|
|
@@ -22,10 +22,15 @@ function xabina return integer is |
|
|
|
-- System |
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
|
|
|
|
|
type subrange is |
|
|
|
type integer_subrange is |
|
|
|
record |
|
|
|
minimum : integer := 0; |
|
|
|
maximum : integer := 0; |
|
|
|
end record; |
|
|
|
|
|
|
|
type natural_subrange is |
|
|
|
record |
|
|
|
minimum : natural := 0; |
|
|
|
average : natural := 0; |
|
|
|
maximum : natural := 0; |
|
|
|
end record; |
|
|
|
|
|
|
@@ -52,7 +57,6 @@ function xabina return integer is |
|
|
|
code : character := ' '; -- Entity ASCII character representation. |
|
|
|
colour : colour_id := COLOUR_WHITE; -- Entity VT100 escape sequence colour. |
|
|
|
effect : effect_id := EFFECT_NORMAL; -- Entity VT100 escape sequence effect. |
|
|
|
collide : boolean := false; -- Entity collision information. |
|
|
|
end record; |
|
|
|
|
|
|
|
type entity_variable_type is tagged |
|
|
@@ -80,13 +84,13 @@ function xabina return integer is |
|
|
|
trigger : natural := 0; |
|
|
|
end record; |
|
|
|
|
|
|
|
type map_list is array (map_list_id) of map_constant_type; |
|
|
|
type map_constant_list is array (map_list_id) of map_constant_type; |
|
|
|
|
|
|
|
map_data : constant map_list := ( |
|
|
|
(ENTITY_MAP, to_unbounded_string ("Stone Wall"), '#', COLOUR_GREY, EFFECT_BOLD, true, MAP_WALL, 0), |
|
|
|
(ENTITY_MAP, to_unbounded_string ("Wooden Wall"), '#', COLOUR_YELLOW, EFFECT_NORMAL, true, MAP_WALL, 0), |
|
|
|
(ENTITY_MAP, to_unbounded_string ("Stone Floor"), '.', COLOUR_GREY, EFFECT_BOLD, false, MAP_FLOOR, 0), |
|
|
|
(ENTITY_MAP, to_unbounded_string ("Wooden Floor"), '.', COLOUR_YELLOW, EFFECT_NORMAL, false, MAP_FLOOR, 0) |
|
|
|
map_data : constant map_constant_list := ( |
|
|
|
(ENTITY_MAP, to_unbounded_string ("Stone Wall"), '#', COLOUR_GREY, EFFECT_BOLD, MAP_WALL, 0), |
|
|
|
(ENTITY_MAP, to_unbounded_string ("Wooden Wall"), '#', COLOUR_YELLOW, EFFECT_NORMAL, MAP_WALL, 0), |
|
|
|
(ENTITY_MAP, to_unbounded_string ("Stone Floor"), '.', COLOUR_GREY, EFFECT_BOLD, MAP_FLOOR, 0), |
|
|
|
(ENTITY_MAP, to_unbounded_string ("Wooden Floor"), '.', COLOUR_YELLOW, EFFECT_NORMAL, MAP_FLOOR, 0) |
|
|
|
); |
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
@@ -97,6 +101,44 @@ function xabina return integer is |
|
|
|
ITEM_NONE, ITEM_AMMUNITION, ITEM_WEAPON, ITEM_ARMOUR, ITEM_SCROLL, ITEM_POTION, ITEM_CONSUMABLE, ITEM_NOTE |
|
|
|
); |
|
|
|
|
|
|
|
type item_list_id is ( |
|
|
|
IRON_SWORD, IRON_GREATSWORD, IRON_AXE, IRON_BATTLEAXE, IRON_SPEAR, IRON_SHIELD, IRON_MACE, IRON_HAMMER |
|
|
|
); |
|
|
|
|
|
|
|
type item_constant_type is new entity_constant_type with |
|
|
|
record |
|
|
|
item : item_id := ITEM_NONE; |
|
|
|
amount_limit : natural := 0; |
|
|
|
weight : natural := 0; |
|
|
|
value : natural := 0; |
|
|
|
attack_range : integer_subrange := (0, 0); |
|
|
|
defense_range : integer_subrange := (0, 0); |
|
|
|
distance_range : integer_subrange := (0, 0); |
|
|
|
health_shift : natural_subrange := (0, 0); |
|
|
|
mana_shift : natural_subrange := (0, 0); |
|
|
|
stamina_shift : natural_subrange := (0, 0); |
|
|
|
-- description : unbounded_string := null_unbounded_string; |
|
|
|
end record; |
|
|
|
|
|
|
|
type item_variable_type is new entity_variable_type with |
|
|
|
record |
|
|
|
amount : natural := 0; |
|
|
|
condition : natural := 0; |
|
|
|
end record; |
|
|
|
|
|
|
|
type item_constant_list is array (item_list_id) of item_constant_type; |
|
|
|
|
|
|
|
item_data : constant item_constant_list := ( -- Please... |
|
|
|
(ENTITY_ITEM, to_unbounded_string ("Iron Sword"), '!', COLOUR_RED, EFFECT_NORMAL, ITEM_WEAPON, 0, 31, 30, (1, 1), (1, 1), (1, 1), (1, 1), (1, 1), (1, 1)), |
|
|
|
(ENTITY_ITEM, to_unbounded_string ("Iron Greatsword"), '!', COLOUR_RED, EFFECT_NORMAL, ITEM_WEAPON, 0, 32, 31, (1, 1), (1, 1), (1, 1), (1, 1), (1, 1), (1, 1)), |
|
|
|
(ENTITY_ITEM, to_unbounded_string ("Iron Axe"), '!', COLOUR_RED, EFFECT_NORMAL, ITEM_WEAPON, 0, 33, 32, (1, 1), (1, 1), (1, 1), (1, 1), (1, 1), (1, 1)), |
|
|
|
(ENTITY_ITEM, to_unbounded_string ("Iron Battleaxe"), '!', COLOUR_RED, EFFECT_NORMAL, ITEM_WEAPON, 0, 34, 33, (1, 1), (1, 1), (1, 1), (1, 1), (1, 1), (1, 1)), |
|
|
|
(ENTITY_ITEM, to_unbounded_string ("Iron Spear"), '!', COLOUR_RED, EFFECT_NORMAL, ITEM_WEAPON, 0, 35, 34, (1, 1), (1, 1), (1, 1), (1, 1), (1, 1), (1, 1)), |
|
|
|
(ENTITY_ITEM, to_unbounded_string ("Iron Shield"), '!', COLOUR_RED, EFFECT_NORMAL, ITEM_WEAPON, 0, 36, 35, (1, 1), (1, 1), (1, 1), (1, 1), (1, 1), (1, 1)), |
|
|
|
(ENTITY_ITEM, to_unbounded_string ("Iron Mace"), '!', COLOUR_RED, EFFECT_NORMAL, ITEM_WEAPON, 0, 37, 36, (1, 1), (1, 1), (1, 1), (1, 1), (1, 1), (1, 1)), |
|
|
|
(ENTITY_ITEM, to_unbounded_string ("Iron Hammer"), '!', COLOUR_RED, EFFECT_NORMAL, ITEM_WEAPON, 0, 38, 37, (1, 1), (1, 1), (1, 1), (1, 1), (1, 1), (1, 1)) |
|
|
|
); |
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
|
-- Plant |
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
@@ -123,21 +165,21 @@ function xabina return integer is |
|
|
|
|
|
|
|
type goblin_constant_type is new entity_constant_type with |
|
|
|
record |
|
|
|
attack_range : subrange := (0, 0, 0); |
|
|
|
health_limit : natural := 0; |
|
|
|
armour_limit : natural := 0; |
|
|
|
mana_limit : natural := 0; |
|
|
|
stamina_limit : natural := 0; |
|
|
|
goblin : goblin_id := GOBLIN_NONE; -- Index of 'goblin_data'. |
|
|
|
health_limit : natural := 0; |
|
|
|
armour_limit : natural := 0; |
|
|
|
mana_limit : natural := 0; |
|
|
|
stamina_limit : natural := 0; |
|
|
|
attack_range : natural_subrange := (0, 0); |
|
|
|
end record; |
|
|
|
|
|
|
|
type goblin_variable_type is new entity_variable_type with |
|
|
|
record |
|
|
|
goblin : goblin_id := GOBLIN_NONE; -- Index of 'goblin_data'. |
|
|
|
health : natural := 0; |
|
|
|
armour : natural := 0; |
|
|
|
mana : natural := 0; |
|
|
|
stamina : natural := 0; |
|
|
|
weapon : item_id := ITEM_NONE; |
|
|
|
health : natural := 0; |
|
|
|
armour : natural := 0; |
|
|
|
mana : natural := 0; |
|
|
|
stamina : natural := 0; |
|
|
|
weapon : item_id := ITEM_NONE; |
|
|
|
end record; |
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
@@ -146,9 +188,9 @@ function xabina return integer is |
|
|
|
|
|
|
|
begin |
|
|
|
|
|
|
|
for this in map_list_id |
|
|
|
for this in item_list_id |
|
|
|
loop |
|
|
|
put_line ("> " & to_string (map_data (this).name)); |
|
|
|
put_line ("> " & to_string (item_data (this).name)); |
|
|
|
end loop; |
|
|
|
|
|
|
|
return 0; |
|
|
|