30 lines
1023 B
C++
30 lines
1023 B
C++
#ifndef PKMNLIB_AI_POKEMONAI_HPP
|
|
#define PKMNLIB_AI_POKEMONAI_HPP
|
|
#include <CreatureLib/Battling/TurnChoices/BaseTurnChoice.hpp>
|
|
#include <PkmnLib/Battling/Battle/Battle.hpp>
|
|
#include <PkmnLib/Battling/Pokemon/Pokemon.hpp>
|
|
|
|
namespace PkmnLibAI {
|
|
class PokemonAI {
|
|
private:
|
|
public:
|
|
virtual ~PokemonAI() = default;
|
|
|
|
virtual CreatureLib::Battling::BaseTurnChoice* GetChoice(PkmnLib::Battling::Battle* battle,
|
|
PkmnLib::Battling::Pokemon* user) = 0;
|
|
|
|
virtual std::string GetName() const noexcept = 0;
|
|
|
|
CreatureLib::Battling::CreatureIndex GetOppositeIndex(PkmnLib::Battling::Pokemon* user) {
|
|
auto side = user->GetBattleSide().GetValue();
|
|
if (side->GetSideIndex() == 0) {
|
|
return CreatureLib::Battling::CreatureIndex(1, 0);
|
|
} else {
|
|
return CreatureLib::Battling::CreatureIndex(0, 0);
|
|
}
|
|
}
|
|
};
|
|
}
|
|
|
|
#endif // PKMNLIB_AI_POKEMONAI_HPP
|