Skip to content

FRLG 19.01a: sell the Nugget for Super Potions; use_repel on Route 23 and Victory Road - #614

Closed
dayfine wants to merge 7 commits into
frlg/moved-trainersfrom
frlg/celadon-restock
Closed

dayfine wants to merge 7 commits into
frlg/moved-trainersfrom
frlg/celadon-restock

Conversation

@dayfine

@dayfine dayfine commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Depends on #599 (base frlg/moved-trainers; the diff shows only this change).

Before the Route 22 rival the bag had 3 Potions and no Super Potions, and the Repels it carries were never used past 13.01. The Mart step can now sell before it buys (sell lines, priced by sale_price()), reads the money box on the BUY list, fails if it shows less than the sales earned, and cuts an if_affordable line to what the money covers; with the money unread it buys blind as before. 19.01a now flies to Lavender's Mart, sells the Nugget, buys 6 Super Potions (the Nugget's $5,000 covers them), and flies back to Viridian for the Antidote and 2 Parlyz Heals. No Celadon floor sells Hyper Potions, and the 2F clerk's Super Potions are on a floor the walker has no map for, so Lavender sells the same item. The Moon Stones can't be sold (price 0). A new use_repel step uses the strongest Repel in the bag and, when it wears off, renews strongest first; 19.03 and 19.04 use it, and the walker's encounter handling stays as the fallback.

Tested with new AutoStoryMart cases (sell then buy, the money math, a sale the money doesn't show), AutoStoryItemUse cases for use_repel, and the 19.01a sim test now flying through both Marts. The money box reader and the console SELL presses have not been run on console B yet. Golden 19's 19.01a lines need regenerating from this PR's CI output.

… on Route 23 and Victory Road

The Mart step sells before it buys ("sell" lines, sale_price()), reads the
money box on the BUY list, fails when it shows less than the sales earned,
and cuts an if_affordable line to what the money covers; unread, it buys
blind as before. 19.01a flies to Lavender's Mart (Celadon sells no Hyper
Potion and its 2F has no map), sells the Nugget, buys 6 Super Potions, and
flies back to Viridian for the Antidote and 2 Parlyz Heals. The new
use_repel step uses the strongest Repel in the bag and renews strongest
first when it wears off; 19.03 and 19.04 use it.
…n header; plan golden 19

MartActions keeps the BUY list (7 methods); the SELL step, SaleEnd and
sale_price() move to PokemonFRLG_AutoStoryMartSell.h with
ConsoleMartSellActions, and run_mart() takes both. USE_REPEL_VARIANT and
use_strongest_repel() move to PokemonFRLG_AutoStoryRepelStep.h, with
repel_put_on_by() replacing the Events.cpp special case; STRONGEST_REPEL
is internal. Golden 19 regenerated from the Fork Draft CI output for the
new 19.01a Lavender route.
…t one Mart

19.01 walked from the Viridian Mart to Route 22 and fought the rival in
the same checkpoint, so a retry replayed the walk. 19.01 now only walks
to (34, 5), a tile short of the trigger, and 19.01b (level check, the
step onto the trigger, the battle) starts from that save.

19.01a flew to Lavender's Mart, sold the Nugget for 6 Super Potions, then
flew back into Viridian's Mart for an Antidote and 2 Parlyz Heals, which
Lavender sells too. With ~$51k on the save, it now buys 15 Super Potions,
the Antidote and the Parlyz Heals at Lavender in one step, no sale, and
ends at Viridian's Fly landing, where 19.01 starts.

Two step lints: a boss battle (a HIGH risk trainer, default_battle_risk())
has only in-place checks and its trigger before it in its checkpoint, with
the twelve that still share listed until they are split; and a checkpoint
never shops at two Marts when one the story visits stocks its whole list.
dayfine and others added 3 commits November 16, 2026 00:36
19.04 ended in Victory Road and its save was refused: the card read
"VICTORY ROAO", but the reader's dictionary had no Victory Road, while
AutoStory's save_card_place() did. Both now read one table in the save
card reader, with every Kanto map section from pokefirered's
region_map_sections.json (52 places). The Elite Four's rooms are the
POKeMON LEAGUE on the card, not Indigo Plateau.

Tests: every story checkpoint's start and end map has a place; the
reader matches every place's card text and "VICTORY ROAO".
…a place

The one Kanto table (96a83ee) gives Route 9 its place, so a save in
pewter-city for a start or end on Route 9 is an error. The "no known place"
cases use One Island's Center, which the table leaves out.
dayfine added a commit that referenced this pull request Nov 18, 2026
After #614's split the Route 22 rival is in 19.01b, so the battle-policy
test reads it there. use_repel (Route 23, Victory Road) uses a Repel from
the Items pocket: STALE, like use_item, with its step-table case.
dayfine added a commit that referenced this pull request Nov 18, 2026
The stored golden is #614's. On this branch two walks plan differently:
19.01a's inside Lavender's Mart goes north 1 then along the walls to the
clerk instead of north 4, and 19.01's from Viridian's south exit takes
the walled street west to Route 22. Neither is #614's change; both come
from the leg planner and maps folded in with it (#583, #403, #409), and
neither has run on the console yet.
@dayfine

dayfine commented Nov 18, 2026

Copy link
Copy Markdown
Owner Author

Merged into #652 (frlg/lean); fixes continue there.

@dayfine dayfine closed this Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant