Skip to content

Commit

Permalink
move loyal overlays to the loyal trait
Browse files Browse the repository at this point in the history
this in particular fixes #4058 . Also people simply forgetting the
IS_LOYAL macro was a not-so-uncommon cause of bugs.

In some cases people want to give the LOYAL trait without giving the
loyal overlays for those cases i added a optional OVERLAY parameter to
the {TRAIT_LOYAL} macro, also heroes should now use {TRAIT_LOYAL_HERO}
instead which uses the hero overlay. The IS_LOYAL and IS_HERO macros are
no longer needed in combination with those traits.
  • Loading branch information
gfgtdf committed May 20, 2019
1 parent e1e51e6 commit 701ecab
Show file tree
Hide file tree
Showing 37 changed files with 67 additions and 47 deletions.
2 changes: 1 addition & 1 deletion data/ai/micro_ais/scenarios/The_Elves_Besieged.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
y=23
{IS_HERO}
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TRAIT_INTELLIGENT}
[/modifications]
[/unit]
Expand Down
2 changes: 1 addition & 1 deletion data/campaigns/Dead_Water/scenarios/01_Invasion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
[unit]
type=Mermaid Priestess
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TRAIT_RESILIENT}
[/modifications]
id=Cylanna
Expand Down
2 changes: 1 addition & 1 deletion data/campaigns/Dead_Water/scenarios/05_Tirigaz.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
x={X}
y={Y}
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL OVERLAY=""}
{TRAIT_FEARLESS}
[/modifications]
moves=0
Expand Down
2 changes: 1 addition & 1 deletion data/campaigns/Dead_Water/scenarios/09_The_Mage.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@
name= _ "Caladon"
unrenamable=yes
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TRAIT_QUICK}
[/modifications]
{IS_HERO}
Expand Down
2 changes: 1 addition & 1 deletion data/campaigns/Dead_Water/scenarios/11_Getting_Help.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
canrecruit=yes
type=Mermaid Diviner
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL OVERLAY=""}
{TRAIT_DEXTROUS}
[/modifications]
[ai]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@
{IS_HERO}
random_traits=no
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
[/modifications]
[/unit]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
type=General
random_traits=no
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
[/modifications]
side=1
x=21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
random_traits=no
unrenamable=yes
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TEAM_COLOR_OVERRIDE () teal}
[/modifications]
#enddef
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@
canrecruit=no
{IS_HERO}
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
[/modifications]
[/modify_unit]

Expand Down
6 changes: 3 additions & 3 deletions data/campaigns/Heir_To_The_Throne/utils/httt_utils.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ fire: +10%"
{PLACEMENT}
{IS_HERO}
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TRAIT_INTELLIGENT}
[/modifications]
[/unit]
Expand All @@ -709,7 +709,7 @@ fire: +10%"
{IS_HERO}
random_traits=no
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
[/modifications]
[/unit]
#enddef
Expand All @@ -725,7 +725,7 @@ fire: +10%"
{IS_HERO}
random_traits=no
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
[/modifications]
[/unit]
#enddef
Expand Down
6 changes: 3 additions & 3 deletions data/campaigns/Legend_of_Wesmere/utils/characters.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
[modifications]
{TRAIT_QUICK}
{TRAIT_RESILIENT}
{TRAIT_LOYAL}
{TRAIT_LOYAL OVERLAY=""}
[/modifications]
#enddef

Expand Down Expand Up @@ -90,7 +90,7 @@
[modifications]
{TRAIT_DEXTROUS}
{TRAIT_RESILIENT}
{TRAIT_LOYAL}
{TRAIT_LOYAL OVERLAY=""}
[/modifications]
#enddef

Expand Down Expand Up @@ -126,7 +126,7 @@
[modifications]
{TRAIT_QUICK}
{TRAIT_RESILIENT}
{TRAIT_LOYAL}
{TRAIT_LOYAL OVERLAY=""}
[/modifications]
#enddef

Expand Down
2 changes: 1 addition & 1 deletion data/campaigns/Liberty/scenarios/01_The_Raid.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
#textdomain wesnoth-l
[/effect]
[/object]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
[/modifications]
{IS_HERO}
unrenamable=yes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
{IS_HERO}
x,y=6,23
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TRAIT_STRONG}
[/modifications]
[/unit]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,7 @@
[foreach]
array=new_companions
[do]
## TODO: does this still work after the overlays= change?
{VARIABLE this_item.side 1}
{VARIABLE this_item.canrecruit no}
# We'll be unstoring these units onto the recall list, which won't heal them automatically, so we do it here.
Expand Down Expand Up @@ -998,7 +999,7 @@
name=this_item.modifications
mode=replace
[literal]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TRAIT_UNDEAD}
[/literal]
[/set_variables]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@
x,y=15,2
side=1
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
[/modifications]
{IS_HERO}
[/unit]
Expand All @@ -284,7 +284,7 @@
x,y=15,2
side=1
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
[/modifications]
{IS_HERO}
[/unit]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@
{IS_HERO}
profile=portraits/alanin.png
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TRAIT_RESILIENT}
[/modifications]
[/unit]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
profile=portraits/baglur.png
facing=sw
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TRAIT_RESILIENT}
[/modifications]
[/unit]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@
x,y=5,24
side=1
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TRAIT_INTELLIGENT}
[/modifications]
[/unit]
Expand Down Expand Up @@ -505,7 +505,7 @@
advances_to=Dwarvish Arcanister
max_experience=210
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TRAIT_STRONG}
[/modifications]
[/unit]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
profile=portraits/durstorn-insane.png
random_traits=no
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
[/modifications]
[/unit]
[unit]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
random_traits=no
{IS_HERO}
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
[object]
[effect]
apply_to=image_mod
Expand Down
6 changes: 3 additions & 3 deletions data/campaigns/Son_Of_The_Black_Eye/utils/utils.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
random_traits=no
{IS_HERO}
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
[/modifications]
[/unit]
#enddef
Expand All @@ -31,7 +31,7 @@
random_traits=no
{IS_HERO}
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
[/modifications]
[/unit]
#enddef
Expand All @@ -49,7 +49,7 @@
random_traits=no
{IS_HERO}
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
[/modifications]
[/unit]
#enddef
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
x={X}
y={Y}
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL OVERLAY=""}
[/modifications]
ai_special=guardian
random_traits=yes
Expand Down
4 changes: 2 additions & 2 deletions data/campaigns/The_Hammer_of_Thursagan/utils/characters.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
unrenamable=yes
{IS_HERO}
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TRAIT_QUICK}
[/modifications]
#enddef
Expand All @@ -34,7 +34,7 @@
unrenamable=yes
{IS_HERO}
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TRAIT_STRONG}
[/modifications]
#enddef
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@
random_traits=no
profile=portraits/lady_outlaw.png
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
[/modifications]
[/unit]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@
random_traits=no
profile=portraits/jessica.png
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
[/modifications]
[/unit]

Expand Down
2 changes: 1 addition & 1 deletion data/campaigns/The_Rise_Of_Wesnoth/utils/trow-macros.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
unrenamable=yes
random_traits=no
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
[/modifications]
[/unit]
#enddef
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
{IS_HERO}
x,y=10,9
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TRAIT_RESILIENT}
[/modifications]
[/unit]
Expand Down Expand Up @@ -802,7 +802,7 @@
{IS_HERO}
x,y=10,9
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TRAIT_RESILIENT}
[/modifications]
[/unit]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@
side=1
x,y=21,14
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TRAIT_INTELLIGENT}
[/modifications]
[/unit]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@
name=EthilielV.modifications
mode=insert
[value]
{TRAIT_LOYAL}
{TRAIT_LOYAL OVERLAY=""}
{TRAIT_QUICK}
[/value]
[/set_variables]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@
canrecruit=no
{IS_HERO}
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
[/modifications]
[/modify_unit]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ _f, _f, Re, _f
x,y=recall,recall
random_traits=no
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
[/modifications]
[/unit]
[/then]
Expand Down
2 changes: 1 addition & 1 deletion data/campaigns/Two_Brothers/utils/characters.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
{IS_HERO}
{PLACEMENT}
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TRAIT_INTELLIGENT}
[/modifications]
[/unit]
Expand Down
Loading

0 comments on commit 701ecab

Please sign in to comment.