BattleAttackInfo.h 851 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * BattleAttackInfo.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 "BattleHex.h"
  12. VCMI_LIB_NAMESPACE_BEGIN
  13. namespace battle
  14. {
  15. class Unit;
  16. class CUnitState;
  17. }
  18. struct DLL_LINKAGE BattleAttackInfo
  19. {
  20. const battle::Unit * attacker;
  21. const battle::Unit * defender;
  22. BattleHex attackerPos;
  23. BattleHex defenderPos;
  24. int chargeDistance = 0;
  25. bool shooting = false;
  26. bool luckyStrike = false;
  27. bool unluckyStrike = false;
  28. bool deathBlow = false;
  29. bool doubleDamage = false;
  30. BattleAttackInfo(const battle::Unit * Attacker, const battle::Unit * Defender, int chargeDistance, bool Shooting);
  31. BattleAttackInfo reverse() const;
  32. };
  33. VCMI_LIB_NAMESPACE_END