Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* BDSP AutoStory - Story table

Check warning on line 1 in SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryTable.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

<file>: file_lines=1000 (advisory above 500, limit 1000)
*
* From: https://github.com/PokemonAutomation/
*
Expand Down Expand Up @@ -888,13 +888,13 @@
};
}

// 01.11: the old woman (3, 25), the old man (2, 25) west of her (r251a). 8 taps west from the banner's x 10..12 ended below
// him (lab-B 2026-11-08 18:41). The field's edge is 3 taps west of him (westedge batch 2026-11-08): x = -1, off the map.
// TODO(map points): the field goes on west of the map (the sim adds it, sim_ground()), or the couple stand a tile east.
// 01.11: the old woman (4, 25), the old man (3, 25) west of her (r251a; columns from the westedge batch 2026-11-08,
// PokemonSimulation#76). 8 taps west from the banner's x 10..12 ended below him (lab-B 2026-11-08 18:41), so the walk
// clips to the field's west edge (x 0) and taps east to her column.
StoryCheckpoint floaromas_old_couple(){
const Pose below_the_old_woman = next_to(FLOAROMA, "old_woman", SOUTH, NORTH);
const Pose below_the_old_man = next_to(FLOAROMA, "old_man", SOUTH, NORTH);
const Pose at_the_field_edge = Pokemon::tile_pose(FLOAROMA, {TilePos{-1, 27}, TilePos{-1, 28}, TilePos{-1, 29}}, WEST);
const Pose at_the_field_edge = Pokemon::tile_pose(FLOAROMA, {TilePos{0, 27}, TilePos{0, 28}, TilePos{0, 29}}, WEST);
return row("01.11", "Floaroma's old couple", into_floaroma(), {
anchored(to_walls("west_to_the_field_edge", {{.direction = WEST, .tiles = 13}}, "until the field's edge stops us"), at_the_field_edge),
legs("below_her_column", {{.direction = EAST, .tiles = 4}}, "4 taps east to her column (westedge batch 2026-11-08)"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* BDSP AutoStory Grid Simulation Tests

Check warning on line 1 in SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_GridSim_Tests.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

<file>: file_lines=986 (advisory above 500, limit 1000)
*
* From: https://github.com/PokemonAutomation/
*
Expand All @@ -12,7 +12,6 @@
#include <algorithm>
#include <format>
#include <functional>
#include <memory>
#include <optional>
#include <string>
#include <utility>
Expand All @@ -24,7 +23,6 @@
#include "PokemonBDSP/Programs/AutoStory/Data/PokemonBDSP_AutoStory_PlanCosts.h"
#include "PokemonBDSP_AutoStory_GridSim.h"
#include "PokemonBDSP_AutoStory_OldStorySteps.h"
#include "PokemonBDSP_AutoStory_SimGround.h"
#include "PokemonBDSP/Programs/AutoStory/Utils/PokemonBDSP_AutoStory_PlannedRoute.h"
#include "PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryExecutor.h"
#include "PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryPlaces.h"
Expand Down Expand Up @@ -597,22 +595,21 @@
// lab-B 2026-11-08 18:41: 01.11's 8 taps west, then north, ended below the
// old man, and no one answered the old woman's talk. Floaroma's banner
// stops us on any of (10..12, 27..29): the old taps miss her from x 10 and
// 12; the table's walk west to the field's edge and 4 taps east end below
// 11; the table's walk west to the field's edge and 4 taps east end below
// her from all nine.
UnitTestResult test_old_couple_from_each_arrival(Logger& logger){
const std::optional<TableSteps> table = table_steps("01.11", "west_to_the_field_edge", "old_woman");
const auto ground = std::ranges::find(sim_ground(), std::string("FloaromaTown"), &SimGround::map);
if (!table || table->steps.empty() || ground == sim_ground().end()){
return "01.11 has no walk west to the field's edge, or Floaroma no ground west of its map.";
const StoryWorld* world = story_plan_world("FloaromaTown", "FloaromaTown");
if (!table || table->steps.empty() || world == nullptr){
return "01.11 has no walk west to the field's edge, or Floaroma no map.";
}
const TableSteps old_taps{table->start, {old_west_along_the_field(), table->steps.back()}};
const std::unique_ptr<StoryWorld> world = with_ground(*story_plan_world("FloaromaTown", "FloaromaTown"), *ground);
const TilePos below_her = story_to_world(*world, "FloaromaTown", map_point("FloaromaTown", "old_woman").next(Direction::SOUTH));
for (int x = 10; x <= 12; x++){
for (int y = 27; y <= 29; y++){
const TilePos start = story_to_world(*world, "FloaromaTown", {x, y});
const std::string old_miss = walk_misses(*world, old_taps, start, {{"up_to_the_old_woman", below_her}}, logger);
if (old_miss.empty() != (x == 11)){
if (old_miss.empty() != (x == 12)){
return std::format("The old taps from ({}, {}): {}", x, y, old_miss.empty() ? "ended below her." : old_miss);
}
const std::string miss = walk_misses(*world, *table, start, {{"up_to_the_old_woman", below_her}}, logger);
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* BDSP AutoStory Story Sim Tests

Check warning on line 1 in SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySim_Tests.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

<file>: file_lines=977 (advisory above 500, limit 1000)
*
* From: https://github.com/PokemonAutomation/
*
Expand Down Expand Up @@ -42,7 +42,6 @@
#include "PokemonBDSP/Programs/AutoStory/Data/PokemonBDSP_AutoStory_Maps.h"
#include "PokemonBDSP_AutoStory_GridSim.h"
#include "PokemonBDSP_AutoStory_OldStorySteps.h"
#include "PokemonBDSP_AutoStory_SimGround.h"
#include "PokemonBDSP/Programs/AutoStory/Utils/PokemonBDSP_AutoStory_RouteWalk.h"
#include "PokemonBDSP/Programs/AutoStory/Actions/PokemonBDSP_AutoStory_Events.h"
#include "PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryExecutor.h"
Expand Down Expand Up @@ -440,7 +439,7 @@
GridSim m_sim;
SimStoryStepIO m_io;
StoryWalkSteps m_walks;
// The planner's worlds with sim_people() and sim_ground() on them, by world and who.
// The planner's worlds with sim_people() on them, by world and who.
mutable std::map<std::pair<const StoryWorld*, std::string>, std::unique_ptr<StoryWorld>> m_peopled;
// The steps of this row that have run.
std::set<std::string> m_ran;
Expand Down Expand Up @@ -471,21 +470,14 @@
who += person.name + ";";
}
}
const SimGround* ground = nullptr;
for (const SimGround& item : sim_ground()){
if (world != nullptr && m_row >= item.row && story_plan_world(item.map, item.map) == world){
ground = &item;
who += item.map + " ground;";
}
}
if (who.empty()){
if (here.empty()){
return world;
}
std::unique_ptr<StoryWorld>& peopled = m_peopled[{world, who}];
if (!peopled){
peopled = ground != nullptr ? with_ground(*world, *ground) : std::make_unique<StoryWorld>(*world);
peopled = std::make_unique<StoryWorld>(*world);
for (const SimPerson& person : here){
peopled->block(story_to_world(*peopled, person.map, person.tile));
peopled->block(story_to_world(*world, person.map, person.tile));
}
}
return peopled.get();
Expand Down
2 changes: 0 additions & 2 deletions SerialPrograms/cmake/SourceFiles.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1712,8 +1712,6 @@ file(GLOB LIBRARY_SOURCES
Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryPlaces.h
Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_OldStorySteps.cpp
Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_OldStorySteps.h
Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimGround.cpp
Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_SimGround.h
Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySim_Tests.cpp
Source/PokemonBDSP/Programs/AutoStory/Simulation/PokemonBDSP_AutoStory_StorySim_Tests.h
Source/PokemonBDSP/Programs/AutoStory/PokemonBDSP_AutoStory_StoryTable_Tests.cpp
Expand Down
4 changes: 2 additions & 2 deletions devtools/maps/map-resources.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"repository": "dayfine/PokemonSimulation",
"games": {
"bdsp": {
"revision": "4de7742a764d27293b4525d6ad2a6fc8a95f3e3a",
"revision": "72093886bc7bc80497aff770d803a753e7e4bca7",
"manifest_path": "data/maps/runtime-manifest.json",
"manifest_sha256": "db6894b6e6c49a6ac7b7661d117a3514ebac2241c8c9311d9c101208abab35ad"
"manifest_sha256": "0ce25ea46dc00d91d5d8587c6f00f322490ca35b8d0ad9778588133a9f55d00f"
}
}
}
Loading