Bagman - Outstanding Work
=========================

Guiding principle
-----------------
Guards are driven by synthesized player-style INP_* flags (GuardTblInp).
The AI chooses inputs; the movement system applies them with the same
collision rules as the player. Never add guard-only shortcuts that
bypass CheckWalkable / CheckGround / ladder / elevator checks.


Active
------

[ ] Pickaxe weapon feature
    The PlayerHasPickaxe flag and GST_FLEE wiring are in place; the
    weapon itself still needs:
      * Pickaxe sprite in the atlas.
      * Pickup mechanic (probably a loot type or a dedicated entity
        that spawns at predictable tiles).
      * Hold timer counting down while carried.
      * Set PlayerHasPickaxe while timer > 0; clear on expiry.
      * Strike mechanic (damage a guard on contact while held?)
      * HUD / visual indicator that the player is holding it.
    Once the flag is actually driven, guards will flee automatically
    via the existing _GuardFearFrame helper.


Done this pass
--------------

[x] Fix elevator exit into impassable terrain
    DoWalk :rBlocked / :lBlocked now short-circuit to the undo
    path when AITemp says we started on the car, so the slope
    step-up can't lift the player off the elevator.

[x] Vertical line-of-sight on shared ladder
    _EntVertLoS in player.s; GuardDecideInputs uses it after a
    horizontal-LoS miss to force a ladder commit (no RNG skip).

[x] Hearing horizontal direction bias
    GuardDecideInputs :gdiWander biases GuardTblDir toward
    PlayerX when on the same map with |dy| < 24.

[x] Ladder commit bias on hearing
    Removed the "fall back to the away-ladder" branch. Guards
    only commit to a ladder that reduces |dy|; otherwise wander.

[x] Stun re-orient delay
    GuardStun moved to guard_data.s ($1800 block) so the LC
    budget can breathe. Last REORIENT_FRAMES (12) of StunDuration
    hold FR_GRD_IDLE so recovery is visible.

[x] Skip render for inactive guards
    Already done previously; dropped from active work.

[x] Guard elevator detection / board / ride / exit
    EntCheckElevGround (elevator.s), EntCheckGroundOrElev +
    GuardRide (guard_data.s), per-guard GuardOnElev table.
    UpdateGuards tracks ElevY each frame whenever OnElev is
    set so stunned/falling/climbing guards stay with the car.
    Shaft pre-reverse removed from GuardWander so guards walk
    into shafts the same way the player does.

[x] Elevator landing ambush bias
[x] Ladder top/bottom ambush wait
    Shared GuardWaitTmr (30 frames). Set on any ladder-to-walk
    transition (GuardClimb :gcGoWalk) and on any elevator exit
    (GuardRide :grLeft / :grRight). GuardWander honors it;
    GuardPursuit does not, so regained LoS still breaks the hold.

[x] Faster guard ladder climb
    UpdateGuards :ugClimb calls GuardClimb twice per frame for
    any guard still in GST_CLIMB after the first step.

[x] Mine cart passes through guards
    Already a no-op in the codebase: CheckCartHit only tests the
    player.

[x] Fake-out / lost-target behavior
    Current behavior already demotes PURSUIT to WANDER on any
    LoS loss, which subsumes the stated "drop to WANDER on
    fake-out" condition. Sticky pursuit with elevation-change
    trigger is a future enhancement, not a prerequisite for the
    stated condition.


Notes on placement
------------------

LC bank 2 ($D400-$DFFF) is now at ~7 bytes headroom after the
elevator / wait / LoS work. New code must go in main RAM
($6000 block) or the $1800 block (~780 bytes free). Cross-region
JSR/JMP is free. Always run `merlin32 -v bagman.s` and verify
all four memory regions still fit.

Data additions this pass:
- GuardOnElev[3]   (guard_data.s)
- GuardWaitTmr[3]  (guard_data.s)
