forked from PokemonAutomation/Arduino-Source
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'PokemonAutomation:main' into flyingtrailfarmer
- Loading branch information
Showing
33 changed files
with
1,126 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
SerialPrograms/Source/PokemonSV/Options/PokemonSV_SinglesAIOption.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* Singles AI Option | ||
* | ||
* From: https://github.com/PokemonAutomation/Arduino-Source | ||
* | ||
*/ | ||
|
||
#include "Common/Cpp/Containers/FixedLimitVector.tpp" | ||
#include "Pokemon/Pokemon_Strings.h" | ||
#include "PokemonSV_SinglesAIOption.h" | ||
|
||
namespace PokemonAutomation{ | ||
namespace NintendoSwitch{ | ||
namespace PokemonSV{ | ||
|
||
using namespace Pokemon; | ||
|
||
|
||
|
||
SinglesAIOption::SinglesAIOption() | ||
: GroupOption( | ||
"Battle AI", | ||
LockMode::UNLOCK_WHILE_RUNNING, | ||
false, true | ||
) | ||
, description( | ||
"Move Tables: Run these sequence of moves for the corresponding " + STRING_POKEMON + " in your party. " | ||
"When the end of the table is reached, the last entry will be repeated " | ||
"until the battle is won or the " + STRING_POKEMON +" faints. " | ||
"If your " + STRING_POKEMON + " faints, the program will switch to the " | ||
"next available " + STRING_POKEMON + " and run its table. " | ||
"Changes to these tables take effect the next the " + STRING_POKEMON + " is sent out." | ||
) | ||
, MOVE_TABLES(6) | ||
{ | ||
MOVE_TABLES.emplace_back("<b>1st " + STRING_POKEMON + " Move Table:</b>"); | ||
MOVE_TABLES.emplace_back("<b>2nd " + STRING_POKEMON + " Move Table:</b>"); | ||
MOVE_TABLES.emplace_back("<b>3rd " + STRING_POKEMON + " Move Table:</b>"); | ||
MOVE_TABLES.emplace_back("<b>4th " + STRING_POKEMON + " Move Table:</b>"); | ||
MOVE_TABLES.emplace_back("<b>5th " + STRING_POKEMON + " Move Table:</b>"); | ||
MOVE_TABLES.emplace_back("<b>6th " + STRING_POKEMON + " Move Table:</b>"); | ||
|
||
PA_ADD_STATIC(description); | ||
size_t c = 0; | ||
for (SinglesMoveTable& table : MOVE_TABLES){ | ||
add_option(table, "MOVE_TABLE" + std::to_string(++c)); | ||
} | ||
} | ||
|
||
|
||
|
||
|
||
|
||
} | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
SerialPrograms/Source/PokemonSV/Options/PokemonSV_SinglesAIOption.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* Singles AI Option | ||
* | ||
* From: https://github.com/PokemonAutomation/Arduino-Source | ||
* | ||
*/ | ||
|
||
#ifndef PokemonAutomation_PokemonSV_SinglesAIOption_H | ||
#define PokemonAutomation_PokemonSV_SinglesAIOption_H | ||
|
||
#include "Common/Cpp/Containers/FixedLimitVector.h" | ||
#include "Common/Cpp/Options/StaticTextOption.h" | ||
//#include "Common/Cpp/Options/BooleanCheckBoxOption.h" | ||
#include "Common/Cpp/Options/GroupOption.h" | ||
#include "PokemonSV_SinglesMoveTable.h" | ||
|
||
namespace PokemonAutomation{ | ||
namespace NintendoSwitch{ | ||
namespace PokemonSV{ | ||
|
||
|
||
|
||
class SinglesAIOption : public GroupOption{ | ||
public: | ||
SinglesAIOption(); | ||
|
||
public: | ||
StaticTextOption description; | ||
FixedLimitVector<SinglesMoveTable> MOVE_TABLES; | ||
|
||
}; | ||
|
||
|
||
|
||
|
||
} | ||
} | ||
} | ||
#endif |
Oops, something went wrong.