BattleConstants.h 3.1 KB

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