Modified behaviour of green skull

This commit is contained in:
Rob Pearce 2008-11-24 21:47:52 +00:00
parent 645522bff6
commit 214d011584
4 changed files with 14 additions and 6 deletions

2
defs.h
View File

@ -160,6 +160,7 @@
#define SLUGINVULNTIME 50 // how long a new slug stays invulnerable for #define SLUGINVULNTIME 50 // how long a new slug stays invulnerable for
#define SHIELDTIME 600 // how long a shield lasts #define SHIELDTIME 600 // how long a shield lasts
#define FALLSPEED 4 // terminal velocity of falling sprites #define FALLSPEED 4 // terminal velocity of falling sprites
#define SMALLNETSPEED 6 // how fast the player's net moves with skull
#define NETSPEED 9 // how fast the player's net moves #define NETSPEED 9 // how fast the player's net moves
#define BIGNETSPEED 12 // how fast the player's net moves with bignet #define BIGNETSPEED 12 // how fast the player's net moves with bignet
#define ACCNETSPEED 28 // how fast the player's net moves with accordion #define ACCNETSPEED 28 // how fast the player's net moves with accordion
@ -602,6 +603,7 @@
#define PW_BADMAGNET 18 // badmagnet #define PW_BADMAGNET 18 // badmagnet
#define PW_JETPACK 19 // kangaroo #define PW_JETPACK 19 // kangaroo
#define PW_CAMERA 20 // camera #define PW_CAMERA 20 // camera
#define PW_SMALLNET 21 // skull
// "virtual" powerup for bosses // "virtual" powerup for bosses
#define PW_RATSHAKE 50 // shake screen horizontally #define PW_RATSHAKE 50 // shake screen horizontally
#define PW_SNAILSHAKE 51 // shake screen vertically #define PW_SNAILSHAKE 51 // shake screen vertically

14
rc.c
View File

@ -5796,6 +5796,9 @@ void drawnetting(sprite_t *s) {
int ii; int ii;
SDL_Color *col1,*col2; SDL_Color *col1,*col2;
dist = (s->slamangle * (180/M_PI))/2; dist = (s->slamangle * (180/M_PI))/2;
if (s->powerup == PW_SMALLNET) {
dist /= 2;
}
s->netxstart = s->x + cos(s->slamangle-(180*(M_PI/180)))*dist*s->dir; s->netxstart = s->x + cos(s->slamangle-(180*(M_PI/180)))*dist*s->dir;
s->netystart = s->y + sin(s->slamangle-(180*(M_PI/180)))*dist; s->netystart = s->y + sin(s->slamangle-(180*(M_PI/180)))*dist;
@ -6448,7 +6451,7 @@ void dogravity(sprite_t *s) {
s->netting++; s->netting++;
if ((s->powerup == PW_ACCORDION) || (s->netting % 2 == 0)) { if ((s->powerup == PW_ACCORDION) || (s->netting % 2 == 0)) {
if (s->netspeed > -NETSPEED) { if ((s->netlen > 0) && (s->netspeed > -NETSPEED)) {
s->netspeed--; s->netspeed--;
} else { } else {
if (s->netlen <= 0) { if (s->netlen <= 0) {
@ -6471,6 +6474,9 @@ void dogravity(sprite_t *s) {
dist = (s->slamangle * (180/M_PI))/2; dist = (s->slamangle * (180/M_PI))/2;
if (s->powerup == PW_SMALLNET) {
dist /= 2;
}
netx = s->x + cos(s->slamangle-(180*(M_PI/180)))*dist*s->dir; netx = s->x + cos(s->slamangle-(180*(M_PI/180)))*dist*s->dir;
nety = s->y + sin(s->slamangle-(180*(M_PI/180)))*dist; nety = s->y + sin(s->slamangle-(180*(M_PI/180)))*dist;
if ((netx >= (640-TILEW)) || (netx <= TILEW)) { if ((netx >= (640-TILEW)) || (netx <= TILEW)) {
@ -7499,9 +7505,7 @@ int dofruiteffect(sprite_t *pp, sprite_t *s) {
playfx(FX_SKULL); playfx(FX_SKULL);
sprintf(tempm, "Power Down!"); sprintf(tempm, "Power Down!");
addoutlinetext(s->x,s->y - s->img->h/2, TEXTSIZE_POINTS, tempm,&black,&grey,POINTSDELAY, TT_NORM); addoutlinetext(s->x,s->y - s->img->h/2, TEXTSIZE_POINTS, tempm,&black,&grey,POINTSDELAY, TT_NORM);
pp->netmax = 1; pp->powerup = PW_SMALLNET;
pp->netsticky = B_FALSE;
pp->netbig = B_FALSE;
return B_TRUE; return B_TRUE;
} else if (s->id == P_HELP) { } else if (s->id == P_HELP) {
playfx(FX_POWERUP); playfx(FX_POWERUP);
@ -9764,6 +9768,8 @@ void trytoshoot(sprite_t *pl) {
adjustx(pl, F_SHOOT); adjustx(pl, F_SHOOT);
if (pl->powerup == PW_ACCORDION) { if (pl->powerup == PW_ACCORDION) {
pl->netspeed = ACCNETSPEED; pl->netspeed = ACCNETSPEED;
} else if (pl->powerup == PW_SMALLNET) {
pl->netspeed = SMALLNETSPEED;
} else if (pl->netbig) { } else if (pl->netbig) {
pl->netspeed = BIGNETSPEED; pl->netspeed = BIGNETSPEED;
} else { } else {

View File

@ -3354,7 +3354,7 @@ void setfruitinfo(void) {
setinfo(P_JETPACK, "Jetpack", "For the remainder of the current level, the jetpack's thrust will add to your jumping ability!", "jetpack.png"); setinfo(P_JETPACK, "Jetpack", "For the remainder of the current level, the jetpack's thrust will add to your jumping ability!", "jetpack.png");
setinfo(P_CAMERA, "Camera", "Creates a bright flash of light, blinding all enemies.", "camera.png"); setinfo(P_CAMERA, "Camera", "Creates a bright flash of light, blinding all enemies.", "camera.png");
setinfo(P_ZAPPOWERUP, "Bug Zapper", "Zaps nearby enemies with miniature bolts of lightning", "zapper.png"); setinfo(P_ZAPPOWERUP, "Bug Zapper", "Zaps nearby enemies with miniature bolts of lightning", "zapper.png");
setinfo(P_SKULL, "Green Skull", "Avoid these at all costs! The green skull will cause you to lose all net powerups.", "skull.png"); setinfo(P_SKULL, "Green Skull", "Avoid these at all costs! The green skull will shrink your net to miniscule proportions for the remainder of the level.", "skull.png");
setinfo(P_CLOVER, "4-Leaf Clover", "Increases your luck...", "clover.png"); setinfo(P_CLOVER, "4-Leaf Clover", "Increases your luck...", "clover.png");
setinfo(P_RANDOM, "Random", "Gives you a random effect...", "random.png"); setinfo(P_RANDOM, "Random", "Gives you a random effect...", "random.png");

View File

@ -70,7 +70,7 @@
</tr><tr><td align=center><img src="img/tap.png"><br>Tap</td><td>The leaky tap will flood the level with water for 20 seconds, allowing you to access hard to reach areas.</td> </tr><tr><td align=center><img src="img/tap.png"><br>Tap</td><td>The leaky tap will flood the level with water for 20 seconds, allowing you to access hard to reach areas.</td>
<td align=center><img src="img/clover.png"><br>4-Leaf Clover</td><td>Increases your luck...</td> <td align=center><img src="img/clover.png"><br>4-Leaf Clover</td><td>Increases your luck...</td>
</tr><tr><td align=center><img src="img/accordion.png"><br>Accordion</td><td>Makes your nets enormous</td> </tr><tr><td align=center><img src="img/accordion.png"><br>Accordion</td><td>Makes your nets enormous</td>
<td align=center><img src="img/skull.png"><br>Green Skull</td><td>Avoid these at all costs! The green skull will cause you to lose all net powerups.</td> <td align=center><img src="img/skull.png"><br>Green Skull</td><td>Avoid these at all costs! The green skull will shrink your net to miniscule proportions for the remainder of the level.</td>
</tr><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/gunner.png"><br>Gunner</td><td>Temporarily equips you with a super powerful machine gun!</td>
<td align=center><img src="img/zapper.png"><br>Bug Zapper</td><td>Zaps nearby enemies with miniature bolts of lightning</td> <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/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>