Prototype game engine for Heroes of Might & Magic, featuring a gameplay plot-twist...
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

71 строка
3.6KB

  1. -- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic
  2. --
  3. -- GNU General Public Licence (version 3 or later)
  4. with core, effect, attribute, faction, equipment;
  5. package unit is
  6. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  7. type enumeration is (
  8. dwarf_base, fairy_base, gnoll_base, goblin_base, imp_base, kobold_base
  9. );
  10. ------------------------------------------------------------------------------------------
  11. type information is record
  12. name : core.short_string;
  13. kind : faction.enumeration;
  14. attributes : attribute.points;
  15. evoke : effect.value;
  16. text : core.long_string;
  17. end record;
  18. type value is record
  19. name : core.short_string := "-- ";
  20. kind : enumeration := imp_base;
  21. state : core.animation := core.idle;
  22. attributes : attribute.points := (others => 0);
  23. equipments : equipment.equip_array := (others => equipment.none);
  24. end record;
  25. type value_limit is range 0 .. 90;
  26. type value_array is array (value_limit) of value;
  27. ------------------------------------------------------------------------------------------
  28. count : constant natural := enumeration'pos (enumeration'last) + 1;
  29. trait : constant array (enumeration) of information := (
  30. ("Dwarf ", faction.dwarf, (others => 1), effect.none, " "),
  31. ("Fairy ", faction.fairy, (others => 1), effect.none, " "),
  32. ("Gnoll ", faction.gnoll, (others => 1), effect.none, " "),
  33. ("Goblin ", faction.goblin, (others => 1), effect.none, " "),
  34. ("Imp ", faction.imp, (others => 1), effect.none, " "),
  35. ("Kobold ", faction.kobold, (others => 1), effect.none, " ")
  36. );
  37. default_value : value;
  38. values : value_array := (
  39. ("Dwarf Berserker ", dwarf_base, core.idle, (3, 2, 1, 3, 2, 2), (equipment.main_hand => equipment.mithril_axe, others => equipment.none)),
  40. ("Dwarf Berserker ", dwarf_base, core.idle, (3, 2, 1, 3, 2, 2), (equipment.main_hand => equipment.mithril_battleaxe, others => equipment.none)),
  41. ("Dwarf Berserker ", dwarf_base, core.idle, (3, 2, 1, 3, 2, 2), (equipment.main_hand => equipment.mithril_mace, others => equipment.none)),
  42. --
  43. others => default_value
  44. );
  45. ------------------------------------------------------------------------------------------
  46. procedure configure;
  47. procedure draw (index : in enumeration; state : in core.animation; x, y : in integer);
  48. procedure draw_icon (index : in enumeration; x, y : in integer);
  49. procedure draw_view (index : in enumeration; x, y : in integer);
  50. procedure draw_full (index : in natural; x, y : in integer);
  51. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  52. end unit;