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...
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

61 rinda
3.0KB

  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 ammunition is
  10. ------------------------------------------------------------------------------------------
  11. type list is (
  12. arrows, bolts, slingshots, jarids
  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. dual_wield : boolean := false;
  21. amount_limit : natural := 0;
  22. attack_range : natural := 0;
  23. distance_range : natural := 0;
  24. end record;
  25. type variable_type is new core.variable_type with
  26. record
  27. amount : natural := 0;
  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.ammunition, "Arrows ", '^', core.colour.red, core.effect.normal, 11, 13, false, 23, 7, 67),
  35. (core.ammunition, "Bolts ", '^', core.colour.red, core.effect.normal, 13, 23, false, 29, 5, 67),
  36. (core.ammunition, "Slingshots ", '^', core.colour.red, core.effect.normal, 5, 7, true, 43, 7, 67),
  37. (core.ammunition, "Jarids ", '^', core.colour.red, core.effect.normal, 29, 37, true, 7, 7, 67)
  38. );
  39. variable_data : variable_list;
  40. ------------------------------------------------------------------------------------------
  41. procedure generate;
  42. procedure render;
  43. ------------------------------------------------------------------------------------------
  44. end ammunition;