Skip to content

Commit d969541

Browse files
authored
Autostory: update checkpoint 41: navigation to Klawf. (#894)
1 parent 11f9dea commit d969541

File tree

2 files changed

+43
-29
lines changed

2 files changed

+43
-29
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ AutoStory::AutoStory()
637637
0
638638
)
639639
, TEST_PBF_JOYSTICK2(
640-
"<b>TEST2: pbf_move_right_joystick():</b>",
640+
"<b>TEST2: pbf_move_joystick():</b>",
641641
LockMode::UNLOCK_WHILE_RUNNING,
642642
false
643643
)
@@ -1267,7 +1267,7 @@ void AutoStory::test_code(SingleSwitchProgramEnvironment& env, ProControllerCont
12671267
}
12681268

12691269
if (TEST_PBF_JOYSTICK2){
1270-
pbf_move_right_joystick(context, X_MOVE2, Y_MOVE2, HOLD_TICKS2, RELEASE_TICKS2);
1270+
pbf_move_left_joystick(context, X_MOVE2, Y_MOVE2, HOLD_TICKS2, RELEASE_TICKS2);
12711271
return;
12721272
}
12731273

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

Lines changed: 41 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,18 @@ void checkpoint_41(
108108
});
109109

110110
// section 2. walk until hit dialog
111-
realign_player_from_landmark(
112-
env.program_info(), env.console, context,
113-
{ZoomChange::KEEP_ZOOM, 0, 128, 70},
114-
{ZoomChange::ZOOM_IN, 255, 93, 170}
115-
);
111+
// realign_player_from_landmark(
112+
// env.program_info(), env.console, context,
113+
// {ZoomChange::KEEP_ZOOM, 0, 128, 70},
114+
// {ZoomChange::ZOOM_IN, 255, 93, 170}
115+
// );
116+
117+
//{0.242708, 0.690741}
118+
place_marker_offset_from_flypoint(env.program_info(), env.console, context,
119+
{ZoomChange::KEEP_ZOOM, 128, 128, 0},
120+
FlyPoint::FAST_TRAVEL,
121+
{0.242708, 0.690741}
122+
);
116123
handle_when_stationary_in_overworld(env.program_info(), env.console, context,
117124
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
118125
overworld_navigation(env.program_info(), env.console, context,
@@ -143,16 +150,17 @@ void checkpoint_41(
143150
);
144151

145152
// section 4
146-
realign_player_from_landmark(
147-
env.program_info(), env.console, context,
148-
{ZoomChange::KEEP_ZOOM, 255, 128, 100},
149-
{ZoomChange::ZOOM_IN, 0, 90, 157}
150-
);
153+
// {0.793229, 0.643519}
154+
place_marker_offset_from_flypoint(env.program_info(), env.console, context,
155+
{ZoomChange::KEEP_ZOOM, 255, 128, 30},
156+
FlyPoint::POKECENTER,
157+
{0.793229, 0.643519}
158+
);
151159
handle_when_stationary_in_overworld(env.program_info(), env.console, context,
152160
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
153161
overworld_navigation(env.program_info(), env.console, context,
154162
NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY,
155-
128, 0, 30, 10, false);
163+
128, 0, 40, 20, false);
156164
},
157165
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
158166
pbf_move_left_joystick(context, 128, 255, 50, 50);
@@ -162,16 +170,17 @@ void checkpoint_41(
162170
);
163171

164172
// section 5
165-
realign_player_from_landmark(
166-
env.program_info(), env.console, context,
167-
{ZoomChange::KEEP_ZOOM, 255, 150, 70},
168-
{ZoomChange::ZOOM_IN, 0, 95, 112}
169-
);
173+
// {0.710938, 0.584259}
174+
place_marker_offset_from_flypoint(env.program_info(), env.console, context,
175+
{ZoomChange::KEEP_ZOOM, 255, 128, 30},
176+
FlyPoint::POKECENTER,
177+
{0.710938, 0.584259}
178+
);
170179
handle_when_stationary_in_overworld(env.program_info(), env.console, context,
171180
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
172181
overworld_navigation(env.program_info(), env.console, context,
173182
NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY,
174-
128, 0, 30, 10, false);
183+
128, 0, 40, 10, false);
175184
},
176185
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
177186
pbf_move_left_joystick(context, 0, 128, 40, 50);
@@ -180,11 +189,12 @@ void checkpoint_41(
180189
);
181190

182191
// section 6
183-
realign_player_from_landmark(
184-
env.program_info(), env.console, context,
185-
{ZoomChange::KEEP_ZOOM, 255, 128, 60},
186-
{ZoomChange::ZOOM_IN, 0, 50, 105}
187-
);
192+
//{0.670312, 0.678704}
193+
place_marker_offset_from_flypoint(env.program_info(), env.console, context,
194+
{ZoomChange::KEEP_ZOOM, 128, 128, 0},
195+
FlyPoint::POKECENTER,
196+
{0.670312, 0.678704}
197+
);
188198
handle_when_stationary_in_overworld(env.program_info(), env.console, context,
189199
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
190200
overworld_navigation(env.program_info(), env.console, context,
@@ -217,15 +227,19 @@ void checkpoint_41(
217227
);
218228

219229
// section 8. walk up to Klawf on lower wall
220-
realign_player_from_landmark(
221-
env.program_info(), env.console, context,
222-
{ZoomChange::KEEP_ZOOM, 255, 150, 50},
223-
{ZoomChange::ZOOM_IN, 30, 30, 135}
224-
);
230+
// {0.666667, 0.238889}
231+
place_marker_offset_from_flypoint(env.program_info(), env.console, context,
232+
{ZoomChange::KEEP_ZOOM, 128, 0, 30},
233+
FlyPoint::POKECENTER,
234+
{0.666667, 0.238889}
235+
);
225236
overworld_navigation(env.program_info(), env.console, context,
226237
NavigationStopCondition::STOP_TIME, NavigationMovementMode::DIRECTIONAL_ONLY,
227238
128, 0, 10, 10, false);
228239

240+
// move the marker so it doesn't cover North in the minimap
241+
realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_NEW_MARKER, 255, 128, 50);
242+
229243
// section 9
230244
do_action_and_monitor_for_battles(env.program_info(), env.console, context,
231245
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){

0 commit comments

Comments
 (0)