Add PokemonParty class.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
f9f83f892d
commit
6fff01a994
|
@ -44,7 +44,7 @@ class PkmnLibConan(ConanFile):
|
|||
self.options["AngelScript"].link_std_statically = True
|
||||
|
||||
def requirements(self):
|
||||
self.requires("CreatureLib/da90c3d59e9b270b973bd52db24c38c14b298655@creaturelib/master")
|
||||
self.requires("CreatureLib/75bce0e32956193699145c4896288b1870c23677@creaturelib/master")
|
||||
if self.options.script_handler == "angelscript":
|
||||
self.requires("AngelScript/2.34@AngelScript/Deukhoofd")
|
||||
else:
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
#ifndef PKMNLIB_POKEMONPARTY_HPP
|
||||
#define PKMNLIB_POKEMONPARTY_HPP
|
||||
|
||||
#include <CreatureLib/Battling/Models/CreatureParty.hpp>
|
||||
#include <utility>
|
||||
#include "Pokemon.hpp"
|
||||
namespace PkmnLib::Battling {
|
||||
class PokemonParty : public CreatureLib::Battling::CreatureParty {
|
||||
public:
|
||||
PokemonParty(std::vector<CreatureLib::Battling::Creature*> party)
|
||||
: CreatureLib::Battling::CreatureParty(std::move(party)) {}
|
||||
PokemonParty(std::initializer_list<CreatureLib::Battling::Creature*> party)
|
||||
: CreatureLib::Battling::CreatureParty(party) {}
|
||||
|
||||
Pokemon* GetAtIndex(int index) const {
|
||||
return dynamic_cast<Pokemon*>(CreatureLib::Battling::CreatureParty::GetAtIndex(index));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // PKMNLIB_POKEMONPARTY_HPP
|
Loading…
Reference in New Issue