Skip to content

Commit 809b90b

Browse files
author
Gin
committed
add movement to LA ranch lady
1 parent 63a0430 commit 809b90b

File tree

5 files changed

+17
-11
lines changed

5 files changed

+17
-11
lines changed

SerialPrograms/Source/PokemonLA/Programs/ML/PokemonLA_GeneratePokemonImageTrainingData.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const TravelLocation& to_travel_location(StartingLocation location){
3030

3131
switch(location){
3232
case StartingLocation::JUBILIFE_VILLAGE:
33-
break;
33+
return locations.Village_FrontGate;
3434
case StartingLocation::FIELDLANDS_FIELDLANDS:
3535
return locations.Fieldlands_Fieldlands;
3636
case StartingLocation::FIELDLANDS_HEIGHTS:
@@ -147,12 +147,18 @@ void GeneratePokemonImageTrainingData::select_starting_location(SingleSwitchProg
147147
StartingLocation location = STARTING_LOCATION;
148148
const TravelLocation& travel_loc = to_travel_location(location);
149149
// fast travel to the target camp to reset player character position
150-
goto_any_camp_from_overworld(env, env.console, context, travel_loc);
150+
fast_travel_from_overworld(env, env.console, context, travel_loc);
151151

152152
// move to the npc to open box system
153153
switch(location){
154154
case StartingLocation::JUBILIFE_VILLAGE:
155155
env.log("Starting at Jubilife Village");
156+
// at gate, face towards the gate
157+
pbf_move_left_joystick(context, 128, 255, 240, 30); // move backwards
158+
pbf_move_left_joystick(context, 255, 150, 120, 60); // move to right
159+
pbf_press_button(context, BUTTON_ZL, 30, 125); // rotate camera to point to where the character is facing
160+
pbf_move_left_joystick(context, 128, 0, 700, 30); // move forward
161+
pbf_move_left_joystick(context, 255, 125, 30, 60); // move to right
156162
break;
157163
case StartingLocation::FIELDLANDS_FIELDLANDS:
158164
env.log("Starting at Fieldlands - Fieldlands Camp");

SerialPrograms/Source/PokemonLA/Programs/PokemonLA_RegionNavigation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ void goto_camp_from_overworld(
472472
context.wait_for(GameSettings::instance().POST_WARP_DELAY0);
473473
}
474474

475-
void goto_any_camp_from_overworld(
475+
void fast_travel_from_overworld(
476476
ProgramEnvironment& env, VideoStream& stream, ProControllerContext& context,
477477
const TravelLocation& location
478478
){
@@ -531,7 +531,7 @@ void goto_any_camp_from_overworld(
531531
{{detector}}
532532
);
533533
if (ret >= 0){
534-
stream.log("Flying back to camp...");
534+
stream.log("Fast traveling...");
535535
pbf_wait(context, 50);
536536
if (location.warp_slot != 0){
537537
for (size_t c = 0; c < location.warp_slot; c++){

SerialPrograms/Source/PokemonLA/Programs/PokemonLA_RegionNavigation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void goto_camp_from_overworld(
5151

5252
// From overworld, open map, press X to open the fast travel popup menu and go to the specified
5353
// travel location.
54-
void goto_any_camp_from_overworld(
54+
void fast_travel_from_overworld(
5555
ProgramEnvironment& env, VideoStream& stream, ProControllerContext& context,
5656
const TravelLocation& location
5757
);

SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_AutoMultiSpawn.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ void AutoMultiSpawn::program(SingleSwitchProgramEnvironment& env, ProControllerC
306306
env.log("The path is: " + os.str());
307307
}
308308

309-
goto_any_camp_from_overworld(env, env.console, context, TravelLocations::instance().Mirelands_Mirelands);
309+
fast_travel_from_overworld(env, env.console, context, TravelLocations::instance().Mirelands_Mirelands);
310310
change_time_of_day_at_tent(env.console, context, path_times[0], Camp::MIRELANDS_MIRELANDS);
311311

312312
for(size_t iStep = 0; iStep < path_despawns.size(); iStep++){
@@ -358,7 +358,7 @@ void AutoMultiSpawn::advance_one_path_step(
358358
pbf_press_button(context, BUTTON_X, 20, 230);
359359
}
360360

361-
goto_any_camp_from_overworld(env, env.console, context, TravelLocations::instance().Mirelands_Mirelands);
361+
fast_travel_from_overworld(env, env.console, context, TravelLocations::instance().Mirelands_Mirelands);
362362

363363
// We try at most three battles to remove pokemon
364364
size_t already_removed_pokemon = 0;
@@ -427,7 +427,7 @@ size_t AutoMultiSpawn::try_one_battle_to_remove_pokemon(
427427
env.log("Cannot focus on any pokemon. Retry.");
428428
// TODO: escape routine may scare wild pokemon. A better way is to reset and load from the backup save?
429429
// or load from a previous save?
430-
goto_any_camp_from_overworld(env, env.console, context, TravelLocations::instance().Mirelands_Mirelands);
430+
fast_travel_from_overworld(env, env.console, context, TravelLocations::instance().Mirelands_Mirelands);
431431
// TODO: May need to reset time of day here
432432
}
433433

@@ -563,7 +563,7 @@ size_t AutoMultiSpawn::try_one_battle_to_remove_pokemon(
563563
}
564564
}
565565

566-
goto_any_camp_from_overworld(env, env.console, context, TravelLocations::instance().Mirelands_Mirelands);
566+
fast_travel_from_overworld(env, env.console, context, TravelLocations::instance().Mirelands_Mirelands);
567567
return num_removed_pokemon;
568568
}
569569

SerialPrograms/Source/PokemonLA/Programs/ShinyHunting/PokemonLA_BurmyFinder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ void BurmyFinder::go_to_height_camp(SingleSwitchProgramEnvironment& env, ProCont
285285
int ret = run_until<ProControllerContext>(
286286
env.console, context,
287287
[&](ProControllerContext& context){
288-
goto_any_camp_from_overworld(env, env.console, context, TravelLocations::instance().Fieldlands_Heights);
288+
fast_travel_from_overworld(env, env.console, context, TravelLocations::instance().Fieldlands_Heights);
289289
},
290290
{
291291
{battle_menu_detector},
@@ -302,7 +302,7 @@ void BurmyFinder::go_to_height_camp(SingleSwitchProgramEnvironment& env, ProCont
302302
// Finish battle
303303
handle_battle(env, context);
304304
// Go back to camp
305-
goto_any_camp_from_overworld(env, env.console, context, TravelLocations::instance().Fieldlands_Heights);
305+
fast_travel_from_overworld(env, env.console, context, TravelLocations::instance().Fieldlands_Heights);
306306
}
307307
}
308308

0 commit comments

Comments
 (0)