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...
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 line
2.9KB

  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 magic is
  10. ------------------------------------------------------------------------------------------
  11. type list is (
  12. ignite, illuminate, bladecharm, battlecry
  13. );
  14. type mark is mod 72;
  15. ------------------------------------------------------------------------------------------
  16. type constant_type is new core.constant_type with
  17. record
  18. self : boolean := false;
  19. health : integer := 0;
  20. armour : integer := 0;
  21. mana : integer := 0;
  22. stamina : integer := 0;
  23. distance : integer := 0;
  24. tribute : natural := 0;
  25. end record;
  26. type variable_type is new core.variable_type with
  27. record
  28. enchantment : natural := 0;
  29. end record;
  30. type constant_list is array (list) of constant_type;
  31. type variable_list is array (mark) of variable_type;
  32. ------------------------------------------------------------------------------------------
  33. constant_data : constant constant_list := (
  34. (core.magic, "Ignite ", '*', core.colour.yellow, core.effect.italic, false, -3, 0, 0, -1, 7, 1),
  35. (core.magic, "Illuminate ", '*', core.colour.yellow, core.effect.italic, false, 0, 0, 0, -1, 13, 1),
  36. (core.magic, "Bladecharm ", '*', core.colour.red, core.effect.italic, true, 0, -3, 0, -1, 7, 3),
  37. (core.magic, "Battlecry ", '*', core.colour.red, core.effect.italic, true, -1, -1, 0, -1, 7, 2)
  38. );
  39. variable_data : variable_list;
  40. ------------------------------------------------------------------------------------------
  41. procedure generate;
  42. procedure render;
  43. ------------------------------------------------------------------------------------------
  44. end magic;