diff --git a/source/effect.adb b/source/effect.adb index 89aa54c..0d5e0b7 100644 --- a/source/effect.adb +++ b/source/effect.adb @@ -13,13 +13,36 @@ package body effect is procedure apply (data : in value) is begin case data.operation is - when player_add => - case data.operator is - when attribute_offense => world.map.chads (1).attributes (attribute.offense) := world.map.chads (1).attributes (attribute.offense) + data.modifier; - when attribute_wisdom => world.map.chads (1).attributes (attribute.wisdom) := world.map.chads (1).attributes (attribute.wisdom) + data.modifier; - when attribute_speed => world.map.chads (1).attributes (attribute.speed) := world.map.chads (1).attributes (attribute.speed) + data.modifier; - when others => null; - end case; + when offense => world.map.chads (1).attributes (attribute.offense) := world.map.chads (1).attributes (attribute.offense) + data.modifier; + when defense => world.map.chads (1).attributes (attribute.defense) := world.map.chads (1).attributes (attribute.defense) + data.modifier; + when wisdom => world.map.chads (1).attributes (attribute.wisdom) := world.map.chads (1).attributes (attribute.wisdom) + data.modifier; + when stamina => world.map.chads (1).attributes (attribute.stamina) := world.map.chads (1).attributes (attribute.stamina) + data.modifier; + when speed => world.map.chads (1).attributes (attribute.speed) := world.map.chads (1).attributes (attribute.speed) + data.modifier; + when reach => world.map.chads (1).attributes (attribute.reach) := world.map.chads (1).attributes (attribute.reach) + data.modifier; + when alchemy => world.map.chads (1).skills (skill.alchemy) := world.map.chads (1).skills (skill.alchemy) + data.modifier; + when archery => world.map.chads (1).skills (skill.archery) := world.map.chads (1).skills (skill.archery) + data.modifier; + when architecture => world.map.chads (1).skills (skill.architecture) := world.map.chads (1).skills (skill.architecture) + data.modifier; + when athletics => world.map.chads (1).skills (skill.athletics) := world.map.chads (1).skills (skill.athletics) + data.modifier; + when diplomacy => world.map.chads (1).skills (skill.diplomacy) := world.map.chads (1).skills (skill.diplomacy) + data.modifier; + when estates => world.map.chads (1).skills (skill.estates) := world.map.chads (1).skills (skill.estates) + data.modifier; + when exploration => world.map.chads (1).skills (skill.exploration) := world.map.chads (1).skills (skill.exploration) + data.modifier; + when leadership => world.map.chads (1).skills (skill.leadership) := world.map.chads (1).skills (skill.leadership) + data.modifier; + when logistics => world.map.chads (1).skills (skill.logistics) := world.map.chads (1).skills (skill.logistics) + data.modifier; + when medicine => world.map.chads (1).skills (skill.medicine) := world.map.chads (1).skills (skill.medicine) + data.modifier; + when mercantile => world.map.chads (1).skills (skill.mercantile) := world.map.chads (1).skills (skill.mercantile) + data.modifier; + when mysticism => world.map.chads (1).skills (skill.mysticism) := world.map.chads (1).skills (skill.mysticism) + data.modifier; + when necromancy => world.map.chads (1).skills (skill.necromancy) := world.map.chads (1).skills (skill.necromancy) + data.modifier; + when resistance => world.map.chads (1).skills (skill.resistance) := world.map.chads (1).skills (skill.resistance) + data.modifier; + when skirmish => world.map.chads (1).skills (skill.skirmish) := world.map.chads (1).skills (skill.skirmish) + data.modifier; + when sorcery => world.map.chads (1).skills (skill.sorcery) := world.map.chads (1).skills (skill.sorcery) + data.modifier; + when tactics => world.map.chads (1).skills (skill.tactics) := world.map.chads (1).skills (skill.tactics) + data.modifier; + when thaumaturgy => world.map.chads (1).skills (skill.thaumaturgy) := world.map.chads (1).skills (skill.thaumaturgy) + data.modifier; + when gold => world.map.chads (1).resources (resource.gold) := world.map.chads (1).resources (resource.gold) + data.modifier; + when wood => world.map.chads (1).resources (resource.wood) := world.map.chads (1).resources (resource.wood) + data.modifier; + when stone => world.map.chads (1).resources (resource.stone) := world.map.chads (1).resources (resource.stone) + data.modifier; + when metal => world.map.chads (1).resources (resource.metal) := world.map.chads (1).resources (resource.metal) + data.modifier; + when leather => world.map.chads (1).resources (resource.leather) := world.map.chads (1).resources (resource.leather) + data.modifier; + when gem => world.map.chads (1).resources (resource.gem) := world.map.chads (1).resources (resource.gem) + data.modifier; when others => null; end case; end apply; diff --git a/source/effect.ads b/source/effect.ads index 13dd3ed..9cd238e 100644 --- a/source/effect.ads +++ b/source/effect.ads @@ -7,28 +7,17 @@ package effect is ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ type operation_index is ( - idle, - player_add, - player_subtract, - player_multiply, - player_divide, - player_increment, - player_decrement - ); - - type operator_index is ( - attribute_offense, attribute_defense, attribute_wisdom, attribute_stamina, attribute_speed, attribute_reach, - skill_alchemy, skill_archery, skill_architecture, skill_athletics, skill_diplomacy, skill_estates, - skill_exploration, skill_leadership, skill_logistics, skill_medicine, skill_mercantile, skill_mysticism, - skill_necromancy, skill_resistance, skill_skirmish, skill_sorcery, skill_tactics, skill_thaumaturgy, - resource_gold, resource_wood, resource_stone, resource_metal, resource_leather, resource_gem + offense, defense, wisdom, stamina, speed, reach, + alchemy, archery, architecture, athletics, diplomacy, estates, + exploration, leadership, logistics, medicine, mercantile, mysticism, + necromancy, resistance, skirmish, sorcery, tactics, thaumaturgy, + gold, wood, stone, metal, leather, gem ); ------------------------------------------------------------------------------------------ type value is record operation : operation_index; - operator : operator_index; modifier : integer; permanent : boolean; duration : natural; diff --git a/source/skill.ads b/source/skill.ads index 51a379d..c429818 100644 --- a/source/skill.ads +++ b/source/skill.ads @@ -29,24 +29,24 @@ package skill is count : constant natural := enumeration'pos (enumeration'last) + 1; trait : constant array (enumeration) of information := ( - ("Alchemy ", 0, "Alchemy skill determines effectiveness of your vials and potions. "), - ("Archery ", 0, "Archery skill determines effectiveness and range or your archers. "), - ("Architecture ", 0, "Architecture decreases time spent on building constructions. "), - ("Athletics ", 0, "Athletics increases movement speed of all your units, since they train. "), - ("Diplomacy ", 0, "Diplomacy helps you to avoid starting a battle you can't win. "), - ("Estates ", 0, "Estates makes you the ultimate crypto-bro, establishing a blockchain. "), - ("Exploration ", 0, "Exploration is quite self-explanatory... "), - ("Leadership ", 0, "Leadership is the default skill for any true chad, like God intended. "), - ("Logistics ", 0, "Logistics is a nightmare in real life, but this is only a game. "), - ("Medicine ", 0, "Medicine skill makes you swallow pills like a kid in a drugstore. "), - ("Mercantile ", 0, "Mercantile is the skill of any true-born nosy person, otherwise useless."), - ("Mysticism ", 0, "Mysticism allows you to have 60 cats, drink wine and talk weird. "), - ("Necromancy ", 0, "Necromancy lets you not to waste the bones after every battle. "), - ("Resistence ", 0, "Resistence skill increases defense points of all your units slightly. "), - ("Skirmish ", 0, "Skirmish makes your units go berserk when they have little health left. "), - ("Sorcery ", 0, "Sorcery skill is appropriately named useless skill to have in real life."), - ("Tactics ", 0, "Tactics is the opposite of skirmish, master it and lose in every battle."), - ("Thaumaturgy ", 0, "Thaumaturgy lets you do nothing, and hope that the best will happen. ") + alchemy => ("Alchemy ", 0, "Alchemy skill determines effectiveness of your vials and potions. "), + archery => ("Archery ", 0, "Archery skill determines effectiveness and range or your archers. "), + architecture => ("Architecture ", 0, "Architecture decreases time spent on building constructions. "), + athletics => ("Athletics ", 0, "Athletics increases movement speed of all your units, since they train. "), + diplomacy => ("Diplomacy ", 0, "Diplomacy helps you to avoid starting a battle you can't win. "), + estates => ("Estates ", 0, "Estates makes you the ultimate crypto-bro, establishing a blockchain. "), + exploration => ("Exploration ", 0, "Exploration is quite self-explanatory... "), + leadership => ("Leadership ", 0, "Leadership is the default skill for any true chad, like God intended. "), + logistics => ("Logistics ", 0, "Logistics is a nightmare in real life, but this is only a game. "), + medicine => ("Medicine ", 0, "Medicine skill makes you swallow pills like a kid in a drugstore. "), + mercantile => ("Mercantile ", 0, "Mercantile is the skill of any true-born nosy person, otherwise useless."), + mysticism => ("Mysticism ", 0, "Mysticism allows you to have 60 cats, drink wine and talk weird. "), + necromancy => ("Necromancy ", 0, "Necromancy lets you not to waste the bones after every battle. "), + resistance => ("Resistence ", 0, "Resistence skill increases defense points of all your units slightly. "), + skirmish => ("Skirmish ", 0, "Skirmish makes your units go berserk when they have little health left. "), + sorcery => ("Sorcery ", 0, "Sorcery skill is appropriately named useless skill to have in real life."), + tactics => ("Tactics ", 0, "Tactics is the opposite of skirmish, master it and lose in every battle."), + thaumaturgy => ("Thaumaturgy ", 0, "Thaumaturgy lets you do nothing, and hope that the best will happen. ") ); ------------------------------------------------------------------------------------------ diff --git a/source/world.ads b/source/world.ads index 4fc0f9c..94a50df 100644 --- a/source/world.ads +++ b/source/world.ads @@ -105,9 +105,9 @@ package world is ); location_trait : constant array (location_index) of location_stats := ( - well_of_agility => ("Well of Agility ", true, 4, 3, (effect.player_add, effect.attribute_speed, 2, false, 0)), - well_of_knowledge => ("Well of Knowledge ", true, 4, 3, (effect.player_add, effect.attribute_wisdom, 2, false, 0)), - well_of_strength => ("Well of Strength ", true, 4, 3, (effect.player_add, effect.attribute_offense, 2, false, 0)) + well_of_agility => ("Well of Agility ", true, 4, 3, (effect.speed, 2, false, 0)), + well_of_knowledge => ("Well of Knowledge ", true, 4, 3, (effect.wisdom, 2, false, 0)), + well_of_strength => ("Well of Strength ", true, 4, 3, (effect.offense, 2, false, 0)) ); map : information;