Several fixes and improvements.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -19,6 +19,8 @@ namespace PkmnLib::Battling {
|
||||
.count())
|
||||
: CreatureLib::Battling::Battle(library, parties, canFlee, numberOfSides, creaturesPerSide, randomSeed) {}
|
||||
|
||||
virtual ~Battle() = default;
|
||||
|
||||
void SetWeather(const ArbUt::StringView& name);
|
||||
void ClearWeather();
|
||||
const ArbUt::StringView& GetWeatherName() noexcept {
|
||||
|
||||
@@ -29,8 +29,8 @@ namespace PkmnLib::Battling {
|
||||
ArbUt::BorrowedPtr<const PkmnLib::Library::Nature> nature, bool allowedExperienceGain = true)
|
||||
: CreatureLib::Battling::Creature(library.ForceAs<const CreatureLib::Battling::BattleLibrary>(),
|
||||
species.ForceAs<const CreatureLib::Library::CreatureSpecies>(),
|
||||
forme.As<const CreatureLib::Library::SpeciesVariant>(), level, experience,
|
||||
uid, gender, coloring, heldItem.As<const CreatureLib::Library::Item>(),
|
||||
forme.ForceAs<const CreatureLib::Library::SpeciesVariant>(), level, experience,
|
||||
uid, gender, coloring, heldItem.ForceAs<const CreatureLib::Library::Item>(),
|
||||
nickname, talent, moves, allowedExperienceGain),
|
||||
_individualValues(individualValues), _effortValues(effortValues), _nature(nature),
|
||||
_friendship(species->GetBaseHappiness()) {}
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace PkmnLib::Battling {
|
||||
PokemonParty(std::initializer_list<CreatureLib::Battling::Creature*> party)
|
||||
: CreatureLib::Battling::CreatureParty(party) {}
|
||||
|
||||
ArbUt::BorrowedPtr<Pokemon> GetAtIndex(int index) const {
|
||||
ArbUt::OptionalBorrowedPtr<Pokemon> GetAtIndex(int index) const {
|
||||
return CreatureLib::Battling::CreatureParty::GetAtIndex(index).As<Pokemon>();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user