That's a really impressive bit of scripting
I don't know exactly how you intend it to behave, so I'm going to start by listing the behaviours I observe, and you can tell me whether I've got them right and whether any of them are bugs. (Also, this is a first stab at a list of what should be taught in an introduction level.)
* Hydra is a required target.
* Hydra can only be stabbed on a middle (non-head, non-tail) tile. Corollary: A length-2 hydra is invulnerable to stabbing and makes the room unsolvable unless some other means of killing is present.
* A length-3 hydra dies to a single stab, and one of any length >
3 can be shortened by 2, so any odd-length hydra can be completely removed.
* An length-2n hydra can be shortened by 2 or split into two hydras totalling (2n - 1), which is odd, therefore one of the hydras is still even. Therefore if a room starts with an even-length hydra, it
cannot be completely removed by Beethro-stabs alone.
* Beethro and another entity can multi-stab, allowing killing a length-4 hydra or reducing an even hydra to two odd hydras.
* Hydras do
not hold down rafts, and any tile can be sunk. Sinking the head causes the next tile to become a head, allowing a hydra to be changed from even to odd. (I suppose this could be expected, given you already have the splitting allowing it to grow a new head from any body tile. Also, I don't know whether hyperme plans to add "
Holds down rafts"
as part of his new "
Behaviour"
command.)
* Unlike normal snakes, hydras rank all four adjacent tiles by distance to their target, preferring to minimise whichever of horizontal and vertical distance is greater (like a Seep on orthosquares). This makes them much more aggressive, and harder to manipulate at a distance.
* Hydras follow "
natural target"
(can be fooled by decoys, don't move if Beethro is invisible, etc.)
* Firetraps will take out a middle tile of a hydra just like a stab, and can instantly kill one if they get its head.
* Hydras move
after puffs (which seems undesirable, for consistency). They can destroy puffs without being harmed, and puffs target them but will die on their bodies without harming them. (Doesn't this make 2S unsolvable?)
____________________________
50th Skywatcher