22 lines
793 B
C++
22 lines
793 B
C++
#ifndef CREATURELIB_SECONDARYEFFECT_HPP
|
|
#define CREATURELIB_SECONDARYEFFECT_HPP
|
|
|
|
#include <Arbutils/ConstString.hpp>
|
|
namespace CreatureLib::Library {
|
|
class SecondaryEffect {
|
|
private:
|
|
float _chance;
|
|
Arbutils::CaseInsensitiveConstString _effectName;
|
|
|
|
public:
|
|
SecondaryEffect() noexcept : _chance(0), _effectName(Arbutils::CaseInsensitiveConstString("")) {}
|
|
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
|