Skip to content

Commit 30f1fcd

Browse files
committed
finish navigation routine to zero lab entrance
1 parent 5f9748f commit 30f1fcd

File tree

4 files changed

+32
-22
lines changed

4 files changed

+32
-22
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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);

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{

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

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ namespace PokemonSV{
2828

2929

3030
std::string AutoStory_Segment_39::name() const{
31-
return "";
31+
return "39: Zero Lab";
3232
}
3333

3434
std::string AutoStory_Segment_39::start_text() const{
35-
return "Start: ";
35+
return "Start: Inside Area Zero Station 4. Deactivated the locks.";
3636
}
3737

3838
std::string AutoStory_Segment_39::end_text() const{
39-
return "End: ";
39+
return "End: Entered Zero Lab. Spoke to AI Professor.";
4040
}
4141

4242
void AutoStory_Segment_39::run_segment(
@@ -59,14 +59,14 @@ void AutoStory_Segment_39::run_segment(
5959

6060
}
6161

62-
std::string AutoStory_Checkpoint_102::name() const{ return "0102 - " + AutoStory_Segment_39().name(); }
62+
std::string AutoStory_Checkpoint_102::name() const{ return "102 - " + AutoStory_Segment_39().name(); }
6363
std::string AutoStory_Checkpoint_102::start_text() const{ return "Inside Area Zero Station 4. Deactivated the locks.";}
6464
std::string AutoStory_Checkpoint_102::end_text() const{ return "Opened Zero lab. Defeated Paradox Pokemon.";}
6565
void AutoStory_Checkpoint_102::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{
6666
checkpoint_102(env, context, options.notif_status_update, stats);
6767
}
6868

69-
std::string AutoStory_Checkpoint_103::name() const{ return "0103 - " + AutoStory_Segment_39().name(); }
69+
std::string AutoStory_Checkpoint_103::name() const{ return "103 - " + AutoStory_Segment_39().name(); }
7070
std::string AutoStory_Checkpoint_103::start_text() const{ return AutoStory_Checkpoint_102().end_text();}
7171
std::string AutoStory_Checkpoint_103::end_text() const{ return "";}
7272
void AutoStory_Checkpoint_103::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{
@@ -88,14 +88,11 @@ void AutoStory_Checkpoint_103::run_checkpoint(SingleSwitchProgramEnvironment& en
8888
// }
8989

9090
void checkpoint_102(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){
91-
// checkpoint_reattempt_loop(env, context, notif_status_update, stats,
92-
// [&](size_t attempt_number){
91+
checkpoint_reattempt_loop(env, context, notif_status_update, stats,
92+
[&](size_t attempt_number){
9393

9494
YOLOv5Detector yolo_detector(RESOURCE_PATH() + "PokemonSV/YOLO/A0-lab.onnx");
9595

96-
#if 0
97-
#endif
98-
9996
pbf_move_left_joystick(context, 128, 255, 200, 100);
10097
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 10, 255, 128);
10198
clear_dialog(env.console, context, ClearDialogMode::STOP_PROMPT, 60, {CallbackEnum::PROMPT_DIALOG});
@@ -176,7 +173,7 @@ void checkpoint_102(SingleSwitchProgramEnvironment& env, ProControllerContext& c
176173
);
177174

178175
pbf_move_right_joystick(context, 128, 255, 200, 0);
179-
move_camera_until_yolo_object_detected(env, context, yolo_detector, "beyond-cliff-5", 0, 30);
176+
move_camera_until_yolo_object_detected(env, context, yolo_detector, "beyond-cliff-5", 0, 60);
180177

181178
move_camera_yolo(env, context, CameraAxis::X, yolo_detector, "beyond-cliff-5", 0.5,
182179
[&](){
@@ -241,7 +238,20 @@ void checkpoint_102(SingleSwitchProgramEnvironment& env, ProControllerContext& c
241238
);
242239

243240

244-
// clear_dialog(env.console, context, ClearDialogMode::STOP_BATTLE, 60, {CallbackEnum::BATTLE});
241+
clear_dialog(env.console, context, ClearDialogMode::STOP_BATTLE, 60, {CallbackEnum::BATTLE, CallbackEnum::PROMPT_DIALOG});
242+
243+
// battle Paradox 1
244+
run_trainer_double_battle_press_A(env.console, context, BattleStopCondition::STOP_DIALOG);
245+
clear_dialog(env.console, context, ClearDialogMode::STOP_BATTLE, 60, {CallbackEnum::BATTLE});
246+
247+
// battle Paradox 2
248+
run_trainer_double_battle_press_A(env.console, context, BattleStopCondition::STOP_DIALOG);
249+
clear_dialog(env.console, context, ClearDialogMode::STOP_BATTLE, 60, {CallbackEnum::BATTLE});
250+
251+
// battle Paradox 3
252+
run_trainer_double_battle_press_A(env.console, context, BattleStopCondition::STOP_DIALOG);
253+
clear_dialog(env.console, context, ClearDialogMode::STOP_OVERWORLD, 60, {CallbackEnum::OVERWORLD, CallbackEnum::PROMPT_DIALOG});
254+
245255

246256
#if 0
247257
// align to rock.
@@ -272,7 +282,7 @@ void checkpoint_102(SingleSwitchProgramEnvironment& env, ProControllerContext& c
272282
);
273283

274284
#endif
275-
// });
285+
});
276286
}
277287

278288
void checkpoint_103(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ class AutoStory_Checkpoint_103 : public AutoStory_Checkpoint{
6565
void checkpoint_102(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats);
6666

6767
// start: Opened Zero lab. Defeated Paradox Pokemon.
68-
// end:
68+
// end: Entered Zero Lab. Spoke to AI Professor.
6969
void checkpoint_103(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats);
7070

71-
// start:
72-
// end:
71+
// start: Entered Zero Lab. Spoke to AI Professor.
72+
// end: Battled the AI Professor. Completed the game.
7373
void checkpoint_104(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats);
7474

7575
// start:

0 commit comments

Comments
 (0)