xabina/magic.ads
2023-10-15 10:01:21 -04:00

60 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;
package magic is
------------------------------------------------------------------------------------------
type magic_list is (
IGNITE, ILLUMINATE, BLADECHARM, BATTLECRY
);
type magic_mark is mod 72;
------------------------------------------------------------------------------------------
type magic_constant_type is new core.entity_constant_type with
record
self : boolean := false;
health : integer := 0;
armour : integer := 0;
mana : integer := 0;
stamina : integer := 0;
distance : integer := 0;
tribute : natural := 0;
end record;
type magic_variable_type is new core.entity_variable_type with
record
enchantment : natural := 0;
end record;
type magic_constant_list is array (magic_list) of magic_constant_type;
type magic_variable_list is array (magic_mark) of magic_variable_type;
------------------------------------------------------------------------------------------
magic_constant_data : constant magic_constant_list := (
(core.ENTITY_MAGIC, "Ignite ", '*', core.colour.yellow, core.effect.italic, false, -3, 0, 0, -1, 7, 1),
(core.ENTITY_MAGIC, "Illuminate ", '*', core.colour.yellow, core.effect.italic, false, 0, 0, 0, -1, 13, 1),
(core.ENTITY_MAGIC, "Bladecharm ", '*', core.colour.red, core.effect.italic, true, 0, -3, 0, -1, 7, 3),
(core.ENTITY_MAGIC, "Battlecry ", '*', core.colour.red, core.effect.italic, true, -1, -1, 0, -1, 7, 2)
);
magic_variable_data : magic_variable_list;
------------------------------------------------------------------------------------------
end magic;