Added canRevive parameter to Heal function, added Faint event.

This commit is contained in:
2020-03-09 16:29:41 +01:00
parent 3efd7a6974
commit 06336c64cd
5 changed files with 25 additions and 14 deletions

View File

@@ -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

View File

@@ -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