Experimental minimal terminal rogue-like game in Ada programming language. I used to write a lot of Ada programs some time ago, then went in full C and assembly mode, and came back to Ada...
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.

62 wiersze
3.2KB

  1. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  2. -- Copyright (c) 2023 - Ognjen 'xolatile' Milan Robovic
  3. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  4. -- Xabina is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either
  5. -- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
  6. -- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  7. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  8. with core;
  9. package armour is
  10. ------------------------------------------------------------------------------------------
  11. type list is (
  12. iron_helmet, iron_chestplate, iron_gauntlets, iron_greaves, iron_cuisse, iron_fauld, iron_gardbrace, iron_rerebrace
  13. );
  14. type mark is mod 72;
  15. ------------------------------------------------------------------------------------------
  16. type constant_type is new core.constant_type with
  17. record
  18. value : natural := 0;
  19. weight : natural := 0;
  20. defense_range : natural := 0;
  21. end record;
  22. type variable_type is new core.variable_type with
  23. record
  24. enchantment : natural := 0;
  25. condition : natural := 0;
  26. end record;
  27. type constant_list is array (list) of constant_type;
  28. type variable_list is array (mark) of variable_type;
  29. ------------------------------------------------------------------------------------------
  30. constant_data : constant constant_list := (
  31. (core.armour, "Iron Helmet ", 'm', core.colour.yellow, core.effect.normal, 11, 31, 7),
  32. (core.armour, "Iron Chestplate ", 'M', core.colour.yellow, core.effect.bold, 23, 67, 11),
  33. (core.armour, "Iron Gauntlets ", 'i', core.colour.yellow, core.effect.normal, 13, 43, 7),
  34. (core.armour, "Iron Greaves ", 'I', core.colour.yellow, core.effect.normal, 19, 73, 13),
  35. (core.armour, "Iron Cuisse ", 'Y', core.colour.yellow, core.effect.bold, 17, 53, 10),
  36. (core.armour, "Iron Fauld ", '-', core.colour.yellow, core.effect.normal, 13, 37, 3),
  37. (core.armour, "Iron Gardbrace ", 'v', core.colour.yellow, core.effect.normal, 11, 41, 8),
  38. (core.armour, "Iron Rerebrace ", 'V', core.colour.yellow, core.effect.normal, 13, 47, 7)
  39. );
  40. variable_data : variable_list;
  41. ------------------------------------------------------------------------------------------
  42. procedure generate;
  43. procedure render;
  44. ------------------------------------------------------------------------------------------
  45. end armour;