diff --git a/conanfile.py b/conanfile.py index 978d7f8..f478ed7 100644 --- a/conanfile.py +++ b/conanfile.py @@ -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: diff --git a/src/Battling/Pokemon/PokemonParty.hpp b/src/Battling/Pokemon/PokemonParty.hpp new file mode 100644 index 0000000..3ffa299 --- /dev/null +++ b/src/Battling/Pokemon/PokemonParty.hpp @@ -0,0 +1,21 @@ +#ifndef PKMNLIB_POKEMONPARTY_HPP +#define PKMNLIB_POKEMONPARTY_HPP + +#include +#include +#include "Pokemon.hpp" +namespace PkmnLib::Battling { + class PokemonParty : public CreatureLib::Battling::CreatureParty { + public: + PokemonParty(std::vector party) + : CreatureLib::Battling::CreatureParty(std::move(party)) {} + PokemonParty(std::initializer_list party) + : CreatureLib::Battling::CreatureParty(party) {} + + Pokemon* GetAtIndex(int index) const { + return dynamic_cast(CreatureLib::Battling::CreatureParty::GetAtIndex(index)); + } + }; +} + +#endif // PKMNLIB_POKEMONPARTY_HPP