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.

64 lines
3.5KB

  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 plant is
  10. ------------------------------------------------------------------------------------------
  11. type list is (
  12. oak_tree, pine_tree, birch_tree, acacia_tree, apple_tree, peach_tree, orange_tree, pear_tree,
  13. bush, thorny_bush, tall_grass, reed
  14. );
  15. type mark is mod 72;
  16. ------------------------------------------------------------------------------------------
  17. type constant_type is new core.constant_type with
  18. record
  19. health_limit : natural := 0;
  20. end record;
  21. type variable_type is new core.variable_type with
  22. record
  23. health : natural := 0;
  24. end record;
  25. type constant_list is array (list) of constant_type;
  26. type variable_list is array (mark) of variable_type;
  27. ------------------------------------------------------------------------------------------
  28. constant_data : constant constant_list := (
  29. (core.plant, "Oak Tree ", 'T', core.colour.green, core.effect.bold, 11),
  30. (core.plant, "Pine Tree ", 'T', core.colour.green, core.effect.bold, 23),
  31. (core.plant, "Birch Tree ", 'T', core.colour.green, core.effect.bold, 13),
  32. (core.plant, "Acacia Tree ", 'T', core.colour.green, core.effect.bold, 19),
  33. (core.plant, "Apple Tree ", 'T', core.colour.green, core.effect.bold, 17),
  34. (core.plant, "Peach Tree ", 'T', core.colour.green, core.effect.bold, 13),
  35. (core.plant, "Orange Tree ", 'T', core.colour.green, core.effect.bold, 11),
  36. (core.plant, "Pear Tree ", 'T', core.colour.green, core.effect.bold, 13),
  37. (core.plant, "Bush ", '&', core.colour.green, core.effect.normal, 5),
  38. (core.plant, "Thorny Bush ", '&', core.colour.green, core.effect.normal, 7),
  39. (core.plant, "Tall Grass ", '%', core.colour.green, core.effect.normal, 3),
  40. (core.plant, "Reed ", '%', core.colour.green, core.effect.normal, 3)
  41. );
  42. variable_data : variable_list;
  43. ------------------------------------------------------------------------------------------
  44. procedure generate;
  45. procedure render;
  46. ------------------------------------------------------------------------------------------
  47. end plant;