Initial code for King Fly

This commit is contained in:
Rob Pearce 2008-11-25 01:41:15 +00:00
parent 8164582267
commit f327d1cf49
7 changed files with 36 additions and 1 deletions

View File

@ -6,6 +6,7 @@ endhelp
monsters monsters
0 4 14 0 4 14
134 35 14 134 35 14
152 19 14
endmonsters endmonsters
exitdir 1 exitdir 1
61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,

BIN
data/sprites/kingfly.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

14
defs.h
View File

@ -237,6 +237,17 @@
#define KSS_JUMPING 6 // jumping, snails turn to slugs #define KSS_JUMPING 6 // jumping, snails turn to slugs
#define KSS_PAUSE3 7 // pause after jumping #define KSS_PAUSE3 7 // pause after jumping
// king fly
#define KF_FLYTIME 300
// king fly states
#define KFS_FLY1 0
#define KFS_HORZPUSH 1
#define KFS_HORZ 2
#define KFS_HORZPULL 3
#define KFS_FLY2 4
#define KFS_VERTPUSH 5
#define KFS_VERT 6
#define KFS_VERTPULL 7
// bell states // bell states
#define BELL_DONESOUND 1 #define BELL_DONESOUND 1
@ -384,7 +395,7 @@
#define S_SLOPE 2 #define S_SLOPE 2
// Sprite types // Sprite types
#define MAXPTYPES 152 #define MAXPTYPES 153
#define P_PLAYER 0 #define P_PLAYER 0
#define P_RAT 1 #define P_RAT 1
#define P_CHEESE 2 #define P_CHEESE 2
@ -542,6 +553,7 @@
#define P_CAMERA 149 #define P_CAMERA 149
#define P_WINGBOOTS 150 #define P_WINGBOOTS 150
#define P_BIGUMBRELLA 151 #define P_BIGUMBRELLA 151
#define P_KINGFLY 152
#define FLY_FLYTIME 150 #define FLY_FLYTIME 150

View File

@ -791,6 +791,10 @@ void setdefaults(sprite_t *s) {
s->timer1 = KSS_WALK1; s->timer1 = KSS_WALK1;
s->timer2 = KS_WALKTIME; s->timer2 = KS_WALKTIME;
s->timer3 = 0; s->timer3 = 0;
} else if (s->id == P_KINGFLY) {
s->timer1 = KFS_FLY1;
s->timer2 = KF_FLYTIME;
s->timer3 = 0;
} }
if (isboss(s->id)) { if (isboss(s->id)) {
s->lives = getbosshealth(s->id); // health s->lives = getbosshealth(s->id); // health
@ -1352,6 +1356,16 @@ int loadimagesets(void) {
/* next 3 are auto genesnailed */ /* next 3 are auto genesnailed */
imageset[P_KINGSNAIL].numimages = 8; imageset[P_KINGSNAIL].numimages = 8;
loadspriteimage(P_KINGFLY,F_WALK1, "sprites/kingfly.png");
loadspriteimage(P_KINGFLY,F_JUMP, "sprites/kingflyjump.png");
loadspriteimage(P_KINGFLY,F_FALL, "sprites/kingflyjump.png");
loadspriteimage(P_KINGFLY,F_CAUGHT, "sprites/kingfly.png");
loadspriteimage(P_KINGFLY,F_DEAD, "sprites/kingflydead.png");
/* next 3 are auto geneflyed */
imageset[P_KINGFLY].numimages = 8;
loadspriteimage(P_KSSHELL,F_WALK1, "sprites/kingsnail_shell.png"); loadspriteimage(P_KSSHELL,F_WALK1, "sprites/kingsnail_shell.png");
imageset[P_KSSHELL].numimages = 1; imageset[P_KSSHELL].numimages = 1;
// manually do flipped one // manually do flipped one
@ -2922,6 +2936,7 @@ int ismonster(int id) {
case P_BLACKCLOUD: case P_BLACKCLOUD:
case P_KINGRAT: case P_KINGRAT:
case P_KINGSNAIL: case P_KINGSNAIL:
case P_KINGFLY:
return MT_BOSS; return MT_BOSS;
} }
@ -3261,6 +3276,7 @@ int isboss(int monid) {
switch (monid) { switch (monid) {
case P_KINGRAT: case P_KINGRAT:
case P_KINGSNAIL: case P_KINGSNAIL:
case P_KINGFLY:
return B_TRUE; return B_TRUE;
default: default:
return B_FALSE; return B_FALSE;
@ -3274,6 +3290,7 @@ int isnettable(sprite_t *s) {
case P_BLACKCLOUD: case P_BLACKCLOUD:
case P_KINGRAT: case P_KINGRAT:
case P_KINGSNAIL: case P_KINGSNAIL:
case P_KINGFLY:
return B_FALSE; return B_FALSE;
default: default:
return B_TRUE; return B_TRUE;
@ -3293,6 +3310,8 @@ int getbosshealth(int mid) {
return 8; return 8;
case P_KINGSNAIL: case P_KINGSNAIL:
return 8; return 8;
case P_KINGFLY:
return 8;
} }
return 0; return 0;
} }
@ -3412,6 +3431,8 @@ void setfruitinfo(void) {
setinfo(P_KINGSNAIL, "King Snail", "The absolute ruler of the snail kingdom is far too large and heavy to catch in a net. In addition, its shell provides protection against all attacks, leaving only its head vulnerable. While King Snail is too proud to chase down enemies itself, it can use its snail army to destroy its foes.", "kingsnail.png"); setinfo(P_KINGSNAIL, "King Snail", "The absolute ruler of the snail kingdom is far too large and heavy to catch in a net. In addition, its shell provides protection against all attacks, leaving only its head vulnerable. While King Snail is too proud to chase down enemies itself, it can use its snail army to destroy its foes.", "kingsnail.png");
setinfo(P_KINGFLY, "King Fly", "King Fly is quite literally the lord of the flies. Far from the timid garden-variety fly, King Fly will roam around with its entourage of underlings in tow, running down anything in its path!", "kingfly.png");
setinfo(P_SNAIL, "Snail", "Snails are slow moving but tough. When attacked normally they will not die, but simply lose their shell and become a slug. The safest way to take them out is to slam another monster into them, thus killing them instantly.", "snail.png"); setinfo(P_SNAIL, "Snail", "Snails are slow moving but tough. When attacked normally they will not die, but simply lose their shell and become a slug. The safest way to take them out is to slam another monster into them, thus killing them instantly.", "snail.png");
setinfo(P_SLUG, "Slug", "Slugs are faster moving than snails and capable of launching themselves through the air at their prey!", "slug.png"); setinfo(P_SLUG, "Slug", "Slugs are faster moving than snails and capable of launching themselves through the air at their prey!", "slug.png");

View File

@ -18,6 +18,7 @@
<tr><td align=center><img src="img/cloud.png"><br>Cloud of Doom</td><td>This unkillable cloud will appear if you spend too much time on one level. Beware, as the only way to defeat the cloud of doom is to complete the level before it grows too large to handle!</td></tr> <tr><td align=center><img src="img/cloud.png"><br>Cloud of Doom</td><td>This unkillable cloud will appear if you spend too much time on one level. Beware, as the only way to defeat the cloud of doom is to complete the level before it grows too large to handle!</td></tr>
<tr><td align=center><img src="img/kingrat.png"><br>King Rat</td><td>This mighty creature is the ruler of the rats, and impervious to the player's net. It can only be harmed by slamming another monster into it! King Rat will roam the level searching for a player, and upon spotting them will charge at high speed.</td></tr> <tr><td align=center><img src="img/kingrat.png"><br>King Rat</td><td>This mighty creature is the ruler of the rats, and impervious to the player's net. It can only be harmed by slamming another monster into it! King Rat will roam the level searching for a player, and upon spotting them will charge at high speed.</td></tr>
<tr><td align=center><img src="img/kingsnail.png"><br>King Snail</td><td>The absolute ruler of the snail kingdom is far too large and heavy to catch in a net. In addition, its shell provides protection against all attacks, leaving only its head vulnerable. While King Snail is too proud to chase down enemies itself, it can use its snail army to destroy its foes.</td></tr> <tr><td align=center><img src="img/kingsnail.png"><br>King Snail</td><td>The absolute ruler of the snail kingdom is far too large and heavy to catch in a net. In addition, its shell provides protection against all attacks, leaving only its head vulnerable. While King Snail is too proud to chase down enemies itself, it can use its snail army to destroy its foes.</td></tr>
<tr><td align=center><img src="img/kingfly.png"><br>King Fly</td><td>King Fly is quite literally the lord of the flies. Far from the timid garden-variety fly, King Fly will roam around with its entourage of underlings in tow, running down anything in its path!</td></tr>
</table> </table>
<center><h2>Power-Ups</h2> <center><h2>Power-Ups</h2>
<table border=1> <table border=1>