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

76 рядки
3.0KB

  1. -- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic
  2. --
  3. -- GNU General Public Licence (version 3 or later)
  4. with core, attribute, skill, resource, faction, equipment;
  5. package chad is
  6. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  7. type enumeration is (
  8. ada, richard, ognjen, wouter, john, marina
  9. );
  10. ------------------------------------------------------------------------------------------
  11. type information is record
  12. name : core.short_string;
  13. kind : faction.enumeration;
  14. bonus_attribute : attribute.enumeration;
  15. bonus_skill : skill.enumeration;
  16. bonus_resource : resource.enumeration;
  17. end record;
  18. item_limit : constant natural := 24;
  19. type item_array is array (0 .. item_limit - 1) of equipment.enumeration;
  20. type value is record
  21. index : enumeration;
  22. state : core.animation;
  23. x : integer;
  24. y : integer;
  25. health : core.point;
  26. mana : core.point;
  27. stamina : core.point;
  28. attributes : attribute.points;
  29. skills : skill.points;
  30. resources : resource.points;
  31. equipments : equipment.equip_array;
  32. item_count : natural;
  33. items : item_array;
  34. end record;
  35. type value_array is array (natural range <>) of value;
  36. ------------------------------------------------------------------------------------------
  37. count : constant natural := enumeration'pos (enumeration'last) + 1;
  38. trait : constant array (enumeration) of information := (
  39. ("Ada Augusta King ", faction.fairy, attribute.defense, skill.diplomacy, resource.metal),
  40. ("Richard Martin Stallman ", faction.dwarf, attribute.offense, skill.leadership, resource.wood),
  41. ("Ognjen Milan Robovic ", faction.kobold, attribute.stamina, skill.archery, resource.leather),
  42. ("Wouter van Oortmerssen ", faction.gnoll, attribute.speed, skill.medicine, resource.stone),
  43. ("John Warner Backus ", faction.goblin, attribute.wisdom, skill.sorcery, resource.gem),
  44. ("Marina Ann Hantzis ", faction.imp, attribute.reach, skill.necromancy, resource.gold)
  45. );
  46. ------------------------------------------------------------------------------------------
  47. procedure configure;
  48. procedure draw (player : in value; x, y : in integer);
  49. procedure draw_data (player : in value; x, y : in integer);
  50. procedure draw_menu (player : in value; x, y : in integer);
  51. function take_equipment_item (player : in out value; item : in equipment.enumeration) return boolean;
  52. procedure draw_pepe;
  53. procedure draw_alice;
  54. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  55. end chad;