Allow player to be pushed off moving blocks

This commit is contained in:
James Campbell
2026-07-25 13:13:48 -04:00
parent 3ad36d2911
commit 8e077ff09d
6 changed files with 75 additions and 13 deletions

View File

@@ -152,9 +152,13 @@ resolution), and whether a moving carrier is closing in on the appropriate side:
- Moving down onto a floored player (backed below + pinned) → crush.
- Moving up into a player under a ceiling (backed above + pinned) → crush.
- Moving horizontally into a player backed by a wall → crush.
- Being carried sideways into a wall (via the `carry` direction) → crush.
- Being carried *up* into a ceiling while riding a platform → crush (the rising
carrier under the feet is caught by the "moving up" case above).
A block that stops with the player fitting underneath does **not** crush
(no residual overlap → not pinned).
(no residual overlap → not pinned). Riding a platform *horizontally* into a wall
is **not** a crush: the carrier is under the feet, perpendicular to the wall, so
it can't pin the player against it — the X pass just stops them at the wall edge
while the platform slides on underneath.
### 5.7 Death conditions (in `playing`)
- Battery ≤ 0.
@@ -326,6 +330,7 @@ evaluated against the player each frame relative to the trap's `sensor_rect()`.
| `{ dir: left\|right\|above\|below }` | player is on that side |
| `{ dir: …, range: N }` | …and within N tiles in that direction |
| `{ dir: …, aligned: true }` | …and overlapping on the perpendicular axis (directly left / directly above, etc.) |
| `{ dir: …, inclusive: true }` | …count the trap's own tile as being on that side (default false: the player must be strictly past the near edge) |
| `{ timer: { interval: A, up_time: B } }` | cyclic: off for A s, then on for B s, repeating |
| `{ all: [ … ] }` | AND of sub-conditions |
| `{ any: [ … ] }` | OR of sub-conditions |