Skip to content

Commit ab443f7

Browse files
authored
Autostory: Zero Lab (#882)
* draft checkpoint_102: navigation to zero lab. * finish navigation routine to zero lab entrance * checkpoint_103: enter zero lab. speak to AI professor * cleanup
1 parent f8cd0fd commit ab443f7

File tree

8 files changed

+286
-90
lines changed

8 files changed

+286
-90
lines changed

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ std::vector<std::unique_ptr<AutoStory_Segment>> make_autoStory_segment_list(){
134134
segment_list.emplace_back(std::make_unique<AutoStory_Segment_36>());
135135
segment_list.emplace_back(std::make_unique<AutoStory_Segment_37>());
136136
segment_list.emplace_back(std::make_unique<AutoStory_Segment_38>());
137-
// segment_list.emplace_back(std::make_unique<AutoStory_Segment_39>());
137+
segment_list.emplace_back(std::make_unique<AutoStory_Segment_39>());
138138
// segment_list.emplace_back(std::make_unique<AutoStory_Segment_40>());
139139
}
140140
return segment_list;
@@ -309,8 +309,8 @@ std::vector<std::unique_ptr<AutoStory_Checkpoint>> make_autoStory_checkpoint_lis
309309
checkpoint_list.emplace_back(std::make_unique<AutoStory_Checkpoint_99>());
310310
checkpoint_list.emplace_back(std::make_unique<AutoStory_Checkpoint_100>());
311311
checkpoint_list.emplace_back(std::make_unique<AutoStory_Checkpoint_101>());
312-
// checkpoint_list.emplace_back(std::make_unique<AutoStory_Checkpoint_102>());
313-
// checkpoint_list.emplace_back(std::make_unique<AutoStory_Checkpoint_103>());
312+
checkpoint_list.emplace_back(std::make_unique<AutoStory_Checkpoint_102>());
313+
checkpoint_list.emplace_back(std::make_unique<AutoStory_Checkpoint_103>());
314314
// checkpoint_list.emplace_back(std::make_unique<AutoStory_Checkpoint_104>());
315315
// checkpoint_list.emplace_back(std::make_unique<AutoStory_Checkpoint_105>());
316316

@@ -478,7 +478,8 @@ AutoStory::AutoStory()
478478
"For Start Points that are at Pokecenters, ensure that you fly there so that your character is in the exactly correct start position."
479479
}
480480
, MAINSTORY_NOTE{
481-
"Ensure you have a level 100 Gardevoir with the moves in the following order: Moonblast, Mystical Fire, Psychic, Misty Terrain.<br>"
481+
"Ensure you have a level 100 Gardevoir with the moves in the following order: Moonblast, Mystical Fire, Psychic, Misty Terrain."
482+
"Ensure PP is maxed out. Ensure Modest nature with max Special Attack and Speed EVs, with max IVs.<br>"
482483
"Also, make sure you have two other strong pokemon (e.g. level 100 Talonflames)<br>"
483484
"Refer to the documentation on github for more details."
484485
}
@@ -506,8 +507,7 @@ AutoStory::AutoStory()
506507
)
507508
, ENABLE_ADVANCED_MODE(
508509
"<b>Advanced mode:</b><br>"
509-
"Select the start/end checkpoints instead of segments. i.e. finer control over start/end points.<br>"
510-
"Also, this enables the option to toggle 'Change settings at Program Start'.",
510+
"Select the start/end checkpoints instead of segments. i.e. finer control over start/end points.",
511511
LockMode::UNLOCK_WHILE_RUNNING,
512512
false
513513
)
@@ -864,7 +864,7 @@ void AutoStory::on_config_value_changed(void* object){
864864
END_DESCRIPTION.set_visibility(!ENABLE_ADVANCED_MODE ? ConfigOptionState::ENABLED : ConfigOptionState::HIDDEN);
865865
START_CHECKPOINT_DESCRIPTION.set_visibility(ENABLE_ADVANCED_MODE ? ConfigOptionState::ENABLED : ConfigOptionState::HIDDEN);
866866
END_CHECKPOINT_DESCRIPTION.set_visibility(ENABLE_ADVANCED_MODE ? ConfigOptionState::ENABLED : ConfigOptionState::HIDDEN);
867-
CHANGE_SETTINGS.set_visibility(ENABLE_ADVANCED_MODE ? ConfigOptionState::ENABLED : ConfigOptionState::HIDDEN);
867+
// CHANGE_SETTINGS.set_visibility(ENABLE_ADVANCED_MODE ? ConfigOptionState::ENABLED : ConfigOptionState::HIDDEN);
868868

869869
if (ENABLE_TEST_CHECKPOINTS){
870870
START_CHECKPOINT.set_visibility(ConfigOptionState::ENABLED);
@@ -1051,8 +1051,8 @@ void AutoStory::test_checkpoints(
10511051
checkpoint_list.push_back([&](){checkpoint_99(env, context, notif_status_update, stats);});
10521052
checkpoint_list.push_back([&](){checkpoint_100(env, context, notif_status_update, stats);});
10531053
checkpoint_list.push_back([&](){checkpoint_101(env, context, notif_status_update, stats);});
1054-
// checkpoint_list.push_back([&](){checkpoint_102(env, context, notif_status_update, stats);});
1055-
// checkpoint_list.push_back([&](){checkpoint_103(env, context, notif_status_update, stats);});
1054+
checkpoint_list.push_back([&](){checkpoint_102(env, context, notif_status_update, stats);});
1055+
checkpoint_list.push_back([&](){checkpoint_103(env, context, notif_status_update, stats);});
10561056
// checkpoint_list.push_back([&](){checkpoint_104(env, context, notif_status_update, stats);});
10571057
// checkpoint_list.push_back([&](){checkpoint_105(env, context, notif_status_update, stats);});
10581058

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1459,6 +1459,7 @@ void move_player_forward(
14591459
uint8_t num_rounds,
14601460
std::function<void()>&& recovery_action,
14611461
bool use_lets_go,
1462+
bool mash_A,
14621463
uint16_t forward_ticks,
14631464
uint8_t y,
14641465
uint16_t delay_after_forward_move,
@@ -1471,7 +1472,12 @@ void move_player_forward(
14711472
do_action_and_monitor_for_battles_early(env.program_info(), env.console, context,
14721473
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
14731474
if (!use_lets_go){
1474-
pbf_move_left_joystick(context, 128, y, forward_ticks, 0);
1475+
// pbf_move_left_joystick(context, 128, y, forward_ticks, 0);
1476+
ssf_press_left_joystick(context, 128, 0, 0, 100, 0);
1477+
1478+
if (mash_A){ // mashing A and Let's go aren't compatible. you end up talking to your Let's go pokemon if you mash A.
1479+
pbf_mash_button(context, BUTTON_A, forward_ticks);
1480+
}
14751481
}else{
14761482
pbf_press_button(context, BUTTON_R, 20, delay_after_lets_go);
14771483
pbf_move_left_joystick(context, 128, y, forward_ticks, delay_after_forward_move);

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,12 +382,14 @@ void checkpoint_reattempt_loop_tutorial(
382382

383383
// walk forward forward_ticks. repeat this for num_rounds.
384384
// if detect battle, kill the Pokemon. then continue. If we run into a battle, this round is considered to be done and will not be repeated.
385+
// NOTE: mashing A and Let's go aren't compatible. you end up talking to your Let's go pokemon if you mash A.
385386
void move_player_forward(
386387
SingleSwitchProgramEnvironment& env,
387388
ProControllerContext& context,
388389
uint8_t num_rounds,
389390
std::function<void()>&& recovery_action,
390391
bool use_lets_go = false,
392+
bool mash_A = false,
391393
uint16_t forward_ticks = 100,
392394
uint8_t y = 0,
393395
uint16_t delay_after_forward_move = 50,

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_38.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ void AutoStory_Segment_38::run_segment(
6060

6161
}
6262

63-
std::string AutoStory_Checkpoint_100::name() const{ return "0100 - " + AutoStory_Segment_38().name(); }
63+
std::string AutoStory_Checkpoint_100::name() const{ return "100 - " + AutoStory_Segment_38().name(); }
6464
std::string AutoStory_Checkpoint_100::start_text() const{ return "Inside Area Zero Station 3. Deactivated the locks.";}
6565
std::string AutoStory_Checkpoint_100::end_text() const{ return "Entered inner cave. Finished cutscene, admiring the waterfall/large crystals.";}
6666
void AutoStory_Checkpoint_100::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{
6767
checkpoint_100(env, context, options.notif_status_update, stats);
6868
}
6969

70-
std::string AutoStory_Checkpoint_101::name() const{ return "0101 - " + AutoStory_Segment_38().name(); }
70+
std::string AutoStory_Checkpoint_101::name() const{ return "101 - " + AutoStory_Segment_38().name(); }
7171
std::string AutoStory_Checkpoint_101::start_text() const{ return AutoStory_Checkpoint_100().end_text();}
7272
std::string AutoStory_Checkpoint_101::end_text() const{ return "Inside Area Zero Station 4. Deactivated the locks.";}
7373
void AutoStory_Checkpoint_101::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{

0 commit comments

Comments
 (0)