From d92cc40c6156dc94f59354749beff27b3e4b4576 Mon Sep 17 00:00:00 2001 From: xolatile Date: Thu, 23 May 2024 04:52:45 -0400 Subject: [PATCH] Refactoring code in general... --- source/chad.ads | 12 ++++++------ source/construction.ads | 12 ++++++------ source/effect.adb | 2 +- source/faction.ads | 20 ++++++++++---------- source/magic.ads | 12 ++++++------ source/material.ads | 8 ++++---- 6 files changed, 33 insertions(+), 33 deletions(-) diff --git a/source/chad.ads b/source/chad.ads index 7832d01..ca6c8e9 100644 --- a/source/chad.ads +++ b/source/chad.ads @@ -49,12 +49,12 @@ package chad is count : constant natural := enumeration'pos (enumeration'last) + 1; trait : constant array (enumeration) of information := ( - ("Ada Augusta King ", faction.fairy, attribute.defense, skill.diplomacy, resource.metal), - ("Richard Martin Stallman ", faction.dwarf, attribute.offense, skill.leadership, resource.wood), - ("Ognjen Milan Robovic ", faction.kobold, attribute.stamina, skill.archery, resource.leather), - ("Wouter van Oortmerssen ", faction.gnoll, attribute.speed, skill.medicine, resource.stone), - ("John Warner Backus ", faction.goblin, attribute.wisdom, skill.sorcery, resource.gem), - ("Marina Ann Hantzis ", faction.imp, attribute.reach, skill.necromancy, resource.gold) + ada => ("Ada Augusta King ", faction.fairy, attribute.defense, skill.diplomacy, resource.metal), + richard => ("Richard Martin Stallman ", faction.dwarf, attribute.offense, skill.leadership, resource.wood), + ognjen => ("Ognjen Milan Robovic ", faction.kobold, attribute.stamina, skill.archery, resource.leather), + wouter => ("Wouter van Oortmerssen ", faction.gnoll, attribute.speed, skill.medicine, resource.stone), + john => ("John Warner Backus ", faction.goblin, attribute.wisdom, skill.sorcery, resource.gem), + marina => ("Marina Ann Hantzis ", faction.imp, attribute.reach, skill.necromancy, resource.gold) ); ------------------------------------------------------------------------------------------ diff --git a/source/construction.ads b/source/construction.ads index 1f3c025..ed55b3e 100644 --- a/source/construction.ads +++ b/source/construction.ads @@ -27,12 +27,12 @@ package construction is count : constant natural := enumeration'pos (enumeration'last) + 1; trait : constant array (enumeration) of information := ( - ("Dwarf House ", faction.dwarf, (others => 0), 1, effect.none), - ("Fairy Cottage ", faction.fairy, (others => 0), 1, effect.none), - ("Gnoll Shack ", faction.gnoll, (others => 0), 1, effect.none), - ("Kobold Homestead ", faction.kobold, (others => 0), 1, effect.none), - ("Goblin Hut ", faction.goblin, (others => 0), 1, effect.none), - ("Imp Den ", faction.imp, (others => 0), 1, effect.none) + house => ("Dwarf House ", faction.dwarf, (others => 0), 1, effect.none), + cottage => ("Fairy Cottage ", faction.fairy, (others => 0), 1, effect.none), + shack => ("Gnoll Shack ", faction.gnoll, (others => 0), 1, effect.none), + homestead => ("Kobold Homestead ", faction.kobold, (others => 0), 1, effect.none), + hut => ("Goblin Hut ", faction.goblin, (others => 0), 1, effect.none), + den => ("Imp Den ", faction.imp, (others => 0), 1, effect.none) ); sprite : array (enumeration) of core.sprite; diff --git a/source/effect.adb b/source/effect.adb index 0d5e0b7..14a52f1 100644 --- a/source/effect.adb +++ b/source/effect.adb @@ -43,7 +43,7 @@ package body effect is 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; + when others => null; end case; end apply; diff --git a/source/faction.ads b/source/faction.ads index ef8c704..9197386 100644 --- a/source/faction.ads +++ b/source/faction.ads @@ -27,16 +27,16 @@ package faction is count : constant natural := enumeration'pos (enumeration'last) + 1; trait : constant array (enumeration) of information := ( - ("Fairy Kingdom ", attribute.speed, skill.mysticism, resource.gold), - ("Dwarf Kingdom ", attribute.defense, skill.estates, resource.stone), - ("Gnoll Kingdom ", attribute.stamina, skill.logistics, resource.leather), - ("Kobold Kingdom ", attribute.offense, skill.tactics, resource.metal), - ("Goblin Kingdom ", attribute.reach, skill.exploration, resource.wood), - ("Imp Kingdom ", attribute.wisdom, skill.sorcery, resource.gem), - ("Fallen Human Empire ", attribute.wisdom, skill.estates, resource.gold), - ("Fallen Elf Empire ", attribute.wisdom, skill.estates, resource.gold), - ("Fallen Orc Empire ", attribute.wisdom, skill.estates, resource.gold), - ("Neutral ", attribute.offense, skill.archery, resource.gold) + fairy => ("Fairy Kingdom ", attribute.speed, skill.mysticism, resource.gold), + dwarf => ("Dwarf Kingdom ", attribute.defense, skill.estates, resource.stone), + gnoll => ("Gnoll Kingdom ", attribute.stamina, skill.logistics, resource.leather), + kobold => ("Kobold Kingdom ", attribute.offense, skill.tactics, resource.metal), + goblin => ("Goblin Kingdom ", attribute.reach, skill.exploration, resource.wood), + imp => ("Imp Kingdom ", attribute.wisdom, skill.sorcery, resource.gem), + human => ("Fallen Human Empire ", attribute.wisdom, skill.estates, resource.gold), + elf => ("Fallen Elf Empire ", attribute.wisdom, skill.estates, resource.gold), + orc => ("Fallen Orc Empire ", attribute.wisdom, skill.estates, resource.gold), + neutral => ("Neutral ", attribute.offense, skill.archery, resource.gold) ); ------------------------------------------------------------------------------------------ diff --git a/source/magic.ads b/source/magic.ads index 6a5be95..4c1a628 100644 --- a/source/magic.ads +++ b/source/magic.ads @@ -44,12 +44,12 @@ package magic is count : constant natural := enumeration'pos (enumeration'last) + 1; trait : constant array (enumeration) of information := ( - ("Arrow Storm ", air, 1, effect.none, "Arrow Storm increases the range of your ranged units. "), - ("Torment ", dark, 1, effect.none, "Torment causes targeted friend or foe to feel pain and shit. "), - ("Stone Armour ", earth, 1, effect.none, "Stone Armour increases defense of selected unit. "), - ("Fireball ", fire, 1, effect.none, "Fireball conjures a literal ball of fire that flies go brr. "), - ("Heal ", light, 1, effect.none, "Heal does what it says it will do, keeps the promise. "), - ("Ice Armour ", water, 1, effect.none, "Ice Armour increases defense and stamina of selected unit. ") + arrow_storm => ("Arrow Storm ", air, 1, effect.none, "Arrow Storm increases the range of your ranged units. "), + torment => ("Torment ", dark, 1, effect.none, "Torment causes targeted friend or foe to feel pain and shit. "), + stone_armour => ("Stone Armour ", earth, 1, effect.none, "Stone Armour increases defense of selected unit. "), + fireball => ("Fireball ", fire, 1, effect.none, "Fireball conjures a literal ball of fire that flies go brr. "), + heal => ("Heal ", light, 1, effect.none, "Heal does what it says it will do, keeps the promise. "), + ice_armour => ("Ice Armour ", water, 1, effect.none, "Ice Armour increases defense and stamina of selected unit. ") ); ------------------------------------------------------------------------------------------ diff --git a/source/material.ads b/source/material.ads index ff75ccd..3532f75 100644 --- a/source/material.ads +++ b/source/material.ads @@ -24,10 +24,10 @@ package material is count : constant natural := enumeration'pos (enumeration'last) + 1; trait : constant array (enumeration) of information := ( - ("Sulphur ", 7), - ("Mercury ", 13), - ("Mint ", 3), - ("Cinnamon ", 5) + sulphur => ("Sulphur ", 7), + mercury => ("Mercury ", 13), + mint => ("Mint ", 3), + cinnamon => ("Cinnamon ", 5) ); ------------------------------------------------------------------------------------------