Support for blocking a creature from gaining experience, don't give experience when a creature is fainted.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-05-20 15:18:27 +02:00
parent 6c40f4291d
commit 2e860192c7
4 changed files with 17 additions and 7 deletions

View File

@@ -10,10 +10,11 @@ Battling::Creature::Creature(const BattleLibrary* library, const Library::Creatu
const Library::SpeciesVariant* variant, uint8_t level, uint32_t experience, uint32_t uid,
Library::Gender gender, uint8_t coloring, const Library::Item* heldItem,
std::string nickname, const Library::TalentIndex& talent,
const List<LearnedAttack*>& attacks)
const List<LearnedAttack*>& attacks, bool allowedExperienceGain)
: _library(library), _species(species), _variant(variant), _level(level), _experience(experience),
_uniqueIdentifier(uid), _gender(gender), _coloring(coloring), _heldItem(heldItem), _nickname(std::move(nickname)),
_talentIndex(talent), _hasOverridenTalent(false), _attacks(attacks) {
_talentIndex(talent), _hasOverridenTalent(false), _attacks(attacks),
_allowedExperienceGain(allowedExperienceGain) {
AssertNotNull(library)
AssertNotNull(species)
AssertNotNull(variant)