Reworks attack scripts to handle effect chance and effect name through data files.
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:
21
src/Library/Attacks/SecondaryEffect.hpp
Normal file
21
src/Library/Attacks/SecondaryEffect.hpp
Normal 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
|
||||
Reference in New Issue
Block a user