2024-04-25 00:27:13 -04:00
|
|
|
-- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic
|
|
|
|
--
|
|
|
|
-- GNU General Public Licence (version 3 or later)
|
|
|
|
|
2024-05-31 07:14:00 -04:00
|
|
|
with core, attribute, skill, resource, material, equipment, unit, construction, chad, effect;
|
2024-02-15 21:03:09 -05:00
|
|
|
|
2024-06-02 07:14:06 -04:00
|
|
|
use core;
|
|
|
|
|
2024-02-15 21:03:09 -05:00
|
|
|
package world is
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
2024-04-26 19:46:09 -04:00
|
|
|
type biome is (
|
2024-04-27 09:04:47 -04:00
|
|
|
ash, sand, grass, rough, snow, swamp
|
2024-02-15 21:03:09 -05:00
|
|
|
);
|
|
|
|
|
2024-05-03 05:28:44 -04:00
|
|
|
type landmark_index is (
|
2024-05-06 14:35:19 -04:00
|
|
|
dead_tree, mossy_rock, palm_tree, pine_tree, pine_forest, reeds,
|
2024-05-15 05:06:15 -04:00
|
|
|
rock, snowed_pine_tree, snowed_rock, spiky_rock, wooden_sign, wooden_arrow_sign,
|
|
|
|
rune_stone, snowed_rune_stone, mossy_rune_stone, snowed_pine_forest, hyacinths, orchids,
|
2024-05-28 08:05:56 -04:00
|
|
|
asters, daffodils, royal_grave, grave, humble_grave, wooden_wide_sign,
|
2024-06-02 14:51:44 -04:00
|
|
|
birch_tree, fir_tree, oak_tree, old_willow_tree
|
2024-05-03 05:28:44 -04:00
|
|
|
);
|
|
|
|
|
2024-05-19 10:33:58 -04:00
|
|
|
type location_index is (
|
2024-05-28 08:05:56 -04:00
|
|
|
well_of_agility, well_of_knowledge, well_of_strength, old_dwarven_grave, huge_ancient_urn, banana_tree,
|
|
|
|
apple_tree, cherry_tree, lemon_tree, orange_tree, pear_tree, peach_tree,
|
|
|
|
plum_tree
|
2024-05-19 10:33:58 -04:00
|
|
|
);
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
type landmark_stats is record
|
2024-06-04 07:28:05 -04:00
|
|
|
name : core.unstring;
|
2024-05-03 05:28:44 -04:00
|
|
|
spawn : biome;
|
|
|
|
clip : boolean;
|
|
|
|
frames : integer;
|
|
|
|
end record;
|
|
|
|
|
2024-05-19 10:33:58 -04:00
|
|
|
type location_stats is record
|
2024-06-04 07:28:05 -04:00
|
|
|
name : core.unstring;
|
2024-05-19 10:33:58 -04:00
|
|
|
clip : boolean;
|
|
|
|
frames : integer;
|
|
|
|
states : integer;
|
2024-06-01 11:56:18 -04:00
|
|
|
evoke : effect.information;
|
2024-05-19 10:33:58 -04:00
|
|
|
end record;
|
|
|
|
|
2024-06-01 11:27:59 -04:00
|
|
|
type entity_description is record
|
2024-05-05 11:38:15 -04:00
|
|
|
index : natural;
|
2024-05-19 12:29:15 -04:00
|
|
|
state : natural;
|
2024-05-03 05:28:44 -04:00
|
|
|
x, y : integer;
|
|
|
|
end record;
|
|
|
|
|
2024-05-19 07:02:34 -04:00
|
|
|
type integer_matrix is array (natural range <>, natural range <>) of integer;
|
|
|
|
type boolean_matrix is array (natural range <>, natural range <>) of boolean;
|
2024-06-01 11:27:59 -04:00
|
|
|
type entity_array is array (natural range <>) of entity_description;
|
2024-05-03 05:28:44 -04:00
|
|
|
|
2024-06-01 11:46:17 -04:00
|
|
|
type definition is record
|
2024-05-05 11:38:15 -04:00
|
|
|
kind : biome;
|
|
|
|
width : natural;
|
|
|
|
height : natural;
|
2024-05-19 13:29:28 -04:00
|
|
|
chad_count : natural;
|
|
|
|
chad_limit : natural;
|
2024-05-25 06:33:05 -04:00
|
|
|
tiles : access integer_matrix;
|
2024-05-19 07:02:34 -04:00
|
|
|
clips : access boolean_matrix;
|
|
|
|
views : access boolean_matrix;
|
2024-05-05 11:38:15 -04:00
|
|
|
landmarks : access entity_array;
|
2024-05-19 10:33:58 -04:00
|
|
|
locations : access entity_array;
|
2024-05-05 11:38:15 -04:00
|
|
|
constructions : access entity_array;
|
2024-05-13 09:20:16 -04:00
|
|
|
equipments : access entity_array;
|
2024-05-09 05:07:20 -04:00
|
|
|
units : access entity_array;
|
2024-06-01 11:56:18 -04:00
|
|
|
chads : access chad.informations;
|
2024-05-03 05:28:44 -04:00
|
|
|
end record;
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
|
2024-05-10 23:44:09 -04:00
|
|
|
biome_count : constant natural := biome'pos (biome'last) + 1;
|
|
|
|
|
2024-05-03 05:28:44 -04:00
|
|
|
landmarks : array (landmark_index) of core.sprite;
|
2024-05-19 10:33:58 -04:00
|
|
|
locations : array (location_index) of core.sprite;
|
2024-05-03 05:28:44 -04:00
|
|
|
|
2024-05-15 05:06:15 -04:00
|
|
|
landmark_count : constant natural := landmark_index'pos (landmark_index'last) + 1;
|
2024-05-19 10:33:58 -04:00
|
|
|
location_count : constant natural := location_index'pos (location_index'last) + 1;
|
2024-05-03 05:28:44 -04:00
|
|
|
|
2024-06-01 11:27:59 -04:00
|
|
|
landmark_description : constant array (landmark_index) of landmark_stats := (
|
2024-06-04 07:28:05 -04:00
|
|
|
dead_tree => (+("Dead Tree"), ash, true, 1),
|
|
|
|
mossy_rock => (+("Mossy Rock"), swamp, true, 1),
|
|
|
|
palm_tree => (+("Palm Tree"), sand, true, 4),
|
|
|
|
pine_tree => (+("Pine Tree"), grass, true, 4),
|
|
|
|
pine_forest => (+("Pine Forest"), grass, true, 4),
|
|
|
|
reeds => (+("Reeds"), swamp, false, 4),
|
|
|
|
rock => (+("Rock"), sand, true, 1),
|
|
|
|
snowed_pine_tree => (+("Snowed Pine Tree"), snow, true, 4),
|
|
|
|
snowed_rock => (+("Snowed Rock"), snow, true, 1),
|
|
|
|
spiky_rock => (+("Spiky Rock"), ash, true, 1),
|
|
|
|
wooden_sign => (+("Wooden Sign"), grass, false, 1),
|
|
|
|
wooden_arrow_sign => (+("Wooden Arrow Sign"), grass, false, 1),
|
|
|
|
rune_stone => (+("Rune Stone"), grass, true, 4),
|
|
|
|
snowed_rune_stone => (+("Snowed Rune Stone"), snow, true, 1),
|
|
|
|
mossy_rune_stone => (+("Mossy Rune Stone"), swamp, true, 4),
|
|
|
|
snowed_pine_forest => (+("Snowed Pine Forest"), snow, true, 4),
|
|
|
|
hyacinths => (+("Hyacinths"), grass, false, 1),
|
|
|
|
orchids => (+("Orchids"), grass, false, 1),
|
|
|
|
asters => (+("Asters"), grass, false, 1),
|
|
|
|
daffodils => (+("Daffodils"), grass, false, 1),
|
|
|
|
royal_grave => (+("Royal Grave"), ash, true, 1),
|
|
|
|
grave => (+("Grave"), ash, true, 1),
|
|
|
|
humble_grave => (+("Humble Grave"), ash, true, 1),
|
|
|
|
wooden_wide_sign => (+("Wooden Wide Sign"), grass, false, 1),
|
|
|
|
birch_tree => (+("Birch Tree"), grass, true, 4),
|
|
|
|
fir_tree => (+("Fir Tree"), grass, true, 4),
|
|
|
|
oak_tree => (+("Oak Tree"), grass, true, 4),
|
|
|
|
old_willow_tree => (+("Old Willow Tree"), swamp, true, 4)
|
2024-05-03 05:28:44 -04:00
|
|
|
);
|
|
|
|
|
2024-06-01 11:27:59 -04:00
|
|
|
location_description : constant array (location_index) of location_stats := (
|
2024-06-04 07:28:05 -04:00
|
|
|
well_of_agility => (+("Well of Agility"), true, 4, 3, (effect.modify_attribute, attribute.enumeration'pos (attribute.speed), 2, false, 0)),
|
|
|
|
well_of_knowledge => (+("Well of Knowledge"), true, 4, 3, (effect.modify_attribute, attribute.enumeration'pos (attribute.wisdom), 2, false, 0)),
|
|
|
|
well_of_strength => (+("Well of Strength"), true, 4, 3, (effect.modify_attribute, attribute.enumeration'pos (attribute.offense), 2, false, 0)),
|
|
|
|
old_dwarven_grave => (+("Old Dwarven Grave"), true, 1, 3, (effect.modify_attribute, attribute.enumeration'pos (attribute.defense), 1, false, 0)),
|
|
|
|
huge_ancient_urn => (+("Huge Ancient Urn"), true, 1, 3, (effect.modify_attribute, attribute.enumeration'pos (attribute.offense), 1, false, 0)),
|
|
|
|
banana_tree => (+("Banana Tree"), true, 4, 3, (effect.modify_material, material.enumeration'pos (material.banana), 4, true, 600)),
|
|
|
|
apple_tree => (+("Apple Tree"), true, 4, 3, (effect.modify_material, material.enumeration'pos (material.apple), 6, true, 600)),
|
|
|
|
cherry_tree => (+("Cherry Tree"), true, 4, 3, (effect.modify_material, material.enumeration'pos (material.cherry), 6, true, 600)),
|
|
|
|
lemon_tree => (+("Lemon Tree"), true, 4, 3, (effect.modify_material, material.enumeration'pos (material.lemon), 6, true, 600)),
|
|
|
|
orange_tree => (+("Orange Tree"), true, 4, 3, (effect.modify_material, material.enumeration'pos (material.orange), 6, true, 600)),
|
|
|
|
pear_tree => (+("Pear Tree"), true, 4, 3, (effect.modify_material, material.enumeration'pos (material.pear), 6, true, 600)),
|
|
|
|
peach_tree => (+("Peach Tree"), true, 4, 3, (effect.modify_material, material.enumeration'pos (material.peach), 6, true, 600)),
|
|
|
|
plum_tree => (+("Plum Tree"), true, 4, 3, (effect.modify_material, material.enumeration'pos (material.plum), 6, true, 600))
|
2024-05-19 10:33:58 -04:00
|
|
|
);
|
|
|
|
|
2024-06-01 15:10:31 -04:00
|
|
|
month_name : constant array (1 .. 12) of core.unstring := (
|
2024-06-02 07:14:06 -04:00
|
|
|
+("I <> Month of Red-Haired Goddess"),
|
|
|
|
+("II <> Month of Xorana"),
|
|
|
|
+("III <> Month of Heneal"),
|
|
|
|
+("IV <> Month of Evelor"),
|
|
|
|
+("V <> Month of Orohan"),
|
|
|
|
+("VI <> Month of Aezora"),
|
|
|
|
+("VII <> Month of Mitena"),
|
2024-06-04 07:28:05 -04:00
|
|
|
+("VIII <> Month of Sheila"),
|
|
|
|
+("IX <> Month of Iliona"),
|
2024-06-02 07:14:06 -04:00
|
|
|
+("X <> Month of Uldrae"),
|
|
|
|
+("XI <> Month of Kanako"),
|
|
|
|
+("XII <> Month of Time-Rebirth")
|
2024-06-01 15:10:31 -04:00
|
|
|
);
|
|
|
|
|
|
|
|
week_name : constant array (1 .. 52) of core.unstring := (
|
2024-06-02 07:14:06 -04:00
|
|
|
+("I <> Week of Miners"),
|
|
|
|
+("II <> Week of Flora"),
|
|
|
|
+("III <> Week of Alchemists"),
|
|
|
|
+("IV <> Week of Shape"),
|
|
|
|
+("V <> Week of Sword"),
|
|
|
|
+("VI <> Week of Necromancers"),
|
|
|
|
+("VII <> Week of Fauna"),
|
|
|
|
+("VIII <> Week of --"),
|
|
|
|
+("IX <> Week of Guards"),
|
|
|
|
+("X <> Week of Blacksmiths"),
|
|
|
|
+("XI <> Week of Archers"),
|
|
|
|
+("XII <> Week of --"),
|
|
|
|
+("XIII <> Week of Sound"),
|
|
|
|
+("XIV <> Week of Water"),
|
|
|
|
+("XV <> Week of Bankers"),
|
|
|
|
+("XVI <> Week of --"),
|
|
|
|
+("XVII <> Week of --"),
|
|
|
|
+("XVIII <> Week of Thaumaturgs"),
|
|
|
|
+("XIX <> Week of Stonecutters"),
|
|
|
|
+("XX <> Week of --"),
|
|
|
|
+("XXI <> Week of --"),
|
|
|
|
+("XXII <> Week of Logic"),
|
|
|
|
+("XXIII <> Week of Mystics"),
|
|
|
|
+("XXIV <> Week of Diplomats"),
|
|
|
|
+("XXV <> Week of Boots"),
|
|
|
|
+("XXVI <> Week of Shield"),
|
|
|
|
+("XXVII <> Week of Advisors"),
|
|
|
|
+("XXVIII <> Week of Architects"),
|
|
|
|
+("XXIX <> Week of Flame"),
|
|
|
|
+("XXX <> Week of Value"),
|
|
|
|
+("XXXI <> Week of Healers"),
|
|
|
|
+("XXXII <> Week of Spear"),
|
|
|
|
+("XXXIII <> Week of --"),
|
|
|
|
+("XXXIV <> Week of Leaders"),
|
|
|
|
+("XXXV <> Week of Skirmishers"),
|
|
|
|
+("XXXVI <> Week of Lubmerjacks"),
|
|
|
|
+("XXXVII <> Week of Pathfinders"),
|
|
|
|
+("XXXVIII <> Week of --"),
|
|
|
|
+("XXXIX <> Week of --"),
|
|
|
|
+("XL <> Week of Helmet"),
|
|
|
|
+("XLI <> Week of Leatherers"),
|
|
|
|
+("XLII <> Week of --"),
|
|
|
|
+("XLIII <> Week of --"),
|
|
|
|
+("XLIV <> Week of Sorcerers"),
|
|
|
|
+("XLV <> Week of Gloves"),
|
|
|
|
+("XLVI <> Week of Earth"),
|
|
|
|
+("XLVII <> Week of Explorers"),
|
|
|
|
+("XLVIII <> Week of --"),
|
|
|
|
+("XLIX <> Week of Strategists"),
|
|
|
|
+("L <> Week of Gemologists"),
|
|
|
|
+("LI <> Week of Merchants"),
|
|
|
|
+("LII <> Week of World")
|
2024-06-01 15:10:31 -04:00
|
|
|
);
|
|
|
|
|
|
|
|
day_name : constant array (1 .. 7) of core.unstring := (
|
2024-06-02 07:14:06 -04:00
|
|
|
+("I <> Day of Sun"),
|
|
|
|
+("II <> Day of Mother-Moon"),
|
|
|
|
+("III <> Day of Daughter-Moon"),
|
|
|
|
+("IV <> Day of All-Earth"),
|
|
|
|
+("V <> Day of All-Water"),
|
|
|
|
+("VI <> Day of All-Sky"),
|
|
|
|
+("VII <> Day of Deities")
|
2024-06-01 15:10:31 -04:00
|
|
|
);
|
|
|
|
|
2024-06-01 11:46:17 -04:00
|
|
|
map : definition;
|
2024-05-03 05:28:44 -04:00
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
|
2024-02-15 21:03:09 -05:00
|
|
|
procedure configure;
|
|
|
|
|
2024-05-19 13:29:28 -04:00
|
|
|
procedure make (index : in biome; width, height, chad_limit : in natural);
|
2024-02-15 21:03:09 -05:00
|
|
|
|
2024-05-23 08:03:38 -04:00
|
|
|
procedure save (file_name : in string);
|
2024-05-25 03:53:53 -04:00
|
|
|
procedure load (file_name : in string);
|
2024-05-23 08:03:38 -04:00
|
|
|
|
2024-04-27 03:49:02 -04:00
|
|
|
procedure draw;
|
2024-02-15 21:03:09 -05:00
|
|
|
|
2024-06-01 20:42:12 -04:00
|
|
|
procedure draw_performance_box;
|
|
|
|
|
2024-05-09 15:54:39 -04:00
|
|
|
procedure mapshot (file_path : in string);
|
|
|
|
|
2024-05-22 21:22:34 -04:00
|
|
|
function map_is_revealed return boolean;
|
2024-05-12 10:07:37 -04:00
|
|
|
|
2024-06-01 11:56:18 -04:00
|
|
|
procedure add_chad (data : in chad.information);
|
2024-05-17 18:35:31 -04:00
|
|
|
|
2024-05-22 21:22:34 -04:00
|
|
|
procedure resource_cheat_1;
|
|
|
|
procedure resource_cheat_2;
|
|
|
|
procedure resource_cheat_3;
|
|
|
|
procedure resource_cheat_4;
|
|
|
|
procedure resource_cheat_5;
|
|
|
|
procedure resource_cheat_6;
|
|
|
|
procedure reveal_map;
|
2024-06-01 12:39:44 -04:00
|
|
|
procedure restore_points;
|
2024-05-22 21:22:34 -04:00
|
|
|
|
2024-05-25 01:48:03 -04:00
|
|
|
procedure player_up;
|
|
|
|
procedure player_down;
|
|
|
|
procedure player_left;
|
|
|
|
procedure player_right;
|
|
|
|
|
2024-02-15 21:03:09 -05:00
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
end world;
|