61 lines
3.5 KiB
Ada
61 lines
3.5 KiB
Ada
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||
|
-- Copyright (c) 2023 - Ognjen 'xolatile' Milan Robovic
|
||
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||
|
-- 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
|
||
|
-- 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
|
||
|
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||
|
-- 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, but realized that I keep my folders messy... Since it's bothersome to find my old Ada projects and share them here, I decided that the most easy thing to do is to
|
||
|
-- write a new program in Ada, a tiny game. Work in progress, it's messy and ugly for now...
|
||
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||
|
|
||
|
with core;
|
||
|
use core;
|
||
|
|
||
|
package ammunition is
|
||
|
|
||
|
------------------------------------------------------------------------------------------
|
||
|
|
||
|
type ammunition_list is (
|
||
|
ARROWS, BOLTS, SLINGSHOTS, JARIDS
|
||
|
);
|
||
|
|
||
|
type ammunition_mark is mod 72;
|
||
|
|
||
|
------------------------------------------------------------------------------------------
|
||
|
|
||
|
type ammunition_constant_type is new entity_constant_type with
|
||
|
record
|
||
|
value : natural := 0;
|
||
|
weight : natural := 0;
|
||
|
dual_wield : boolean := false;
|
||
|
amount_limit : natural := 0;
|
||
|
attack_range : natural := 0;
|
||
|
distance_range : natural := 0;
|
||
|
end record;
|
||
|
|
||
|
type ammunition_variable_type is new entity_variable_type with
|
||
|
record
|
||
|
amount : natural := 0;
|
||
|
enchantment : natural := 0;
|
||
|
end record;
|
||
|
|
||
|
type ammunition_constant_list is array (ammunition_list) of ammunition_constant_type;
|
||
|
type ammunition_variable_list is array (ammunition_mark) of ammunition_variable_type;
|
||
|
|
||
|
------------------------------------------------------------------------------------------
|
||
|
|
||
|
ammunition_constant_data : constant ammunition_constant_list := (
|
||
|
(ENTITY_AMMUNITION, "Arrows ", '^', COLOUR_RED, EFFECT_NORMAL, 11, 13, false, 23, 7, 67),
|
||
|
(ENTITY_AMMUNITION, "Bolts ", '^', COLOUR_RED, EFFECT_NORMAL, 13, 23, false, 29, 5, 67),
|
||
|
(ENTITY_AMMUNITION, "Slingshots ", '^', COLOUR_RED, EFFECT_NORMAL, 5, 7, true, 43, 7, 67),
|
||
|
(ENTITY_AMMUNITION, "Jarids ", '^', COLOUR_RED, EFFECT_NORMAL, 29, 37, true, 7, 7, 67)
|
||
|
);
|
||
|
|
||
|
ammunition_variable_data : ammunition_variable_list;
|
||
|
|
||
|
------------------------------------------------------------------------------------------
|
||
|
|
||
|
end ammunition;
|