Dead Fish
Verified against the spelunky.ai port v0.1.10 on .
The Dead Fish is a skeletal fish in Spelunky Classic that takes the Piranha's place on the Jungle's graveyard levels, biting a swimming player for 1 heart.
On a graveyard level of the Jungle, the water holds Dead Fish where other levels have Piranhas. A Dead Fish leaves a player on dry land alone, but once he's swimming near it, it swims straight at him and bites. Its code is a copy of the Piranha's, less its hunting of other monsters and its bubbles, plus a check for being on screen. With 1 hit point, it dies to any damage, and falls apart into three bones.
Behaviour
#A Dead Fish swims back and forth at 1 pixel per step, turning around where the water ends or a wall is in its way [5]. It always starts out heading right [6].
When the player is swimming within 90 pixels of it, it attacks: it swims straight at him at 1 pixel per step (30 per second), its heading wobbling by a degree each step, and moves only while the way ahead is water [7] [8]. The game moves it in whole pixels on each axis, so on a diagonal it covers 1 pixel across and 1 up or down in a step [9]. When he leaves the water or its range, it stops for 20–40 steps (0.67–1.33 seconds) and then patrols again, heading left or right at random [10] [11]. The clip shows a Dead Fish swimming at the player in a graveyard level's pool, biting him, and the Whip breaking it up.
Unlike a Piranha, a Dead Fish doesn't hunt other monsters in the water, and lets off no bubbles [12] [13].
Out of the water. A Dead Fish whose middle isn't in water turns into a Fish Bone at once [14].
Off screen. A Dead Fish does nothing at all unless it's on screen, or less than 16 pixels off its left or top edge: it doesn't move, and even one killed or out of the water there only falls apart or turns into a Fish Bone once it's back on screen [15]. A Piranha has no such check, and swims on out of sight.
Damage
#When the player touches a Dead Fish without stomping it, he loses 1 heart, is knocked away from it, and blinks, invincible, for 30 steps (1 second) [16]. This is the touch code most monsters share. Unlike a Piranha's, its bite draws no blood [17] [18]. The bite clip shows a bite taking the player from four hearts to three.
Defeating
#A Dead Fish has 1 hit point, so any damage kills it [19]:
| Way | Damage | |
|---|---|---|
| Whip | 1 hit point | [20] |
| Machete | 2 hit points | [20] |
| Stomp (landing on it), except while the player is swimming | 1, plus 1 for every 16 steps of falling; three times that with Spike Shoes | [21] |
| A thrown item moving faster than 2 pixels per step, such as a Rock | 1 | [22] |
| A stunned monster thrown into it | 1 | [23] [24] |
| A Shotgun or Pistol bullet | 4 hit points | [25] |
| A Bomb's explosion | 30 hit points | [26] |
| Being out of the water | Turns it into a Fish Bone | [14] |
The Dead Fish's own step event replaces the one most monsters share, which is where Spikes, Lava and Spear Traps hurt them, so none of those harm a Dead Fish [27].
A swimming player can't stomp it, but one dropping into the water lands on it before he's swimming, and that is a stomp. The clip shows the player dropping into a pool onto a Dead Fish, which falls apart.
A Dead Fish that dies falls apart into three bones [28]. Dead Fish
killed count toward the player's kills, and the screen between levels draws a Dead Fish icon for each; in
the kills table the game writes to stats.txt, which has no row for them, they're added to the Piranha's
row [29]
[30] [31]. One
that turns into a Fish Bone out of the water isn't killed, so it isn't counted.
Locations
#Level generation makes Dead Fish only on graveyard levels, which 1 in 10 levels of the Jungle is [32] [33]. Each water block with no solid block in it has a 1 in 30 chance of a monster, which on a graveyard level is a Dead Fish and on any other Jungle level a Piranha [34].
The level editor has no tile for a Dead Fish, so custom levels can't have them.
Tips
#- A Dead Fish only chases a swimming player, so one crossing above the water isn't chased.
- Dropping into the water right onto a Dead Fish stomps it.
- A Dead Fish freezes as soon as it's off screen, so one left behind stays where it was, and one killed off screen falls apart only when it's seen again.
Trivia
#- The Dead Fish's code never sets its
typestring, so it keeps the parent object's"None"[35]. A Dead Fish that takes the player's last heart isn't counted in the deaths-by-enemy table the game writes tostats.txt, under the Piranha or anywhere else [36]. - Unlike the Piranha's, its code starts an attack without checking that the player is alive, so near a dead swimming player it keeps starting attacks and giving them up the next step [7] [37] [38].
FAQ
#- How much damage does a Dead Fish do in Spelunky Classic?
1 heart per bite, like a Piranha. Each bite also knocks the player back and makes him invincible for 30 steps (1 second).
- Where do Dead Fish live in Spelunky Classic?
In the water of graveyard levels ("THE DEAD ARE RESTLESS!"), which 1 in 10 levels of the Jungle is. There, the 1 in 30 chance for each water block that makes a Piranha elsewhere makes a Dead Fish instead.
- What is the difference between a Dead Fish and a Piranha in Spelunky Classic?
Little. A Dead Fish swims and bites as a Piranha does, but it only hunts the player, not other monsters, only moves while it's on screen, and falls apart into three bones instead of bleeding when it dies.
- How do you kill a Dead Fish in Spelunky Classic?
Hit it once with anything. A Dead Fish has 1 hit point, so a Whip hit, a thrown item, a bullet or a Bomb kills it. A swimming player can't stomp it, but one dropping into the water onto it can.
See also
#- Related
References
#objects/oDeadFish/create.gml:14objects/oEnemy/collision_oCharacter.gml:25objects/oDeadFish/step.gml:56objects/oDeadFish/step.gml:21-63objects/oDeadFish/step.gml:21-35objects/oDeadFish/create.gml:11objects/oDeadFish/step.gml:36-39objects/oDeadFish/step.gml:50-57scripts/moveTo.gml:20-31objects/oDeadFish/step.gml:41-49objects/oDeadFish/step.gml:58-62objects/oPiranha/step.gml:37-51objects/oPiranha/step.gml:123-128objects/oDeadFish/step.gml:70-74objects/oDeadFish/step.gml:1-3objects/oEnemy/collision_oCharacter.gml:14-25objects/oEnemy/collision_oCharacter.gml:55objects/oDeadFish/create.gml:27objects/oDeadFish/step.gml:4-17objects/oEnemy/collision_oWhip.gml:1objects/oEnemy/collision_oCharacter.gml:6-13objects/oItem/step.gml:256-348objects/oEnemy/step.gml:169-180objects/oEnemy/step.gml:252-259objects/oBullet/collision_oEnemy.gml:16objects/oExplosion/collision_oEnemy.gml:14objects/oEnemy/step.gml:63-128objects/oDeadFish/step.gml:6-9objects/oDeadFish/step.gml:10-15objects/oTransition/alarm_0.gml:143-148scripts/scrWriteStats.gml:181-198scripts/scrInitLevel.gml:147-148scripts/scrClearGlobals.gml:56scripts/scrEntityGen.gml:326-336objects/oEnemy/create.gml:4objects/oEnemy/collision_oCharacter.gml:27-51objects/oDeadFish/step.gml:52-62objects/oPiranha/step.gml:32
Source code
objects/oDeadFish/create.gmlobjects/oDeadFish/step.gmlobjects/oEnemy/create.gmlobjects/oEnemy/collision_oCharacter.gmlobjects/oEnemy/collision_oWhip.gmlscripts/scrEntityGen.gml