BattleConstants.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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 EBattleEffect
  12. {
  13. // list of battle effects that have hardcoded triggers
  14. MAGIC_MIRROR = 3,
  15. FIRE_SHIELD = 11,
  16. FEAR = 15,
  17. GOOD_LUCK = 18,
  18. GOOD_MORALE = 20,
  19. BAD_MORALE = 30,
  20. BAD_LUCK = 48,
  21. RESURRECT = 50,
  22. DRAIN_LIFE = 52,
  23. POISON = 67,
  24. DEATH_BLOW = 73,
  25. REGENERATION = 74,
  26. MANA_DRAIN = 77,
  27. RESISTANCE = 78,
  28. INVALID = -1,
  29. };
  30. enum class EAnimationEvents {
  31. OPENING = 0, // battle opening sound is playing
  32. ACTION = 1, // there are any ongoing animations
  33. MOVEMENT = 2, // stacks are moving or turning around
  34. BEFORE_HIT = 3, // effects played before all attack/defence/hit animations
  35. ATTACK = 4, // attack and defence animations are playing
  36. HIT = 5, // hit & death animations are playing
  37. AFTER_HIT = 6, // after all hit & death animations are over
  38. COUNT
  39. };
  40. enum class EHeroAnimType
  41. {
  42. HOLDING = 0,
  43. IDLE = 1, // idling movement that happens from time to time
  44. DEFEAT = 2, // played when army loses stack or on friendly fire
  45. VICTORY = 3, // when enemy stack killed or huge damage is dealt
  46. CAST_SPELL = 4 // spellcasting
  47. };
  48. enum class ECreatureAnimType
  49. {
  50. INVALID = -1,
  51. MOVING = 0,
  52. MOUSEON = 1,
  53. HOLDING = 2, // base idling animation
  54. HITTED = 3, // base animation for when stack is taking damage
  55. DEFENCE = 4, // alternative animation for defending in melee if stack spent its action on defending
  56. DEATH = 5,
  57. DEATH_RANGED = 6, // Optional, alternative animation for when stack is killed by ranged attack
  58. TURN_L = 7,
  59. TURN_R = 8,
  60. //TURN_L2 = 9, //unused - identical to TURN_L
  61. //TURN_R2 = 10, //unused - identical to TURN_R
  62. ATTACK_UP = 11,
  63. ATTACK_FRONT = 12,
  64. ATTACK_DOWN = 13,
  65. SHOOT_UP = 14, // Shooters only
  66. SHOOT_FRONT = 15, // Shooters only
  67. SHOOT_DOWN = 16, // Shooters only
  68. SPECIAL_UP = 17, // If empty, fallback to SPECIAL_FRONT
  69. SPECIAL_FRONT = 18, // Used for any special moves - dragon breath, spellcasting, Pit Lord/Ogre Mage ability
  70. SPECIAL_DOWN = 19, // If empty, fallback to SPECIAL_FRONT
  71. MOVE_START = 20, // small animation to be played before MOVING
  72. MOVE_END = 21, // small animation to be played after MOVING
  73. DEAD = 22, // new group, used to show dead stacks. If empty - last frame from "DEATH" will be copied here
  74. 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
  75. RESURRECTION = 24, // new group, used for animating resurrection, if empty - reversed "DEATH" animation will be copiend here
  76. FROZEN = 25, // new group, used when stack animation is paused (e.g. petrified). If empty - consist of first frame from HOLDING animation
  77. CAST_UP = 30,
  78. CAST_FRONT = 31,
  79. CAST_DOWN = 32,
  80. GROUP_ATTACK_UP = 40,
  81. GROUP_ATTACK_FRONT = 41,
  82. GROUP_ATTACK_DOWN = 42
  83. };