From c47b3f32084ccaaeff30c88f07adccca2ef86bf0 Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Sat, 24 Jun 2017 20:19:34 -0400 Subject: [PATCH] Simplify leadership (and THoT inspire) using new ability formulas --- .../utils/abilities.cfg | 60 +------------------ data/core/macros/abilities.cfg | 49 +-------------- 2 files changed, 4 insertions(+), 105 deletions(-) diff --git a/data/campaigns/The_Hammer_of_Thursagan/utils/abilities.cfg b/data/campaigns/The_Hammer_of_Thursagan/utils/abilities.cfg index 27f649dac144..e00a9d97a02a 100644 --- a/data/campaigns/The_Hammer_of_Thursagan/utils/abilities.cfg +++ b/data/campaigns/The_Hammer_of_Thursagan/utils/abilities.cfg @@ -6,10 +6,9 @@ _" The presence of this unit inspires own units next to it to deal more damage i #define ABILITY_INSPIRE # Canned definition of the Inspire ability to be included in an # [abilities] clause. - # Note: Works only on units of level 0-5 [leadership] id=inspire - value=150 + value="(25 * (level - other.level + 1))" cumulative=no name= _ "inspire" female_name= _ "female^inspire" @@ -17,62 +16,7 @@ _" The presence of this unit inspires own units next to it to deal more damage i affect_self=no [affect_adjacent] [filter] - formula="level = other.level - 5" - [/filter] - [/affect_adjacent] - [/leadership] - [leadership] - id=inspire - value=125 - cumulative=no - affect_self=no - [affect_adjacent] - [filter] - formula="level = other.level - 4" - [/filter] - [/affect_adjacent] - [/leadership] - [leadership] - id=inspire - value=100 - cumulative=no - affect_self=no - [affect_adjacent] - [filter] - formula="level = other.level - 3" - [/filter] - [/affect_adjacent] - [/leadership] - [leadership] - id=inspire - value=75 - cumulative=no - affect_self=no - [affect_adjacent] - [filter] - formula="level = other.level - 2" - [/filter] - [/affect_adjacent] - [/leadership] - [leadership] - id=inspire - value=50 - cumulative=no - affect_self=no - [affect_adjacent] - [filter] - formula="level = other.level - 1" - [/filter] - [/affect_adjacent] - [/leadership] - [leadership] - id=inspire - value=25 - cumulative=no - affect_self=no - [affect_adjacent] - [filter] - formula="level = other.level" + formula="level <= other.level" [/filter] [/affect_adjacent] [/leadership] diff --git a/data/core/macros/abilities.cfg b/data/core/macros/abilities.cfg index 53afc5d6952a..6b66697d52bc 100644 --- a/data/core/macros/abilities.cfg +++ b/data/core/macros/abilities.cfg @@ -99,10 +99,9 @@ This ability will not cure an affected unit of poison, however, only delay its e #define ABILITY_LEADERSHIP # Canned definition of the Leadership ability to be included in an # [abilities] clause. - # Note: Works only on units of level 1-5 [leadership] id=leadership - value=125 + value="(25 * (level - other.level))" cumulative=no name= _ "leadership" female_name= _ "female^leadership" @@ -112,51 +111,7 @@ Adjacent own units of lower level will do more damage in battle. When a unit adj affect_self=no [affect_adjacent] [filter] - formula="level = other.level - 5" - [/filter] - [/affect_adjacent] - [/leadership] - [leadership] - id=leadership - value=100 - cumulative=no - affect_self=no - [affect_adjacent] - [filter] - formula="level = other.level - 4" - [/filter] - [/affect_adjacent] - [/leadership] - [leadership] - id=leadership - value=75 - cumulative=no - affect_self=no - [affect_adjacent] - [filter] - formula="level = other.level - 3" - [/filter] - [/affect_adjacent] - [/leadership] - [leadership] - id=leadership - value=50 - cumulative=no - affect_self=no - [affect_adjacent] - [filter] - formula="level = other.level - 2" - [/filter] - [/affect_adjacent] - [/leadership] - [leadership] - id=leadership - value=25 - cumulative=no - affect_self=no - [affect_adjacent] - [filter] - formula="level = other.level - 1" + formula="level < other.level" [/filter] [/affect_adjacent] [/leadership]