Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 5b270046f8
Fetching contributors…

Cannot retrieve contributors at this time

105 lines (98 sloc) 2.157 kb
# wmllint: no translatables
#Shorter access to [variable].
#define VARCH VARIABLE CONDITION VALUE
[variable]
name={VARIABLE}
{CONDITION}={VALUE}
[/variable]
#enddef
#Does the current side have all the requisite resources?
#define c_HAVE_RESOURCES AP_COST GOLD_COST FOOD_COST MATERIAL_COST
{VARCH side_stats[$side_number].action_points greater_than_equal_to {AP_COST}}
[and]
{VARCH side_stats[$side_number].gold greater_than_equal_to {GOLD_COST}}
[or]
{VARCH zero equals {GOLD_COST}}
[/or]
[/and]
{VARCH side_stats[$side_number].food greater_than_equal_to {FOOD_COST}}
{VARCH side_stats[$side_number].material greater_than_equal_to {MATERIAL_COST}}
#enddef
#Is there a builder close to $x1,$y1?
#define c_BUILDER_NEARBY
[have_location]
[and]
x,y = $x1,$y1
radius = 3
[filter_radius]
#The range does not cross chasms or walls.
[not]
terrain = Xu*,Xo*,*^Xm,Qxu,Qxe,Ql,Qlf,*^Xo,*^fme,_off^usr
[/not]
[/filter_radius]
[/and]
[filter]
side = $side_number
type = {s_BUILDER_TYPES}
[/filter]
[/have_location]
#enddef
#Is $x1,$y1 in range of our leader or a hut?
#define c_COMMUNITY_NEARBY
[have_location]
[and]
x,y = $x1,$y1
radius=15
[/and]
terrain="*^Vc,*^Vh"
owner_side=$side_number
[or]
[filter]
side=$side_number
canrecruit=yes
[filter_location]
x,y=$x1,$y1
radius=5
[/filter_location]
[/filter]
[/or]
[/have_location]
#enddef
#Has $x1,$y1 just been modified?
#define c_JUST_MODIFIED
[have_location]
x,y = $x1,$y1
find_in = just_modified
[/have_location]
#enddef
#Is $x1,$y1 too close to an enemy hut or watchtower?
#define c_ENEMY_COMMUNITY_NEARBY
[have_location]
[and]
x,y = $x1,$y1
radius=1
[/and]
terrain="*^Vc,*^Vh"
[not]
owner_side=$side_number
[or]
owner_side=0
[/or]
[/not]
[/have_location]
[or]
[have_location]
[and]
x,y = $x1,$y1
radius=2
[/and]
terrain="Co^Vc"
[not]
owner_side=$side_number
[or]
owner_side=0
[/or]
[/not]
[/have_location]
[/or]
#enddef
Jump to Line
Something went wrong with that request. Please try again.