Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
bc6a558
FRLG gates: row sims, replay and gated plans honor gates
dayfine Nov 13, 2026
5178e3f
FRLG gates: row sim reads the sim's maps for wall checks; has_gates -…
dayfine Nov 13, 2026
b887582
FRLG gates: sim keeps gate maps and Card Key in SimState; one walked_…
dayfine Nov 13, 2026
85d2ec2
FRLG maps: pin PokemonSimulation 4b886bb (Silph card-key doors, Mansi…
dayfine Nov 13, 2026
fb8795f
FRLG gates: real maps in the gate tests, Mansion 13.01-13.04 planned …
dayfine Nov 13, 2026
13f7f7b
FRLG gates: code-health fixes (walk state accessor, string_view scene…
dayfine Nov 13, 2026
e22c2fd
FRLG gates: register the gate-map tests with the FRLG suites (file_li…
dayfine Nov 13, 2026
bdf5fed
FRLG gates: replay a recorded route through a Silph card-key door and…
dayfine Nov 13, 2026
569471c
FRLG gates: wrap the replay scenario in a JsonValue
dayfine Nov 13, 2026
4d3c3ea
FRLG gates: a route run without maps keeps none through its gates (th…
dayfine Nov 13, 2026
b4d6bff
FRLG gates: split the replay test's fixture builders (code health)
dayfine Nov 13, 2026
3134bd9
Merge frlg/stage14a-blaine (12.02 split) into frlg/gates
dayfine Nov 13, 2026
1129a13
Merge frlg/stage14a-blaine (14.02 split) into frlg/gates
dayfine Nov 13, 2026
5b53476
Merge frlg/stage14a-blaine (14.04 split) into frlg/gates
dayfine Nov 13, 2026
1666779
FRLG AutoStory: the chain test expects 66 checkpoints (the split's me…
dayfine Nov 13, 2026
7496f15
Merge remote-tracking branch 'origin/frlg/stage14a-blaine' into HEAD
dayfine Nov 13, 2026
520dd51
Merge frlg/stage14a-blaine into frlg/gates
dayfine Nov 13, 2026
fbfd76a
Merge origin/frlg/stage14a-blaine into frlg/gates
dayfine Nov 13, 2026
0ad0952
FRLG maps: pin PokemonSimulation 1cacf81 (Silph card keys, Mansion sw…
dayfine Nov 13, 2026
54d5210
FRLG gates: Victory Road floor-switch barriers on the real maps
dayfine Nov 13, 2026
4de8e2e
FRLG gates: Victory Road test uses string_view
dayfine Nov 13, 2026
e3867c1
Merge origin/frlg/gates into frlg/stage19b-victory-cave
dayfine Nov 13, 2026
0e0dc5f
Unit test runner: drop the deleted Pokemon_Gates_Tests.h
dayfine Nov 13, 2026
f1aad34
FRLG gates: a boulder on a floor switch's button turns it on; one flo…
dayfine Nov 13, 2026
d0cca80
FRLG 19.04b to 19.04d: Victory Road's boulder switches, 1F to 3F and …
dayfine Nov 13, 2026
f50ce99
FRLG boulders: boulder_pushed() in its own file, flatter land_fallen_…
dayfine Nov 13, 2026
159f1a2
Merge frlg/stage19-victory-road into frlg/stage19b-victory-cave: upst…
dayfine Nov 13, 2026
10e9585
Merge origin/frlg/stage19-victory-road into frlg/stage19b-victory-cave
dayfine Nov 13, 2026
c5b5ed9
Merge origin/frlg/stage19-victory-road into frlg/stage19b-victory-cave
dayfine Nov 13, 2026
8be4c65
Navigation: restore the shared gate tests next to the FRLG ones
dayfine Nov 13, 2026
62fac8d
Merge frlg/stage19-victory-road into frlg/stage19b-victory-cave
dayfine Nov 14, 2026
89573ed
Merge frlg/stage19-victory-road into frlg/stage19b-victory-cave
dayfine Nov 14, 2026
607d768
Merge frlg/stage19-victory-road into frlg/stage19b-victory-cave
dayfine Nov 14, 2026
9ebf5f4
Merge frlg/stage19-victory-road into frlg/stage19b-victory-cave
dayfine Nov 14, 2026
931aa1d
Merge origin/frlg/stage19-victory-road into frlg/stage19b-victory-cave
dayfine Nov 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cpp-ci-serial-programs-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:

- name: Prepare approved FRLG map resources
id: map-resources
uses: dayfine/PokemonSimulation/integrations/arduino-source/verify-map-packs@d3eea1b5c04180f8b60eb98b0d65f70aca6b1abb
uses: dayfine/PokemonSimulation/integrations/arduino-source/verify-map-packs@1cacf81b2377ec1413317d905ad5415f6fe8dad5
with:
layout: resources
operation: prepare
Expand Down
4 changes: 2 additions & 2 deletions SerialPrograms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ add_library(SerialProgramsLib STATIC ${CORE_LIBRARY_SOURCES} ${LIBRARY_SOURCES})
include(cmake/EmbedTextFiles.cmake)
pa_embed_text_files(SerialProgramsLib Source/Pokemon/Navigation/TestMaps
Pokemon/Navigation/Pokemon_NavigationTestMaps.h PokemonAutomation::Pokemon navigation_test_map_json)
pa_embed_text_files(SerialProgramsLib Source/Pokemon/Navigation/GateTestMaps
Pokemon/Navigation/Pokemon_NavigationGateTestMaps.h PokemonAutomation::Pokemon navigation_gate_test_map_json)
include(cmake/PokesimMapResources.cmake)
pa_frlg_map_resources(FRLG_MAP_RESOURCES)
pa_embed_text_files(SerialProgramsLib "${FRLG_MAP_RESOURCES}"
Expand All @@ -240,8 +242,6 @@ pa_embed_text_files(SerialProgramsLib Source/VideoGames/PokemonFRLG/Programs/Aut
VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryTable.h PokemonAutomation::NintendoSwitch::PokemonFRLG autostory_checkpoint_json)
pa_embed_text_files(SerialProgramsLib Source/VideoGames/PokemonFRLG/Programs/AutoStory/ReplayData
VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_StoryReplay.h PokemonAutomation::NintendoSwitch::PokemonFRLG story_replay_fixture_json)
pa_embed_text_files(SerialProgramsLib Source/Pokemon/Navigation/GateTestMaps
Pokemon/Navigation/Pokemon_NavigationGateTestMaps.h PokemonAutomation::Pokemon navigation_gate_test_map_json)


# Create binary target
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
}


Event story_event(const StoryStep& step, StoryStepExecutor& executor){

Check warning on line 45 in SerialPrograms/Source/Pokemon/AutoStory/Pokemon_StoryStepExecutor.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

PokemonAutomation::Pokemon::story_event( const StoryStep & step , StoryStepExecutor & executor): function_lines=30 (advisory above 25, limit 50)
Event event;
event.name = step.name;
event.why = step.why;
Expand All @@ -62,6 +62,11 @@
}
return outcome;
};
if (step.gates_after){
event.when_skipped = [&step](RunState& state){
apply_gate_change(state.gates, *step.gates_after);
};
}
if (step.pose_after){
event.pose_learned = pose_of(*step.pose_after);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Story Steps Tests

Check warning on line 1 in SerialPrograms/Source/Pokemon/AutoStory/Pokemon_StoryStepExecutor_Tests.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

<file>: file_lines=918 (advisory above 500, limit 1000)
*
* From: https://github.com/PokemonAutomation/
*
Expand Down Expand Up @@ -344,6 +344,33 @@
return true;
}

UnitTestResult test_skipped_step_gates_applied(){

Check warning on line 347 in SerialPrograms/Source/Pokemon/AutoStory/Pokemon_StoryStepExecutor_Tests.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

PokemonAutomation::Pokemon::test_skipped_step_gates_applied(): function_lines=26 (advisory above 25, limit 50)
// A step that skip_if skips has its effect already: the door it opens
// is open for the steps after it, and a later step that needs it runs
// with it open.
StoryStep open_door = make(StoryStepKind::TALK, "open_door");
open_door.skip_if = {"door_done"};
open_door.gates_after = GateChange{.opened = {"SilphCo_5F/door_2"}};
const StoryCheckpoint data{
.id = "16.02",
.title = "Silph",
.steps = {open_door, make(StoryStepKind::TALK, "after")},
};
FakeExecutor executor;
executor.conditions = {"door_done"};
const Run result = run(data, executor);
if (!result.report.completed || result.report.events_skipped != 1){
return std::format("Expected the door step skipped:{}", joined(result.lines));
}
if (executor.gates_seen.size() != 1 || !executor.gates_seen[0].second.opened.contains("SilphCo_5F/door_2")){
return "Expected the step after a skipped door step to see the door open.";
}
if (!result.state.gates.opened.contains("SilphCo_5F/door_2")){
return "Expected the door open at the end of the checkpoint.";
}
return true;
}

UnitTestResult test_failure_names_the_step(){
const StoryCheckpoint data = lab_checkpoint();
FakeExecutor executor;
Expand Down Expand Up @@ -826,6 +853,10 @@
.input = {.name = "gate state and run flags carried from the save through the steps", .test = test_gate_state_carried},
.expectation = {.description = "applies start_gates, start_flags, gates_after and flags_after in order"},
},
{
.input = {.name = "a skipped step's gates_after is applied", .test = test_skipped_step_gates_applied},
.expectation = {.description = "the gates a skipped step opened are open for the steps after it"},
},
{
.input = {.name = "unsupported kinds and lost battles", .test = test_unsupported_and_lost_battles},
.expectation = {.description = "flags unsupported step types and handles battle defeat"},
Expand Down
Loading
Loading