Prototype game engine for Heroes of Might & Magic, featuring a gameplay plot-twist...
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

171 wiersze
14KB

  1. -- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic
  2. --
  3. -- GNU General Public Licence (version 3 or later)
  4. with core, effect, attribute, faction;
  5. package item is
  6. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  7. type slot is (
  8. with_body, full_body, head, chest, hands, feet,
  9. neck, main_hand, off_hand, bag, cloak, additional
  10. );
  11. type enumeration is (
  12. -- 04.05.2024.
  13. bone_chestplate, bronze_chestplate, chainmail_chestplate, crystal_chestplate, golden_chestplate, iron_chestplate,
  14. leather_chestplate, mithril_chestplate, steel_chestplate, bone_greaves, bronze_greaves, chainmail_greaves,
  15. crystal_greaves, golden_greaves, iron_greaves, leather_greaves, mithril_greaves, steel_greaves,
  16. black_tunic, blue_tunic, cyan_tunic, green_tunic, grey_tunic, lime_tunic,
  17. orange_tunic, pink_tunic, purple_tunic, red_tunic, white_tunic, yellow_tunic,
  18. bone_gauntlets, bronze_gauntlets, chainmail_gauntlets, crystal_gauntlets, golden_gauntlets, iron_gauntlets,
  19. leather_gauntlets, mithril_gauntlets, steel_gauntlets, bone_helmet, bronze_helmet, chainmail_helmet,
  20. crystal_helmet, golden_helmet, iron_helmet, leather_helmet, mithril_helmet, steel_helmet,
  21. bone_axe, bone_battleaxe, bone_bow, bone_mace, bone_spear, bone_sword,
  22. bronze_axe, bronze_greatsword, bronze_mace, bronze_spear, bronze_sword, club,
  23. crystal_bow, crystal_greatsword, crystal_mace, crystal_spear, crystal_sword, golden_axe,
  24. golden_battleaxe, golden_bow, golden_greatsword, golden_sword, iron_axe, iron_bow,
  25. iron_mace, iron_spear, iron_sword, jade_axe, jade_battleaxe, jade_greatsword,
  26. jade_mace, jade_spear, jade_sword, maul, mithril_axe, mithril_battleaxe,
  27. mithril_bow, mithril_mace, mithril_spear, sledge_hammer, spiked_club, spiked_staff,
  28. staff, steel_battleaxe, steel_bow, steel_greatsword, steel_mace, steel_sword,
  29. wooden_bow, wooden_greatsword, wooden_sword, golden_necklace, bronze_shield, crystal_shield,
  30. golden_shield, iron_shield, mithril_shield, steel_shield, wooden_shield
  31. );
  32. ------------------------------------------------------------------------------------------
  33. type information is record
  34. name : core.short_string;
  35. kind : slot;
  36. attributes : attribute.points;
  37. favor : faction.enumeration;
  38. evoke : effect.enumeration;
  39. end record;
  40. ------------------------------------------------------------------------------------------
  41. count : constant natural := enumeration'pos (enumeration'last) + 1;
  42. trait : constant array (enumeration) of information := (
  43. ("bone_chestplate, ", chest, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  44. ("bronze_chestplate, ", chest, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  45. ("chainmail_chestplate, ", chest, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  46. ("crystal_chestplate, ", chest, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  47. ("golden_chestplate, ", chest, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  48. ("iron_chestplate, ", chest, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  49. ("leather_chestplate, ", chest, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  50. ("mithril_chestplate, ", chest, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  51. ("steel_chestplate, ", chest, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  52. ("bone_greaves, ", feet, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  53. ("bronze_greaves, ", feet, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  54. ("chainmail_greaves, ", feet, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  55. ("crystal_greaves, ", feet, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  56. ("golden_greaves, ", feet, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  57. ("iron_greaves, ", feet, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  58. ("leather_greaves, ", feet, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  59. ("mithril_greaves, ", feet, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  60. ("steel_greaves, ", feet, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  61. ("black_tunic, ", full_body, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  62. ("blue_tunic, ", full_body, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  63. ("cyan_tunic, ", full_body, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  64. ("green_tunic, ", full_body, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  65. ("grey_tunic, ", full_body, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  66. ("lime_tunic, ", full_body, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  67. ("orange_tunic, ", full_body, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  68. ("pink_tunic, ", full_body, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  69. ("purple_tunic, ", full_body, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  70. ("red_tunic, ", full_body, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  71. ("white_tunic, ", full_body, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  72. ("yellow_tunic, ", full_body, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  73. ("bone_gauntlets, ", hands, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  74. ("bronze_gauntlets, ", hands, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  75. ("chainmail_gauntlets, ", hands, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  76. ("crystal_gauntlets, ", hands, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  77. ("golden_gauntlets, ", hands, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  78. ("iron_gauntlets, ", hands, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  79. ("leather_gauntlets, ", hands, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  80. ("mithril_gauntlets, ", hands, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  81. ("steel_gauntlets, ", hands, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  82. ("bone_helmet, ", head, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  83. ("bronze_helmet, ", head, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  84. ("chainmail_helmet, ", head, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  85. ("crystal_helmet, ", head, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  86. ("golden_helmet, ", head, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  87. ("iron_helmet, ", head, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  88. ("leather_helmet, ", head, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  89. ("mithril_helmet, ", head, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  90. ("steel_helmet, ", head, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  91. ("bone_axe, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  92. ("bone_battleaxe, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  93. ("bone_bow, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  94. ("bone_mace, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  95. ("bone_spear, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  96. ("bone_sword, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  97. ("bronze_axe, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  98. ("bronze_greatsword, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  99. ("bronze_mace, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  100. ("bronze_spear, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  101. ("bronze_sword, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  102. ("club, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  103. ("crystal_bow, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  104. ("crystal_greatsword, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  105. ("crystal_mace, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  106. ("crystal_spear, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  107. ("crystal_sword, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  108. ("golden_axe, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  109. ("golden_battleaxe, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  110. ("golden_bow, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  111. ("golden_greatsword, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  112. ("golden_sword, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  113. ("iron_axe, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  114. ("iron_bow, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  115. ("iron_mace, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  116. ("iron_spear, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  117. ("iron_sword, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  118. ("jade_axe, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  119. ("jade_battleaxe, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  120. ("jade_greatsword, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  121. ("jade_mace, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  122. ("jade_spear, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  123. ("jade_sword, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  124. ("maul, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  125. ("mithril_axe, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  126. ("mithril_battleaxe, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  127. ("mithril_bow, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  128. ("mithril_mace, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  129. ("mithril_spear, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  130. ("sledge_hammer, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  131. ("spiked_club, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  132. ("spiked_staff, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  133. ("staff, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  134. ("steel_battleaxe, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  135. ("steel_bow, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  136. ("steel_greatsword, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  137. ("steel_mace, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  138. ("steel_sword, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  139. ("wooden_bow, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  140. ("wooden_greatsword, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  141. ("wooden_sword, ", main_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  142. ("golden_necklace, ", neck, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  143. ("bronze_shield, ", off_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  144. ("crystal_shield, ", off_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  145. ("golden_shield, ", off_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  146. ("iron_shield, ", off_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  147. ("mithril_shield, ", off_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  148. ("steel_shield, ", off_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
  149. ("wooden_shield ", off_hand, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none)
  150. );
  151. ------------------------------------------------------------------------------------------
  152. procedure configure;
  153. procedure draw (index : in enumeration; x, y : in integer);
  154. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  155. end item;