MP Wildlands: add proper objectives
Default objectives are not correct here. [ci skip]
This commit is contained in:
parent
3289517599
commit
5cfe19ec8c
1 changed files with 55 additions and 0 deletions
|
@ -195,6 +195,61 @@
|
|||
|
||||
[/then]
|
||||
[/if]
|
||||
|
||||
# Objectives
|
||||
# Wether the side is defeated can apparently only be checked with Lua.
|
||||
|
||||
[objectives]
|
||||
[objective]
|
||||
description= _ "Defeat the enemy leaders"
|
||||
condition=win
|
||||
[show_if]
|
||||
[lua]
|
||||
# workaround: when the objectives are first shown, sides with controller=null
|
||||
# are not yet considered defeated, thus also checking the controller
|
||||
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[2].lost then if not 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[4].lost then if not wesnoth.sides[4].controller == "null" then alive = alive + 1 end end
|
||||
if alive > 1 then return true else return false end >>
|
||||
[/lua]
|
||||
[/show_if]
|
||||
[/objective]
|
||||
|
||||
[objective]
|
||||
description= _ "Defeat all monsters"
|
||||
condition=win
|
||||
[show_if]
|
||||
[have_unit]
|
||||
side=5
|
||||
[/have_unit]
|
||||
[/show_if]
|
||||
[/objective]
|
||||
|
||||
[objective]
|
||||
description= _ "Death of your leader"
|
||||
condition=lose
|
||||
[/objective]
|
||||
[/objectives]
|
||||
|
||||
[objectives]
|
||||
side=5
|
||||
[objective]
|
||||
description= _ "Defeat the enemy leaders"
|
||||
condition=win
|
||||
[/objective]
|
||||
|
||||
[objective]
|
||||
description= _ "Death of all your units"
|
||||
condition=lose
|
||||
[/objective]
|
||||
|
||||
[note]
|
||||
description= _ "You cannot recruit units."
|
||||
[/note]
|
||||
[/objectives]
|
||||
|
||||
[/event]
|
||||
[/multiplayer]
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue