Added certain default values...
This commit is contained in:
parent
dc6084ec6d
commit
ecc6e0ba68
@ -27,20 +27,20 @@ package chad is
|
|||||||
type item_array is array (0 .. item_limit - 1) of equipment.enumeration;
|
type item_array is array (0 .. item_limit - 1) of equipment.enumeration;
|
||||||
|
|
||||||
type information is record
|
type information is record
|
||||||
index : enumeration;
|
index : enumeration := ada;
|
||||||
state : core.animation;
|
state : core.animation := core.idle;
|
||||||
x : integer;
|
x : integer := 0;
|
||||||
y : integer;
|
y : integer := 0;
|
||||||
health : core.point;
|
health : core.point := (12, 12);
|
||||||
mana : core.point;
|
mana : core.point := (12, 12);
|
||||||
movement : core.point;
|
movement : core.point := (12, 12);
|
||||||
attributes : attribute.points;
|
attributes : attribute.points := attribute.default;
|
||||||
skills : skill.points;
|
skills : skill.points := skill.default;
|
||||||
resources : resource.points;
|
resources : resource.points := resource.default;
|
||||||
materials : material.points;
|
materials : material.points := material.default;
|
||||||
equipments : equipment.equip_array;
|
equipments : equipment.equip_array := equipment.default;
|
||||||
item_count : natural;
|
item_count : natural := 0;
|
||||||
items : item_array;
|
items : item_array := (others => equipment.none);
|
||||||
end record;
|
end record;
|
||||||
|
|
||||||
type informations is array (natural range <>) of information;
|
type informations is array (natural range <>) of information;
|
||||||
|
@ -17,14 +17,14 @@ package effect is
|
|||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
type information is record
|
type information is record
|
||||||
kind : enumeration;
|
kind : enumeration := idle;
|
||||||
modifier : integer;
|
modifier : integer := 0;
|
||||||
amount : integer;
|
amount : integer := 0;
|
||||||
permanent : boolean;
|
permanent : boolean := false;
|
||||||
duration : natural;
|
duration : natural := 0;
|
||||||
end record;
|
end record;
|
||||||
|
|
||||||
none : constant information := (idle, 0, 0, false, 0);
|
none : constant information := (others => <>);
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -56,8 +56,11 @@ package equipment is
|
|||||||
|
|
||||||
count : constant natural := enumeration'pos (enumeration'last) + 1;
|
count : constant natural := enumeration'pos (enumeration'last) + 1;
|
||||||
|
|
||||||
|
default : constant equip_array := (others => none);
|
||||||
|
|
||||||
description : constant array (enumeration) of definition := (
|
description : constant array (enumeration) of definition := (
|
||||||
none => (new string'("--"), full_body, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none),
|
none => (others => <>),
|
||||||
|
--
|
||||||
golden_axe => (new string'("Golden Axe"), main_hand, (2, 0, 0, 0, 0, 0), faction.fairy, effect.none),
|
golden_axe => (new string'("Golden Axe"), main_hand, (2, 0, 0, 0, 0, 0), faction.fairy, effect.none),
|
||||||
golden_battleaxe => (new string'("Golden Battleaxe"), main_hand, (3, 0, 0, 0, 0, 0), faction.fairy, effect.none),
|
golden_battleaxe => (new string'("Golden Battleaxe"), main_hand, (3, 0, 0, 0, 0, 0), faction.fairy, effect.none),
|
||||||
golden_bow => (new string'("Golden Bow"), main_hand, (1, 0, 0, 0, 0, 0), faction.fairy, effect.none),
|
golden_bow => (new string'("Golden Bow"), main_hand, (1, 0, 0, 0, 0, 0), faction.fairy, effect.none),
|
||||||
|
@ -109,25 +109,13 @@ procedure main is
|
|||||||
text_box_height : integer := 0;
|
text_box_height : integer := 0;
|
||||||
|
|
||||||
player : chad.information := (
|
player : chad.information := (
|
||||||
index => chad.ada,
|
|
||||||
state => core.idle,
|
|
||||||
x => 0,
|
|
||||||
y => 0,
|
|
||||||
health => (30, 40),
|
|
||||||
mana => (20, 30),
|
|
||||||
movement => (10, 20),
|
|
||||||
attributes => attribute.default,
|
|
||||||
skills => skill.default,
|
|
||||||
resources => ((29, 480), (11, 240), (23, 240), (13, 240), (17, 240), (7, 240)),
|
|
||||||
materials => material.default,
|
|
||||||
equipments => (equipment.chest => equipment.iron_chestplate,
|
equipments => (equipment.chest => equipment.iron_chestplate,
|
||||||
equipment.head => equipment.iron_helmet,
|
equipment.head => equipment.iron_helmet,
|
||||||
equipment.hands => equipment.iron_gauntlets,
|
equipment.hands => equipment.iron_gauntlets,
|
||||||
equipment.feet => equipment.iron_greaves,
|
equipment.feet => equipment.iron_greaves,
|
||||||
equipment.main_hand => equipment.iron_sword,
|
equipment.main_hand => equipment.iron_sword,
|
||||||
others => equipment.none),
|
others => equipment.none),
|
||||||
item_count => 0,
|
others => <>
|
||||||
items => (others => equipment.none)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
@ -29,7 +29,7 @@ package material is
|
|||||||
|
|
||||||
count : constant natural := enumeration'pos (enumeration'last) + 1;
|
count : constant natural := enumeration'pos (enumeration'last) + 1;
|
||||||
|
|
||||||
default : constant points := (others => (1, 12));
|
default : constant points := (others => (0, 12));
|
||||||
|
|
||||||
description : constant array (enumeration) of definition := (
|
description : constant array (enumeration) of definition := (
|
||||||
sulphur => (new string'("Sulphur"), 11),
|
sulphur => (new string'("Sulphur"), 11),
|
||||||
|
@ -27,6 +27,8 @@ package resource is
|
|||||||
|
|
||||||
count : constant natural := enumeration'pos (enumeration'last) + 1;
|
count : constant natural := enumeration'pos (enumeration'last) + 1;
|
||||||
|
|
||||||
|
default : constant points := (others => (12, 240));
|
||||||
|
|
||||||
description : constant array (enumeration) of definition := (
|
description : constant array (enumeration) of definition := (
|
||||||
gold => ((24, 480), new string'("Gold"), new string'("Gold is precious yellowish shiny metal, valued since ancient times.")),
|
gold => ((24, 480), new string'("Gold"), new string'("Gold is precious yellowish shiny metal, valued since ancient times.")),
|
||||||
wood => ((12, 240), new string'("Wood"), new string'("Wood is just bundle of lignin and cellulose, nothing more.")),
|
wood => ((12, 240), new string'("Wood"), new string'("Wood is just bundle of lignin and cellulose, nothing more.")),
|
||||||
|
@ -111,6 +111,10 @@ package body world is
|
|||||||
y => offset.y + (vertical - core.camera.y) * size,
|
y => offset.y + (vertical - core.camera.y) * size,
|
||||||
width => size,
|
width => size,
|
||||||
height => size)
|
height => size)
|
||||||
|
and core.cursor_inside (x => core.window_width / 2 - 6 * size,
|
||||||
|
y => core.window_height / 2 - 6 * size,
|
||||||
|
width => 12 * size,
|
||||||
|
height => 12 * size)
|
||||||
and core.cursor_mode = core.cursor_left
|
and core.cursor_mode = core.cursor_left
|
||||||
and not ui.prioritize then
|
and not ui.prioritize then
|
||||||
target.x := horizontal;
|
target.x := horizontal;
|
||||||
|
@ -127,19 +127,20 @@ package world is
|
|||||||
plum_tree => (new string'("Plum Tree"), true, 4, 3, (effect.modify_material, material.enumeration'pos (material.plum), 6, true, 600))
|
plum_tree => (new string'("Plum Tree"), true, 4, 3, (effect.modify_material, material.enumeration'pos (material.plum), 6, true, 600))
|
||||||
);
|
);
|
||||||
|
|
||||||
month_name : constant array (1 .. 12) of access string := (
|
month_name : constant array (1 .. 13) of access string := (
|
||||||
new string'("I <> Month of Red-Haired Goddess"),
|
new string'("I <> Month of Life"),
|
||||||
new string'("II <> Month of Xorana"),
|
new string'("II <> Month of Red-Haired Goddess"),
|
||||||
new string'("III <> Month of Heneal"),
|
new string'("III <> Month of Xorana"),
|
||||||
new string'("IV <> Month of Evelor"),
|
new string'("IV <> Month of Heneal"),
|
||||||
new string'("V <> Month of Orohan"),
|
new string'("V <> Month of Evelor"),
|
||||||
new string'("VI <> Month of Aezora"),
|
new string'("VI <> Month of Orohan"),
|
||||||
new string'("VII <> Month of Mitena"),
|
new string'("VII <> Month of Aezora"),
|
||||||
new string'("VIII <> Month of Sheila"),
|
new string'("VIII <> Month of Mitena"),
|
||||||
new string'("IX <> Month of Iliona"),
|
new string'("IX <> Month of Sheila"),
|
||||||
new string'("X <> Month of Uldrae"),
|
new string'("X <> Month of Iliona"),
|
||||||
new string'("XI <> Month of Kanako"),
|
new string'("XI <> Month of Uldrae"),
|
||||||
new string'("XII <> Month of Time-Rebirth")
|
new string'("XII <> Month of Kanako"),
|
||||||
|
new string'("XIII <> Month of Death")
|
||||||
);
|
);
|
||||||
|
|
||||||
week_name : constant array (1 .. 52) of access string := (
|
week_name : constant array (1 .. 52) of access string := (
|
||||||
|
Loading…
Reference in New Issue
Block a user