Several fixes and improvements.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-12-28 15:11:06 +01:00
parent bbb2691b91
commit 31008c0107
7 changed files with 70 additions and 20 deletions

View File

@@ -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 {

View File

@@ -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()) {}

View File

@@ -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>();
}
};