Core magic implementation...

This commit is contained in:
Ognjen Milan Robovic 2023-10-10 13:36:30 -04:00
parent 65576af120
commit 9e65b3434f

View File

@ -79,7 +79,7 @@ function xabina return integer is
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
type entities is ( type entities is (
ENTITY_NULL, ENTITY_MENU, ENTITY_MAP, ENTITY_ITEM, ENTITY_SPELL, ENTITY_AMMUNITION, ENTITY_WEAPON, ENTITY_ARMOUR, ENTITY_NULL, ENTITY_MENU, ENTITY_MAP, ENTITY_ITEM, ENTITY_MAGIC, ENTITY_AMMUNITION, ENTITY_WEAPON, ENTITY_ARMOUR,
ENTITY_SCROLL, ENTITY_POTION, ENTITY_CONSUMABLE, ENTITY_NOTE, ENTITY_PLANT, ENTITY_ANIMAL, ENTITY_GOBLIN, ENTITY_PLAYER ENTITY_SCROLL, ENTITY_POTION, ENTITY_CONSUMABLE, ENTITY_NOTE, ENTITY_PLANT, ENTITY_ANIMAL, ENTITY_GOBLIN, ENTITY_PLAYER
); );
@ -149,7 +149,6 @@ function xabina return integer is
record record
value : natural := 0; value : natural := 0;
weight : natural := 0; weight : natural := 0;
-- description : unbounded_string := null_unbounded_string;
end record; end record;
type item_variable_type is new entity_variable_type with type item_variable_type is new entity_variable_type with
@ -217,8 +216,43 @@ function xabina return integer is
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Spell -- Spell
-- -- Place-holders mostly, implement self/target/target_range effect variations...
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
type magic_list is (
IGNITE, ILLUMINATE, BLADECHARM, BATTLECRY
);
type magic_mark is mod 72;
type magic_constant_type is new 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 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 := (
(ENTITY_MAGIC, to_unbounded_string ("Ignite"), '*', COLOUR_YELLOW, EFFECT_ITALIC, false, -3, 0, 0, -1, 7, 1),
(ENTITY_MAGIC, to_unbounded_string ("Illuminate"), '*', COLOUR_YELLOW, EFFECT_ITALIC, false, 0, 0, 0, -1, 13, 1),
(ENTITY_MAGIC, to_unbounded_string ("Bladecharm"), '*', COLOUR_RED, EFFECT_ITALIC, true, 0, -3, 0, -1, 7, 3),
(ENTITY_MAGIC, to_unbounded_string ("Battlecry"), '*', COLOUR_RED, EFFECT_ITALIC, true, -1, -1, 0, -1, 7, 2)
);
magic_variable_data : magic_variable_list;
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Ammunition -- Ammunition
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@ -238,10 +272,9 @@ function xabina return integer is
dual_wield : boolean := false; dual_wield : boolean := false;
value : natural := 0; value : natural := 0;
weight : natural := 0; weight : natural := 0;
attack_range : integer_subrange := (0, 0); attack_range : natural_subrange := (0, 0);
defense_range : integer_subrange := (0, 0); defense_range : natural_subrange := (0, 0);
distance_range : integer_subrange := (0, 0); distance_range : natural_subrange := (0, 0);
-- description : unbounded_string := null_unbounded_string;
end record; end record;
type weapon_variable_type is new entity_variable_type with type weapon_variable_type is new entity_variable_type with
@ -280,8 +313,7 @@ function xabina return integer is
record record
value : natural := 0; value : natural := 0;
weight : natural := 0; weight : natural := 0;
defense_range : integer_subrange := (0, 0); defense_range : natural_subrange := (0, 0);
-- description : unbounded_string := null_unbounded_string;
end record; end record;
type armour_variable_type is new entity_variable_type with type armour_variable_type is new entity_variable_type with