diff --git a/data/levels.dat b/data/levels.dat index dbbbdec..edc4552 100644 --- a/data/levels.dat +++ b/data/levels.dat @@ -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 diff --git a/data/sprites/candle.png b/data/sprites/candle.png new file mode 100644 index 0000000..4ebfbf1 Binary files /dev/null and b/data/sprites/candle.png differ diff --git a/defs.h b/defs.h index 82a606b..3f9cb7b 100644 --- a/defs.h +++ b/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 diff --git a/rc.c b/rc.c index 097b384..8eca39c 100644 --- a/rc.c +++ b/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; diff --git a/shared.c b/shared.c index e4c994a..98f92b6 100644 --- a/shared.c +++ b/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"); diff --git a/website/img/candle.png b/website/img/candle.png new file mode 100644 index 0000000..2086eeb Binary files /dev/null and b/website/img/candle.png differ diff --git a/website/info.html b/website/info.html index 296bc36..77792f9 100644 --- a/website/info.html +++ b/website/info.html @@ -72,6 +72,7 @@