Added new powerup: kangaroo
This commit is contained in:
parent
a5d477197c
commit
b718ef380b
Binary file not shown.
After Width: | Height: | Size: 1011 B |
4
defs.h
4
defs.h
|
@ -380,7 +380,7 @@
|
|||
#define S_SLOPE 2
|
||||
|
||||
// Sprite types
|
||||
#define MAXPTYPES 148
|
||||
#define MAXPTYPES 149
|
||||
#define P_PLAYER 0
|
||||
#define P_RAT 1
|
||||
#define P_CHEESE 2
|
||||
|
@ -534,6 +534,7 @@
|
|||
#define P_SMALLANCHOR 145
|
||||
#define P_MAGNET 146
|
||||
#define P_BADMAGNET 147
|
||||
#define P_KANGAROO 148
|
||||
|
||||
|
||||
#define FLY_FLYTIME 150
|
||||
|
@ -596,6 +597,7 @@
|
|||
#define PW_ANCHOR 16 // anchor
|
||||
#define PW_MAGNET 17 // magnet
|
||||
#define PW_BADMAGNET 18 // badmagnet
|
||||
#define PW_KANGAROO 19 // kangaroo
|
||||
// "virtual" powerup for bosses
|
||||
#define PW_RATSHAKE 20 // shake screen horizontally
|
||||
#define PW_SNAILSHAKE 21 // shake screen vertically
|
||||
|
|
10
rc.c
10
rc.c
|
@ -1421,6 +1421,8 @@ void jump(sprite_t *s, int dir) {
|
|||
s->jumping = 1;
|
||||
if (s->climbing) {
|
||||
s->jumpspeed = 3;
|
||||
} else if (s->powerup == PW_KANGAROO) {
|
||||
s->jumpspeed = 7;
|
||||
} else if (s->ontramp) {
|
||||
s->jumpspeed = 7;
|
||||
} else {
|
||||
|
@ -1451,7 +1453,7 @@ void jump(sprite_t *s, int dir) {
|
|||
s->recoiling = B_FALSE;
|
||||
} else {
|
||||
// play sound effect
|
||||
if (s->ontramp) {
|
||||
if ((s->ontramp) || (s->powerup == PW_KANGAROO)) {
|
||||
playfx(FX_SPRING);
|
||||
} else {
|
||||
playfx(FX_JUMP);
|
||||
|
@ -7321,6 +7323,12 @@ int dofruiteffect(sprite_t *pp, sprite_t *s) {
|
|||
addoutlinetext(s->x,s->y - s->img->h/2, TEXTSIZE_POINTS, tempm,&white,&black,POINTSDELAY, TT_NORM);
|
||||
pp->powerup = PW_MAGNET;
|
||||
return B_TRUE;
|
||||
} else if (s->id == P_KANGAROO) {
|
||||
playfx(FX_POWERUP);
|
||||
sprintf(tempm, "Kangaroo jumps!");
|
||||
addoutlinetext(s->x,s->y - s->img->h/2, TEXTSIZE_POINTS, tempm,&white,&black,POINTSDELAY, TT_NORM);
|
||||
pp->powerup = PW_KANGAROO;
|
||||
return B_TRUE;
|
||||
} else if (s->id == P_BADMAGNET) {
|
||||
playfx(FX_SKULL);
|
||||
sprintf(tempm, "Repel fruits!");
|
||||
|
|
9
shared.c
9
shared.c
|
@ -1559,6 +1559,9 @@ int loadimagesets(void) {
|
|||
loadspriteimage(P_BADMAGNET,F_WALK1, "sprites/badmagnet.png");
|
||||
imageset[P_BADMAGNET].numimages = 1;
|
||||
|
||||
loadspriteimage(P_KANGAROO,F_WALK1, "sprites/kangaroo.png");
|
||||
imageset[P_KANGAROO].numimages = 1;
|
||||
|
||||
loadspriteimage(P_ZAPPOWERUP,F_WALK1, "sprites/zapper.png");
|
||||
imageset[P_ZAPPOWERUP].numimages = 1;
|
||||
|
||||
|
@ -2454,6 +2457,7 @@ int isfruit(int id) {
|
|||
case P_RANDOM:
|
||||
case P_MAGNET:
|
||||
case P_BADMAGNET:
|
||||
case P_KANGAROO:
|
||||
return FT_TEMP;
|
||||
/* flowers */
|
||||
case P_FLOWERYELLOW:
|
||||
|
@ -3097,7 +3101,7 @@ int loadlevellist(void) {
|
|||
|
||||
int randompowerup(void) {
|
||||
int num;
|
||||
num = rand() % 41;
|
||||
num = rand() % 42;
|
||||
|
||||
switch (num) {
|
||||
case 0:
|
||||
|
@ -3188,6 +3192,8 @@ int randompowerup(void) {
|
|||
return P_MAGNET;
|
||||
case 40:
|
||||
return P_BADMAGNET;
|
||||
case 41:
|
||||
return P_KANGAROO;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3338,6 +3344,7 @@ void setfruitinfo(void) {
|
|||
setinfo(P_ANCHOR, "Anchor", "The extremely heavy anchor will weigh down enemies, preventing them from jumping or flying.", "anchor.png");
|
||||
setinfo(P_MAGNET, "Magnet", "Collecting this powerup will align the magnetic forces of the earth in your favour, attracting all nearby fruits towards you.", "magnet.png");
|
||||
setinfo(P_BADMAGNET, "Red Skull", "This skull curses you and will repel fruits away from you, denying you access to them!", "badmagnet.png");
|
||||
setinfo(P_KANGAROO, "Kangaroo", "For the remainder of the current level, your jumping ability is increased to that of a kangaroo!", "kangaroo.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_CLOVER, "4-Leaf Clover", "Increases your luck...", "clover.png");
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
</tr><tr><td width=10% align=center><img src="img/pizza.png"><br>Pizza</td><td width=40%>Worth 2500 points.</td>
|
||||
<td width=10% align=center><img src="img/sundae.png"><br>Sundae</td><td width=40%>Worth 3000 points.</td>
|
||||
</tr><tr><td width=10% align=center><img src="img/cake.png"><br>Cake</td><td width=40%>Worth 3500 points.</td>
|
||||
<td width=10% align=center><img src="img/chocolate.png"><br>Chocolate</td><td width=40%>Worth 4000 points.</td>
|
||||
<td width=10% align=center><img src="img/chocolate.png"><br>Chocolate</td><td width=40%>Worth 8000 points.</td>
|
||||
</tr><tr><td width=10% align=center><img src="img/flower-yellow.png"><br>Sunflower</td><td width=40%>Worth 5 points.</td>
|
||||
<td width=10% align=center><img src="img/flower-red.png"><br>Tulip</td><td width=40%>Worth 10 points.</td>
|
||||
</tr><tr><td width=10% align=center><img src="img/flower-purple.png"><br>Orchid</td><td width=40%>Worth 30 points.</td>
|
||||
|
@ -80,8 +80,9 @@
|
|||
</tr><tr><td align=center><img src="img/anchor.png"><br>Anchor</td><td>The extremely heavy anchor will weigh down enemies, preventing them from jumping or flying.</td>
|
||||
<td align=center><img src="img/magnet.png"><br>Magnet</td><td>Collecting this powerup will align the magnetic forces of the earth in your favour, attracting all nearby fruits towards you.</td>
|
||||
</tr><tr><td align=center><img src="img/badmagnet.png"><br>Red Skull</td><td>This skull curses you and will repel fruits away from you, denying you access to them!</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/kangaroo.png"><br>Kangaroo</td><td>For the remainder of the current level, your jumping ability is increased to that of a kangaroo!</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></table>
|
||||
|
|
Loading…
Reference in New Issue