Simplify the village capturing and counting WML of 'Peaceful Valley' a bit.

This commit is contained in:
Lari Nieminen 2007-12-07 12:44:59 +00:00
parent 7919f2a1dd
commit 82f6f2fbd8

View file

@ -50,6 +50,8 @@
[/ai]
[/side]
{STARTING_VILLAGES 2 99}
[event]
name=prestart
@ -72,24 +74,6 @@
description=_ "Death of Darken Volk"
[/objective]
[/objectives]
{VARIABLE number_villages 13}
{VARIABLE villages_owned 0}
# Set goblin villages
{SET_VILLAGE 2 4 1}
{SET_VILLAGE 2 18 2}
{SET_VILLAGE 2 12 3}
{SET_VILLAGE 2 4 4}
{SET_VILLAGE 2 11 5}
{SET_VILLAGE 2 4 7}
{SET_VILLAGE 2 8 7}
{SET_VILLAGE 2 12 7}
{SET_VILLAGE 2 3 10}
{SET_VILLAGE 2 7 10}
{SET_VILLAGE 2 10 11}
{SET_VILLAGE 2 15 11}
{SET_VILLAGE 2 6 13}
[/event]
[event]
@ -121,10 +105,7 @@
{DIALOGUE_PV_START}
[/event]
# Macros
# Generate a random number of guards between 0 and 2 near X,Y
# Note that this uses BfW's default behavior to shift unit placement when you try to place on top of another unit
# Generate a random number of guards between 0 and 2 around X,Y
#define RANDOM_GUARDS TYPE DESCRIPTION UDESCRIPTION SIDE X Y
{VARIABLE_OP number_of_guards random 0..2}
@ -242,14 +223,6 @@
{TIME_OUT_LOSE}
# Victory Condition
#[event]
# name=capture
# first_time_only=no
# [filter]
# side=2
# [/filter]
# {VARIABLE_OP villages_owned add -1}
#[/event]
[event]
name=capture
@ -259,22 +232,22 @@
[/filter]
# {VARIABLE_OP villages_owned add 1}
#when capturing a village we check if we own all villages of the map
[store_villages]
variable=villages
owner_side=1
[/store_villages]
[if]
[variable]
name=villages.length
numerical_equals=$number_villages
[/variable]
[then]
[have_location]
terrain=*^V*
[not]
owner_side=1
[/not]
[/have_location]
[else]
{DIALOGUE_PV_END}
[endlevel]
bonus=yes
result=victory
[/endlevel]
[/then]
[/else]
[/if]
[/event]
@ -291,7 +264,6 @@
{CLEAR_VARIABLE $village_var}
{NEXT i}
{CLEAR_VARIABLE number_villages}
{CLEAR_VARIABLE villages}
{CLEAR_VARIABLE village_var}
[/event]