80 lines
3.2 KiB
Ada
80 lines
3.2 KiB
Ada
-- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic
|
|
--
|
|
-- GNU General Public Licence (version 3 or later)
|
|
|
|
with core, attribute, skill, resource, material, faction, equipment;
|
|
|
|
package chad is
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
type enumeration is (
|
|
ada, richard, ognjen, wouter, john, marina
|
|
);
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
type information is record
|
|
name : core.short_string;
|
|
kind : faction.enumeration;
|
|
bonus_attribute : attribute.enumeration;
|
|
bonus_skill : skill.enumeration;
|
|
bonus_resource : resource.enumeration;
|
|
end record;
|
|
|
|
item_limit : constant natural := 24;
|
|
|
|
type item_array is array (0 .. item_limit - 1) of equipment.enumeration;
|
|
|
|
type value is record
|
|
index : enumeration;
|
|
state : core.animation;
|
|
x : integer;
|
|
y : integer;
|
|
health : core.point;
|
|
mana : core.point;
|
|
stamina : core.point;
|
|
attributes : attribute.points;
|
|
skills : skill.points;
|
|
resources : resource.points;
|
|
materials : material.points;
|
|
equipments : equipment.equip_array;
|
|
item_count : natural;
|
|
items : item_array;
|
|
end record;
|
|
|
|
type value_array is array (natural range <>) of value;
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
count : constant natural := enumeration'pos (enumeration'last) + 1;
|
|
|
|
trait : constant array (enumeration) of information := (
|
|
ada => ("Ada Augusta King ", faction.fairy, attribute.defense, skill.diplomacy, resource.metal),
|
|
richard => ("Richard Martin Stallman ", faction.dwarf, attribute.offense, skill.leadership, resource.wood),
|
|
ognjen => ("Ognjen Milan Robovic ", faction.kobold, attribute.stamina, skill.archery, resource.leather),
|
|
wouter => ("Wouter van Oortmerssen ", faction.gnoll, attribute.speed, skill.medicine, resource.stone),
|
|
john => ("John Warner Backus ", faction.goblin, attribute.wisdom, skill.sorcery, resource.gem),
|
|
marina => ("Marina Ann Hantzis ", faction.imp, attribute.reach, skill.necromancy, resource.gold)
|
|
);
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
procedure configure;
|
|
|
|
procedure draw (player : in value; x, y : in integer);
|
|
procedure draw_data (player : in value; x, y : in integer);
|
|
procedure draw_menu (player : in value; x, y : in integer);
|
|
|
|
function take_equipment_item (player : in out value; item : in equipment.enumeration) return boolean;
|
|
|
|
procedure draw_pepe;
|
|
procedure draw_alice;
|
|
|
|
procedure save_value (here : in core.io.file_type; data : in value);
|
|
procedure load_value (here : in core.io.file_type; data : out value);
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
end chad;
|