Преглед изворни кода

Core magic implementation...

master
Ognjen Milan Robovic пре 7 месеци
родитељ
комит
9e65b3434f
1 измењених фајлова са 42 додато и 10 уклоњено
  1. +42
    -10
      xabina.adb

+ 42
- 10
xabina.adb Прегледај датотеку

@@ -79,7 +79,7 @@ function xabina return integer 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
);

@@ -149,7 +149,6 @@ function xabina return integer is
record
value : natural := 0;
weight : natural := 0;
-- description : unbounded_string := null_unbounded_string;
end record;

type item_variable_type is new entity_variable_type with
@@ -217,8 +216,43 @@ function xabina return integer is

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- 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
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -238,10 +272,9 @@ function xabina return integer is
dual_wield : boolean := false;
value : natural := 0;
weight : natural := 0;
attack_range : integer_subrange := (0, 0);
defense_range : integer_subrange := (0, 0);
distance_range : integer_subrange := (0, 0);
-- description : unbounded_string := null_unbounded_string;
attack_range : natural_subrange := (0, 0);
defense_range : natural_subrange := (0, 0);
distance_range : natural_subrange := (0, 0);
end record;

type weapon_variable_type is new entity_variable_type with
@@ -278,10 +311,9 @@ function xabina return integer is

type armour_constant_type is new entity_constant_type with
record
value : natural := 0;
weight : natural := 0;
defense_range : integer_subrange := (0, 0);
-- description : unbounded_string := null_unbounded_string;
value : natural := 0;
weight : natural := 0;
defense_range : natural_subrange := (0, 0);
end record;

type armour_variable_type is new entity_variable_type with


Loading…
Откажи
Сачувај