Added new powerup: candle (creates flaming corpses)
This commit is contained in:
parent
09d9ec48f8
commit
07d980df31
|
@ -51,3 +51,4 @@
|
|||
413,level413.dat,Three Parts
|
||||
109,level109.dat,THE END SO FAR
|
||||
99,level99.dat,TEST LEVEL
|
||||
414,level414.dat,NEW LEVEL
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 615 B |
4
defs.h
4
defs.h
|
@ -332,7 +332,7 @@
|
|||
#define S_SLOPE 2
|
||||
|
||||
// Sprite types
|
||||
#define MAXPTYPES 139
|
||||
#define MAXPTYPES 140
|
||||
#define P_PLAYER 0
|
||||
#define P_RAT 1
|
||||
#define P_CHEESE 2
|
||||
|
@ -477,6 +477,7 @@
|
|||
#define P_GNOME 136
|
||||
#define P_WAND 137
|
||||
#define P_WHISTLE 138
|
||||
#define P_CANDLE 139
|
||||
|
||||
|
||||
#define FLY_FLYTIME 150
|
||||
|
@ -535,6 +536,7 @@
|
|||
#define PW_ACCORDION 12 // super long net
|
||||
#define PW_GUNNER 13 // machine gunner
|
||||
#define PW_WHISTLE 14 // whistle
|
||||
#define PW_CANDLE 15 // candle
|
||||
// "virtual" powerup for bosses
|
||||
#define PW_RATSHAKE 20 // shake screen horizontally
|
||||
#define PW_SNAILSHAKE 21 // shake screen vertically
|
||||
|
|
27
rc.c
27
rc.c
|
@ -1566,6 +1566,11 @@ void die(sprite_t *s) {
|
|||
s->iced = 0;
|
||||
s->angry = 0;
|
||||
|
||||
// play effect if they are going to be flaming
|
||||
if (globpowerup == PW_CANDLE) {
|
||||
playfx(FX_METEOR);
|
||||
}
|
||||
|
||||
// check for level clear
|
||||
checklevelend();
|
||||
|
||||
|
@ -2106,6 +2111,14 @@ int movesprite(sprite_t *s) {
|
|||
s->dead = D_LASTBOUNCE;
|
||||
}
|
||||
}
|
||||
|
||||
// if flaming...
|
||||
if (globpowerup == PW_CANDLE) {
|
||||
if (timer % 5 == 0) {
|
||||
// add explosion
|
||||
addsprite(P_SMASH, s->x, s->y, "candle_exp");
|
||||
}
|
||||
}
|
||||
}
|
||||
return B_FALSE;
|
||||
} else if (s->dead == D_LASTBOUNCE) { /* final fall */
|
||||
|
@ -2148,6 +2161,14 @@ int movesprite(sprite_t *s) {
|
|||
s->dead = D_FINAL;
|
||||
puffin(-1, x, y, "nothing_sprd", 0);
|
||||
}
|
||||
|
||||
// if flaming...
|
||||
if (globpowerup == PW_CANDLE) {
|
||||
if (timer % 5 == 0) {
|
||||
// add explosion
|
||||
addsprite(P_SMASH, s->x, s->y, "candle_exp");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return B_FALSE;
|
||||
|
@ -6964,6 +6985,12 @@ int dofruiteffect(sprite_t *pp, sprite_t *s) {
|
|||
|
||||
globpowerup = PW_WHISTLE;
|
||||
|
||||
return B_TRUE;
|
||||
} else if (s->id == P_CANDLE) {
|
||||
playfx(FX_POWERUP);
|
||||
sprintf(tempm, "Flaming Corpses!");
|
||||
addoutlinetext(s->x,s->y - s->img->h/2, TEXTSIZE_POINTS, tempm,&white,&black,POINTSDELAY, TT_NORM);
|
||||
globpowerup = PW_CANDLE;
|
||||
return B_TRUE;
|
||||
} else if (s->id == P_WAND) {
|
||||
sprite_t *s2;
|
||||
|
|
9
shared.c
9
shared.c
|
@ -1496,6 +1496,9 @@ int loadimagesets(void) {
|
|||
loadspriteimage(P_WAND,F_WALK1, "sprites/wand.png");
|
||||
imageset[P_WAND].numimages = 1;
|
||||
|
||||
loadspriteimage(P_CANDLE,F_WALK1, "sprites/candle.png");
|
||||
imageset[P_CANDLE].numimages = 1;
|
||||
|
||||
loadspriteimage(P_WHISTLE,F_WALK1, "sprites/whistle.png");
|
||||
imageset[P_WHISTLE].numimages = 1;
|
||||
|
||||
|
@ -2371,6 +2374,7 @@ int isfruit(int id) {
|
|||
case P_SKULL:
|
||||
case P_GNOME:
|
||||
case P_WAND:
|
||||
case P_CANDLE:
|
||||
case P_WHISTLE:
|
||||
case P_RANDOM:
|
||||
return FT_TEMP;
|
||||
|
@ -3003,7 +3007,7 @@ int loadlevellist(void) {
|
|||
|
||||
int randompowerup(void) {
|
||||
int num;
|
||||
num = rand() % 37;
|
||||
num = rand() % 38;
|
||||
|
||||
switch (num) {
|
||||
case 0:
|
||||
|
@ -3086,6 +3090,8 @@ int randompowerup(void) {
|
|||
return P_WAND;
|
||||
case 36:
|
||||
return P_WHISTLE;
|
||||
case 37:
|
||||
return P_CANDLE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3226,6 +3232,7 @@ void setfruitinfo(void) {
|
|||
setinfo(P_GNOME, "Garden Gnome", "This tricky little gnome has rigged explosive devices to all flowers on the level - when collected he will detonate them!", "gnome.png");
|
||||
setinfo(P_WAND, "Magic Wand", "A wave of the magic wand will magically polymorph all monsters into weaker ones.", "wand.png");
|
||||
setinfo(P_WHISTLE, "Whistle", "Produces an extremely loud, shrill whistling noise which wakes the black cloud of doom! In its angered state, the black cloud will slaughter both friend and foe alike.", "whistle.png");
|
||||
setinfo(P_CANDLE, "Candle", "Once collected, the candle will cause all enemy corpses to burst into flames, igniting any other enemy which they touch.", "candle.png");
|
||||
setinfo(P_ZAPPOWERUP, "Bug Zapper", "Zaps nearby enemies with miniature bolts of lightning", "zapper.png");
|
||||
setinfo(P_SKULL, "Skull", "Avoid these at all costs! The skull will cause you to lose all net powerups.", "skull.png");
|
||||
setinfo(P_CLOVER, "4-Leaf Clover", "Increases your luck...", "clover.png");
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -72,6 +72,7 @@
|
|||
<tr><td align=center><img src="img/gnome.png"><br>Garden Gnome</td><td>This tricky little gnome has rigged explosive devices to all flowers on the level - when collected he will detonate them!</td></tr>
|
||||
<tr><td align=center><img src="img/wand.png"><br>Magic Wand</td><td>A wave of the magic wand will magically polymorph all monsters into weaker ones.</td></tr>
|
||||
<tr><td align=center><img src="img/whistle.png"><br>Whistle</td><td>Produces an extremely loud, shrill whistling noise which wakes the black cloud of doom! In its angered state, the black cloud will slaughter both friend and foe alike.</td></tr>
|
||||
<tr><td align=center><img src="img/candle.png"><br>Candle</td><td>Once collected, the candle will cause all enemy corpses to burst into flames, igniting any other enemy which they touch.</td></tr>
|
||||
<tr><td align=center><font color="ff00ff"><b><big>?</big></b></font><br>Random</td><td>Gives you a random effect...</td></tr>
|
||||
<tr bgcolor="#ffff00"><th colspan=2>Super Powerups</th></tr>
|
||||
<tr><td align=center><img src="img/bigspeed.png"><br>Big Speed Up</td><td>Makes you walk faster, permenantly!</td></tr>
|
||||
|
|
Loading…
Reference in New Issue