Added new powerup: top hat
This commit is contained in:
parent
7b0a859fe6
commit
9868a0f105
6
defs.h
6
defs.h
|
@ -423,7 +423,7 @@
|
|||
#define S_SLOPE 2
|
||||
|
||||
// Sprite types
|
||||
#define MAXPTYPES 162
|
||||
#define MAXPTYPES 163
|
||||
#define P_PLAYER 0
|
||||
#define P_RAT 1
|
||||
#define P_CHEESE 2
|
||||
|
@ -591,6 +591,7 @@
|
|||
#define P_ANT2 159
|
||||
#define P_ANT3 160
|
||||
#define P_FIREBALL 161
|
||||
#define P_TOPHAT 162
|
||||
|
||||
|
||||
#define FLY_FLYTIME 150
|
||||
|
@ -657,7 +658,8 @@
|
|||
#define PW_CAMERA 20 // camera
|
||||
#define PW_SMALLNET 21 // skull
|
||||
#define PW_PILL 22 // pill
|
||||
#define PW_RAYGUN 23 // pill
|
||||
#define PW_RAYGUN 23 // ray gun
|
||||
#define PW_TOPHAT 24 // top hat
|
||||
// "virtual" powerup for bosses
|
||||
#define PW_RATSHAKE 50 // shake screen horizontally
|
||||
#define PW_SNAILSHAKE 51 // shake screen vertically
|
||||
|
|
21
rc.c
21
rc.c
|
@ -7713,6 +7713,12 @@ void dogravity(sprite_t *s) {
|
|||
/* will become a fruit when it finishes dying */
|
||||
if (boss) {
|
||||
s2->willbecome = -1;
|
||||
} else if (s->powerup == PW_TOPHAT) {
|
||||
/* all fruits are powerups! */
|
||||
s2->willbecome = poweruptypes[curpoweruptype[getpnum(s)]];
|
||||
if (poweruptypes[++(curpoweruptype[getpnum(s)])] == -1) {
|
||||
curpoweruptype[getpnum(s)] = 0;
|
||||
}
|
||||
} else {
|
||||
s2->willbecome = fruittypes[curfruittype];
|
||||
/* increment fruit type */
|
||||
|
@ -7861,7 +7867,12 @@ void dogravity(sprite_t *s) {
|
|||
} else if (s->powerup == PW_MACE) {
|
||||
s2->willbecome = P_DIAMOND;
|
||||
} else { // should never happen
|
||||
|
||||
if (s->powerup == PW_TOPHAT) {
|
||||
s2->willbecome = poweruptypes[curpoweruptype[getpnum(s)]];
|
||||
if (poweruptypes[++(curpoweruptype[getpnum(s)])] == -1) {
|
||||
curpoweruptype[getpnum(s)] = 0;
|
||||
}
|
||||
} else {
|
||||
/* will become a fruit when it finishes dying */
|
||||
s2->willbecome = fruittypes[curfruittype];
|
||||
/* increment fruit type */
|
||||
|
@ -7870,6 +7881,7 @@ void dogravity(sprite_t *s) {
|
|||
}
|
||||
fruittime = gtime;
|
||||
}
|
||||
}
|
||||
if (s2->id == P_SNAIL) {
|
||||
// turn into a slug so that it really dies
|
||||
s2->id = P_SLUG;
|
||||
|
@ -8390,6 +8402,13 @@ int dofruiteffect(sprite_t *pp, sprite_t *s) {
|
|||
pp->powerup = PW_RAYGUN;
|
||||
pp->timer1 = 5; // # of shots
|
||||
return B_TRUE;
|
||||
} else if (s->id == P_TOPHAT) {
|
||||
// Top Hat
|
||||
playfx(FX_POWERUP);
|
||||
sprintf(tempm, "Top Hat!");
|
||||
addoutlinetext(s->x,s->y - s->img->h/2, TEXTSIZE_POINTS, tempm,&white,&black,POINTSDELAY, TT_NORM);
|
||||
pp->powerup = PW_TOPHAT;
|
||||
return B_TRUE;
|
||||
} else if (s->id == P_CANNONPOWERUP) {
|
||||
sprite_t *newsp;
|
||||
// cannon
|
||||
|
|
8
shared.c
8
shared.c
|
@ -1659,6 +1659,9 @@ int loadimagesets(void) {
|
|||
loadspriteimage(P_RAYGUN,F_WALK1, "sprites/raygun.png");
|
||||
imageset[P_RAYGUN].numimages = 1;
|
||||
|
||||
loadspriteimage(P_TOPHAT,F_WALK1, "sprites/tophat.png");
|
||||
imageset[P_TOPHAT].numimages = 1;
|
||||
|
||||
loadspriteimage(P_GUN,F_WALK1, "sprites/gunner.png");
|
||||
imageset[P_GUN].numimages = 1;
|
||||
|
||||
|
@ -2593,6 +2596,7 @@ int isabilitypowerup(int id) {
|
|||
case P_JETPACK:
|
||||
case P_PILL:
|
||||
case P_RAYGUN:
|
||||
case P_TOPHAT:
|
||||
return B_TRUE;
|
||||
}
|
||||
return B_FALSE;
|
||||
|
@ -2690,6 +2694,7 @@ int isfruit(int id) {
|
|||
case P_CAMERA:
|
||||
case P_PILL:
|
||||
case P_RAYGUN:
|
||||
case P_TOPHAT:
|
||||
return FT_TEMP;
|
||||
/* flowers */
|
||||
case P_FLOWERYELLOW:
|
||||
|
@ -3487,6 +3492,8 @@ int randompowerup(void) {
|
|||
return P_PILL;
|
||||
case 45:
|
||||
return P_RAYGUN;
|
||||
case 46:
|
||||
return P_TOPHAT;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3617,6 +3624,7 @@ void setfruitinfo(void) {
|
|||
|
||||
setinfo(P_PILL, "Pill", "Eating this pill will cause you to enter a hyperactive state, moving at four times your standard speed!", "pill.png");
|
||||
setinfo(P_RAYGUN, "Ray Gun", "Alien in origin, the ray gun contains enough charge for five shots of burning plasma.", "raygun.png");
|
||||
setinfo(P_TOPHAT, "Top Hat", "Players wearing the top hat will find that every itam which appears will now be a power-up!", "tophat.png");
|
||||
|
||||
setinfo(P_BOXING, "Boxing Glove", "Your net will punch monsters, killing them instantly.", "boxing.png");
|
||||
setinfo(P_MACEPOWERUP, "Mace", "Slamming your net will cause a lethal explosion!", "macepowerup.png");
|
||||
|
|
|
@ -104,8 +104,9 @@
|
|||
</tr><tr><td align=center><img src="img/camera.png"><br>Camera</td><td>Creates a bright flash of light, blinding all enemies.</td>
|
||||
<td align=center><img src="img/pill.png"><br>Pill</td><td>Eating this pill will cause you to enter a hyperactive state, moving at four times your standard speed!</td>
|
||||
</tr><tr><td align=center><img src="img/raygun.png"><br>Ray Gun</td><td>Alien in origin, the ray gun contains enough charge for five shots of burning plasma.</td>
|
||||
<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=4>Super Powerups</th></tr>
|
||||
<td align=center><img src="img/tophat.png"><br>Top Hat</td><td>Players wearing the top hat will find that every itam which appears will now be a power-up!</td>
|
||||
</tr><tr><td align=center><font color="ff00ff"><b><big>?</big></b></font><br>Random</td><td>Gives you a random effect...</td>
|
||||
<td colspan=2> </td></tr><tr bgcolor="#ffff00"><th colspan=4>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>
|
||||
<td align=center><img src="img/bigscuba.png"><br>Big Scuba Mask</td><td>Permenantly gives you fast underwater movement.</td>
|
||||
</tr><tr><td align=center><img src="img/superumbrella.png"><br>Big Umbrella</td><td>Bestows you with an umbrella which can survive death!</td>
|
||||
|
|
Loading…
Reference in New Issue