ApplyDamage.h 836 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * ApplyDamage.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include <vcmi/events/ApplyDamage.h>
  12. VCMI_LIB_NAMESPACE_BEGIN
  13. namespace events
  14. {
  15. class DLL_LINKAGE CApplyDamage : public ApplyDamage
  16. {
  17. public:
  18. CApplyDamage(const Environment * env_, BattleStackAttacked * pack_, std::shared_ptr<battle::Unit> target_);
  19. bool isEnabled() const override;
  20. int64_t getInitialDamage() const override;
  21. int64_t getDamage() const override;
  22. void setDamage(int64_t value) override;
  23. const battle::Unit * getTarget() const override;
  24. private:
  25. int64_t initialDamage;
  26. BattleStackAttacked * pack;
  27. std::shared_ptr<battle::Unit> target;
  28. };
  29. }
  30. VCMI_LIB_NAMESPACE_END