diff --git a/data/upgrades/abilities/barkskin.txt b/data/upgrades/abilities/barkskin.txt index ca76d517ee..b416cb9fbe 100644 --- a/data/upgrades/abilities/barkskin.txt +++ b/data/upgrades/abilities/barkskin.txt @@ -3,7 +3,7 @@ upgrade_barkskin = { icon = icon_barkskin ability = true - conditions = { + unit_conditions = { upgrade = upgrade_deity_frey } } diff --git a/data/upgrades/abilities/blessing.txt b/data/upgrades/abilities/blessing.txt new file mode 100644 index 0000000000..054808bea0 --- /dev/null +++ b/data/upgrades/abilities/blessing.txt @@ -0,0 +1,9 @@ +upgrade_blessing = { + name = "Blessing" + icon = icon_blessing + ability = true + + unit_conditions = { + upgrade = upgrade_deity_christian_god + } +} diff --git a/data/upgrades/abilities/deadly_precision.txt b/data/upgrades/abilities/deadly_precision.txt new file mode 100644 index 0000000000..6b72aef04e --- /dev/null +++ b/data/upgrades/abilities/deadly_precision.txt @@ -0,0 +1,10 @@ +upgrade_deadly_precision = { + name = "Deadly Precision" + icon = icon_deadly_precision + ability = true + requirements_string = "Critical Strike" + + unit_conditions = { + upgrade = upgrade_critical_strike + } +} diff --git a/data/upgrades/abilities/far_sight.txt b/data/upgrades/abilities/far_sight.txt new file mode 100644 index 0000000000..b493a30074 --- /dev/null +++ b/data/upgrades/abilities/far_sight.txt @@ -0,0 +1,9 @@ +upgrade_far_sight = { + name = "Far Sight" + icon = icon_far_sight + ability = true + + unit_conditions = { + upgrade = upgrade_deity_odin + } +} diff --git a/data/upgrades/abilities/healing.txt b/data/upgrades/abilities/healing.txt new file mode 100644 index 0000000000..99c50df925 --- /dev/null +++ b/data/upgrades/abilities/healing.txt @@ -0,0 +1,9 @@ +upgrade_healing = { + name = "Healing" + icon = icon_healing + ability = true + + unit_conditions = { + upgrade = upgrade_deity_christian_god + } +} diff --git a/data/upgrades/abilities/inspire.txt b/data/upgrades/abilities/inspire.txt new file mode 100644 index 0000000000..6994bf213a --- /dev/null +++ b/data/upgrades/abilities/inspire.txt @@ -0,0 +1,9 @@ +upgrade_inspire = { + name = "Inspire" + icon = icon_inspire + ability = true + + unit_conditions = { + upgrade = upgrade_deity_tyr + } +} diff --git a/data/upgrades/abilities/precision.txt b/data/upgrades/abilities/precision.txt new file mode 100644 index 0000000000..f5244d873b --- /dev/null +++ b/data/upgrades/abilities/precision.txt @@ -0,0 +1,9 @@ +upgrade_precision = { + name = "Precision" + icon = icon_precision + ability = true + + unit_conditions = { + upgrade = upgrade_deity_heimdall + } +} diff --git a/data/upgrades/abilities/regeneration.txt b/data/upgrades/abilities/regeneration.txt index bfa9470bb3..b4974b9291 100644 --- a/data/upgrades/abilities/regeneration.txt +++ b/data/upgrades/abilities/regeneration.txt @@ -3,7 +3,7 @@ upgrade_regeneration = { icon = icon_regeneration ability = true - conditions = { + unit_conditions = { upgrade = upgrade_deity_freyja } } diff --git a/data/upgrades/abilities/shocking_grasp.txt b/data/upgrades/abilities/shocking_grasp.txt new file mode 100644 index 0000000000..510419eb2b --- /dev/null +++ b/data/upgrades/abilities/shocking_grasp.txt @@ -0,0 +1,9 @@ +upgrade_shocking_grasp = { + name = "Shocking Grasp" + icon = icon_shocking_grasp + ability = true + + unit_conditions = { + upgrade = upgrade_deity_thor + } +} diff --git a/data/upgrades/abilities/slow.txt b/data/upgrades/abilities/slow.txt new file mode 100644 index 0000000000..cf76a68dd4 --- /dev/null +++ b/data/upgrades/abilities/slow.txt @@ -0,0 +1,9 @@ +upgrade_slow_ability = { + name = "Slow" + icon = icon_slow + ability = true + + unit_conditions = { + upgrade = upgrade_deity_loki + } +} diff --git a/data/upgrades/abilities/terror.txt b/data/upgrades/abilities/terror.txt new file mode 100644 index 0000000000..238e7e971c --- /dev/null +++ b/data/upgrades/abilities/terror.txt @@ -0,0 +1,9 @@ +upgrade_terror = { + name = "Terror" + icon = icon_terror + ability = true + + unit_conditions = { + upgrade = upgrade_deity_gathaarl + } +} diff --git a/data/upgrades/abilities/wither.txt b/data/upgrades/abilities/wither.txt new file mode 100644 index 0000000000..770ccc9444 --- /dev/null +++ b/data/upgrades/abilities/wither.txt @@ -0,0 +1,9 @@ +upgrade_wither = { + name = "Wither" + icon = icon_wither + ability = true + + unit_conditions = { + upgrade = upgrade_deity_hel + } +} diff --git a/scripts/abilities.lua b/scripts/abilities.lua index 8d8129a969..e977552185 100644 --- a/scripts/abilities.lua +++ b/scripts/abilities.lua @@ -33,12 +33,6 @@ DefineUpgrade("upgrade-axe-mastery", { MaxLimit = 5 }) -DefineUpgrade("upgrade-blessing", { - Name = "Blessing", - Icon = "icon-blessing", - Ability = true -}) - DefineUpgrade("upgrade-bow-mastery", { Name = "Bow Mastery", Icon = "icon-bow-mastery", @@ -53,13 +47,6 @@ DefineUpgrade("upgrade-critical-strike", { Ability = true }) -DefineUpgrade("upgrade-deadly-precision", { - Name = "Deadly Precision", - Icon = "icon-deadly-precision", - Ability = true, - RequirementsString = "Critical Strike" -}) - DefineUpgrade("upgrade-eagle-eye", { Name = "Eagle Eye", Icon = "icon-eagle-eye", @@ -73,12 +60,6 @@ DefineUpgrade("upgrade-ethereal-vision", { Ability = true }) -DefineUpgrade("upgrade-far-sight", { - Name = "Far Sight", - Icon = "icon-far-sight", - Ability = true -}) - DefineUpgrade("upgrade-gun-mastery", { Name = "Gun Mastery", Icon = "icon-gun-mastery", @@ -87,18 +68,6 @@ DefineUpgrade("upgrade-gun-mastery", { MaxLimit = 5 }) -DefineUpgrade("upgrade-healing", { - Name = "Healing", - Icon = "icon-healing", - Ability = true -}) - -DefineUpgrade("upgrade-inspire", { - Name = "Inspire", - Icon = "icon-inspire", - Ability = true -}) - DefineUpgrade("upgrade-leadership", { Name = "Leadership", Icon = "icon-leadership", @@ -125,12 +94,6 @@ DefineUpgrade("upgrade-precise-shot", { Ability = true }) -DefineUpgrade("upgrade-precision", { - Name = "Precision", - Icon = "icon-precision", - Ability = true -}) - DefineUpgrade("upgrade-puncture", { Name = "Puncture", Icon = "icon-puncture", @@ -143,18 +106,6 @@ DefineUpgrade("upgrade-scouting", { Ability = true }) -DefineUpgrade("upgrade-shocking-grasp", { - Name = "Shocking Grasp", - Icon = "icon-shocking-grasp", - Ability = true -}) - -DefineUpgrade("upgrade-slow-ability", { - Name = "Slow", - Icon = "icon-slow", - Ability = true -}) - DefineUpgrade("upgrade-spear-mastery", { Name = "Spear Mastery", Icon = "icon-spear-mastery", @@ -177,12 +128,6 @@ DefineUpgrade("upgrade-sword-mastery", { MaxLimit = 5 }) -DefineUpgrade("upgrade-terror", { - Name = "Terror", - Icon = "icon-terror", - Ability = true -}) - DefineUpgrade("upgrade-throwing-mastery", { Name = "Throwing Mastery", Icon = "icon-throwing-mastery", @@ -198,12 +143,6 @@ DefineUpgrade("upgrade-toughness", { MaxLimit = 100 }) -DefineUpgrade("upgrade-wither", { - Name = "Wither", - Icon = "icon-wither", - Ability = true -}) - DefineModifier("upgrade-axe-mastery", {"BasicDamage", 2} ) diff --git a/scripts/ability_dependencies.lua b/scripts/ability_dependencies.lua deleted file mode 100644 index 4485b2bf76..0000000000 --- a/scripts/ability_dependencies.lua +++ /dev/null @@ -1,66 +0,0 @@ --- _________ __ __ --- / _____// |_____________ _/ |______ ____ __ __ ______ --- \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ --- / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ --- /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > --- \/ \/ \//_____/ \/ --- ______________________ ______________________ --- T H E W A R B E G I N S --- Stratagus - A free fantasy real time strategy game engine --- --- (c) Copyright 2014-2022 by Andrettin --- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- - -DefineDependency("upgrade-blessing", - {"upgrade_deity_christian_god"} -) - -DefineDependency("upgrade-deadly-precision", - {"upgrade-critical-strike"} -) - -DefineDependency("upgrade-far-sight", - {"upgrade-deity-odin"} -) - -DefineDependency("upgrade-healing", - {"upgrade_deity_christian_god"} -) - -DefineDependency("upgrade-inspire", - {"upgrade-deity-tyr"} -) - -DefineDependency("upgrade-precision", - {"upgrade-deity-heimdall"} -) - -DefineDependency("upgrade-shocking-grasp", - {"upgrade-deity-thor"} -) - -DefineDependency("upgrade-slow-ability", - {"upgrade-deity-loki"} -) - -DefineDependency("upgrade-terror", - {"upgrade-deity-gathaarl"} -) - -DefineDependency("upgrade-wither", - {"upgrade-deity-hel"} -) diff --git a/scripts/buttons.lua b/scripts/buttons.lua index 20c20bf414..c5d093b612 100644 --- a/scripts/buttons.lua +++ b/scripts/buttons.lua @@ -204,14 +204,14 @@ DefineButton( { Pos = 10, Level = "choose-individual-upgrade-level", Icon = "ico --[[ DefineButton( { Pos = 1, Level = "choose-individual-upgrade-level", Icon = "icon-healing", - Action = "learn-ability", Value = "upgrade-healing", + Action = "learn-ability", Value = "upgrade_healing", Description = "Healing is an active ability that heals an organic unit.", Key = "h", Hint = "Learn ~!Healing", Popup = "popup_learn_ability", ForUnit = {"unit-dwarven-loremaster"} }) DefineButton( { Pos = 2, Level = "choose-individual-upgrade-level", Icon = "icon-precision", - Action = "learn-ability", Value = "upgrade-precision", + Action = "learn-ability", Value = "upgrade_precision", Key = "r", Hint = "Learn P~!recision", Popup = "popup_learn_ability", Description = "Precision is an active ability that doubles the accuracy of an organic unit while in combat.", ForUnit = {"unit-germanic-priest", "unit-teuton-priest", "unit-elven-priest", "unit-dwarven-loremaster"} diff --git a/scripts/civilizations/dwarf/units.lua b/scripts/civilizations/dwarf/units.lua index 208aadb937..c608df3c06 100644 --- a/scripts/civilizations/dwarf/units.lua +++ b/scripts/civilizations/dwarf/units.lua @@ -1441,7 +1441,7 @@ DefineUnitType("unit-dwarven-witness", { InvertedEastArms = true, InvertedSoutheastArms = true, ButtonKey = "w", - StartingAbilities = {"upgrade-far-sight", "upgrade-inspire", "upgrade-precision", "upgrade-shocking-grasp", "upgrade-slow-ability", "upgrade-wither"}, + StartingAbilities = {"upgrade_far_sight", "upgrade_inspire", "upgrade_precision", "upgrade_shocking_grasp", "upgrade_slow_ability", "upgrade_wither"}, CanCastSpell = {"spell-far-sight", "spell-inspire", "spell-healing", "spell-precision", "spell-shocking-grasp", "spell-slow", "spell-wither"}, AutoCastActive = {"spell-inspire", "spell-healing", "spell-precision", "spell-shocking-grasp", "spell-slow", "spell-wither"}, AiDrops = {"unit-boots", "unit-cheese", "unit_meat", "unit-potion-of-healing", "unit_potion_of_mana"}, @@ -1476,7 +1476,7 @@ DefineUnitType("unit-dwarven-annalist", { BluntDamage = true, InvertedEastArms = true, InvertedSoutheastArms = true, - StartingAbilities = {"upgrade-far-sight", "upgrade-inspire", "upgrade-precision", "upgrade-shocking-grasp", "upgrade-slow-ability", "upgrade-wither"}, + StartingAbilities = {"upgrade_far_sight", "upgrade_inspire", "upgrade_precision", "upgrade_shocking_grasp", "upgrade_slow_ability", "upgrade_wither"}, CanCastSpell = {"spell-far-sight", "spell-inspire", "spell-healing", "spell-precision", "spell-shocking-grasp", "spell-slow", "spell-wither"}, AutoCastActive = {"spell-inspire", "spell-healing", "spell-precision", "spell-shocking-grasp", "spell-slow", "spell-wither"}, AiDrops = {"unit-boots", "unit-cheese", "unit_meat", "unit-potion-of-healing", "unit_potion_of_mana"}, @@ -1511,7 +1511,7 @@ DefineUnitType("unit-dwarven-loremaster", { BluntDamage = true, InvertedEastArms = true, InvertedSoutheastArms = true, - StartingAbilities = {"upgrade-far-sight", "upgrade-inspire", "upgrade-precision", "upgrade-shocking-grasp", "upgrade-slow-ability", "upgrade-wither"}, + StartingAbilities = {"upgrade_far_sight", "upgrade_inspire", "upgrade_precision", "upgrade_shocking_grasp", "upgrade_slow_ability", "upgrade_wither"}, CanCastSpell = {"spell-far-sight", "spell-inspire", "spell-healing", "spell-precision", "spell-shocking-grasp", "spell-slow", "spell-wither"}, AutoCastActive = {"spell-inspire", "spell-healing", "spell-precision", "spell-shocking-grasp", "spell-slow", "spell-wither"}, AiDrops = {"unit-boots", "unit-cheese", "unit_meat", "unit-potion-of-healing", "unit_potion_of_mana"}, diff --git a/scripts/civilizations/elf/units.lua b/scripts/civilizations/elf/units.lua index 38e6bc85d4..68b6d140b5 100644 --- a/scripts/civilizations/elf/units.lua +++ b/scripts/civilizations/elf/units.lua @@ -60,7 +60,7 @@ DefineUnitType("unit-elven-priest", { -- WeaponClasses = {"mace"}, BluntDamage = true, ButtonKey = "p", - StartingAbilities = {"upgrade-healing"}, + StartingAbilities = {"upgrade_healing"}, CanCastSpell = {"spell-healing", "spell-precision"}, AutoCastActive = {"spell-healing", "spell-precision"}, AiDrops = {"unit-boots", "unit-cheese", "unit_meat", "unit-potion-of-healing", "unit_potion_of_mana"}, diff --git a/scripts/civilizations/germanic/units.lua b/scripts/civilizations/germanic/units.lua index b9cb9e7424..34d2ed7c84 100644 --- a/scripts/civilizations/germanic/units.lua +++ b/scripts/civilizations/germanic/units.lua @@ -656,7 +656,7 @@ DefineUnitType("unit-germanic-priest", { -- WeaponClasses = {"mace"}, BluntDamage = true, ButtonKey = "g", - StartingAbilities = {"upgrade-barkskin", "upgrade-far-sight", "upgrade-inspire", "upgrade-precision", "upgrade-regeneration", "upgrade-shocking-grasp", "upgrade-slow-ability", "upgrade-wither"}, + StartingAbilities = {"upgrade_barkskin", "upgrade_far_sight", "upgrade_inspire", "upgrade_precision", "upgrade_regeneration", "upgrade_shocking_grasp", "upgrade_slow_ability", "upgrade_wither"}, CanCastSpell = {"spell-barkskin", "spell-far-sight", "spell-inspire", "spell-healing", "spell-precision", "spell-regeneration", "spell-shocking-grasp", "spell-slow", "spell-wither"}, AutoCastActive = {"spell-barkskin", "spell-inspire", "spell-healing", "spell-precision", "spell-regeneration", "spell-shocking-grasp", "spell-slow", "spell-wither"}, AiDrops = {"unit-boots", "unit-cheese", "unit-potion-of-healing", "unit_potion_of_mana"}, diff --git a/scripts/civilizations/goblin/units.lua b/scripts/civilizations/goblin/units.lua index 26cae8438e..53cfe01806 100644 --- a/scripts/civilizations/goblin/units.lua +++ b/scripts/civilizations/goblin/units.lua @@ -355,7 +355,7 @@ DefineUnitType("unit-goblin-shaman", { Accuracy = 10, Evasion = 10, Corpse = "unit-goblin-dead-body", - StartingAbilities = {"upgrade-terror", "upgrade-wither"}, + StartingAbilities = {"upgrade_terror", "upgrade_wither"}, CanCastSpell = {"spell-terror", "spell-wither"}, AutoCastActive = {"spell-terror", "spell-wither"}, AiDrops = {"unit-boots", "unit-cheese", "unit_meat", "unit-potion-of-healing", "unit_potion_of_mana"}, diff --git a/scripts/civilizations/teuton/units.lua b/scripts/civilizations/teuton/units.lua index 14e21596cc..394775ecd2 100644 --- a/scripts/civilizations/teuton/units.lua +++ b/scripts/civilizations/teuton/units.lua @@ -822,7 +822,7 @@ DefineUnitType("unit-teuton-priest", { -- WeaponClasses = {"mace"}, BluntDamage = true, ButtonKey = "l", - StartingAbilities = {"upgrade-barkskin", "upgrade-blessing", "upgrade-far-sight", "upgrade-healing", "upgrade-inspire", "upgrade-precision", "upgrade-regeneration", "upgrade-shocking-grasp", "upgrade-slow-ability", "upgrade-wither"}, + StartingAbilities = {"upgrade_barkskin", "upgrade_blessing", "upgrade_far_sight", "upgrade_healing", "upgrade_inspire", "upgrade_precision", "upgrade_regeneration", "upgrade_shocking_grasp", "upgrade_slow_ability", "upgrade_wither"}, CanCastSpell = {"spell-barkskin", "spell-blessing", "spell-far-sight", "spell-healing", "spell-inspire", "spell-precision", "spell-regeneration", "spell-shocking-grasp", "spell-slow", "spell-wither"}, AutoCastActive = {"spell-barkskin", "spell-blessing", "spell-healing", "spell-inspire", "spell-precision", "spell-regeneration", "spell-shocking-grasp", "spell-slow", "spell-wither"}, AiDrops = {"unit-boots", "unit-cheese", "unit_carrots", "unit-potion-of-healing", "unit_potion_of_mana"}, diff --git a/scripts/stratagus.lua b/scripts/stratagus.lua index 4a7f60ca45..9a2b5bab31 100644 --- a/scripts/stratagus.lua +++ b/scripts/stratagus.lua @@ -1880,7 +1880,6 @@ Load("scripts/item_prefixes.lua") Load("scripts/item_suffixes.lua") Load("scripts/units.lua") Load("scripts/upgrade.lua") -Load("scripts/ability_dependencies.lua") Load("scripts/religions.lua") Load("scripts/deities.lua") Load("scripts/wyr.lua")