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
Expand Up @@ -46,6 +46,11 @@
#include "PokemonSV_AutoStory_Segment_22.h"
#include "PokemonSV_AutoStory_Segment_23.h"
#include "PokemonSV_AutoStory_Segment_24.h"
#include "PokemonSV_AutoStory_Segment_25.h"
#include "PokemonSV_AutoStory_Segment_26.h"
#include "PokemonSV_AutoStory_Segment_27.h"
#include "PokemonSV_AutoStory_Segment_28.h"
#include "PokemonSV_AutoStory_Segment_29.h"
#include "PokemonSV_AutoStory.h"

#include <iostream>
Expand Down Expand Up @@ -88,8 +93,13 @@ std::vector<std::unique_ptr<AutoStory_Segment>> make_autoStory_segment_list(){
segment_list.emplace_back(std::make_unique<AutoStory_Segment_20>());
segment_list.emplace_back(std::make_unique<AutoStory_Segment_21>());
segment_list.emplace_back(std::make_unique<AutoStory_Segment_22>());
// segment_list.emplace_back(std::make_unique<AutoStory_Segment_23>());
segment_list.emplace_back(std::make_unique<AutoStory_Segment_23>());
// segment_list.emplace_back(std::make_unique<AutoStory_Segment_24>());
// segment_list.emplace_back(std::make_unique<AutoStory_Segment_25>());
// segment_list.emplace_back(std::make_unique<AutoStory_Segment_26>());
// segment_list.emplace_back(std::make_unique<AutoStory_Segment_27>());
// segment_list.emplace_back(std::make_unique<AutoStory_Segment_28>());
// segment_list.emplace_back(std::make_unique<AutoStory_Segment_29>());

return segment_list;
};
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class AutoStory_Segment_23 : public AutoStory_Segment{
};


// start:
// end:
// start: Defeated Levincia Gym (Electric). At Levincia (North) Pokecenter.
// end: At East Province (Area Three) Watchtower.
void checkpoint_54(
SingleSwitchProgramEnvironment& env,
ProControllerContext& context,
Expand All @@ -37,62 +37,6 @@ void checkpoint_54(
);


// start:
// end:
void checkpoint_55(
SingleSwitchProgramEnvironment& env,
ProControllerContext& context,
EventNotificationOption& notif_status_update,
AutoStoryStats& stats
);

// start:
// end:
void checkpoint_56(
SingleSwitchProgramEnvironment& env,
ProControllerContext& context,
EventNotificationOption& notif_status_update,
AutoStoryStats& stats
);

// start:
// end:
void checkpoint_57(
SingleSwitchProgramEnvironment& env,
ProControllerContext& context,
EventNotificationOption& notif_status_update,
AutoStoryStats& stats
);

// start:
// end:
void checkpoint_58(
SingleSwitchProgramEnvironment& env,
ProControllerContext& context,
EventNotificationOption& notif_status_update,
AutoStoryStats& stats
);

// start:
// end:
void checkpoint_59(
SingleSwitchProgramEnvironment& env,
ProControllerContext& context,
EventNotificationOption& notif_status_update,
AutoStoryStats& stats
);

// start:
// end:
void checkpoint_60(
SingleSwitchProgramEnvironment& env,
ProControllerContext& context,
EventNotificationOption& notif_status_update,
AutoStoryStats& stats
);




}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,153 @@ void AutoStory_Segment_24::run_segment(
}


void checkpoint_55(
SingleSwitchProgramEnvironment& env,
ProControllerContext& context,
EventNotificationOption& notif_status_update,
AutoStoryStats& stats
){
checkpoint_reattempt_loop(env, context, notif_status_update, stats,
[&](size_t attempt_number){

// todo: try to align to left side of tunnel. then charge at Orthworm
// reset if caught in battle.
/////////////////////

// get_off_ride(env.program_info(), env.console, context);


// direction.change_direction(env.program_info(), env.console, context, 0.261);
// pbf_move_left_joystick(context, 128, 0, 500, 100);
// pbf_move_left_joystick(context, 0, 0, 500, 100);

// // now aligned to corner.

// direction.change_direction(env.program_info(), env.console, context, 3.736);
// pbf_move_left_joystick(context, 128, 0, 400, 100);

// direction.change_direction(env.program_info(), env.console, context, 5.306);
// pbf_move_left_joystick(context, 128, 0, 700, 100);


// direction.change_direction(env.program_info(), env.console, context, 4.988);
// pbf_move_left_joystick(context, 128, 0, 800, 100);
// pbf_move_left_joystick(context, 255, 0, 500, 100);

// // now aligned to the wall next to the hole/passage

// // walk away from wall slightly
// pbf_move_left_joystick(context, 128, 255, 50, 100);
// get_on_ride(env.program_info(), env.console, context);

// direction.change_direction(env.program_info(), env.console, context, 0.366);
// pbf_move_left_joystick(context, 128, 0, 250, 100);

// direction.change_direction(env.program_info(), env.console, context, 2.565);
// // run at Orthworm. run into its second position as well.
// pbf_move_left_joystick(context, 128, 0, 50, 0);
// pbf_controller_state(context, BUTTON_LCLICK, DPAD_NONE, 128, 0, 128, 128, 500);
// pbf_move_left_joystick(context, 255, 0, 500, 500);

// get_off_ride(env.program_info(), env.console, context);

// direction.change_direction(env.program_info(), env.console, context, 0.261);
// pbf_move_left_joystick(context, 128, 0, 500, 100);
// pbf_move_left_joystick(context, 0, 0, 500, 100);

// // now aligned to corner.

// direction.change_direction(env.program_info(), env.console, context, 3.736);
// pbf_move_left_joystick(context, 128, 0, 400, 100);

// direction.change_direction(env.program_info(), env.console, context, 5.306);
// pbf_move_left_joystick(context, 128, 0, 700, 100);


// direction.change_direction(env.program_info(), env.console, context, 4.988);
// pbf_move_left_joystick(context, 128, 0, 800, 100);
// pbf_move_left_joystick(context, 255, 0, 500, 100);

// // now aligned to the wall next to the hole/passage


});

}

void checkpoint_56(
SingleSwitchProgramEnvironment& env,
ProControllerContext& context,
EventNotificationOption& notif_status_update,
AutoStoryStats& stats
){
checkpoint_reattempt_loop(env, context, notif_status_update, stats,
[&](size_t attempt_number){


});

}

void checkpoint_57(
SingleSwitchProgramEnvironment& env,
ProControllerContext& context,
EventNotificationOption& notif_status_update,
AutoStoryStats& stats
){
checkpoint_reattempt_loop(env, context, notif_status_update, stats,
[&](size_t attempt_number){


});

}

void checkpoint_58(
SingleSwitchProgramEnvironment& env,
ProControllerContext& context,
EventNotificationOption& notif_status_update,
AutoStoryStats& stats
){
checkpoint_reattempt_loop(env, context, notif_status_update, stats,
[&](size_t attempt_number){


});

}

void checkpoint_59(
SingleSwitchProgramEnvironment& env,
ProControllerContext& context,
EventNotificationOption& notif_status_update,
AutoStoryStats& stats
){
checkpoint_reattempt_loop(env, context, notif_status_update, stats,
[&](size_t attempt_number){


});

}

void checkpoint_60(
SingleSwitchProgramEnvironment& env,
ProControllerContext& context,
EventNotificationOption& notif_status_update,
AutoStoryStats& stats
){
checkpoint_reattempt_loop(env, context, notif_status_update, stats,
[&](size_t attempt_number){


});

}





}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,62 @@ class AutoStory_Segment_24 : public AutoStory_Segment{
};


// start: At East Province (Area Three) Watchtower.
// end:
void checkpoint_55(
SingleSwitchProgramEnvironment& env,
ProControllerContext& context,
EventNotificationOption& notif_status_update,
AutoStoryStats& stats
);

// start:
// end:
void checkpoint_56(
SingleSwitchProgramEnvironment& env,
ProControllerContext& context,
EventNotificationOption& notif_status_update,
AutoStoryStats& stats
);

// start:
// end:
void checkpoint_57(
SingleSwitchProgramEnvironment& env,
ProControllerContext& context,
EventNotificationOption& notif_status_update,
AutoStoryStats& stats
);

// start:
// end:
void checkpoint_58(
SingleSwitchProgramEnvironment& env,
ProControllerContext& context,
EventNotificationOption& notif_status_update,
AutoStoryStats& stats
);

// start:
// end:
void checkpoint_59(
SingleSwitchProgramEnvironment& env,
ProControllerContext& context,
EventNotificationOption& notif_status_update,
AutoStoryStats& stats
);

// start:
// end:
void checkpoint_60(
SingleSwitchProgramEnvironment& env,
ProControllerContext& context,
EventNotificationOption& notif_status_update,
AutoStoryStats& stats
);





}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/* AutoStory
*
* From: https://github.com/PokemonAutomation/
*
*/

#include "CommonFramework/Exceptions/OperationFailedException.h"
#include "CommonTools/Async/InferenceRoutines.h"
#include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h"
#include "PokemonSV/Programs/PokemonSV_GameEntry.h"
#include "PokemonSV/Programs/PokemonSV_SaveGame.h"
#include "PokemonSV/Programs/PokemonSV_MenuNavigation.h"
#include "PokemonSV/Programs/PokemonSV_WorldNavigation.h"
#include "PokemonSV_AutoStoryTools.h"
#include "PokemonSV_AutoStory_Segment_25.h"

//#include <iostream>
//using std::cout;
//using std::endl;
//#include <unordered_map>
//#include <algorithm>

namespace PokemonAutomation{
namespace NintendoSwitch{
namespace PokemonSV{




std::string AutoStory_Segment_25::name() const{
return "";
}

std::string AutoStory_Segment_25::start_text() const{
return "Start: ";
}

std::string AutoStory_Segment_25::end_text() const{
return "End: ";
}

void AutoStory_Segment_25::run_segment(
SingleSwitchProgramEnvironment& env,
ProControllerContext& context,
AutoStoryOptions options,
AutoStoryStats& stats
) const{


stats.m_segment++;
env.update_stats();
context.wait_for_all_requests();
env.console.log("Start Segment " + name(), COLOR_ORANGE);

// checkpoint_(env, context, options.notif_status_update, stats);

context.wait_for_all_requests();
env.console.log("End Segment " + name(), COLOR_GREEN);

}



}
}
}
Loading