Finished adding wand powerup
This commit is contained in:
parent
a3caaa0d09
commit
590ccdac68
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 461 B |
6
defs.h
6
defs.h
|
@ -252,7 +252,7 @@
|
|||
/* enums */
|
||||
|
||||
/* sounds */
|
||||
#define MAXFX 51
|
||||
#define MAXFX 52
|
||||
#define FX_SHOOT 0
|
||||
#define FX_SLAM 1
|
||||
#define FX_KILL 2
|
||||
|
@ -304,6 +304,7 @@
|
|||
#define FX_SNAILPREPARE 48
|
||||
#define FX_WHOOSH 49
|
||||
#define FX_BOOM2 50
|
||||
#define FX_WAND 51
|
||||
|
||||
// card suits
|
||||
#define CS_HEART 1
|
||||
|
@ -329,7 +330,7 @@
|
|||
#define S_SLOPE 2
|
||||
|
||||
// Sprite types
|
||||
#define MAXPTYPES 137
|
||||
#define MAXPTYPES 138
|
||||
#define P_PLAYER 0
|
||||
#define P_RAT 1
|
||||
#define P_CHEESE 2
|
||||
|
@ -472,6 +473,7 @@
|
|||
#define P_PLAYER2 134
|
||||
#define P_ARMOUR2 135 // player 2 wearing armour
|
||||
#define P_GNOME 136
|
||||
#define P_WAND 137
|
||||
|
||||
|
||||
#define FLY_FLYTIME 150
|
||||
|
|
43
rc.c
43
rc.c
|
@ -6911,6 +6911,48 @@ int dofruiteffect(sprite_t *pp, sprite_t *s) {
|
|||
}
|
||||
}
|
||||
|
||||
return B_TRUE;
|
||||
} else if (s->id == P_WAND) {
|
||||
sprite_t *s2;
|
||||
|
||||
playfx(FX_WAND);
|
||||
sprintf(tempm, "Polymorph monsters!");
|
||||
addoutlinetext(s->x,s->y - s->img->h/2, TEXTSIZE_POINTS, tempm,&white,&black,POINTSDELAY, TT_NORM);
|
||||
// turn all flowers into explosions
|
||||
for (s2 = sprite; s2 ; s2 = s2->next) {
|
||||
if (ismonster(s2->id)) {
|
||||
int newtype = -1;
|
||||
|
||||
// make it non-angry
|
||||
if (s2->angry) s2->angry = B_FALSE;
|
||||
|
||||
// change to a weaker version
|
||||
switch (s2->id) {
|
||||
case P_SNAKE:
|
||||
case P_TICK:
|
||||
case P_SNAIL:
|
||||
case P_SLUG:
|
||||
newtype = P_RAT;
|
||||
break;
|
||||
case P_FISH:
|
||||
case P_FLY:
|
||||
newtype = P_BEE;
|
||||
break;
|
||||
}
|
||||
|
||||
if (newtype != -1) {
|
||||
// morph
|
||||
s2->dead = D_FINAL;
|
||||
addsprite(newtype, s2->x, s2->y, "created_mon");
|
||||
}
|
||||
//puffs anyway
|
||||
puffin(-1, s2->x - (s2->img->w/2), s2->y, "wandpuff", rand() % 5);
|
||||
puffin(-1, s2->x + (s2->img->w/2), s2->y, "wandpuff", rand() % 5);
|
||||
puffin(-1, s2->x, s2->y - (s2->img->h/2), "wandpuff", rand() % 5);
|
||||
puffin(-1, s2->x, s2->y + (s2->img->h/2), "wandpuff", rand() % 5);
|
||||
}
|
||||
}
|
||||
|
||||
return B_TRUE;
|
||||
} else if (s->id == P_ZAPPOWERUP) {
|
||||
sprite_t *newsp;
|
||||
|
@ -7132,6 +7174,7 @@ int initsound(void) {
|
|||
loadfx(FX_SNAILPREPARE, "longdrum.wav");
|
||||
loadfx(FX_WHOOSH, "whoosh.wav");
|
||||
loadfx(FX_BOOM2, "boom2.wav");
|
||||
loadfx(FX_WAND, "wand.wav");
|
||||
|
||||
// load sound effects
|
||||
for (i = 0; i < MAXFX; i++) {
|
||||
|
|
9
shared.c
9
shared.c
|
@ -1492,6 +1492,9 @@ int loadimagesets(void) {
|
|||
loadspriteimage(P_GNOME,F_WALK1, "sprites/gnome.png");
|
||||
imageset[P_GNOME].numimages = 1;
|
||||
|
||||
loadspriteimage(P_WAND,F_WALK1, "sprites/wand.png");
|
||||
imageset[P_WAND].numimages = 1;
|
||||
|
||||
loadspriteimage(P_ZAPPOWERUP,F_WALK1, "sprites/zapper.png");
|
||||
imageset[P_ZAPPOWERUP].numimages = 1;
|
||||
|
||||
|
@ -2336,6 +2339,7 @@ int isfruit(int id) {
|
|||
case P_ZAPPOWERUP:
|
||||
case P_SKULL:
|
||||
case P_GNOME:
|
||||
case P_WAND:
|
||||
case P_RANDOM:
|
||||
return FT_TEMP;
|
||||
/* flowers */
|
||||
|
@ -2967,7 +2971,7 @@ int loadlevellist(void) {
|
|||
|
||||
int randompowerup(void) {
|
||||
int num;
|
||||
num = rand() % 35;
|
||||
num = rand() % 36;
|
||||
|
||||
switch (num) {
|
||||
case 0:
|
||||
|
@ -3046,6 +3050,8 @@ int randompowerup(void) {
|
|||
return P_RANDOM;
|
||||
case 34:
|
||||
return P_GNOME;
|
||||
case 35:
|
||||
return P_WAND;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3184,6 +3190,7 @@ void setfruitinfo(void) {
|
|||
setinfo(P_ACCORDION, "Accordion", "Makes your nets enormous", "accordion.png");
|
||||
setinfo(P_GUN, "Gunner", "Temporarily equips you with a super powerful machine gun!", "gunner.png");
|
||||
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_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: 876 B |
|
@ -70,6 +70,7 @@
|
|||
<tr><td align=center><img src="img/gunner.png"><br>Gunner</td><td>Temporarily equips you with a super powerful machine gun!</td></tr>
|
||||
<tr><td align=center><img src="img/zapper.png"><br>Bug Zapper</td><td>Zaps nearby enemies with miniature bolts of lightning</td></tr>
|
||||
<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><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