MP 5p Wildlands: more tweaks
- use faction=custom - no upkeep for side 5 - fix operator precedence in objectives [ci skip]
This commit is contained in:
parent
98a1b299fe
commit
5a51c56985
1 changed files with 46 additions and 15 deletions
|
@ -114,6 +114,12 @@
|
||||||
# use a different flag
|
# use a different flag
|
||||||
{FLAG_VARIANT loyalist}
|
{FLAG_VARIANT loyalist}
|
||||||
defeat_condition=no_units_left
|
defeat_condition=no_units_left
|
||||||
|
faction=Custom
|
||||||
|
recruit=""
|
||||||
|
faction_lock=yes
|
||||||
|
leader_lock=yes
|
||||||
|
income_lock=yes
|
||||||
|
gold_lock=yes
|
||||||
side=5
|
side=5
|
||||||
team_name=Team 5
|
team_name=Team 5
|
||||||
user_team_name= _ "teamname^Monsters"
|
user_team_name= _ "teamname^Monsters"
|
||||||
|
@ -125,18 +131,49 @@
|
||||||
income=-2
|
income=-2
|
||||||
[/side]
|
[/side]
|
||||||
|
|
||||||
|
# set up side 5 (only if played)
|
||||||
[event]
|
[event]
|
||||||
name=prestart
|
name=prestart
|
||||||
[if]
|
[if]
|
||||||
[have_unit]
|
[lua]
|
||||||
side=5
|
code=<< return wesnoth.sides[5].controller ~= 'null' >>
|
||||||
[/have_unit]
|
[/lua]
|
||||||
[then]
|
[then]
|
||||||
|
|
||||||
|
# In case lock_settings are overridden, remove leader and recruit list
|
||||||
[kill]
|
[kill]
|
||||||
animate=no
|
animate=no
|
||||||
fire_event=no
|
fire_event=no
|
||||||
side=5
|
side=5
|
||||||
[/kill]
|
[/kill]
|
||||||
|
[set_recruit]
|
||||||
|
side=5
|
||||||
|
recruit=""
|
||||||
|
[/set_recruit]
|
||||||
|
|
||||||
|
# visual change, don't turn the gold counter negative
|
||||||
|
[event]
|
||||||
|
name=unit placed
|
||||||
|
first_time_only=no
|
||||||
|
[filter]
|
||||||
|
side=5
|
||||||
|
[/filter]
|
||||||
|
|
||||||
|
[modify_unit]
|
||||||
|
[filter]
|
||||||
|
id=$unit.id
|
||||||
|
[/filter]
|
||||||
|
|
||||||
|
[object]
|
||||||
|
silent=yes
|
||||||
|
duration=scenario
|
||||||
|
[effect]
|
||||||
|
apply_to=loyal
|
||||||
|
[/effect]
|
||||||
|
[/object]
|
||||||
|
[/modify_unit]
|
||||||
|
[/event]
|
||||||
|
|
||||||
{MPWILD_UNIT 38 36 (Sea Serpent)}
|
{MPWILD_UNIT 38 36 (Sea Serpent)}
|
||||||
{MPWILD_UNIT 6 20 (Cuttle Fish)}
|
{MPWILD_UNIT 6 20 (Cuttle Fish)}
|
||||||
{MPWILD_UNIT 58 42 (Cuttle Fish)}
|
{MPWILD_UNIT 58 42 (Cuttle Fish)}
|
||||||
|
@ -187,31 +224,25 @@
|
||||||
{MPWILD_SOULLESS 54 30 swimmer}
|
{MPWILD_SOULLESS 54 30 swimmer}
|
||||||
{MPWILD_SOULLESS 53 34 swimmer}
|
{MPWILD_SOULLESS 53 34 swimmer}
|
||||||
{MPWILD_WALKING_CORPSE 56 30 swimmer}
|
{MPWILD_WALKING_CORPSE 56 30 swimmer}
|
||||||
|
|
||||||
[set_recruit]
|
|
||||||
side=5
|
|
||||||
recruit=""
|
|
||||||
[/set_recruit]
|
|
||||||
|
|
||||||
[/then]
|
[/then]
|
||||||
[/if]
|
[/if]
|
||||||
|
|
||||||
# Objectives
|
# Objectives
|
||||||
# Wether the side is defeated can apparently only be checked with Lua.
|
# Whether the side is defeated can apparently only be checked with Lua.
|
||||||
|
|
||||||
[objectives]
|
[objectives]
|
||||||
[objective]
|
[objective]
|
||||||
description= _ "Defeat the enemy leaders"
|
description= _ "Defeat all enemy leaders"
|
||||||
condition=win
|
condition=win
|
||||||
[show_if]
|
[show_if]
|
||||||
[lua]
|
[lua]
|
||||||
# workaround: when the objectives are first shown, sides with controller=null
|
# workaround: when the objectives are first shown, sides with controller=null
|
||||||
# are not yet considered defeated, thus also checking the controller
|
# are not yet considered defeated, thus also checking the controller
|
||||||
code = << local alive = 0
|
code = << local alive = 0
|
||||||
if not wesnoth.sides[1].lost then if not wesnoth.sides[1].controller == "null" then alive = alive + 1 end end
|
if not wesnoth.sides[1].lost then if wesnoth.sides[1].controller ~= "null" then alive = alive + 1 end end
|
||||||
if not wesnoth.sides[2].lost then if not wesnoth.sides[2].controller == "null" then alive = alive + 1 end end
|
if not wesnoth.sides[2].lost then if wesnoth.sides[2].controller ~= "null" then alive = alive + 1 end end
|
||||||
if not wesnoth.sides[3].lost then if not wesnoth.sides[3].controller == "null" then alive = alive + 1 end end
|
if not wesnoth.sides[3].lost then if wesnoth.sides[3].controller ~= "null" then alive = alive + 1 end end
|
||||||
if not wesnoth.sides[4].lost then if not wesnoth.sides[4].controller == "null" then alive = alive + 1 end end
|
if not wesnoth.sides[4].lost then if wesnoth.sides[4].controller ~= "null" then alive = alive + 1 end end
|
||||||
if alive > 1 then return true else return false end >>
|
if alive > 1 then return true else return false end >>
|
||||||
[/lua]
|
[/lua]
|
||||||
[/show_if]
|
[/show_if]
|
||||||
|
|
Loading…
Add table
Reference in a new issue