xabina/armour.ads

61 lines
3.9 KiB
Ada
Raw Normal View History

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- 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;
package armour is
------------------------------------------------------------------------------------------
type armour_list is (
IRON_HELMET, IRON_CHESTPLATE, IRON_GAUNTLETS, IRON_GREAVES, IRON_CUISSE, IRON_FAULD, IRON_GARDBRACE, IRON_REREBRACE
);
type armour_mark is mod 72;
------------------------------------------------------------------------------------------
2023-10-15 10:01:21 -04:00
type armour_constant_type is new core.entity_constant_type with
record
value : natural := 0;
weight : natural := 0;
defense_range : natural := 0;
end record;
2023-10-15 10:01:21 -04:00
type armour_variable_type is new core.entity_variable_type with
record
enchantment : natural := 0;
condition : natural := 0;
end record;
type armour_constant_list is array (armour_list) of armour_constant_type;
type armour_variable_list is array (armour_mark) of armour_variable_type;
------------------------------------------------------------------------------------------
armour_constant_data : constant armour_constant_list := (
2023-10-15 10:01:21 -04:00
(core.ENTITY_ARMOUR, "Iron Helmet ", 'm', core.colour.yellow, core.effect.normal, 11, 31, 7),
(core.ENTITY_ARMOUR, "Iron Chestplate ", 'M', core.colour.yellow, core.effect.bold, 23, 67, 11),
(core.ENTITY_ARMOUR, "Iron Gauntlets ", 'i', core.colour.yellow, core.effect.normal, 13, 43, 7),
(core.ENTITY_ARMOUR, "Iron Greaves ", 'I', core.colour.yellow, core.effect.normal, 19, 73, 13),
(core.ENTITY_ARMOUR, "Iron Cuisse ", 'Y', core.colour.yellow, core.effect.bold, 17, 53, 10),
(core.ENTITY_ARMOUR, "Iron Fauld ", '-', core.colour.yellow, core.effect.normal, 13, 37, 3),
(core.ENTITY_ARMOUR, "Iron Gardbrace ", 'v', core.colour.yellow, core.effect.normal, 11, 41, 8),
(core.ENTITY_ARMOUR, "Iron Rerebrace ", 'V', core.colour.yellow, core.effect.normal, 13, 47, 7)
);
armour_variable_data : armour_variable_list;
------------------------------------------------------------------------------------------
end armour;