use overlay effect over [unit] overlays=

This commit is contained in:
gfgtdf 2019-08-21 22:28:34 +02:00
parent aa07ec7915
commit ef06634485
11 changed files with 42 additions and 47 deletions

View file

@ -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]

View file

@ -214,9 +214,6 @@
side=2
variable=start_loc
[/store_starting_location]
{CLEAR_VARIABLE Lionel.overlays}
{CLEAR_VARIABLE Lionel.ellipse}
{VARIABLE Lionel.canrecruit yes}
{VARIABLE Lionel.side 2}
{VARIABLE Lionel.facing nw}
[unstore_unit]
@ -224,6 +221,7 @@
x=$start_loc.x
y=$start_loc.y
[/unstore_unit]
{MAKE_LOYAL_LEADER Lionel}
{CLEAR_VARIABLE start_loc,Lionel}
# wmllint: recognize Lionel
[/event]
@ -367,7 +365,7 @@
[/else]
[/if]
{SUBSUME_SIDE_AND_VILLAGES 2}
{MAKE_HERO Lionel}
{MAKE_LOYAL_HERO Lionel}
[/event]
# last breath events for Iliah-Malal

View file

@ -73,16 +73,15 @@
[/foreach]
{CLEAR_VARIABLE side_villages}
#restore moves, turn off canrecruit for the leader and change all allegiances.
[modify_unit]
[filter]
side={SIDE}
[/filter]
moves=$this_unit.max_moves
canrecruit=no
side=1
[/modify_unit]
#next, turn off canrecruit for the leader and change all allegiances.
{MODIFY_UNIT (side={SIDE}
canrecruit=yes) canrecruit no}
{MODIFY_UNIT side={SIDE} side 1}
[modify_side]
side={SIDE}
@ -133,9 +132,7 @@
# side 1.
#define CHANTAL_FOLLOWS_DELFADOR
{MODIFY_UNIT (id=Chantal) canrecruit no}
{MODIFY_UNIT (id=Chantal) overlays "misc/hero-icon.png"}
{MODIFY_UNIT (id=Chantal) ellipse "misc/ellipse-hero"}
{MAKE_LOYAL_HERO Chantal}
{MODIFY_UNIT (side=3) side 1}
[modify_side]
side=3
@ -263,7 +260,7 @@
{CLEAR_VARIABLE delfador_store}
# "n" tells us if {X} is even or odd. If it's even, "n" is equal to 1;
# otherwise, it's set to 0
# otherwise, it's set to 0
{VARIABLE n "$(if(({X}/2.0 = {X}/2), 1, 0))"}
{NAMED_UNIT 1 (Royal Guard) "$({X}-1)" "$({Y}-(1-$n))" Clogrin _"Clogrin" (facing=nw)}

View file

@ -48,6 +48,7 @@
profile=portraits/relana.png
facing=se
side=2
# TODO: why does she have a hero icon in addition to her leader icon?
overlays=misc/hero-icon.png
canrecruit=yes
controller=ai
@ -203,10 +204,10 @@
speaker=Relana
message= _ "I agree. But, Baldras, what will you tell him? We know something has been going badly wrong in Wesnoth of late, that more than ordinary corruption and incompetence is afoot. But when the effects fall on mere peasants, the wrong of it may not seem so obvious from a nobles chair."
[/message]
[sound]
name=ambient/wardrums.ogg
[sound]
name=ambient/wardrums.ogg
repeat=3
[/sound]
[/sound]
[message]
speaker=Baldras
message= _ "We need evidence. Hard evidence... but wait— Are those orcish war drums I hear?"

View file

@ -81,17 +81,7 @@
[/have_unit]
[then]
# Ensure he is a leader
[modify_unit]
[filter]
id=Krash
[/filter]
canrecruit=yes
[/modify_unit]
# Remove loyalty overlay
[remove_unit_overlay]
id=Krash
image=misc/loyal-icon.png
[/remove_unit_overlay]
{MAKE_LOYAL_LEADER Krash}
# Give expendable overlay
[unit_overlay]
id=Krash

View file

@ -327,7 +327,6 @@
x,y=$wesfolk_leader_store.x,$wesfolk_leader_store.y
experience=$wesfolk_leader_store.experience
moves=$wesfolk_leader_store.moves
overlays=misc/hero-icon.png
random_traits=no
profile=portraits/lady_outlaw.png
[modifications]

View file

@ -270,7 +270,6 @@
placement=map_overwrite
facing=$lady_store.facing
experience=$lady_store.experience
overlays=misc/hero-icon.png
random_traits=no
profile=portraits/jessica.png
[modifications]

View file

@ -85,28 +85,29 @@
[side]
side=3
type=Soulless
id=Gruth
name= _ "Gruth"
canrecruit=yes
overlays="misc/leader-expendable.png"
team_name=undead
side_name=_"Undead"
user_team_name=_"Undead"
controller=ai
{GOLD 45 60 75}
{INCOME 5 8 11}
[leader]
type=Soulless
id=Gruth
name= _ "Gruth"
{IS_EXPENDABLE_LEADER}
[/leader]
# Second leader:
[unit]
[leader]
type=Soulless
id=Gerd
name=_ "Gerd"
canrecruit=yes
overlays="misc/leader-expendable.png"
x,y=11,26
[/unit]
{IS_EXPENDABLE_LEADER}
[/leader]
[ai]
recruitment_pattern=fighter
{NO_SCOUTS}

View file

@ -320,12 +320,8 @@
id=Minister Hylas
[/kill]
{MODIFY_UNIT (id=Sir Gerrick) overlays ""}
{MODIFY_UNIT (id=Sir Gerrick) canrecruit yes}
{MODIFY_UNIT (id=Sir Gerrick) ellipse ""}
{MODIFY_UNIT (id=Urza Afalas) overlays "misc/loyal-icon.png"}
{MODIFY_UNIT (id=Urza Afalas) ellipse ""}
{MAKE_LOYAL_LEADER (Sir Gerrick)}
{MAKE_LOYAL_NORMAL (Urza Afalas)}
[message]
speaker=Illan

View file

@ -390,8 +390,7 @@
x,y=18,8
[/recall]
{MODIFY_UNIT (id=Minister Hylas) overlays "misc/loyal-icon.png"}
{MODIFY_UNIT (id=Minister Hylas) ellipse ""}
{MAKE_LOYAL_NORMAL (Minister Hylas)}
[message]
speaker=Deoran

View file

@ -30,7 +30,14 @@
#define IS_EXPENDABLE_LEADER
# Embed this into a unit declaration to add an expendable leader icon to the unit.
overlays="misc/leader-expendable.png"
[+modifications]
[object]
[effect]
apply_to=overlay
add="misc/leader-expendable.png"
[/effect]
[/object]
[/modifications]
#enddef
#define NEW_JOURNEY X Y