Implements marking opponents as seen.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-12-14 12:40:50 +01:00
parent c25d7b865e
commit 3baed93597
5 changed files with 58 additions and 2 deletions

View File

@@ -47,6 +47,7 @@ namespace CreatureLib::Battling {
bool _hasOverridenTalent;
std::string _overridenTalentName = "";
std::unordered_set<Creature*> _seenOpponents = {};
std::vector<LearnedAttack*> _attacks;
@@ -69,7 +70,7 @@ namespace CreatureLib::Battling {
void SetBattleData(Battle* battle, BattleSide* side);
Battle* GetBattle() const;
BattleSide* GetBattleSide() const;
void SetOnBattleField(bool value) {_onBattleField = value;}
void SetOnBattleField(bool value) { _onBattleField = value; }
bool IsOnBattleField() const { return _onBattleField; }
const std::string& GetNickname() const;
@@ -83,6 +84,9 @@ namespace CreatureLib::Battling {
void Damage(uint32_t damage, DamageSource source);
void OverrideActiveTalent(const std::string& talent);
void MarkOpponentAsSeen(Creature* creature) { _seenOpponents.insert(creature); }
const std::unordered_set<Creature*>& GetSeenOpponents() const { return _seenOpponents; }
void GetActiveScripts(std::vector<ScriptWrapper>& scripts) override;
void ClearVolatileScripts();