BattleConstants.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*
  2. * BattleConstants.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. enum class EAnimationEvents {
  12. OPENING = 0, // battle opening sound is playing
  13. ACTION = 1, // there are any ongoing animations
  14. MOVEMENT = 2, // stacks are moving or turning around
  15. ATTACK = 3, // attack and defense animations are playing
  16. HIT = 4, // hit & death animations are playing
  17. PROJECTILES = 5, // there are any flying projectiles
  18. COUNT
  19. };
  20. namespace EBattleEffect
  21. {
  22. enum EBattleEffect
  23. {
  24. // list of battle effects that have hardcoded triggers
  25. FEAR = 15,
  26. GOOD_LUCK = 18,
  27. GOOD_MORALE = 20,
  28. BAD_MORALE = 30,
  29. BAD_LUCK = 48,
  30. RESURRECT = 50,
  31. DRAIN_LIFE = 52, // hardcoded constant in CGameHandler
  32. POISON = 67,
  33. DEATH_BLOW = 73,
  34. REGENERATION = 74,
  35. MANA_DRAIN = 77,
  36. INVALID = -1,
  37. };
  38. }
  39. namespace EHeroAnimType
  40. {
  41. enum Type
  42. {
  43. HOLDING = 0,
  44. IDLE = 1, // idling movement that happens from time to time
  45. DEFEAT = 2, // played when army loses stack or on friendly fire
  46. VICTORY = 3, // when enemy stack killed or huge damage is dealt
  47. CAST_SPELL = 4 // spellcasting
  48. };
  49. }
  50. namespace ECreatureAnimType
  51. {
  52. enum Type // list of creature animations, numbers were taken from def files
  53. {
  54. MOVING = 0,
  55. MOUSEON = 1,
  56. HOLDING = 2, // base idling animation
  57. HITTED = 3, // base animation for when stack is taking damage
  58. DEFENCE = 4, // alternative animation for defending in melee if stack spent its action on defending
  59. DEATH = 5,
  60. DEATH_RANGED = 6, // alternative animation for when stack is killed by ranged attack
  61. TURN_L = 7,
  62. TURN_R = 8,
  63. //TURN_L2 = 9, //unused - identical to TURN_L
  64. //TURN_R2 = 10, //unused - identical to TURN_R
  65. ATTACK_UP = 11,
  66. ATTACK_FRONT = 12,
  67. ATTACK_DOWN = 13,
  68. SHOOT_UP = 14,
  69. SHOOT_FRONT = 15,
  70. SHOOT_DOWN = 16,
  71. CAST_UP = 17,
  72. CAST_FRONT = 18,
  73. CAST_DOWN = 19,
  74. MOVE_START = 20, // small animation to be played before MOVING
  75. MOVE_END = 21, // small animation to be played after MOVING
  76. DEAD = 22, // new group, used to show dead stacks. If empty - last frame from "DEATH" will be copied here
  77. DEAD_RANGED = 23, // new group, used to show dead stacks (if DEATH_RANGED was used). If empty - last frame from "DEATH_RANGED" will be copied here
  78. RESURRECTION = 24, // new group, used for animating resurrection, if empty - reversed "DEATH" animation will be copiend here
  79. VCMI_CAST_UP = 30,
  80. VCMI_CAST_FRONT = 31,
  81. VCMI_CAST_DOWN = 32,
  82. VCMI_2HEX_UP = 40,
  83. VCMI_2HEX_FRONT = 41,
  84. VCMI_2HEX_DOWN = 42
  85. };
  86. }