Support for getting a creatures actual talent.
continuous-integration/drone/push Build is passing Details

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
Deukhoofd 2020-09-05 14:51:06 +02:00
parent a0ae9e8523
commit def38e98c6
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
2 changed files with 5 additions and 0 deletions

View File

@ -65,6 +65,10 @@ export uint8_t CreatureLib_Creature_Heal(Creature* p, uint32_t health, bool canR
Try(p->Heal(health, canRevive);) Try(p->Heal(health, canRevive);)
} }
export uint8_t CreatureLib_Creature_RestoreAllAttackUses(Creature* p) { Try(p->RestoreAllAttackUses();) } export uint8_t CreatureLib_Creature_RestoreAllAttackUses(Creature* p) { Try(p->RestoreAllAttackUses();) }
export bool CreatureLib_Creature_GetRealTalentIsSecret(const Creature* p) { return p->GetRealTalent().IsSecret(); }
export bool CreatureLib_Creature_GetRealTalentIndex(const Creature* p) { return p->GetRealTalent().GetIndex(); }
export uint8_t CreatureLib_Creature_GetActiveTalent(const Creature* p, const char*& out) { export uint8_t CreatureLib_Creature_GetActiveTalent(const Creature* p, const char*& out) {
Try(out = p->GetActiveTalent().c_str();) Try(out = p->GetActiveTalent().c_str();)
} }

View File

@ -114,6 +114,7 @@ namespace CreatureLib::Battling {
inline bool IsOnBattleField() const { return _onBattleField; } inline bool IsOnBattleField() const { return _onBattleField; }
inline std::string_view GetNickname() const noexcept { return _nickname; } inline std::string_view GetNickname() const noexcept { return _nickname; }
const CreatureLib::Library::TalentIndex& GetRealTalent() const noexcept { return _talentIndex; }
const ArbUt::StringView& GetActiveTalent() const; const ArbUt::StringView& GetActiveTalent() const;
[[nodiscard]] bool IsFainted() const noexcept; [[nodiscard]] bool IsFainted() const noexcept;