This commit is contained in:
27
src/Battling/EventHooks/StatusChangeEvent.hpp
Normal file
27
src/Battling/EventHooks/StatusChangeEvent.hpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef PKMNLIB_STATUSCHANGEEVENT_HPP
|
||||
#define PKMNLIB_STATUSCHANGEEVENT_HPP
|
||||
|
||||
#include <Arbutils/String/StringView.hpp>
|
||||
#include <CreatureLib/Battling/EventHooks/EventData.hpp>
|
||||
#include "../Pokemon/Pokemon.hpp"
|
||||
#include "PkmnEventKind.hpp"
|
||||
|
||||
namespace PkmnLib::Battling {
|
||||
class StatusChangeEvent : public CreatureLib::Battling::EventData {
|
||||
ArbUt::BorrowedPtr<Pokemon> _pokemon;
|
||||
ArbUt::StringView _statusName;
|
||||
|
||||
public:
|
||||
explicit StatusChangeEvent(const ArbUt::BorrowedPtr<Pokemon>& pkmn, const ArbUt::StringView& name)
|
||||
: _pokemon(pkmn), _statusName(name) {}
|
||||
|
||||
[[nodiscard]] CreatureLib::Battling::EventDataKind GetKind() const noexcept override {
|
||||
return static_cast<CreatureLib::Battling::EventDataKind>(PkmnEventDataKind::StatusChange);
|
||||
}
|
||||
|
||||
const ArbUt::BorrowedPtr<Pokemon>& GetPokemon() const noexcept { return _pokemon; }
|
||||
const ArbUt::StringView& GetStatusName() const noexcept { return _statusName; }
|
||||
};
|
||||
}
|
||||
|
||||
#endif // PKMNLIB_STATUSCHANGEEVENT_HPP
|
||||
Reference in New Issue
Block a user