xhads/source/unit.ads

80 lines
3.6 KiB
Ada
Raw Normal View History

-- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic
--
-- GNU General Public Licence (version 3 or later)
2024-05-11 03:38:33 -04:00
with core, effect, attribute, faction, equipment;
2024-02-15 21:03:09 -05:00
package unit is
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
type enumeration is (
dwarf_base, fairy_base, gnoll_base, goblin_base, imp_base, kobold_base
2024-02-15 21:03:09 -05:00
);
------------------------------------------------------------------------------------------
type information is record
2024-03-11 15:35:56 -04:00
name : core.short_string;
kind : faction.enumeration;
2024-04-23 16:19:29 -04:00
attributes : attribute.points;
evoke : effect.enumeration;
text : core.long_string;
2024-02-15 21:03:09 -05:00
end record;
2024-05-11 02:13:20 -04:00
type value is record
name : core.short_string := "-- ";
kind : enumeration := imp_base;
state : core.animation := core.idle;
attributes : attribute.points := (others => 0);
2024-05-11 03:38:33 -04:00
equipments : equipment.equip_array := (others => equipment.empty);
end record;
2024-05-11 03:03:28 -04:00
type value_limit is range 0 .. 100;
type value_array is array (value_limit) of value;
2024-02-15 21:03:09 -05:00
------------------------------------------------------------------------------------------
count : constant natural := enumeration'pos (enumeration'last) + 1;
trait : constant array (enumeration) of information := (
("Dwarf ", faction.dwarf, (others => 1), effect.none, " "),
("Fairy ", faction.fairy, (others => 1), effect.none, " "),
("Gnoll ", faction.gnoll, (others => 1), effect.none, " "),
("Goblin ", faction.goblin, (others => 1), effect.none, " "),
("Imp ", faction.imp, (others => 1), effect.none, " "),
("Kobold ", faction.kobold, (others => 1), effect.none, " ")
2024-02-15 21:03:09 -05:00
);
2024-05-11 02:13:20 -04:00
default_value : value;
values : value_array := (
("Dwarf Berserker ", dwarf_base, core.idle, (3, 2, 1, 3, 2, 2),
2024-05-11 03:38:33 -04:00
(equipment.main_hand => (equipment.mithril_axe, true),
others => equipment.empty)),
2024-05-11 02:13:20 -04:00
--
("Dwarf Berserker ", dwarf_base, core.idle, (3, 2, 1, 3, 2, 2),
2024-05-11 03:38:33 -04:00
(equipment.main_hand => (equipment.mithril_battleaxe, true),
others => equipment.empty)),
2024-05-11 02:13:20 -04:00
--
("Dwarf Berserker ", dwarf_base, core.idle, (3, 2, 1, 3, 2, 2),
2024-05-11 03:38:33 -04:00
(equipment.main_hand => (equipment.mithril_mace, true),
others => equipment.empty)),
2024-05-11 02:13:20 -04:00
--
others => default_value
);
2024-02-15 21:03:09 -05:00
------------------------------------------------------------------------------------------
procedure configure;
procedure draw (index : in enumeration; state : in core.animation; x, y : in integer);
procedure icon (index : in enumeration; x, y : in integer);
procedure view (index : in enumeration; x, y : in integer);
2024-05-11 02:13:20 -04:00
procedure draw_full (index : in natural; x, y : in integer);
2024-03-11 15:35:56 -04:00
2024-02-15 21:03:09 -05:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
end unit;