Supersede probability/animation village macros with optional arguments

This commit is contained in:
ln-zookeeper 2016-12-23 13:11:06 +02:00
parent ea55e7dbbc
commit 2519c43d61
2 changed files with 21 additions and 49 deletions

View file

@ -321,10 +321,10 @@
#Drake villages
#20% 20% 20% 20% 20%
{NEW:VILLAGE_A3 *^Vd 200 village/drake1-A}{VILLAGE_PROBABILITY 20}
{NEW:VILLAGE_A3 *^Vd 100 village/drake2-A}{VILLAGE_PROBABILITY 25}
{NEW:VILLAGE *^Vd village/drake3}{VILLAGE_PROBABILITY 33}
{NEW:VILLAGE *^Vd village/drake4}{VILLAGE_PROBABILITY 50}
{NEW:VILLAGE *^Vd village/drake1-A PROB=20 ANIM=[01~03] TIME=200}
{NEW:VILLAGE *^Vd village/drake2-A PROB=25 ANIM=[01~03] TIME=100}
{NEW:VILLAGE *^Vd village/drake3 PROB=33}
{NEW:VILLAGE *^Vd village/drake4 PROB=50}
{NEW:VILLAGE *^Vd village/drake5}
#Orcish villages
@ -362,8 +362,8 @@
# {NEW:VILLAGE *^Vm village/coast2}{VILLAGE_PROBABILITY 24}
# {NEW:VILLAGE *^Vm village/coast3}{VILLAGE_PROBABILITY 29}
# {NEW:VILLAGE *^Vm village/coast4}{VILLAGE_PROBABILITY 35}
{NEW:VILLAGE_TOD_P *^Vm 80 village/coast}
{NEW:VILLAGE_A4 *^Vm 140 village/coast_5-A}
{NEW:VILLAGE_TOD_P *^Vm 80 village/coast}
{NEW:VILLAGE *^Vm village/coast_5-A ANIM=[01~04] TIME=140}
#
# > O V E R L A Y S <

View file

@ -1859,6 +1859,16 @@ transition#endarg
#enddef
#define NEW:VILLAGE TERRAINLIST IMAGESTEM
#arg PROB
100#endarg
#arg ANIM
#endarg
#arg TIME
#endarg
[terrain_graphics]
map="
, *
@ -1873,8 +1883,10 @@ transition#endarg
set_no_flag=village
[/tile]
probability={PROB}
[image]
name={IMAGESTEM}@V.png
name={IMAGESTEM}@V{ANIM}.png:{TIME}
variations=";2;3;4;5;6;7"
layer=0
base=90,144
@ -1884,27 +1896,7 @@ transition#endarg
#enddef
#define NEW:VILLAGE_A3 TERRAINLIST TIME IMAGESTEM
[terrain_graphics]
map="
, *
* , *
, 1
* , *
, *"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag=village
[/tile]
[image]
name={IMAGESTEM}[01~03].png:{TIME}
layer=0
base=90,144
center=90,144
[/image]
[/terrain_graphics]
{NEW:VILLAGE {TERRAINLIST} {IMAGESTEM} (ANIM=[01~03]) (TIME={TIME})}
#enddef
#define NEW:VILLAGE_TOD_P TERRAINLIST PROB IMAGESTEM
@ -1938,27 +1930,7 @@ transition#endarg
#enddef
#define NEW:VILLAGE_A4 TERRAINLIST TIME IMAGESTEM
[terrain_graphics]
map="
, *
* , *
, 1
* , *
, *"
[tile]
pos=1
type={TERRAINLIST}
set_no_flag=village
[/tile]
[image]
name={IMAGESTEM}[01~04].png:{TIME}
layer=0
base=90,144
center=90,144
[/image]
[/terrain_graphics]
{NEW:VILLAGE {TERRAINLIST} {IMAGESTEM} (ANIM=[01~04]) (TIME={TIME})}
#enddef
# This hacky macro will hopefully be replaced with a more elegant way of passing