flybrain/services/flysim/crates/flybrain-gb/src/pokemon_red/macros
acamilo e006db3742 macros: a ball at low HP is the only attack, and the fly types its catch's name
Two operator decisions (2026-09-29, row 69).

Throw on low HP only: in a wild battle with THROW BALL dealt and the
wild Pokemon at the HP where ItemUseBall's HP factor saturates
(W = (MaxHP*255/BallFactor)/max(HP/4,1) >= 255: about a third for a
Poke Ball, a half for a Great Ball), MOVE 1-4, SWITCH, RUN and the bag's
BACK are withheld. ITEM stays for a hurt thrower. Every precondition of
THROW BALL still gates it, so no ball, a caught species or a trainer
gives the ordinary pad back.

Let the fly name it: the naming screen is read (menu bytes, the
keyboard's box, the underscores; wNamingScreenNameLength and
wNamingScreenSubmitName pinned from the cartridge's own stores) before
the battle test and reads Unknown. Its pad is the fly's own D-pad, A, B
and START, passed through Observed::raw while nothing is bound. Once
the name is full or sixty brain seconds have run, CONFIRM alone is
dealt and presses START until the keyboard closes.

Also moves two doc comments row 66 split from their items (review N3).
2026-09-29 18:07:15 +00:00
..
tests macros: a ledge is a hop the route search takes the one way the cartridge does 2026-09-28 22:50:34 +00:00
cartridge.rs macros: a ball at low HP is the only attack, and the fly types its catch's name 2026-09-29 18:07:15 +00:00
driver.rs macros: a ball at low HP is the only attack, and the fly types its catch's name 2026-09-29 18:07:15 +00:00
executor.rs macros: a ball at low HP is the only attack, and the fly types its catch's name 2026-09-29 18:07:15 +00:00
geography.rs macros: a ball at low HP is the only attack, and the fly types its catch's name 2026-09-29 18:07:15 +00:00
mod.rs flybrain v0.4.0: public tree (history retained privately) 2026-09-21 15:09:46 +00:00
palette.rs macros: a ball at low HP is the only attack, and the fly types its catch's name 2026-09-29 18:07:15 +00:00
path.rs macros: a yard's one door is taken, and a split map's exits are the fly's own piece's 2026-09-29 04:01:16 +00:00
plan.rs flybrain v0.4.0: public tree (history retained privately) 2026-09-21 15:09:46 +00:00
state.rs macros: a ball at low HP is the only attack, and the fly types its catch's name 2026-09-29 18:07:15 +00:00
tests.rs macros: a ball at low HP is the only attack, and the fly types its catch's name 2026-09-29 18:07:15 +00:00