Reworks attack scripts to handle effect chance and effect name through data files.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-04-06 12:02:29 +02:00
parent e2675d06fb
commit 340520e0e3
8 changed files with 68 additions and 21 deletions

View File

@@ -0,0 +1,21 @@
#ifndef CREATURELIB_SECONDARYEFFECT_HPP
#define CREATURELIB_SECONDARYEFFECT_HPP
#include <Arbutils/ConstString.hpp>
namespace CreatureLib::Library {
class SecondaryEffect {
private:
float _chance;
Arbutils::CaseInsensitiveConstString _effectName;
public:
constexpr SecondaryEffect() noexcept : _chance(0), _effectName(""_cnc) {}
constexpr SecondaryEffect(float chance, const Arbutils::CaseInsensitiveConstString& effectName) noexcept
: _chance(chance), _effectName(effectName) {}
constexpr float GetChance() const noexcept { return _chance; }
constexpr const Arbutils::CaseInsensitiveConstString& GetEffectName() const noexcept { return _effectName; }
};
}
#endif // CREATURELIB_SECONDARYEFFECT_HPP