xhads/source/magic.ads

67 lines
2.5 KiB
Ada

-- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic
--
-- GNU General Public Licence (version 3 or later)
with core, effect;
package magic is
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
type school is (
air, dark, earth, fire, light, water
);
type enumeration is (
-- Air
arrow_storm,
-- Dark
torment,
-- Earth
stone_armour,
-- Fire
fireball,
-- Light
heal,
-- Water
ice_armour
);
------------------------------------------------------------------------------------------
subtype level_limit is natural range 0 .. 6;
type information is record
name : core.short_string;
kind : school;
level : level_limit;
evoke : effect.enumeration;
text : core.long_string;
end record;
------------------------------------------------------------------------------------------
count : constant natural := enumeration'pos (enumeration'last) + 1;
trait : constant array (enumeration) of information := (
("Arrow Storm ", air, 1, effect.none, "- "),
("Torment ", dark, 1, effect.none, "- "),
("Stone Armour ", earth, 1, effect.none, "- "),
("Fireball ", fire, 1, effect.none, "- "),
("Heal ", light, 1, effect.none, "- "),
("Ice Armour ", water, 1, effect.none, "- ")
);
------------------------------------------------------------------------------------------
procedure configure;
procedure icon (index : in enumeration; x, y : in integer);
procedure view (index : in enumeration; x, y : in integer);
procedure menu (x, y : in integer; center : in boolean);
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
end magic;