Added canRevive parameter to Heal function, added Faint event.
This commit is contained in:
@@ -42,6 +42,16 @@ namespace CreatureLib::Battling {
|
||||
uint32_t GetOriginalHealth() const { return _originalHealth; }
|
||||
uint32_t GetNewHealth() const { return _newHealth; }
|
||||
};
|
||||
|
||||
class FaintEvent : public EventData {
|
||||
Creature* _creature;
|
||||
|
||||
public:
|
||||
FaintEvent(Creature* c) : _creature(c) {}
|
||||
EventDataKind GetKind() const override { return EventDataKind ::Faint; }
|
||||
Creature* GetCreature() const { return _creature; }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // CREATURELIB_EVENTDATA_HPP
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
#include <Arbutils/Enum.hpp>
|
||||
|
||||
namespace CreatureLib::Battling {
|
||||
ENUM(EventDataKind, uint8_t, Damage, Heal)
|
||||
ENUM(EventDataKind, uint8_t, Damage, Heal, Faint)
|
||||
|
||||
}
|
||||
|
||||
#endif // CREATURELIB_EVENTDATAKIND_HPP
|
||||
|
||||
Reference in New Issue
Block a user