To break down these cases we need to know how hot tiles and movement order work internally.
Just so you know, when I say entity I mean an NPC, a monster, the player, Halph or basically anything from the last tab in the editor, including inactive clones, decoys and temporal projections.
Hot tiles damage is calculated at the end of each entity's turn. If, since the last turn, the entity's position didn't change in any way the entity will be damaged. Let's say each entity has a flag saying "
movedThisTurn"
, and the overall code looks like this:
Before anything moves:
- Set every entity's movedThisTurn to false
Process movement of each entity:
- Process my move
- If I changed my position, set movedThisTurn to true
- If I am on a hot tile AND my movedThisTurn is false, do the hot tile attack
Entities move in the following order (as always ties are broken by the order the entities were added to the room):
First is the
Player
Then
Temporal Projections
Then
Player doubles (Mimic, decoy, inactive clones).
Then some other entities we won't use in our examples.
Then
Regular Monsters.
It is important to realize that inactive clones are still entities which movement (permanent waiting) is processed each turn and they are killed by the hot tiles after they "
move"
.
So let's break down the four cases and look for issues:
(1) If you push a clone across hot tiles, the clone lives.
Order of action:
1. Each entity's
movedThisTurn is set to false.
2. Player moves, the move pushes clone, clone's
movedThisTurn is set to true.
3. Clone is stunned so it doesn't move but its
movedThisTurn is true (thanks to being pushed) so it is not damaged by the hot tiles. The clone survives.
(2) If a mimic pushes a monster across hot tiles, the monster lives. (we will assume the monster is a roach)
Order of action:
1. Each entity's
movedThisTurn is set to false.
2. Player moves.
3. Mimic moves because player has moved. It pushes the roach setting its
movedThisTurn to true.
4. Roach can't move because it's stunned but its
movedThisTurn is true (thanks to being pushed) so it is not damaged by the hot tiles. The roach survives.
(3) If a mimic pushes a clone across hot tiles, the clone dies.
Order of action, assuming the mimic was placed before the clone:
1. Each entity's
movedThisTurn is set to false.
2. Player moves.
3. Mimic moves because player has moved. It pushes the clone setting its
movedThisTurn to true.
4. Clone can't move because it's stunned but its
movedThisTurn is true (thanks to being pushed) so it is not damaged by the hot tiles. The clone survives.
Order of action, assuming the clone was placed before the mimic:
1. Each entity's
movedThisTurn is set to false.
2. Player moves.
3. Clone waits and because its
movedThisTurn is set to false it is attacked by the hot tiles. The clone dies, we lose the room.
4. Mimic moves because player has moved. It pushes the clone setting its
movedThisTurn to true but it doesn't matter because it already died.
5. We lose the room.
(4) If a clone pushes you across hot tiles, you die.
This one is an actual bug. Before processing the reactions to player turning a flag is set
bStayedOnHotFloor to true. Then, once the reactions to player move are calculated, even though the player's position changes the game doesn't make another check for that and just kills the player. And it doesn't matter what entity is being pushed by (and pushes) the player, it's always the same.
So out of these four cases only the last one is incorrect, even though the third one seems to be weird.
____________________________
My website