Skip to content

Commit

Permalink
Merge pull request #4088 from gfgtdf/fix_remove_overlay
Browse files Browse the repository at this point in the history
wml changes for overlays= change

* move loyal overlays to the loyal trait
* other wml improvments.

Fix [remove_object] for effects that change ellipse
  • Loading branch information
gfgtdf committed Aug 25, 2019
2 parents 3be0f75 + 6ba25a8 commit 66fb021
Show file tree
Hide file tree
Showing 121 changed files with 375 additions and 821 deletions.
3 changes: 1 addition & 2 deletions data/ai/micro_ais/scenarios/The_Elves_Besieged.cfg
Expand Up @@ -52,9 +52,8 @@
side=1
x=19
y=23
{IS_HERO}
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TRAIT_INTELLIGENT}
[/modifications]
[/unit]
Expand Down
10 changes: 9 additions & 1 deletion data/ai/micro_ais/scenarios/messenger_escort.cfg
Expand Up @@ -74,7 +74,15 @@
side=2
x,y=30,27
random_traits=no
overlays=misc/hero-icon.png
[modifications]
# TODO: maybe it is better to give the corresponding LOYAL_HERO trait directly?
[object]
[effect]
apply_to=overlay
add="misc/hero-icon.png"
[/effect]
[/object]
[/modifications]
[/unit]
{NOTRAIT_UNIT 2 Dragoon 30 26}
[unit]
Expand Down
Expand Up @@ -72,7 +72,7 @@
{TRAIT_LOYAL}
{TRAIT_RESILIENT}
[/modifications]
{IS_LOYAL}

facing=ne
[/unit]
[/side]
Expand Down
5 changes: 0 additions & 5 deletions data/campaigns/An_Orcish_Incursion/scenarios/07_Showdown.cfg
Expand Up @@ -115,7 +115,6 @@
{TRAIT_LOYAL}
{TRAIT_RESILIENT}
[/modifications]
{IS_LOYAL}
facing=sw
[/unit]

Expand All @@ -135,7 +134,6 @@
[modifications]
{TRAIT_LOYAL}
[/modifications]
{IS_LOYAL}
facing=sw
[/unit]

Expand All @@ -155,7 +153,6 @@
[modifications]
{TRAIT_LOYAL}
[/modifications]
{IS_LOYAL}
facing=sw
[/unit]

Expand All @@ -175,7 +172,6 @@
[modifications]
{TRAIT_LOYAL}
[/modifications]
{IS_LOYAL}
facing=sw
[/unit]

Expand All @@ -195,7 +191,6 @@
[modifications]
{TRAIT_LOYAL}
[/modifications]
{IS_LOYAL}
facing=sw
[/unit]

Expand Down
4 changes: 1 addition & 3 deletions data/campaigns/Dead_Water/scenarios/01_Invasion.cfg
Expand Up @@ -221,7 +221,7 @@
[unit]
type=Mermaid Priestess
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TRAIT_RESILIENT}
[/modifications]
id=Cylanna
Expand All @@ -230,7 +230,6 @@
side=1
x=21
y=9
{IS_HERO}
unrenamable=yes
[/unit]

Expand Down Expand Up @@ -312,7 +311,6 @@
[/modifications]
facing=se
animate=yes
{IS_LOYAL}
profile=portraits/gwabbo.png
[/unit]

Expand Down
3 changes: 0 additions & 3 deletions data/campaigns/Dead_Water/scenarios/02_Flight.cfg
Expand Up @@ -463,7 +463,6 @@ _f, _f, _f, _f, _f, _f, _f
side=1
x=$x1
y=$y1
{IS_LOYAL}
[/unit]

[if]
Expand Down Expand Up @@ -590,7 +589,6 @@ _f, _f, _f, _f, _f, _f, _f
side=1
x=$x1
y=$y1
{IS_LOYAL}
[/unit]

[if]
Expand Down Expand Up @@ -733,7 +731,6 @@ _f, _f, _f, _f, _f, _f, _f
side=1
x=$x1
y=$y1
{IS_LOYAL}
[/unit]

[if]
Expand Down
3 changes: 0 additions & 3 deletions data/campaigns/Dead_Water/scenarios/04_Slavers.cfg
Expand Up @@ -335,7 +335,6 @@
{TRAIT_LOYAL}
{TRAIT_RESILIENT}
[/modifications]
{IS_LOYAL}
[/unit]

[message]
Expand Down Expand Up @@ -627,7 +626,6 @@
{TRAIT_LOYAL}
{TRAIT_INTELLIGENT}
[/modifications]
{IS_LOYAL}
[/unit]

[message]
Expand Down Expand Up @@ -691,7 +689,6 @@
{TRAIT_LOYAL}
{TRAIT_RESILIENT}
[/modifications]
{IS_LOYAL}
[/unit]

[if]
Expand Down
24 changes: 4 additions & 20 deletions data/campaigns/Dead_Water/scenarios/05_Tirigaz.cfg
Expand Up @@ -182,7 +182,7 @@
x={X}
y={Y}
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL OVERLAY=""}
{TRAIT_FEARLESS}
[/modifications]
moves=0
Expand Down Expand Up @@ -603,28 +603,12 @@
[/variable]

[then]
[store_unit]
[modify_unit]
[filter]
side=2
[/filter]
kill=yes
variable=orcs
[/store_unit]
[foreach]
array=orcs
[do]
[set_variable]
name=this_item.moves
value=0
[/set_variable]
[unstore_unit]
variable=this_item
[/unstore_unit]
[/do]
[/foreach]
[clear_variable]
name=orcs
[/clear_variable]
moves=0
[/modify_unit]
[/then]
[/if]
[/event]
Expand Down
19 changes: 3 additions & 16 deletions data/campaigns/Dead_Water/scenarios/06_Uncharted_Islands.cfg
Expand Up @@ -218,24 +218,12 @@
id=Growloff
[/filter]

[store_unit]
variable=Growloff_stored
[modify_unit]
[filter]
id=Growloff
[/filter]
kill=yes
[/store_unit]

[set_variable]
name=Growloff_stored.hitpoints
value=1
[/set_variable]

[unstore_unit]
variable=Growloff_stored
[/unstore_unit]

{CLEAR_VARIABLE Growloff_stored}
hitpoints=1
[/modify_unit]

[message]
speaker=Growloff
Expand Down Expand Up @@ -280,7 +268,6 @@
{TRAIT_LOYAL}
{TRAIT_HEALTHY}
[/modifications]
{IS_LOYAL}
animate=yes
[/unit]
[message]
Expand Down
9 changes: 4 additions & 5 deletions data/campaigns/Dead_Water/scenarios/08_Talking_to_Tyegea.cfg
Expand Up @@ -240,11 +240,6 @@
y=8
[/filter]
[then]
[unit_overlay]
x=15
y=8
image=overlays/arcane-icon.png
[/unit_overlay]
[remove_item]
x,y=15,8
[/remove_item]
Expand All @@ -264,6 +259,10 @@
range=melee
set_type=arcane
[/effect]
[effect]
apply_to=overlay
add="overlays/arcane-icon.png"
[/effect]
[/object]
[/event]
[/event]
Expand Down
3 changes: 1 addition & 2 deletions data/campaigns/Dead_Water/scenarios/09_The_Mage.cfg
Expand Up @@ -383,10 +383,9 @@
name= _ "Caladon"
unrenamable=yes
[modifications]
{TRAIT_LOYAL}
{TRAIT_LOYAL_HERO}
{TRAIT_QUICK}
[/modifications]
{IS_HERO}
profile=portraits/caladon.png
[/unit]

Expand Down
41 changes: 11 additions & 30 deletions data/campaigns/Dead_Water/scenarios/10_The_Flaming_Sword.cfg
Expand Up @@ -451,7 +451,6 @@
{TRAIT_LOYAL}
{TRAIT_DEXTROUS}
[/modifications]
{IS_LOYAL}
[/unit]
[unit]
type=Thug
Expand All @@ -464,7 +463,6 @@
{TRAIT_LOYAL}
{TRAIT_RESILIENT}
[/modifications]
{IS_LOYAL}
[/unit]
[unit]
type=Thug
Expand All @@ -477,7 +475,6 @@
{TRAIT_LOYAL}
{TRAIT_QUICK}
[/modifications]
{IS_LOYAL}
[/unit]

{CLEAR_VARIABLE Siddry_stored}
Expand Down Expand Up @@ -619,37 +616,21 @@
message= _ "Correction. Now I have the sword!"
[/message]

[store_unit]
[filter]
id=Caladon
[/filter]
variable=Caladon_stored
[/store_unit]

[remove_unit_overlay]
x=$Caladon_stored.x
y=$Caladon_stored.y
image=misc/hero-icon.png
[/remove_unit_overlay]

[store_unit]
[filter]
id=Caladon
[/filter]
kill=yes
variable=Caladon_stored
[/store_unit]
[remove_trait]
id=Caladon
trait_id=loyal
[/remove_trait]

{VARIABLE Caladon_stored.side 4}
{VARIABLE Caladon_stored.canrecruit yes}
{VARIABLE Caladon_stored.ellipse ""}
# He is not going to recruit, but summon guardians each
# turn. Still, he needs this variable set to get a crown icon,
# and to show up in the status table.

[unstore_unit]
variable=Caladon_stored
[/unstore_unit]
[modify_unit]
[filter]
id=Caladon
[/filter]
side=4
canrecruit=yes
[/modify_unit]

[animate_unit]
flag=pre_teleport
Expand Down

0 comments on commit 66fb021

Please sign in to comment.