Initialize Creature talent script when battle library is set, allow talent overriding
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:
@@ -44,6 +44,9 @@ namespace CreatureLib::Battling{
|
||||
int8_t _talentIndex;
|
||||
Script* _activeTalent = nullptr;
|
||||
|
||||
bool _hasOverridenTalent;
|
||||
std::string _overridenTalentName = "";
|
||||
|
||||
std::vector<LearnedAttack*> _attacks;
|
||||
|
||||
Script* _status = nullptr;
|
||||
@@ -57,19 +60,22 @@ namespace CreatureLib::Battling{
|
||||
|
||||
virtual ~Creature() = default;
|
||||
|
||||
const std::string& GetNickname() const;
|
||||
const std::string& GetTalent() const;
|
||||
void ChangeLevel(int8_t amount);
|
||||
void Damage(uint32_t damage, DamageSource source);
|
||||
|
||||
void SetBattleData(Battle* battle, BattleSide* side);
|
||||
Battle* GetBattle() const;
|
||||
BattleSide* GetBattleSide() const;
|
||||
|
||||
const std::string& GetNickname() const;
|
||||
const std::string& GetActiveTalent() const;
|
||||
|
||||
[[nodiscard]] bool IsFainted() const;
|
||||
[[nodiscard]] const std::vector<uint8_t>& GetTypes() const;
|
||||
[[nodiscard]] bool HasType(uint8_t type) const;
|
||||
|
||||
void ChangeLevel(int8_t amount);
|
||||
void Damage(uint32_t damage, DamageSource source);
|
||||
void OverrideActiveTalent(const std::string& talent);
|
||||
|
||||
|
||||
void GetActiveScripts(std::vector<ScriptWrapper> &scripts) override;
|
||||
|
||||
//region Stat APIs
|
||||
|
||||
Reference in New Issue
Block a user