label="2p - Hamlets replay090403"
version="1.6"
completion="victory"
campaign_type="multiplayer"
difficulty="NORMAL"
random_seed="9467"
random_calls="0"
next_underlying_unit_id="213"
end_text_duration="0"
[variables]
[/variables]
[replay]
	[command]
		[start]
		[/start]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="0"
			x="11"
			y="5"
		[/recruit]
		[random]
			value="7955"
		[/random]
		[random]
			value="24088"
		[/random]
		[random]
			value="5391"
		[/random]
		[random]
			value="30023"
		[/random]
		[random]
			value="25016"
		[/random]
		[random]
			value="24518"
		[/random]
		[random]
			value="7022"
		[/random]
		[random]
			value="1837"
		[/random]
		[random]
			value="26421"
		[/random]
		[random]
			value="7935"
		[/random]
		[random]
			value="27373"
		[/random]
		[random]
			value="31861"
		[/random]
		[random]
			value="14936"
		[/random]
		[random]
			value="29166"
		[/random]
		[random]
			value="23897"
			[results]
				checksum="LhGI37qHcsJn9Niqer4moRo6wD4zsHoKP1Hy+wP.,jg1d-5cL>71745hhbgk5n1,oc<nn6f23854.p4418om4H8bFWB0pjc+cZng<m8e6X68+vn>t55bKrqZdmOCaJmI"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="0"
			x="13"
			y="4"
		[/recruit]
		[random]
			value="7325"
		[/random]
		[random]
			value="4794"
		[/random]
		[random]
			value="18502"
		[/random]
		[random]
			value="23976"
		[/random]
		[random]
			value="16993"
		[/random]
		[random]
			value="4292"
		[/random]
		[random]
			value="11877"
		[/random]
		[random]
			value="32726"
		[/random]
		[random]
			value="32374"
		[/random]
		[random]
			value="5097"
		[/random]
		[random]
			value="8459"
		[/random]
		[random]
			value="19683"
		[/random]
		[random]
			value="23697"
		[/random]
		[random]
			value="3352"
		[/random]
		[random]
			value="20797"
			[results]
				checksum="LhGI28qHcsJn9Niqer4mpRo6wD4zsHnKP1Hy+wP.,jg1d-5cL>71745hhbgk5n1,oc<nn6f23854.p5418om4H8bFWB0pjc+cZng<m8e6X68+vn>t55bKrqZdmOCaJmI"
			[/results]
		[/random]
	[/command]
	[command]
		undo="no"
		[speak]
			id="kamikaze"
			message="hf & gl"
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="centro has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="The_kungfu_boy"
			message="u too :)"
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="5"
			x="11"
			y="2"
		[/recruit]
		[random]
			value="18007"
		[/random]
		[random]
			value="24019"
		[/random]
		[random]
			value="27833"
		[/random]
		[random]
			value="872"
		[/random]
		[random]
			value="27366"
		[/random]
		[random]
			value="4283"
		[/random]
		[random]
			value="11646"
		[/random]
		[random]
			value="735"
		[/random]
		[random]
			value="15477"
		[/random]
		[random]
			value="27766"
		[/random]
		[random]
			value="26714"
		[/random]
		[random]
			value="10855"
		[/random]
		[random]
			value="30403"
		[/random]
		[random]
			value="32530"
		[/random]
		[random]
			value="28463"
			[results]
				checksum="wmNPCQ,<jCB,xNaeN9c8kBjp>f.33i3,bi2g6odf4d42johapi+j5>4.,j0+4d89dk>9,2l9E.fc-I>-,WJ2j2m>8oQ0birbp4<4OkUyc1nTJvFiKQ-515ck5XIh5Kjg"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="pelaaja has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="hongkong888 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="3"
			x="11"
			y="4"
		[/recruit]
		[random]
			value="5204"
		[/random]
		[random]
			value="24583"
		[/random]
		[random]
			value="27562"
		[/random]
		[random]
			value="22460"
		[/random]
		[random]
			value="5387"
		[/random]
		[random]
			value="3388"
		[/random]
		[random]
			value="13883"
		[/random]
		[random]
			value="24764"
		[/random]
		[random]
			value="8751"
		[/random]
		[random]
			value="18082"
		[/random]
		[random]
			value="23512"
		[/random]
		[random]
			value="7604"
		[/random]
		[random]
			value="30742"
			[results]
				checksum="wIq0h4Aje6ZNhfnNl+7b,Ha4jCJxd>Z4D>emIBh6hCW2BmtJ8j1v.9xmODNURxriEsBIuurvENcQBQBPqyPrRxP5tBQME,Ezpfu49w6JQVkN94JBwVAIsdMAIZHHpExA"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="1"
			x="12"
			y="3"
		[/recruit]
		[random]
			value="22356"
		[/random]
		[random]
			value="9701"
		[/random]
		[random]
			value="20631"
		[/random]
		[random]
			value="23556"
		[/random]
		[random]
			value="27423"
		[/random]
		[random]
			value="28117"
		[/random]
		[random]
			value="18705"
		[/random]
		[random]
			value="29429"
		[/random]
		[random]
			value="20852"
		[/random]
		[random]
			value="13478"
		[/random]
		[random]
			value="5490"
		[/random]
		[random]
			value="148"
		[/random]
		[random]
			value="20620"
			[results]
				checksum="Dem>c1k,fFB3IPKDDy,IIVsrrz9qrFsKPmsAOVOPtQsRHOMGLquuPuNAtBx6AEqpsGOKxE8KFoBPRQNzSIM0NsInAEUrD<pd7wU07l,LsmkMRAyTOtHFLqpFUIIzsxsc"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,10,9,8"
			y="3,3,4,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[recruit]
			value="6"
			x="11"
			y="24"
		[/recruit]
		[random]
			value="26410"
		[/random]
		[random]
			value="26074"
		[/random]
		[random]
			value="15470"
		[/random]
		[random]
			value="9974"
		[/random]
		[random]
			value="10752"
		[/random]
		[random]
			value="28844"
		[/random]
		[random]
			value="9789"
		[/random]
		[random]
			value="15870"
		[/random]
		[random]
			value="3532"
		[/random]
		[random]
			value="22499"
		[/random]
		[random]
			value="4364"
		[/random]
		[random]
			value="4980"
		[/random]
		[random]
			value="26116"
		[/random]
		[random]
			value="30376"
		[/random]
		[random]
			value="10931"
			[results]
				checksum="J59kLNwuL-Q+X062sP>0637mC5373eQ6,a5n2j.dTe2hl89<fZ.a.g-4+XcWi.Xef>.1Xyja86>c+>fg4o.2cih1iXad6r,8m4,Z.v3Dnk4Yd84dfCd5sga,Y<,09k7r"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Janitor has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="chesnutspread has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="6"
			x="11"
			y="22"
		[/recruit]
		[random]
			value="25188"
		[/random]
		[random]
			value="24537"
		[/random]
		[random]
			value="23917"
		[/random]
		[random]
			value="8458"
		[/random]
		[random]
			value="1685"
		[/random]
		[random]
			value="21635"
		[/random]
		[random]
			value="32761"
		[/random]
		[random]
			value="19202"
		[/random]
		[random]
			value="6678"
		[/random]
		[random]
			value="4863"
		[/random]
		[random]
			value="20930"
		[/random]
		[random]
			value="17713"
		[/random]
		[random]
			value="5931"
		[/random]
		[random]
			value="10774"
		[/random]
		[random]
			value="28091"
			[results]
				checksum="J59kONwuL-Q+4062sP>0637mC5373eQ6,a5n2j.dTe2hl89<fZ.a.g-4+XcWi.Xef>.1Xyja86>c+>fg4o.2cih1iXam6r,8m4,Z.v3Dnk4Yd84dfCd5sga,Y<,06m7r"
			[/results]
		[/random]
	[/command]
	[command]
		[recruit]
			value="4"
			x="11"
			y="21"
		[/recruit]
		[random]
			value="23559"
		[/random]
		[random]
			value="5678"
		[/random]
		[random]
			value="15252"
		[/random]
		[random]
			value="17019"
		[/random]
		[random]
			value="12395"
		[/random]
		[random]
			value="26335"
		[/random]
		[random]
			value="27177"
		[/random]
		[random]
			value="13831"
		[/random]
		[random]
			value="13353"
		[/random]
		[random]
			value="11201"
		[/random]
		[random]
			value="26997"
		[/random]
		[random]
			value="5012"
		[/random]
		[random]
			value="14709"
		[/random]
		[random]
			value="12611"
		[/random]
		[random]
			value="19192"
			[results]
				checksum="6hs5opl9mneud6314Hg106a+elObfd5dh>d-kgk5j40fd5c,laoh2>q4W68<jj1,,Bh1+4l10mji0YUg681h64jGjKk7ELbfXlO69>IPFNIDBGnBCSO3srDyLKztBBHx"
			[/results]
		[/random]
	[/command]
	[command]
		[recruit]
			value="5"
			x="9"
			y="22"
		[/recruit]
		[random]
			value="18352"
		[/random]
		[random]
			value="14929"
		[/random]
		[random]
			value="2547"
		[/random]
		[random]
			value="22186"
		[/random]
		[random]
			value="26402"
		[/random]
		[random]
			value="5521"
		[/random]
		[random]
			value="24493"
		[/random]
		[random]
			value="25173"
		[/random]
		[random]
			value="21463"
		[/random]
		[random]
			value="32145"
		[/random]
		[random]
			value="1429"
		[/random]
		[random]
			value="7715"
		[/random]
		[random]
			value="16926"
		[/random]
		[random]
			value="20207"
		[/random]
		[random]
			value="14629"
			[results]
				checksum="SU39RsJPnopbtoBBt5yPBdjCxIoyMyJsCAbPtOQpxQRNpnMsQGGGqEpPQwrEETo0BNqQDyBuEICFSQFuTGrqGNJbRBzNpHETGFOwJPvMPJFf8IBNyQOKRJUZDRgO-mID"
			[/results]
		[/random]
	[/command]
	[command]
		[recruit]
			value="5"
			x="10"
			y="22"
		[/recruit]
		[random]
			value="4806"
		[/random]
		[random]
			value="30590"
		[/random]
		[random]
			value="4736"
		[/random]
		[random]
			value="10923"
		[/random]
		[random]
			value="6271"
		[/random]
		[random]
			value="5686"
		[/random]
		[random]
			value="18668"
		[/random]
		[random]
			value="26856"
		[/random]
		[random]
			value="28040"
		[/random]
		[random]
			value="19226"
		[/random]
		[random]
			value="25725"
		[/random]
		[random]
			value="25786"
		[/random]
		[random]
			value="5829"
		[/random]
		[random]
			value="24722"
		[/random]
		[random]
			value="15055"
			[results]
				checksum="SU39RsEPnopbtoBBt5yPBdjCxIoyMyJsCAbPtOQpxQRNpnMsQGGGqEpPQwrEETo0BNqQDyBuEICFSQFuTGrqGIJbRBzNpHETGFOwJPvMPJFf8IBNyQOKRJUZDRgO-mID"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="11,12,13,14"
			y="23,22,22,22"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,12,12,12,12,12,12"
			y="3,4,5,6,7,8,9,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,10,9,8,7,6,5,4"
			y="2,2,3,3,4,3,3,3"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="8,9,10,11"
			y="4,4,3,3"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11,11,11,10,10,9"
			y="5,6,7,8,8,9,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,14,15,16,17,18"
			y="4,4,4,4,4,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,12,13,14,15,15"
			y="4,4,5,5,6,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="none has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="11,11,12,13,14,15,16,16,17"
			y="22,21,20,20,19,19,18,17,17"
		[/move]
	[/command]
	[command]
		[move]
			x="11,12,13,13,13,13"
			y="21,20,20,19,18,17"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Olesch has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="9,9,8,8,8,8"
			y="22,21,20,19,18,17"
		[/move]
	[/command]
	[command]
		[move]
			x="10,9,9,8,8,7"
			y="22,22,21,20,19,19"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="iLouche has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="11,10,9,8,7,6,5,4"
			y="24,23,23,23,24,23,23,22"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="iLouche has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="14,13,12,11"
			y="22,23,23,23"
		[/move]
	[/command]
	[command]
		[recruit]
			value="2"
			x="11"
			y="21"
		[/recruit]
		[random]
			value="3940"
		[/random]
		[random]
			value="21428"
		[/random]
		[random]
			value="25038"
		[/random]
		[random]
			value="660"
		[/random]
		[random]
			value="27254"
		[/random]
		[random]
			value="4580"
		[/random]
		[random]
			value="1355"
		[/random]
		[random]
			value="6449"
		[/random]
		[random]
			value="20890"
		[/random]
		[random]
			value="20675"
		[/random]
		[random]
			value="3085"
		[/random]
		[random]
			value="23057"
		[/random]
		[random]
			value="12752"
		[/random]
		[random]
			value="24799"
		[/random]
		[random]
			value="32184"
			[results]
				checksum="<3c85mndU3eF0a,..P305kg7W0d6cpzj<c3>k7>a,+alX1ah,2Wi<0o.-bnee7bo56d2incd,4Z6occi4.H-f-5057b>02aa.o6Z+40CN5c8b.<X,48D.7v393e4xt<3"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="JoniJnm has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Taloche has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="2"
			x="11"
			y="22"
		[/recruit]
		[random]
			value="28530"
		[/random]
		[random]
			value="19781"
		[/random]
		[random]
			value="14819"
		[/random]
		[random]
			value="30196"
		[/random]
		[random]
			value="16244"
		[/random]
		[random]
			value="8079"
		[/random]
		[random]
			value="26717"
		[/random]
		[random]
			value="13764"
		[/random]
		[random]
			value="27784"
		[/random]
		[random]
			value="26631"
		[/random]
		[random]
			value="24604"
		[/random]
		[random]
			value="6739"
		[/random]
		[random]
			value="7608"
		[/random]
		[random]
			value="28957"
		[/random]
		[random]
			value="17184"
			[results]
				checksum="<3l85mndU3eF>a,..P305kg7W0d6cpzj<c3>k7>a,+alX1ah,2Wi<0o.-bnee7bo56d2incd,4Z6occi44H-f-5057b>02aa.o6Z+40CN5c8b.<X,48D.7v393e4xt<3"
			[/results]
		[/random]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="BlueBaron has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,18,18,18,17,17"
			y="4,5,6,7,8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="15,16,17,17,18"
			y="7,7,8,9,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,12"
			y="10,11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="4,3,3,2"
			y="3,3,2,1"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,8,7,6,5"
			y="10,10,10,9,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="winargen has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Yami2ki has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="RedBaron has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="d has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Esteboune has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="o_o has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Keros has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="shurik has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12"
			y="12,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="3"
			x="11"
			y="5"
		[/recruit]
		[random]
			value="27448"
		[/random]
		[random]
			value="14826"
		[/random]
		[random]
			value="26646"
		[/random]
		[random]
			value="21239"
		[/random]
		[random]
			value="9619"
		[/random]
		[random]
			value="22965"
		[/random]
		[random]
			value="18522"
		[/random]
		[random]
			value="28284"
		[/random]
		[random]
			value="11352"
		[/random]
		[random]
			value="3754"
		[/random]
		[random]
			value="19955"
		[/random]
		[random]
			value="28556"
		[/random]
		[random]
			value="30165"
			[results]
				checksum="wIq0h4Aje6ZNhfnNl+7b,Ha4jCJxd>Z4D>emIBh6hCW2BmtJ8j1v.9xmODNURxriEsBIuurvENcQBQBPqyPrRxP5tBQME,Ezpfu49w6JQVkN94JBwVAIsdMAIZHHpExA"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="0"
			x="13"
			y="4"
		[/recruit]
		[random]
			value="31846"
		[/random]
		[random]
			value="5566"
		[/random]
		[random]
			value="7165"
		[/random]
		[random]
			value="157"
		[/random]
		[random]
			value="25106"
		[/random]
		[random]
			value="28517"
		[/random]
		[random]
			value="21314"
		[/random]
		[random]
			value="24924"
		[/random]
		[random]
			value="12912"
		[/random]
		[random]
			value="5052"
		[/random]
		[random]
			value="24106"
		[/random]
		[random]
			value="12317"
		[/random]
		[random]
			value="29182"
		[/random]
		[random]
			value="25304"
		[/random]
		[random]
			value="5060"
			[results]
				checksum="xNb9Bryn.D--c-i+05CRoaOL-EyQnvClJF7qE383X-fb-Zy1ji46+2f+9l+5<foc<nn6f23854.p3418om4H8bFWB0pjc+cZng<m8e6X68+vn>t55bKrqZdmOCaJmIaF"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="4,4,4,4,5,5"
			y="22,21,20,19,19,18"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="shooting_airhead has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="17,18,18,18,18,19,20,20"
			y="17,17,18,19,20,21,21,22"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Dauntless has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="8,9,9,10"
			y="17,17,16,15"
		[/move]
	[/command]
	[command]
		[move]
			x="7,7,7,7,7"
			y="19,18,17,16,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="nono has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Camilla has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="7,7"
			y="15,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="tuxlover2 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="13,14,15,16,17"
			y="17,16,17,17,17"
		[/move]
	[/command]
	[command]
		[move]
			x="11,12,13,13,13,13"
			y="21,20,20,19,18,17"
		[/move]
	[/command]
	[command]
		[move]
			x="11,11,11,11,11,12,12"
			y="22,21,20,19,18,17,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="dornenherr has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="o_o has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Amarant has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="2,2,2,2,2,2,2,1"
			y="1,2,3,4,5,6,7,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Keros has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="hongkong888 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="nono0 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11,11,11,10,9"
			y="5,6,7,8,8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,14,15,15,16,16,17"
			y="4,4,5,6,6,7,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Victor has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Dark has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="zilo has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="17,16,15,14,13,12"
			y="9,8,9,8,8,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,17"
			y="9,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="2"
			x="11"
			y="5"
		[/recruit]
		[random]
			value="17700"
		[/random]
		[random]
			value="10589"
		[/random]
		[random]
			value="9906"
		[/random]
		[random]
			value="25186"
		[/random]
		[random]
			value="16185"
		[/random]
		[random]
			value="14386"
		[/random]
		[random]
			value="8507"
		[/random]
		[random]
			value="8941"
		[/random]
		[random]
			value="32097"
		[/random]
		[random]
			value="19864"
		[/random]
		[random]
			value="941"
		[/random]
		[random]
			value="23795"
		[/random]
		[random]
			value="20347"
			[results]
				checksum="TuuzMJvu3JOmTCCoKGpBJPA6SCMFtLEzKIxOCmtqSOKJLCFwmIsr1QENmxPFHFw.RFKFnqypNLqM8mwoForIhF8xkkBsH9ih>N4ftxqADyQNdDsofqQwNFrCg8vPGzPi"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Sigm4 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="20,19,19,18"
			y="22,23,24,24"
		[/move]
	[/command]
	[command]
		[move]
			x="5,5"
			y="18,17"
		[/move]
	[/command]
	[command]
		[move]
			x="5,6"
			y="17,16"
		[/move]
	[/command]
	[command]
		[move]
			x="6,7,8"
			y="16,16,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Zeusthundra has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="kard has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="8,8"
			y="15,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="killersgod has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="8,9,10"
			y="14,14,13"
		[/move]
	[/command]
	[command]
		[move]
			x="10,11"
			y="13,14"
		[/move]
	[/command]
	[command]
		[move]
			x="13,14,14,14"
			y="17,16,15,14"
		[/move]
	[/command]
	[command]
		[move]
			x="12,12"
			y="16,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Frolik has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="JCD has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Obrus has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="10,11,12,13"
			y="15,15,14,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="l3l01 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="7,8,8,9,10"
			y="16,15,14,14,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="sa60 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="5"
			x="11"
			y="21"
		[/recruit]
		[random]
			value="11074"
		[/random]
		[random]
			value="3982"
		[/random]
		[random]
			value="20465"
		[/random]
		[random]
			value="8933"
		[/random]
		[random]
			value="6624"
		[/random]
		[random]
			value="8408"
		[/random]
		[random]
			value="21993"
		[/random]
		[random]
			value="28602"
		[/random]
		[random]
			value="29289"
		[/random]
		[random]
			value="18536"
		[/random]
		[random]
			value="243"
		[/random]
		[random]
			value="27053"
		[/random]
		[random]
			value="29348"
		[/random]
		[random]
			value="24508"
		[/random]
		[random]
			value="19495"
			[results]
				checksum="SU39RsRPnopbtoBBs5yPBdjCxIoyMyJsCAbPtOQpxQRNpnMsQGGGqEpPQwrEETo0BNqQDyBuEICFSQFuTGrqGVJbRBzNpHETGFOwJPvMPJFf8IBNyQOKRJUZDRgOWmID"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Freta has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="trebor has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="10,9"
			y="13,14"
		[/move]
	[/command]
	[command]
		[move]
			x="17,17,16"
			y="17,16,15"
		[/move]
	[/command]
	[command]
		[move]
			x="16,15"
			y="15,15"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Antoniopast has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Mike has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Keros has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,9"
			y="9,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11,11,11,10,9"
			y="5,6,7,8,8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="6"
			x="11"
			y="5"
		[/recruit]
		[random]
			value="30783"
		[/random]
		[random]
			value="3950"
		[/random]
		[random]
			value="12295"
		[/random]
		[random]
			value="9914"
		[/random]
		[random]
			value="22616"
		[/random]
		[random]
			value="25806"
		[/random]
		[random]
			value="29743"
		[/random]
		[random]
			value="7598"
		[/random]
		[random]
			value="30844"
		[/random]
		[random]
			value="1953"
		[/random]
		[random]
			value="19250"
		[/random]
		[random]
			value="32369"
		[/random]
		[random]
			value="14351"
			[results]
				checksum="RqMsBKzD0FKjsFwUULNJZmGIxrMqRUrwAqFDQBsGIPzPLBOztLbGuuQUIGIP7KIRwurIsmHBB+FVoqJyy6J8xkkBsfg-8bR7eEHFHBVJRlsCL4wQFtHLK,fBFKhGav7k"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="6"
			x="13"
			y="4"
		[/recruit]
		[random]
			value="13475"
		[/random]
		[random]
			value="9069"
		[/random]
		[random]
			value="5137"
		[/random]
		[random]
			value="10253"
		[/random]
		[random]
			value="9105"
		[/random]
		[random]
			value="3857"
		[/random]
		[random]
			value="25883"
		[/random]
		[random]
			value="16721"
		[/random]
		[random]
			value="23010"
		[/random]
		[random]
			value="28678"
		[/random]
		[random]
			value="6085"
		[/random]
		[random]
			value="1268"
		[/random]
		[random]
			value="26452"
			[results]
				checksum="RqMsBKzD0FKjsFwUULNJZmGIxrMqRUrwAqFDQBsGIPzPLBOztLbGuuQUIGIP7KIRwurIsmHBB+FVoqJyy6J8xkkBsfg-8bR7eEHFHBVJRlsCL4wQFtHLK,fBFKhGav7k"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Strateg23 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,13,13"
			y="8,9,10,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="x25 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="11,11,11,11,10"
			y="21,20,19,18,17"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="chesnutspread has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="5"
			x="11"
			y="21"
		[/recruit]
		[random]
			value="2878"
		[/random]
		[random]
			value="17860"
		[/random]
		[random]
			value="6496"
		[/random]
		[random]
			value="30391"
		[/random]
		[random]
			value="28964"
		[/random]
		[random]
			value="14774"
		[/random]
		[random]
			value="10977"
		[/random]
		[random]
			value="24426"
		[/random]
		[random]
			value="12197"
		[/random]
		[random]
			value="9123"
		[/random]
		[random]
			value="20236"
		[/random]
		[random]
			value="22100"
		[/random]
		[random]
			value="1250"
		[/random]
		[random]
			value="18744"
		[/random]
		[random]
			value="29864"
			[results]
				checksum="SU39RsGPnopbtoBBs5yPBdjCxIoyMyJsCAbPtOQpxQRNpnMsQGGGqEpPQwrEETo0BNqQDyBuEICFSQFuTGrqGKJbRBzNpHETGFOwJPvMPJFf8IBNyQOKRJUZDRgOWmID"
			[/results]
		[/random]
	[/command]
	[command]
		[recruit]
			value="0"
			x="9"
			y="22"
		[/recruit]
		[random]
			value="26029"
		[/random]
		[random]
			value="31429"
		[/random]
		[random]
			value="20624"
		[/random]
		[random]
			value="25893"
		[/random]
		[random]
			value="9719"
		[/random]
		[random]
			value="26241"
		[/random]
		[random]
			value="24529"
		[/random]
		[random]
			value="14148"
		[/random]
		[random]
			value="18998"
		[/random]
		[random]
			value="23347"
		[/random]
		[random]
			value="18867"
		[/random]
		[random]
			value="23805"
		[/random]
		[random]
			value="32045"
		[/random]
		[random]
			value="27423"
			[results]
				checksum="TtCMTozq7Vo-vHfNG<LtrmzARfmmFqV+ryEAuy4CQEqETFPCHGCyrKADxItsJVFvuOxEx3PuvGswNKRdEuCIrvtwzKGzixTLICN<rDI4RC8pJORdj<Pya5jb,a-,394R"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Keros has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="9,10,11"
			y="14,13,13"
		[/move]
	[/command]
	[command]
		[move]
			x="13,13"
			y="14,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="JCD has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="13,13"
			y="13,14"
		[/move]
	[/command]
	[command]
		[move]
			x="12,12,12"
			y="15,14,13"
		[/move]
	[/command]
	[command]
		[move]
			x="18,18,18,18,18,18,18,18"
			y="24,23,22,21,20,19,18,17"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="gnida1488 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="11,10,10,9"
			y="14,14,15,16"
		[/move]
	[/command]
	[command]
		[move]
			x="14,13,12"
			y="14,14,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="oblak has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="12,11"
			y="13,14"
		[/move]
	[/command]
	[command]
		[move]
			x="15,14"
			y="15,14"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,9,9"
			y="10,11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Target has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,9"
			y="9,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,8,8,8"
			y="10,10,11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="player2 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,14,15,15,16"
			y="4,4,5,6,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11,11,11,11"
			y="5,6,7,8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="6"
			x="11"
			y="5"
		[/recruit]
		[random]
			value="25608"
		[/random]
		[random]
			value="7417"
		[/random]
		[random]
			value="19450"
		[/random]
		[random]
			value="24430"
		[/random]
		[random]
			value="31195"
		[/random]
		[random]
			value="18859"
		[/random]
		[random]
			value="25767"
		[/random]
		[random]
			value="32090"
		[/random]
		[random]
			value="7035"
		[/random]
		[random]
			value="22747"
		[/random]
		[random]
			value="10272"
		[/random]
		[random]
			value="30740"
		[/random]
		[random]
			value="4894"
			[results]
				checksum="RqMsBKzD0FKjsFwUULNJZmGIxrMqRUrwAqFDQBsGIPzPLBOztLbGuuQUIGIP7KIRwurIsmHBB+FVoqJyy6J8xkkBsfg-8bR7eEHFHBVJRlsCL4wQFtHLK,fBFKhGav7k"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Dauntless_ has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="6"
			x="13"
			y="4"
		[/recruit]
		[random]
			value="17021"
		[/random]
		[random]
			value="4260"
		[/random]
		[random]
			value="14879"
		[/random]
		[random]
			value="22219"
		[/random]
		[random]
			value="30365"
		[/random]
		[random]
			value="12825"
		[/random]
		[random]
			value="31101"
		[/random]
		[random]
			value="5563"
		[/random]
		[random]
			value="2546"
		[/random]
		[random]
			value="12777"
		[/random]
		[random]
			value="19934"
		[/random]
		[random]
			value="6496"
		[/random]
		[random]
			value="2021"
			[results]
				checksum="RqMsBKzD0FKjsFwUULNJZmGIxrMqRUrwAqFDQBsGIPzPLBOztLbGuuQUIGIP7KIRwurIsmHBB+FVoqJyy6J8xkkBsfg-8bR7eEHFHBVJRlsCL4wQFtHLK,fBFKhGav7k"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="17,17,17,18"
			y="9,10,11,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="krotop has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="5,5"
			y="10,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="5,6,7,8,9"
			y="9,9,10,9,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="1,1,1,1,1,1"
			y="8,9,10,11,12,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="1,1"
			y="13,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Keros has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="17,17"
			y="8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,14,15"
			y="11,11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Kometa has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="dario has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="15,15,14"
			y="12,11,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="17,16,15"
			y="9,9,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Nerelf has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="tuxlover has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="11,10,9,8,7,7"
			y="14,13,14,14,14,13"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="2"
			[source]
				x="7"
				y="13"
			[/source]
			[destination]
				x="8"
				y="12"
			[/destination]
		[/attack]
		[random]
			value="2860"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="17409"
			[results]
				chance="50"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="13,12,11,10,9,8"
			y="14,13,14,13,14,13"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="8"
				y="13"
			[/source]
			[destination]
				x="8"
				y="12"
			[/destination]
		[/attack]
		[random]
			value="27840"
			[results]
				chance="50"
				damage="9"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="31298"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="12018"
			[results]
				chance="50"
				damage="9"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="22653"
			[results]
				chance="70"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="8443"
			[results]
				chance="70"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Cantspeakenglish has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="11,10,9"
			y="13,13,13"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="9"
				y="13"
			[/source]
			[destination]
				x="8"
				y="12"
			[/destination]
		[/attack]
		[random]
			value="25805"
			[results]
				chance="50"
				damage="9"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Bugstorm has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="9,9,8,8,8,7"
			y="22,21,20,19,18,18"
		[/move]
	[/command]
	[command]
		[move]
			x="9,8,8,7"
			y="16,15,14,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="paris has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="7,7,6"
			y="14,13,12"
		[/move]
	[/command]
	[command]
		[move]
			x="6,6"
			y="12,11"
		[/move]
	[/command]
	[command]
		[move]
			x="6,6,5"
			y="11,10,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="paris has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="d has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="12,11,10,9,8,8"
			y="14,14,13,14,13,12"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="2"
			[source]
				x="8"
				y="12"
			[/source]
			[destination]
				x="9"
				y="12"
			[/destination]
		[/attack]
		[random]
			value="31748"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="22654"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="rept has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="10,9,9,8"
			y="17,17,16,15"
		[/move]
	[/command]
	[command]
		[move]
			x="11,12,13,13,13"
			y="21,20,20,19,18"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="maliR_ has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="MJMX has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="14,13"
			y="14,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Victor has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Targuil has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Jaakkoheiskanen has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="2"
			x="11"
			y="21"
		[/recruit]
		[random]
			value="7278"
		[/random]
		[random]
			value="30847"
		[/random]
		[random]
			value="30262"
		[/random]
		[random]
			value="2431"
		[/random]
		[random]
			value="9159"
		[/random]
		[random]
			value="11323"
		[/random]
		[random]
			value="20969"
		[/random]
		[random]
			value="5360"
		[/random]
		[random]
			value="7193"
		[/random]
		[random]
			value="4241"
		[/random]
		[random]
			value="25919"
		[/random]
		[random]
			value="8482"
		[/random]
		[random]
			value="3874"
		[/random]
		[random]
			value="12761"
		[/random]
		[random]
			value="20096"
			[results]
				checksum="<3p85mndU3eF>a,..P305kg7W0d6cpzj<c3>k7>a,+alX1ah,2Wi<0o.-bnee7bo56d2incd,4Z6occi48H-f-5057b>02aa.o6Z+40CN5c8b.<X,48D.7v3b3e4xt<3"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="11,11,11,11,11,11"
			y="23,22,21,20,19,18"
		[/move]
	[/command]
	[command]
		[move]
			x="13,12,11,10,9"
			y="15,14,14,13,14"
		[/move]
	[/command]
	[command]
		[move]
			x="18,17"
			y="17,17"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="zoraKs has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="1,1,1,1,1,1,1,1,1"
			y="12,13,14,15,16,17,18,19,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,8,7,6,5"
			y="10,9,9,8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="5"
				y="9"
			[/source]
			[destination]
				x="5"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="17891"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="6915"
			[results]
				chance="70"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,9,8,7,6"
			y="12,11,10,10,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="6"
				y="9"
			[/source]
			[destination]
				x="5"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="31265"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="22129"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="24637"
			[results]
				chance="50"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="29131"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1951"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="26757"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Dodoo has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,11,10,9,8,7,6"
			y="11,11,10,10,10,11,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="6"
				y="10"
			[/source]
			[destination]
				x="5"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="13771"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="16078"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="15628"
			[results]
				chance="50"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Mandarin has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Kalle-Peter has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,10,9,8,7"
			y="9,9,10,9,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="14,13,12,11,10,9"
			y="10,10,9,9,9,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="16,16,16,17"
			y="6,7,8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="15,14,13,12,11,10,9"
			y="10,9,9,9,9,9,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,10,9,9,8"
			y="5,5,6,7,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,12,11,11,10"
			y="4,4,5,6,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,17,16,16,15,14"
			y="11,11,10,9,9,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="6"
			x="11"
			y="5"
		[/recruit]
		[random]
			value="15003"
		[/random]
		[random]
			value="5703"
		[/random]
		[random]
			value="31720"
		[/random]
		[random]
			value="845"
		[/random]
		[random]
			value="7607"
		[/random]
		[random]
			value="28766"
		[/random]
		[random]
			value="14251"
		[/random]
		[random]
			value="29995"
		[/random]
		[random]
			value="20195"
		[/random]
		[random]
			value="26052"
		[/random]
		[random]
			value="25839"
		[/random]
		[random]
			value="19508"
		[/random]
		[random]
			value="6023"
			[results]
				checksum="RqMsBKzD0FKjsFwUULNJZmGIxrMqRUrwAqFDQBsGIPzPLBOztLbGuuQUIGIP7KIRwurIsmHBB+FVoqJyy6J8xkkBsfg-8bR7eEHFHBVJRlsCL4wQFtHLK,fBFKhGav7k"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="EDF has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="11,11,11,11,11,11"
			y="18,19,20,21,22,23"
		[/move]
	[/command]
	[command]
		[recruit]
			value="2"
			x="9"
			y="22"
		[/recruit]
		[random]
			value="836"
		[/random]
		[random]
			value="24467"
		[/random]
		[random]
			value="24045"
		[/random]
		[random]
			value="11323"
		[/random]
		[random]
			value="7088"
		[/random]
		[random]
			value="23268"
		[/random]
		[random]
			value="24193"
		[/random]
		[random]
			value="4650"
		[/random]
		[random]
			value="29985"
		[/random]
		[random]
			value="26135"
		[/random]
		[random]
			value="19088"
		[/random]
		[random]
			value="10311"
		[/random]
		[random]
			value="6703"
		[/random]
		[random]
			value="24059"
		[/random]
		[random]
			value="22013"
			[results]
				checksum="<3n85mndU3eF0a,..P305kg7W0d6cpzj<c3>k7>a,+alX1ah,2Wi<0o.-bnee7bo56d2incd,4Z6occi46H-f-5057b>02aa.o6Z+40CN5c8b.<X,47J.7v3b3e4xt<3"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Rigor has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="17,17"
			y="17,16"
		[/move]
	[/command]
	[command]
		[move]
			x="17,17,17"
			y="16,15,14"
		[/move]
	[/command]
	[command]
		[move]
			x="17,18"
			y="14,13"
		[/move]
	[/command]
	[command]
		[move]
			x="18,18"
			y="13,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="CheeseLord has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="zer has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="5,4"
			y="10,10"
		[/move]
	[/command]
	[command]
		[move]
			x="7,6,5,4,4,5"
			y="13,12,12,11,10,10"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="1"
			weapon="2"
			[source]
				x="5"
				y="10"
			[/source]
			[destination]
				x="6"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="22263"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="26145"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="22380"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="6555"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="27192"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="8,7,6,5,5"
			y="12,12,12,12,11"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="1"
			weapon="2"
			[source]
				x="5"
				y="11"
			[/source]
			[destination]
				x="6"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="14796"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="21237"
			[results]
				chance="60"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="19657"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="14078"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="20716"
			[results]
				chance="60"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="9,10,10,10,10"
			y="14,13,12,11,10"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="10"
				y="10"
			[/source]
			[destination]
				x="9"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="16343"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="6977"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="9,8,8,8"
			y="13,12,11,10"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="8"
				y="10"
			[/source]
			[destination]
				x="9"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="4131"
			[results]
				chance="40"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="19701"
			[results]
				chance="40"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="8,8,9,9"
			y="13,12,12,11"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="9"
				y="11"
			[/source]
			[destination]
				x="9"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="16261"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="8934"
			[results]
				chance="40"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="jingjang has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="11,10,9,8,7,6"
			y="21,20,21,20,20,19"
		[/move]
	[/command]
	[command]
		[move]
			x="7,7,7,7,7,7"
			y="18,17,16,15,14,13"
		[/move]
	[/command]
	[command]
		[move]
			x="8,8,8,8,7"
			y="15,14,13,12,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="olof29 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="4,4,5,6"
			y="10,11,12,12"
		[/move]
	[/command]
	[command]
		[move]
			x="13,13,14,14,14"
			y="18,17,16,15,14"
		[/move]
	[/command]
	[command]
		[move]
			x="18,19,20"
			y="12,12,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Mandarinn has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Atuan has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="20,21"
			y="11,12"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="1,2"
			y="20,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="2,3,3,4"
			y="20,21,22,22"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="6"
				y="9"
			[/source]
			[destination]
				x="5"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="26917"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="20559"
			[results]
				chance="60"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="16750"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="17625"
			[results]
				chance="60"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="9400"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="5,4,3,3,4"
			y="9,8,9,10,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="1"
			weapon="0"
			[source]
				x="4"
				y="10"
			[/source]
			[destination]
				x="5"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="15191"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="9212"
			[results]
				chance="50"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="20092"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="16384"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="18273"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="tancan has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,8,7,6,5"
			y="9,8,8,8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="1"
			weapon="0"
			[source]
				x="5"
				y="9"
			[/source]
			[destination]
				x="5"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="24268"
			[results]
				chance="70"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1035"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="23988"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1006"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="2714"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="14,15,16,17,18"
			y="8,9,9,9,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11,11,11,12"
			y="5,6,7,8,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="6"
				y="10"
			[/source]
			[destination]
				x="5"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="1142"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="9528"
			[results]
				chance="50"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="22429"
			[results]
				chance="40"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="16365"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="8583"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="7,7"
			y="9,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="7"
				y="10"
			[/source]
			[destination]
				x="8"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="27214"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="24241"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="19414"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="23605"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="8,8,8"
			y="7,8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="8"
				y="9"
			[/source]
			[destination]
				x="8"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="9142"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="7734"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1624"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="13936"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Roary has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="9"
				y="10"
			[/source]
			[destination]
				x="8"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="2059"
			[results]
				chance="70"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="26993"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Lolleros2 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="10,9,8,7,7"
			y="6,7,7,8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="2"
			x="11"
			y="5"
		[/recruit]
		[random]
			value="9614"
		[/random]
		[random]
			value="31095"
		[/random]
		[random]
			value="13605"
		[/random]
		[random]
			value="17036"
		[/random]
		[random]
			value="25842"
		[/random]
		[random]
			value="14883"
		[/random]
		[random]
			value="28882"
		[/random]
		[random]
			value="10154"
		[/random]
		[random]
			value="14692"
		[/random]
		[random]
			value="19619"
		[/random]
		[random]
			value="14353"
		[/random]
		[random]
			value="19195"
		[/random]
		[random]
			value="1169"
			[results]
				checksum="TuuzMJvu3JOmTCCoKGpBJPA6SCMFtLEzKIxOCmtqSOKJLCFwmIsr1QENmxPFHFw.RFKFnqypNLqM8mwoForIhF8xkkBsH9ih>N4ftxqADyQNdDsofqQwNFrCg8vPGzPi"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="akkon has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="kubi696 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="6,6,6,6,5,4"
			y="19,20,21,22,23,23"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="4"
				y="23"
			[/source]
			[destination]
				x="4"
				y="22"
			[/destination]
		[/attack]
		[random]
			value="8136"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="4717"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="24344"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="9,8,7,6,5,4"
			y="22,21,21,20,21,21"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="4"
				y="21"
			[/source]
			[destination]
				x="4"
				y="22"
			[/destination]
		[/attack]
		[random]
			value="2761"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="21119"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="19417"
			[results]
				chance="60"
				damage="4"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[recruit]
			value="5"
			x="11"
			y="21"
		[/recruit]
		[random]
			value="28213"
		[/random]
		[random]
			value="16169"
		[/random]
		[random]
			value="18211"
		[/random]
		[random]
			value="23846"
		[/random]
		[random]
			value="30200"
		[/random]
		[random]
			value="11486"
		[/random]
		[random]
			value="3654"
		[/random]
		[random]
			value="31027"
		[/random]
		[random]
			value="26289"
		[/random]
		[random]
			value="16468"
		[/random]
		[random]
			value="1606"
		[/random]
		[random]
			value="20561"
		[/random]
		[random]
			value="8508"
		[/random]
		[random]
			value="22852"
		[/random]
		[random]
			value="18690"
			[results]
				checksum="SU39RsIPnopbtoBBt5yPBdjCxIoyMyJsCAbPtOQpxQRNpnMsQGGGqEpPQwrEETo0BNqQDyBuEICFSQFuTGrqGMJbRBzNpHETGFOwJPvMPJFf8IBNyQOKRJUZDRgOWmID"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="14,15,15,16"
			y="14,14,13,12"
		[/move]
	[/command]
	[command]
		[move]
			x="21,20,20"
			y="12,11,10"
		[/move]
	[/command]
	[command]
		[move]
			x="20,20,21"
			y="10,9,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="super_rambo has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="21,21,21,21"
			y="9,8,7,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Hellrider has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="7,6,5,4,3,3"
			y="13,12,12,12,12,11"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="3"
				y="11"
			[/source]
			[destination]
				x="4"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="7755"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="25391"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="24926"
			[results]
				chance="50"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Coco has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="10,11,11,10,9"
			y="10,10,9,8,9"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="9"
				y="9"
			[/source]
			[destination]
				x="9"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="14672"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="14893"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Toxe3 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="7,6,5,4"
			y="12,12,12,11"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="4"
				y="11"
			[/source]
			[destination]
				x="4"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="26726"
			[results]
				chance="50"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="22649"
			[results]
				chance="50"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="5,5"
			y="11,12"
		[/move]
	[/command]
	[command]
		[move]
			x="8,8,7,6,5,5"
			y="10,11,12,12,12,11"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="5"
				y="11"
			[/source]
			[destination]
				x="4"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="11287"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="27805"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="6,5,4,3,2,2,2,3,4"
			y="12,13,12,12,11,10,9,9,9"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="4"
				y="9"
			[/source]
			[destination]
				x="4"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="4612"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="28412"
			[results]
				chance="50"
				damage="5"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Mabuse has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="5,4,4,5,6"
			y="10,10,11,12,11"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="1"
			weapon="2"
			[source]
				x="6"
				y="11"
			[/source]
			[destination]
				x="6"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="19689"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="20176"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="23155"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="11676"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="4474"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Uberkeyser has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="5,4,4,5"
			y="12,11,10,10"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="2"
			[source]
				x="5"
				y="10"
			[/source]
			[destination]
				x="6"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="12500"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="3795"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="R has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="9,8,7"
			y="11,11,11"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="7"
				y="11"
			[/source]
			[destination]
				x="7"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="17209"
			[results]
				chance="60"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="535"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="12364"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="23856"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="PirateCaptain has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="boehmifighter has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Lolleros2 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="jogador9586 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Anni has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="pxndxpuk has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="OdinPL has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="6,6"
			y="9,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="7,6"
			y="10,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="6"
				y="9"
			[/source]
			[destination]
				x="5"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="26126"
			[results]
				chance="40"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="5806"
			[results]
				chance="60"
				damage="3"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="6,6"
			y="8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="6"
				y="10"
			[/source]
			[destination]
				x="5"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="22651"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="18110"
			[results]
				chance="50"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="14125"
			[results]
				chance="40"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="25830"
			[results]
				chance="50"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="12760"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="PirateCaptain has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="1"
			weapon="0"
			[source]
				x="5"
				y="9"
			[/source]
			[destination]
				x="5"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="8205"
			[results]
				chance="70"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="11097"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="29331"
			[results]
				chance="70"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="32296"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="9856"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="6"
				y="9"
			[/source]
			[destination]
				x="5"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="1477"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="21526"
			[results]
				chance="60"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="28816"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="32367"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="12109"
			[results]
				chance="40"
				damage="5"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="7,6,5"
			y="9,9,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,13,14,15,16"
			y="8,8,8,9,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,18,18,19,20"
			y="9,8,7,7,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="20"
				y="6"
			[/source]
			[destination]
				x="21"
				y="6"
			[/destination]
		[/attack]
		[random]
			value="10621"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="2209"
			[results]
				chance="60"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="17332"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="19510"
			[results]
				chance="60"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="20582"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="17913"
			[results]
				chance="60"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="0"
			x="13"
			y="4"
		[/recruit]
		[random]
			value="3485"
		[/random]
		[random]
			value="78"
		[/random]
		[random]
			value="28287"
		[/random]
		[random]
			value="19478"
		[/random]
		[random]
			value="2563"
		[/random]
		[random]
			value="7830"
		[/random]
		[random]
			value="15997"
		[/random]
		[random]
			value="11221"
		[/random]
		[random]
			value="2773"
		[/random]
		[random]
			value="3632"
		[/random]
		[random]
			value="8889"
		[/random]
		[random]
			value="19005"
		[/random]
		[random]
			value="8586"
		[/random]
		[random]
			value="31373"
		[/random]
		[random]
			value="14710"
			[results]
				checksum="LhGI37qHcsJn9Niqer4mnRo6wD4zsHoKP1Hy+wP.,jg1d-5cL>71745hhbgk5n1,oc<nn6f23854.p3418om4H8bFWB0pjc+cZng<m8e6X68+vn>t55bKrqZdmOCaJmI"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Bugstorm has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Uberflaven has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Lobezno has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11,10,9,9"
			y="5,6,6,7,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="9"
				y="8"
			[/source]
			[destination]
				x="9"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="21411"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="6614"
			[results]
				chance="50"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="6339"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="24122"
			[results]
				chance="50"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="27125"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="9"
				y="10"
			[/source]
			[destination]
				x="9"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="27277"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="19648"
			[results]
				chance="70"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="8,8"
			y="9,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="8"
				y="8"
			[/source]
			[destination]
				x="9"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="7417"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="32143"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="28986"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="22225"
			[results]
				chance="40"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="tuxlover1 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Nick_censored has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,12,13,14,15"
			y="3,3,4,3,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="4,4"
			y="23,22"
		[/move]
	[/command]
	[command]
		[move]
			x="4,4,4,5,5,5"
			y="21,20,19,19,18,17"
		[/move]
	[/command]
	[command]
		[move]
			x="11,12,13,13,13,13"
			y="21,20,20,19,18,17"
		[/move]
	[/command]
	[command]
		[move]
			x="16,16,16,15,15"
			y="12,11,10,10,9"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="15"
				y="9"
			[/source]
			[destination]
				x="16"
				y="8"
			[/destination]
		[/attack]
		[random]
			value="10500"
			[results]
				chance="60"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="32182"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="10934"
			[results]
				chance="60"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="22113"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Lolleros2 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="21,21,20,19,18,17,16,16,15"
			y="6,5,4,5,5,6,6,7,8"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="15"
				y="8"
			[/source]
			[destination]
				x="16"
				y="8"
			[/destination]
		[/attack]
		[random]
			value="29667"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="2421"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="20947"
			[results]
				chance="60"
				damage="4"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="4,3,3,3,4,4,4,4"
			y="9,9,8,7,6,5,4,3"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Shadowczech has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="3,3,3,3,4,5"
			y="11,10,9,8,7,8"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="5"
				y="8"
			[/source]
			[destination]
				x="5"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="20069"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="20771"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="10378"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="4,3,3,3,4"
			y="11,11,10,9,8"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="4"
				y="8"
			[/source]
			[destination]
				x="5"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="7617"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1883"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="5,4,4"
			y="11,10,9"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="4"
				y="9"
			[/source]
			[destination]
				x="5"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="9546"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="2910"
			[results]
				chance="60"
				damage="5"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="7,7"
			y="11,10"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="7"
				y="10"
			[/source]
			[destination]
				x="6"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="25583"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="23556"
			[results]
				chance="70"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="18781"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="21028"
			[results]
				chance="70"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="23684"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Shran has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="The_kungfu_boy"
			message="ur kicking my ass :("
			side="1"
		[/speak]
	[/command]
	[command]
		[move]
			x="9,10"
			y="9,8"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="10"
				y="8"
			[/source]
			[destination]
				x="9"
				y="8"
			[/destination]
		[/attack]
		[random]
			value="31201"
			[results]
				chance="50"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="12521"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="5086"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="8306"
			[results]
				chance="60"
				damage="4"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="6,5,4,4,4,5"
			y="11,12,11,10,9,9"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="2"
			[source]
				x="5"
				y="9"
			[/source]
			[destination]
				x="6"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="1839"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="10587"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="shaw has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="aiwan has logged into the lobby"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="kamikaze"
			message="i was lucky so far"
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="15,15,15,15"
			y="4,5,6,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="15"
				y="7"
			[/source]
			[destination]
				x="15"
				y="8"
			[/destination]
		[/attack]
		[random]
			value="9452"
			[results]
				chance="70"
				damage="13"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="24991"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="17,16"
			y="9,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="16"
				y="8"
			[/source]
			[destination]
				x="15"
				y="8"
			[/destination]
		[/attack]
		[random]
			value="7558"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="26415"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="4704"
			[results]
				chance="60"
				damage="6"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="15066"
		[/random]
		[random]
			value="23190"
		[/random]
		[random]
			value="14085"
		[/random]
		[random]
			value="29761"
		[/random]
		[random]
			value="29861"
		[/random]
		[random]
			value="31778"
		[/random]
		[random]
			value="30942"
		[/random]
		[random]
			value="384"
		[/random]
		[random]
			value="457"
		[/random]
		[random]
			value="11860"
		[/random]
		[random]
			value="27826"
		[/random]
		[random]
			value="16648"
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="20,19,18,17,17"
			y="6,7,7,8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,12,11,10,9,8"
			y="4,3,4,4,5,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,8"
			y="10,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="8"
				y="9"
			[/source]
			[destination]
				x="7"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="5467"
			[results]
				chance="70"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="23166"
			[results]
				chance="70"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="5,5,6,7"
			y="10,11,11,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="7"
				y="11"
			[/source]
			[destination]
				x="7"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="28262"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="7770"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="19278"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="2244"
			[results]
				chance="60"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="8,7"
			y="8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="7"
				y="9"
			[/source]
			[destination]
				x="7"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="5977"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="20127"
			[results]
				chance="60"
				damage="7"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="6,5"
			y="10,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="5"
				y="10"
			[/source]
			[destination]
				x="5"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="26639"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="19260"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="26389"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="12303"
			[results]
				chance="50"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="30883"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="6"
				y="9"
			[/source]
			[destination]
				x="7"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="6351"
			[results]
				chance="70"
				damage="6"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,8,7,6"
			y="8,7,8,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="6"
				y="8"
			[/source]
			[destination]
				x="5"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="5395"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="7284"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="22085"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="26071"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="296"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="17,16"
			y="9,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="16"
				y="9"
			[/source]
			[destination]
				x="15"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="30513"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="25899"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="31214"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="9430"
			[results]
				chance="60"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="10608"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="5,4,3,3,4"
			y="9,8,9,10,10"
		[/move]
	[/command]
	[command]
		[move]
			x="4,5"
			y="9,9"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="5"
				y="9"
			[/source]
			[destination]
				x="6"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="29917"
			[results]
				chance="60"
				damage="8"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[choose]
			value="0"
		[/choose]
	[/command]
	[command]
		[move]
			x="4,4,5,6"
			y="8,7,7,7"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="6"
				y="7"
			[/source]
			[destination]
				x="6"
				y="8"
			[/destination]
		[/attack]
		[random]
			value="5257"
			[results]
				chance="60"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="358"
			[results]
				chance="70"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="12550"
			[results]
				chance="60"
				damage="8"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="5,6,7,8"
			y="8,8,8,8"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="8"
				y="8"
			[/source]
			[destination]
				x="8"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="11863"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="3658"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="31705"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[attack]
			defender_weapon="1"
			weapon="2"
			[source]
				x="4"
				y="10"
			[/source]
			[destination]
				x="5"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="23972"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="21532"
			[results]
				chance="50"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="26834"
			[results]
				chance="50"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="8967"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="16806"
			[results]
				chance="50"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="5,5,6,6,6"
			y="17,16,15,14,13"
		[/move]
	[/command]
	[command]
		[move]
			x="4,4,3,2"
			y="3,2,2,1"
		[/move]
	[/command]
	[command]
		[move]
			x="15,14,13,13"
			y="9,9,10,11"
		[/move]
	[/command]
	[command]
		[move]
			x="13,14,14,14,14"
			y="17,16,15,14,13"
		[/move]
	[/command]
	[command]
		[move]
			x="14,14"
			y="13,12"
		[/move]
	[/command]
	[command]
		[move]
			x="4,4,4,4,5,5,5"
			y="22,21,20,19,19,18,17"
		[/move]
	[/command]
	[command]
		[recruit]
			value="5"
			x="11"
			y="21"
		[/recruit]
		[random]
			value="8130"
		[/random]
		[random]
			value="30768"
		[/random]
		[random]
			value="32726"
		[/random]
		[random]
			value="24898"
		[/random]
		[random]
			value="4693"
		[/random]
		[random]
			value="960"
		[/random]
		[random]
			value="21381"
		[/random]
		[random]
			value="8793"
		[/random]
		[random]
			value="15592"
		[/random]
		[random]
			value="21449"
		[/random]
		[random]
			value="10345"
		[/random]
		[random]
			value="14316"
		[/random]
		[random]
			value="5549"
		[/random]
		[random]
			value="31296"
		[/random]
		[random]
			value="10998"
			[results]
				checksum="SU39RsIPnopbtoBBt5yPBdjCxIoyMyJsCAbPtOQpxQRNpnMsQGGGqEpPQwrEETo0BNqQDyBuEICFSQFuTGrqGMJbRBzNpHETGFOwJPvMPJFf8IBNyQOKRJUZDRgOWmID"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="FighterX has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="5"
			x="11"
			y="22"
		[/recruit]
		[random]
			value="13459"
		[/random]
		[random]
			value="18026"
		[/random]
		[random]
			value="18704"
		[/random]
		[random]
			value="7182"
		[/random]
		[random]
			value="18417"
		[/random]
		[random]
			value="29862"
		[/random]
		[random]
			value="16539"
		[/random]
		[random]
			value="31985"
		[/random]
		[random]
			value="25594"
		[/random]
		[random]
			value="9394"
		[/random]
		[random]
			value="25409"
		[/random]
		[random]
			value="16093"
		[/random]
		[random]
			value="23005"
		[/random]
		[random]
			value="25679"
		[/random]
		[random]
			value="17362"
			[results]
				checksum="SU39RsJPnopbtoBBt5yPBdjCxIoyMyJsCAbPtOQpxQRNpnMsQGGGqEpPQwrEETo0BNqQDyBuEICFSQFuTGrqGNJbRBzNpHETGFOwJPvMPJFf8IBNyQOKRJUZDRgO-mID"
			[/results]
		[/random]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Danx has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="The_kungfu_boy"
			message="lucky? u almost defeat me, and u will if i can't fefeat ur troll and ur horse will live long in that willage"
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="5"
				y="10"
			[/source]
			[destination]
				x="4"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="31088"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="20563"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="28751"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="14661"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="25229"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="7,6,5,4"
			y="11,11,12,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="4"
				y="11"
			[/source]
			[destination]
				x="4"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="24977"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="6626"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="2426"
			[results]
				chance="50"
				damage="7"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="23885"
		[/random]
		[random]
			value="2534"
		[/random]
		[random]
			value="26745"
		[/random]
		[random]
			value="6040"
		[/random]
		[random]
			value="484"
		[/random]
		[random]
			value="4985"
		[/random]
		[random]
			value="1787"
		[/random]
		[random]
			value="9893"
		[/random]
		[random]
			value="16454"
		[/random]
		[random]
			value="5109"
		[/random]
		[random]
			value="22501"
		[/random]
		[random]
			value="11531"
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="15,15,14,13,12,11"
			y="7,6,5,5,4,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="llhAnny has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="15,14,13,12,11,11"
			y="8,7,8,8,8,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="16,17"
			y="9,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="8,7,6"
			y="9,9,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="6"
				y="8"
			[/source]
			[destination]
				x="6"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="27141"
			[results]
				chance="70"
				damage="12"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="18368"
			[results]
				chance="70"
				damage="12"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="8,7,7,6"
			y="4,5,6,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="6"
				y="6"
			[/source]
			[destination]
				x="6"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="10347"
			[results]
				chance="70"
				damage="12"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="6891"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Sinbad has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="16,17,18"
			y="8,9,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="5,5,5,4,4,4"
			y="17,16,15,14,13,12"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="4"
				y="12"
			[/source]
			[destination]
				x="4"
				y="11"
			[/destination]
		[/attack]
		[random]
			value="2518"
			[results]
				chance="60"
				damage="6"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="6,6,6,6"
			y="13,12,11,10"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="1"
			weapon="2"
			[source]
				x="6"
				y="10"
			[/source]
			[destination]
				x="5"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="19148"
			[results]
				chance="50"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="23497"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="17486"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="12270"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="8465"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="matt_will has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="platek has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="14,15,16,17,18"
			y="12,12,11,11,10"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="18"
				y="10"
			[/source]
			[destination]
				x="18"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="31221"
			[results]
				chance="50"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="26907"
			[results]
				chance="70"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="16785"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="32297"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="I_HATE_GOD has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="13,14,15,16,17"
			y="11,11,11,10,10"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="17"
				y="10"
			[/source]
			[destination]
				x="18"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="31912"
			[results]
				chance="50"
				damage="10"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="x has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="2,3,4,4,4,4,4,5"
			y="1,2,2,3,4,5,6,7"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="5"
				y="7"
			[/source]
			[destination]
				x="6"
				y="6"
			[/destination]
		[/attack]
		[random]
			value="23211"
			[results]
				chance="60"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="3868"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="11460"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="5,4,4,4,5"
			y="9,8,7,6,6"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="5"
				y="6"
			[/source]
			[destination]
				x="6"
				y="6"
			[/destination]
		[/attack]
		[random]
			value="4774"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="5413"
			[results]
				chance="60"
				damage="17"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="8,8,7"
			y="8,7,7"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="7"
				y="7"
			[/source]
			[destination]
				x="6"
				y="6"
			[/destination]
		[/attack]
		[random]
			value="26094"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="2036"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="7849"
			[results]
				chance="60"
				damage="6"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="olof has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="FKWSNTH has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="EvilMaster has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="6,6,6,6,5"
			y="7,6,5,4,4"
		[/move]
	[/command]
	[command]
		[move]
			x="11,11,11,11,12,12"
			y="21,20,19,18,17,16"
		[/move]
	[/command]
	[command]
		[move]
			x="11,11,11,11,11,12"
			y="22,21,20,19,18,17"
		[/move]
	[/command]
	[command]
		[recruit]
			value="5"
			x="11"
			y="21"
		[/recruit]
		[random]
			value="19461"
		[/random]
		[random]
			value="861"
		[/random]
		[random]
			value="8990"
		[/random]
		[random]
			value="2794"
		[/random]
		[random]
			value="29965"
		[/random]
		[random]
			value="11778"
		[/random]
		[random]
			value="18747"
		[/random]
		[random]
			value="24760"
		[/random]
		[random]
			value="27770"
		[/random]
		[random]
			value="27000"
		[/random]
		[random]
			value="3295"
		[/random]
		[random]
			value="8696"
		[/random]
		[random]
			value="14708"
		[/random]
		[random]
			value="12440"
		[/random]
		[random]
			value="3217"
			[results]
				checksum="SU39RsRPnopbtoBBs5yPBdjCxIoyMyJsCAbPtOQpxQRNpnMsQGGGqEpPQwrEETo0BNqQDyBuEICFSQFuTGrqGVJbRBzNpHETGFOwJPvMPJFf8IBNyQOKRJUZDRgOWmID"
			[/results]
		[/random]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11"
			y="4,3"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="0"
			x="11"
			y="5"
		[/recruit]
		[random]
			value="24381"
		[/random]
		[random]
			value="9987"
		[/random]
		[random]
			value="15264"
		[/random]
		[random]
			value="25840"
		[/random]
		[random]
			value="29373"
		[/random]
		[random]
			value="11916"
		[/random]
		[random]
			value="1068"
		[/random]
		[random]
			value="32278"
		[/random]
		[random]
			value="7721"
		[/random]
		[random]
			value="23018"
		[/random]
		[random]
			value="17006"
		[/random]
		[random]
			value="9850"
		[/random]
		[random]
			value="3770"
		[/random]
		[random]
			value="4415"
		[/random]
		[random]
			value="11919"
			[results]
				checksum="LhGI28qHcsJn9Niqer4mpRo6wD4zsHnKP1Hy+wP.,jg1d-5cL>71745hhbgk5n1,oc<nn6f23854.p5418om4H8bFWB0pjc+cZng<m8e6X68+vn>t55bKrqZdmOCaJmI"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="sidzej has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="2"
			x="11"
			y="4"
		[/recruit]
		[random]
			value="13755"
		[/random]
		[random]
			value="27414"
		[/random]
		[random]
			value="3934"
		[/random]
		[random]
			value="9707"
		[/random]
		[random]
			value="9929"
		[/random]
		[random]
			value="10896"
		[/random]
		[random]
			value="20546"
		[/random]
		[random]
			value="16267"
		[/random]
		[random]
			value="13893"
		[/random]
		[random]
			value="4932"
		[/random]
		[random]
			value="19446"
		[/random]
		[random]
			value="14660"
		[/random]
		[random]
			value="22495"
			[results]
				checksum="TuuzMJvu3JOmTCCoKGpBJPA6SCMFtLEzKIxOCmtqSOKJLCFwmIsr1QENmxPFHFw.RFKFnqypNLqM8mwoForIhF8xkkBsH9ih>N4ftxqADyQNdDsofqQwNFrCg8vPGzPi"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="6"
			x="13"
			y="4"
		[/recruit]
		[random]
			value="22767"
		[/random]
		[random]
			value="20517"
		[/random]
		[random]
			value="3206"
		[/random]
		[random]
			value="8332"
		[/random]
		[random]
			value="15211"
		[/random]
		[random]
			value="3750"
		[/random]
		[random]
			value="28507"
		[/random]
		[random]
			value="11323"
		[/random]
		[random]
			value="19985"
		[/random]
		[random]
			value="16098"
		[/random]
		[random]
			value="2660"
		[/random]
		[random]
			value="11052"
		[/random]
		[random]
			value="26454"
			[results]
				checksum="RqMsBKzD0FKjsFwUULNJZmGIxrMqRUrwAqFDQBsGIPzPLBOztLbGuuQUIGIP7KIRwurIsmHBB+FVoqJyy6J8xkkBsfg-8bR7eEHFHBVJRlsCL4wQFtHLK,fBFKhGav7k"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,10,9,8"
			y="3,3,4,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="6,7,8,8"
			y="8,8,7,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="1"
			weapon="0"
			[source]
				x="8"
				y="6"
			[/source]
			[destination]
				x="7"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="2481"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="7759"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="21540"
			[results]
				chance="70"
				damage="12"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,10,9,8,7"
			y="7,6,6,5,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="7"
				y="6"
			[/source]
			[destination]
				x="7"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="4533"
			[results]
				chance="60"
				damage="7"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="114"
		[/random]
		[random]
			value="13941"
		[/random]
		[random]
			value="28419"
		[/random]
		[random]
			value="13511"
		[/random]
		[random]
			value="22433"
		[/random]
		[random]
			value="2896"
		[/random]
		[random]
			value="29054"
		[/random]
		[random]
			value="31094"
		[/random]
		[random]
			value="14198"
		[/random]
		[random]
			value="11118"
		[/random]
		[random]
			value="30351"
		[/random]
		[random]
			value="19776"
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="CringleCrusher has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="5,5,4,3,3,3,3,4"
			y="10,9,8,8,7,6,5,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="4"
				y="4"
			[/source]
			[destination]
				x="5"
				y="4"
			[/destination]
		[/attack]
		[random]
			value="7139"
			[results]
				chance="70"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="2207"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="6625"
			[results]
				chance="70"
				damage="5"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="4,5"
			y="10,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="18,19,19,18"
			y="10,10,9,8"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="18"
				y="8"
			[/source]
			[destination]
				x="17"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="11243"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="22163"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="14797"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="26343"
			[results]
				chance="60"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="10398"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="17,18"
			y="10,9"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="18"
				y="9"
			[/source]
			[destination]
				x="17"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="27079"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="12700"
			[results]
				chance="50"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="3656"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="18442"
			[results]
				chance="50"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="9002"
			[results]
				chance="50"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="hpx has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="12,12,12,12,13"
			y="16,15,14,13,13"
		[/move]
	[/command]
	[command]
		[move]
			x="12,13,14,14,14,14"
			y="17,17,16,15,14,13"
		[/move]
	[/command]
	[command]
		[move]
			x="4,4,5,6,6,6,6"
			y="12,11,11,10,9,8,7"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="2"
			[source]
				x="6"
				y="7"
			[/source]
			[destination]
				x="7"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="30127"
			[results]
				chance="60"
				damage="9"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="8192"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="6,6,6,7"
			y="10,9,8,8"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="2"
			[source]
				x="7"
				y="8"
			[/source]
			[destination]
				x="7"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="10595"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="22787"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="5,6,6,7,8"
			y="6,6,7,8,7"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="8"
				y="7"
			[/source]
			[destination]
				x="8"
				y="6"
			[/destination]
		[/attack]
		[random]
			value="30983"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="27652"
			[results]
				chance="60"
				damage="17"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="5,6,7,8,9,9"
			y="7,7,8,8,8,7"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="9"
				y="7"
			[/source]
			[destination]
				x="8"
				y="6"
			[/destination]
		[/attack]
		[random]
			value="26393"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="32412"
			[results]
				chance="60"
				damage="7"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="11,11,11,11,12"
			y="21,20,19,18,17"
		[/move]
	[/command]
	[command]
		[recruit]
			value="2"
			x="11"
			y="21"
		[/recruit]
		[random]
			value="7836"
		[/random]
		[random]
			value="24039"
		[/random]
		[random]
			value="2291"
		[/random]
		[random]
			value="13304"
		[/random]
		[random]
			value="14750"
		[/random]
		[random]
			value="13054"
		[/random]
		[random]
			value="3225"
		[/random]
		[random]
			value="16518"
		[/random]
		[random]
			value="27832"
		[/random]
		[random]
			value="12708"
		[/random]
		[random]
			value="25094"
		[/random]
		[random]
			value="93"
		[/random]
		[random]
			value="20498"
		[/random]
		[random]
			value="30005"
		[/random]
		[random]
			value="19383"
			[results]
				checksum="<3l85mndU3eF>a,..P305kg7W0d6cpzj<c3>k7>a,+alX1ah,2Wi<0o.-bnee7bo56d2incd,4Z6occi44H-f-5057b>02aa.o6Z+40CN5c8b.<X,48D.7v393e4xt<3"
			[/results]
		[/random]
	[/command]
	[command]
		[recruit]
			value="5"
			x="11"
			y="22"
		[/recruit]
		[random]
			value="32631"
		[/random]
		[random]
			value="30217"
		[/random]
		[random]
			value="12628"
		[/random]
		[random]
			value="1500"
		[/random]
		[random]
			value="2744"
		[/random]
		[random]
			value="29627"
		[/random]
		[random]
			value="5405"
		[/random]
		[random]
			value="4647"
		[/random]
		[random]
			value="21547"
		[/random]
		[random]
			value="3242"
		[/random]
		[random]
			value="10683"
		[/random]
		[random]
			value="30795"
		[/random]
		[random]
			value="28422"
		[/random]
		[random]
			value="10367"
		[/random]
		[random]
			value="5190"
			[results]
				checksum="SU39RsGPnopbtoBBs5yPBdjCxIoyMyJsCAbPtOQpxQRNpnMsQGGGqEpPQwrEETo0BNqQDyBuEICFSQFuTGrqGKJbRBzNpHETGFOwJPvMPJFf8IBNyQOKRJUZDRgOWmID"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="pablo- has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="dethtoll has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="7"
				y="7"
			[/source]
			[destination]
				x="8"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="10719"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="3156"
			[results]
				chance="60"
				damage="14"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Flameslash has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Bob has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="7,6,5,5,4"
			y="6,5,5,4,3"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,14,15,16,17"
			y="4,3,4,4,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,12,13,14,15,16"
			y="5,4,4,4,4,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="ybrhue has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="8,7,7,6"
			y="4,5,6,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="1"
			weapon="1"
			[source]
				x="6"
				y="6"
			[/source]
			[destination]
				x="6"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="7961"
			[results]
				chance="70"
				damage="13"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="32726"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="27396"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="28080"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="6808"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="thermophilus has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="4,4,4,5"
			y="4,5,6,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="5"
				y="7"
			[/source]
			[destination]
				x="6"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="8625"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="7006"
			[results]
				chance="50"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="15350"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="22663"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="577"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,10,9,8,7,7"
			y="4,4,5,5,6,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="7"
				y="7"
			[/source]
			[destination]
				x="6"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="23986"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="22002"
			[results]
				chance="60"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="14927"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="3073"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="24901"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="5,5,5"
			y="10,9,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="5"
				y="8"
			[/source]
			[destination]
				x="6"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="27415"
			[results]
				chance="60"
				damage="6"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="27494"
		[/random]
		[random]
			value="31185"
		[/random]
		[random]
			value="21391"
		[/random]
		[random]
			value="18823"
		[/random]
		[random]
			value="26485"
		[/random]
		[random]
			value="12763"
		[/random]
		[random]
			value="15110"
		[/random]
		[random]
			value="10138"
		[/random]
		[random]
			value="17938"
		[/random]
		[random]
			value="2242"
		[/random]
		[random]
			value="18012"
		[/random]
		[random]
			value="7358"
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="newcomer has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="13,14,14,15,15,16"
			y="13,12,11,11,10,9"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="16"
				y="9"
			[/source]
			[destination]
				x="17"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="32369"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="4122"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="16160"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="17149"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="18938"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="14,15,16,16,16,17"
			y="13,13,12,11,10,10"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="17"
				y="10"
			[/source]
			[destination]
				x="17"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="5097"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="23260"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="27179"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="3661"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="17851"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="farce has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="18,18,17,17,16"
			y="8,7,7,6,5"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="16"
				y="5"
			[/source]
			[destination]
				x="16"
				y="4"
			[/destination]
		[/attack]
		[random]
			value="31577"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="5063"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="18,18"
			y="9,8"
		[/move]
	[/command]
	[command]
		[move]
			x="12,13,14,14,14"
			y="17,17,16,15,14"
		[/move]
	[/command]
	[command]
		[move]
			x="11,11,11,11,12,12"
			y="21,20,19,18,17,16"
		[/move]
	[/command]
	[command]
		[move]
			x="11,11,11,11,11"
			y="22,21,20,19,18"
		[/move]
	[/command]
	[command]
		[recruit]
			value="5"
			x="11"
			y="21"
		[/recruit]
		[random]
			value="24587"
		[/random]
		[random]
			value="22023"
		[/random]
		[random]
			value="31768"
		[/random]
		[random]
			value="21893"
		[/random]
		[random]
			value="31564"
		[/random]
		[random]
			value="29948"
		[/random]
		[random]
			value="848"
		[/random]
		[random]
			value="28892"
		[/random]
		[random]
			value="32401"
		[/random]
		[random]
			value="12947"
		[/random]
		[random]
			value="7835"
		[/random]
		[random]
			value="9228"
		[/random]
		[random]
			value="21004"
		[/random]
		[random]
			value="31812"
		[/random]
		[random]
			value="21343"
			[results]
				checksum="SU39RsRPnopbtoBBs5yPBdjCxIoyMyJsCAbPtOQpxQRNpnMsQGGGqEpPQwrEETo0BNqQDyBuEICFSQFuTGrqGVJbRBzNpHETGFOwJPvMPJFf8IBNyQOKRJUZDRgOWmID"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Yawner has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Tyrion has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="voker57 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="8,9,9,8,7,6"
			y="7,7,6,5,5,5"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="6"
				y="5"
			[/source]
			[destination]
				x="6"
				y="6"
			[/destination]
		[/attack]
		[random]
			value="18787"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="31714"
			[results]
				chance="70"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="12119"
			[results]
				chance="60"
				damage="14"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1464"
			[results]
				chance="70"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="10624"
			[results]
				chance="70"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="9,9,8,7,6,5,5"
			y="7,6,5,5,4,5,6"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="5"
				y="6"
			[/source]
			[destination]
				x="6"
				y="6"
			[/destination]
		[/attack]
		[random]
			value="9582"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="25615"
			[results]
				chance="50"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="13658"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="10394"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="30782"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="16519"
			[results]
				chance="50"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[choose]
			value="0"
		[/choose]
	[/command]
	[command]
		[move]
			x="7,8,9,9,8"
			y="8,8,8,7,6"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="2"
			[source]
				x="8"
				y="6"
			[/source]
			[destination]
				x="7"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="15416"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="10452"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Atuan has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Anarky has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="5,4,3,3,3,4,5,6"
			y="7,7,7,6,5,4,4,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="6"
				y="4"
			[/source]
			[destination]
				x="6"
				y="5"
			[/destination]
		[/attack]
		[random]
			value="17904"
			[results]
				chance="70"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="4635"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="21352"
			[results]
				chance="70"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="7526"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="6055"
			[results]
				chance="70"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[choose]
			value="0"
		[/choose]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="6"
				y="6"
			[/source]
			[destination]
				x="6"
				y="5"
			[/destination]
		[/attack]
		[random]
			value="17171"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="17666"
			[results]
				chance="70"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Alexjonder has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="7,7"
			y="7,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="7"
				y="6"
			[/source]
			[destination]
				x="6"
				y="5"
			[/destination]
		[/attack]
		[random]
			value="27415"
			[results]
				chance="70"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="2845"
			[results]
				chance="60"
				damage="11"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="29465"
			[results]
				chance="70"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="26818"
			[results]
				chance="60"
				damage="11"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="4,4,3,2"
			y="3,2,2,1"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="17,18"
			y="4,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="voker57 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="16,17"
			y="4,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="17"
				y="5"
			[/source]
			[destination]
				x="16"
				y="5"
			[/destination]
		[/attack]
		[random]
			value="29324"
			[results]
				chance="70"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="30837"
			[results]
				chance="70"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="xivarmy has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Jenova has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="5,6,7,8"
			y="8,8,8,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="8"
				y="7"
			[/source]
			[destination]
				x="8"
				y="6"
			[/destination]
		[/attack]
		[random]
			value="1394"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="20836"
			[results]
				chance="60"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="32109"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="11703"
			[results]
				chance="60"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="6,7"
			y="7,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="7"
				y="7"
			[/source]
			[destination]
				x="8"
				y="6"
			[/destination]
		[/attack]
		[random]
			value="28882"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="19812"
			[results]
				chance="60"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="12018"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="13834"
			[results]
				chance="60"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="6,7"
			y="5,6"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="7"
				y="6"
			[/source]
			[destination]
				x="6"
				y="6"
			[/destination]
		[/attack]
		[random]
			value="26056"
			[results]
				chance="60"
				damage="11"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="20347"
			[results]
				chance="70"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="7327"
			[results]
				chance="60"
				damage="11"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		undo="no"
		[speak]
			id="kamikaze"
			message="gg"
			side="1"
		[/speak]
	[/command]
[/replay]
[snapshot]
[/snapshot]
[replay_start]
	current_tod="0"
	description="Warfare transforms the simple farms and villages of a peaceful region into a subtly parceled battlefield."
	experience_modifier="70"
	hash="EqK,,,KxGHj1q>FS,UdqBn4erWBwx7tGxLe4nIo9f0-xnP6JQuOI6W-92qdedEsY3JamDYvGPYyVho<aFvF.erCJ<kAmykeuOUMfxjIttN.OSV6lVoINmB+HvhWlBQFe"
	id="multiplayer_Hamlets"
	map_data="border_size=1
usage=map

Gs^Fp       , Hh          , Gg          , Wwf         , Wwf         , Gs^Fp       , Hh          , Gs^Fp       , Gg          , Gs^Fp       , Gs^Fp       , Wwf         , Gg          , Hh          , Gs^Fms      , Mm          , Wwf         , Wwf         , Hh          , Gs^Fp       , Hh          , Mm          , Mm          
Hh          , Hh          , Gg^Vh       , Wwf         , Wwf         , Gs^Fp       , Mm          , Hh          , Gg          , Gs^Fms      , Wwf         , Wwf         , Wwf         , Mm          , Hh          , Gs^Fms      , Wwf         , Wwf         , Gs^Fp       , Hh          , Hh          , Gs^Fms      , Hh          
Wwf         , Wwf         , Wwf         , Wwf         , Gg          , Wwf         , Wwf         , Hh          , Gg          , Gg          , Wwf         , Ch          , Wwf         , Gs^Fp       , Wwf         , Wwf         , Gg          , Gg          , Hh          , Mm          , Wwf         , Mm          , Hh          
Mm          , Hh          , Wwf         , Gg^Fp       , Gg^Ve       , Wwf         , Gg          , Gg          , Wwf         , Wwf         , Wwf         , 1 Kh        , Ch          , Wwf         , Gg          , Gg          , Rd          , Rd^Uf       , Wwf         , Wwf         , Gs^Fms      , Wwf         , Wwf         
Wwf         , Wwf         , Mm          , Wwf         , Gg^Fms      , Wwf         , Wwf         , Wwf         , Gg^Vh       , Gg          , Wwf         , Ch          , Wwf         , Ch          , Rd          , Rd          , Wwf         , Wwf         , Gg^Vh       , Gs^Fp       , Re^Gvs      , Hh          , Hh          
Gs^Fp       , Hh          , Wwf         , Gg^Fp       , Wwf         , Wwf         , Gg          , Gg          , Rd          , Gg          , Wwf         , Ch          , Gg          , Wwf         , Wwf         , Wwf         , Mm          , Gs^Fp       , Gg          , Re^Gvs      , Gg^Wm       , Re^Gvs      , Re^Gvs      
Wwf         , Wwf         , Mm          , Wwf         , Hh          , Gg^Fms      , Rd          , Rd          , Gg          , Gg          , Wwf         , Wwf         , Gs^Fms      , Gg          , Hh          , Gg          , Gg          , Gg          , Rd          , Gg          , Gg          , Hh          , Hh          
Gs^Fp       , Hh          , Gs^Fms      , Gg          , Gg          , Rd          , Gg          , Gg          , Wwf         , Wwf         , Gs^Fms      , Wwf         , Gs^Fp       , Mm          , Gg          , Gg          , Rd          , Rd          , Gg          , Ggf         , Mm          , Gs^Fp       , Gs^Fp       
Gs^Fp       , Gs^Fp       , Gg          , Gg          , Wwf         , Gg          , Wwf         , Wwf         , Mm          , Hh          , Wwf         , Wwf         , Gg          , Gg          , Rd          , Rd          , Rd          , Gg          , Gs^Fp       , Gs^Fms      , Gs^Fms      , Hh          , Hh          
Hh          , Hh          , Wwf         , Wwf         , Hh          , Wwf         , Gg          , Gg          , Gg          , Gg          , Wwf         , Gg          , Gg          , Rd          , Gg          , Gg          , Gg          , Gg^Vh       , Hh          , Gg          , Wwf         , Ggf         , Ggf         
Wwf         , Wwf         , Hh          , Ggf         , Gs^Fp       , Gg^Vh       , Re^Gvs      , Gg          , Gg          , Ss^Vhs      , Hh          , Ww          , Gs^Fms      , Gg          , Gs^Fp       , Hh          , Wwf         , Wwf         , Wwf         , Wwf         , Gg          , Wwf         , Wwf         
Hh          , Hh          , Gg          , Gg^Wm       , Re^Gvs      , Re^Gvs      , Re^Gvs      , Gg          , Gg          , Ss          , Gs^Fp       , Ww          , Hh          , Mm          , Wwf         , Wwf         , Gg          , Gg          , Rd^Uf       , Gg          , Gg          , Gs^Fp       , Gs^Fms      
Gs^Fp       , Gs^Fp       , Gg          , Gg          , Gg          , Re^Gvs      , Gg          , Gg          , Hh          , Mm          , Wwf         , Ww          , Ww          , Wo          , Wwf         , Gg          , Hh          , Gs^Fp       , Rd          , Rd          , Hh          , Gg          , Gg          
Rd          , Rd          , Gs^Fms      , Hh          , Rd          , Gg          , Gs^Fp       , Gg          , Gg          , Wwf         , Gg          , Gg          , Gg          , Wwf         , Gg          , Gg          , Gs^Fp       , Rd^Uf       , Rd          , Mm          , Gs^Fms      , Rd          , Rd          
Rd          , Rd          , Hh          , Mm          , Rd          , Rd^Uf       , Hh          , Gg          , Wwf         , Wwf         , Ww          , Gg          , Wwf         , Wwf         , Hh          , Gg          , Gg          , Gg          , Gg          , Hh          , Gg          , Rd          , Rd          
Gg          , Gg          , Gg          , Rd          , Rd^Uf       , Gs^Fp       , Gg          , Gg          , Wwf         , Wo          , Hh          , Ww          , Gs^Fp       , Mm          , Gg          , Gg          , Re^Gvs      , Re^Gvs      , Re^Gvs      , Gg          , Gg          , Gs^Fp       , Gs^Fp       
Gs^Fp       , Gs^Fp       , Gg          , Gg          , Wwf         , Gg          , Wwf         , Wwf         , Gs^Fms      , Mm          , Gs^Fp       , Ww          , Hh          , Ss          , Gg          , Gg          , Re^Gvs      , Re^Gvs      , Gs^Fms      , Gg^Wm       , Hh          , Hh          , Hh          
Wwf         , Wwf         , Wwf         , Wwf         , Hh          , Wwf         , Gg          , Hh          , Gg          , Gg          , Gg          , Ww          , Wwf         , Ss^Vhs      , Gg          , Gg          , Gg          , Gg^Vh       , Hh          , Ggf         , Wwf         , Wwf         , Wwf         
Ggf         , Ggf         , Gs^Fms      , Gg          , Gs^Fp       , Gg^Vh       , Rd          , Gg          , Rd          , Rd          , Gg          , Gg          , Wwf         , Gg          , Mm          , Gg          , Wwf         , Wwf         , Wwf         , Wwf         , Gg          , Mm          , Mm          
Hh          , Hh          , Mm          , Gs^Fp       , Gg          , Gg          , Rd          , Rd          , Gg          , Gg          , Gs^Fms      , Wwf         , Gs^Fms      , Hh          , Wwf         , Wwf         , Gg          , Gg          , Gg          , Gg          , Gs^Fp       , Gs^Fms      , Gs^Fms      
Gs^Fp       , Gs^Fp       , Gg          , Ggf         , Rd          , Rd          , Gg          , Gg          , Hh          , Mm          , Gg          , Wwf         , Wwf         , Wwf         , Gg          , Gg          , Rd          , Rd          , Hh          , Gg          , Mm          , Hh          , Hh          
Hh          , Hh          , Gg^Wm       , Gg          , Gg          , Gg          , Mm          , Gg          , Wwf         , Wwf         , Wwf         , Ch          , Gg          , Gg          , Rd          , Rd          , Gg          , Gg^Fp       , Wwf         , Wwf         , Wwf         , Wwf         , Wwf         
Re^Gvs      , Re^Gvs      , Re^Gvs      , Re^Gvs      , Gg^Vh       , Gs^Fp       , Wwf         , Wwf         , Rd          , Ch          , Ch          , Ch          , Gg          , Gg          , Gg^Vh       , Gg          , Wwf         , Wwf         , Gg^Fms      , Gg^Fp       , Gg^Ve       , Gg          , Gg          
Hh          , Hh          , Gs^Fms      , Gs^Fp       , Wwf         , Wwf         , Rd          , Rd          , Gg          , Gg          , Wwf         , 2 Kh        , Wwf         , Gg          , Wwf         , Wwf         , Gg          , Wwf         , Wwf         , Wwf         , Wwf         , Gs^Fp       , Gs^Fp       
Gs^Fp       , Mm          , Wwf         , Wwf         , Hh          , Rd^Uf       , Gs^Fp       , Hh          , Wwf         , Wwf         , Wwf         , Ch          , Wwf         , Wwf         , Hh          , Gg          , Ggf         , Wwf         , Gg^Vh       , Gg          , Wwf         , Mm          , Mm          
Gs^Fp       , Gs^Fp       , Wwf         , Gs^Fp       , Mm          , Hh          , Hh          , Wwf         , Gs^Fp       , Gs^Fp       , Gg          , Wwf         , Gg          , Gs^Fms      , Gs^Fms      , Gg          , Ggf         , Wwf         , Wwf         , Gg          , Gs^Fp       , Wwf         , Hh          
"
	mp_countdown="yes"
	mp_countdown_action_bonus="20"
	mp_countdown_init_time="270"
	mp_countdown_reservoir_time="270"
	mp_countdown_turn_bonus="200"
	mp_fog="yes"
	mp_shroud="no"
	mp_use_map_settings="yes"
	mp_village_gold="2"
	name="2p - Hamlets"
	next_underlying_unit_id="0"
	objectives="Victory:
@Defeat enemy leader(s)"
	observer="yes"
	random_seed="9467"
	random_start_time="no"
	scenario="(L) (The_kungfu_boy 1535) ladder game"
	turns="-1"
	version="1.6"
	[time]
		green="-20"
		id="dawn"
		image="misc/schedule-dawn.png"
		name=_ "Dawn"
		red="-20"
		sound="ambient/morning.ogg"
	[/time]
	[time]
		id="morning"
		image="misc/schedule-morning.png"
		lawful_bonus="25"
		name=_ "Morning"
	[/time]
	[time]
		id="afternoon"
		image="misc/schedule-afternoon.png"
		lawful_bonus="25"
		name=_ "Afternoon"
	[/time]
	[time]
		blue="-20"
		green="-20"
		id="dusk"
		image="misc/schedule-dusk.png"
		name=_ "Dusk"
		sound="ambient/night.ogg"
	[/time]
	[time]
		blue="-10"
		green="-40"
		id="first_watch"
		image="misc/schedule-firstwatch.png"
		lawful_bonus="-25"
		name=_ "First Watch"
		red="-40"
	[/time]
	[time]
		blue="-10"
		green="-40"
		id="second_watch"
		image="misc/schedule-secondwatch.png"
		lawful_bonus="-25"
		name=_ "Second Watch"
		red="-40"
	[/time]
	[music]
		ms_before="12000"
		name="knolls.ogg"
	[/music]
	[music]
		append="yes"
		ms_before="12000"
		name="wanderer.ogg"
	[/music]
	[music]
		append="yes"
		ms_before="12000"
		name="battle.ogg"
	[/music]
	[music]
		append="yes"
		ms_before="12000"
		name="transience.ogg"
	[/music]
	[music]
		append="yes"
		ms_before="12000"
		name="the_king_is_dead.ogg"
	[/music]
	[music]
		append="yes"
		ms_before="12000"
		name="knalgan_theme.ogg"
	[/music]
	[music]
		append="yes"
		ms_before="12000"
		name="the_city_falls.ogg"
	[/music]
	[music]
		append="yes"
		ms_before="12000"
		name="nunc_dimittis.ogg"
	[/music]
	[music]
		append="yes"
		ms_before="12000"
		name="revelation.ogg"
	[/music]
	[music]
		append="yes"
		ms_before="12000"
		name="loyalists.ogg"
	[/music]
	[music]
		append="yes"
		ms_before="12000"
		name="breaking_the_chains.ogg"
	[/music]
	[music]
		append="yes"
		ms_before="12000"
		name="elvish-theme.ogg"
	[/music]
	[music]
		append="yes"
		ms_before="12000"
		name="legends_of_the_north.ogg"
	[/music]
	[music]
		append="yes"
		ms_before="12000"
		name="traveling_minstrels.ogg"
	[/music]
	[music]
		append="yes"
		ms_before="12000"
		name="underground.ogg"
	[/music]
	[music]
		append="yes"
		ms_before="12000"
		name="vengeful.ogg"
	[/music]
	[music]
		append="yes"
		ms_before="12000"
		name="frantic.ogg"
	[/music]
	[music]
		append="yes"
		ms_before="12000"
		name="the_dangerous_symphony.ogg"
	[/music]
	[music]
		append="yes"
		ms_before="12000"
		name="heroes_rite.ogg"
	[/music]
	[music]
		append="yes"
		ms_before="12000"
		name="suspense.ogg"
	[/music]
	[music]
		append="yes"
		ms_before="12000"
		name="the_deep_path.ogg"
	[/music]
	[music]
		append="yes"
		ms_before="12000"
		name="siege_of_laurelmor.ogg"
	[/music]
	[event]
		name="prestart"
		[music]
			ms_before="12000"
			name="knolls.ogg"
		[/music]
		[music]
			append="yes"
			ms_before="12000"
			name="wanderer.ogg"
		[/music]
		[music]
			append="yes"
			ms_before="12000"
			name="battle.ogg"
		[/music]
		[music]
			append="yes"
			ms_before="12000"
			name="transience.ogg"
		[/music]
		[music]
			append="yes"
			ms_before="12000"
			name="revelation.ogg"
		[/music]
		[music]
			append="yes"
			ms_before="12000"
			name="loyalists.ogg"
		[/music]
		[music]
			append="yes"
			ms_before="12000"
			name="the_king_is_dead.ogg"
		[/music]
		[music]
			append="yes"
			ms_before="12000"
			name="knalgan_theme.ogg"
		[/music]
		[music]
			append="yes"
			ms_before="12000"
			name="the_city_falls.ogg"
		[/music]
		[music]
			append="yes"
			ms_before="12000"
			name="nunc_dimittis.ogg"
		[/music]
		[music]
			append="yes"
			ms_before="12000"
			name="breaking_the_chains.ogg"
		[/music]
		[music]
			append="yes"
			ms_before="12000"
			name="elvish-theme.ogg"
		[/music]
		[music]
			append="yes"
			ms_before="12000"
			name="legends_of_the_north.ogg"
		[/music]
		[music]
			append="yes"
			ms_before="12000"
			name="traveling_minstrels.ogg"
		[/music]
		[music]
			append="yes"
			ms_before="12000"
			name="underground.ogg"
		[/music]
		[music]
			append="yes"
			ms_before="12000"
			name="vengeful.ogg"
		[/music]
		[music]
			append="yes"
			ms_before="12000"
			name="frantic.ogg"
		[/music]
		[music]
			append="yes"
			ms_before="12000"
			name="the_dangerous_symphony.ogg"
		[/music]
		[music]
			append="yes"
			ms_before="12000"
			name="heroes_rite.ogg"
		[/music]
		[music]
			append="yes"
			ms_before="12000"
			name="suspense.ogg"
		[/music]
		[music]
			append="yes"
			ms_before="12000"
			name="the_deep_path.ogg"
		[/music]
		[music]
			append="yes"
			ms_before="12000"
			name="siege_of_laurelmor.ogg"
		[/music]
	[/event]
	[era]
		id="era_default"
#textdomain wesnoth-multiplayer
		name=_ "Default"
		[multiplayer_side]
			flag_rgb="magenta"
			id="Random"
			image="units/random-dice.png"
			name=_ "Random"
			random_faction="yes"
		[/multiplayer_side]
		[multiplayer_side]
			flag_rgb="magenta"
			id="Loyalists"
			image="units/human-loyalists/lieutenant.png"
			leader="Lieutenant,Swordsman,Pikeman,Javelineer,Shock Trooper,Longbowman,White Mage,Red Mage"
			name=_ "Loyalists"
			random_leader="Lieutenant,Swordsman,Pikeman,Javelineer,Longbowman,Red Mage"
			recruit="Cavalryman,Horseman,Spearman,Fencer,Heavy Infantryman,Bowman,Mage,Merman Fighter"
			terrain_liked="Gg, Ww, Wo"
			type="Lieutenant"
			[ai]
				recruitment_pattern="fighter,fighter,fighter,archer,mixed fighter,scout"
				[team_formula]
					rulebase="fai 'recruitment.fai'
		# ===== Some general functions used later ==== #

def sumarize_values( input_map )
	sum(
		values(input_map)
	);

def lowest_value( input_map )
	choose( input_map, -value ).value;

def highest_value( input_map )
	choose( input_map, value ).value;

def change_numbers_to_percents( input_map )
	map( input_map, 
		(value*100) / highest_value(input_map) 
	);

def add_number_to_values( input_map, number )
	map( input_map, 
		value + number 
	);

#make sure we have only positive values in a map #

def make_positive_only( input_map )
	if( lowest_value( input_map ) < 0, 
		add_number_to_values( 
			input_map, 
			abs(lowest_value(input_map))
		), 
		input_map 
	);

def sumarize_maps_values( map_A, map_B )
	map( map_A + map_B, 
		value + map_A[key]
	);

		#===== Evaluation how good unit is on a map ===== #

# ==1==  evaluate average defense #
#gives map where key is id of terrain, and value is number of hexes of that terrain on a gamemap#

def locations_map(ai*) 
	tomap( 
		map( 
			map.terrain, 
			id 
		) 
	);

#filters terrain map, min_percent it minimal % of map that terrain has to occupy to be considered in later evaluations# 

def filtered_locations_map(ai*, min_percent)
	filter( 
		locations_map(ai) , 
		value >  (map.w * map.h) / ( 100 / min_percent ) 
	);

#returns average defense of the unit #

def unit_average_defense(ai*, unit, terrain_min_percent )
	sum( 
		values( 
			map(
				filtered_locations_map(ai,terrain_min_percent), 
				defense_on( 
					unit, 
					find(map.terrain,id=key).loc
				) *
				value
			) 
		) 
	) / 
	sum(
		values(
			filtered_locations_map(
				ai,
				terrain_min_percent
			)
		)
	);

#returns map of units from units_list and their average defense (more -> better) #

def map_units_average_defense(ai*, units_list, terrain_min_percent) 
	tomap(
		map( 
			units_list, 
			id 
		), 
		map( 
			units_list, 'unit', 
			unit_average_defense(
				ai, 
				unit, 
				terrain_min_percent 
			) 
		) 
	);

def units_average_defense(ai*, units_list, terrain_min_percent)
	sum(
		map( 
			units_list, 'unit', 
			unit_average_defense(
				ai, 
				unit, 
				terrain_min_percent 
			) 
		) 
	) /
	size(
		units_list
	);


# ==2== TODO: evaluate unit effectivness based on movement points and movement cost#


		#===== Evaluation of game state - how good is ai doing ===== #

# ==1== based on unit cost and current amount of gold #
# returns number between 0 and 100 where: 0 we are losing, 100 we are winning #

def units_cost_gold_eval(ai*)
	min(
		[
			(
				(
					sum(
						map(
							allies, 'team', 
							sum(
								map(
									units_of_side[team], 
									cost
								)
							) + 
							teams[team].gold 
						)
					) * 
					100
				) / 
				sum(
					map(
						enemies, 'team', 
						sum(
							map(
								units_of_side[team], 
								cost
							)
						) + 
						max(
							[teams[team].gold, 0]
						) 
					)
				)
			) / 2,
			100
		]
	);

# ==2== based on village possession #

def count_allied_villages(ai*)
	sum(
		map(
			allies, 'side', 
			size(
				villages_of_side[side]
			)
		)
	);

def count_enemy_villages(ai*)
	sum(
		map(
			enemies, 'side', 
			size(
				villages_of_side[side]
			)
		)
	);

# multipled by 1000 to increase precision #

def village_evaluation(ai*)
	(
		50000 + 
		(
			count_allied_villages(ai) - 
			count_enemy_villages(ai)
		) * 
		(
			50000 /
			size(
				villages
			)
		)
	) /
	1000;

# ==3== combined 2 of the above #

def eval(ai*)
	( 
		units_cost_gold_eval(ai) + 
		village_evaluation(ai)
	) / 
	2;

		#===== Evaluation how effective my units are against the enemy ===== #

#==1==  basic evaluation #

# evaluate how much damage unit can inflict - how much damage unit can get#

def evaluate_attacker_against_opponents(ai*, unit, enemy_units)
	sum( 
		map( 
			enemy_units, 'enemy_unit', 
			sum(
				map(
					[
						max_possible_damage_with_retaliation( unit, enemy_unit )
					],
					max(
						[
							self[0] - self[2],
							self[1] - self[3]
						]
					)
				) 
			)
		)
	);

def evaluate_defender_against_opponents(ai*, unit, enemy_units)
	-sum( 
		map( 
			enemy_units, 'enemy_unit', 
			sum(
				map(
					[
						max_possible_damage_with_retaliation( enemy_unit, unit )
					],
					max(
						[
							self[0] - self[2],
							self[1] - self[3]
						]
					)
				)
			)
		)
	);

def units_hp_map(ai*, units)
	tomap( 
		map(
			units, 
			id
		), 
		map( 
			units, 
			hitpoints
		)
	);

#in case side's gold is more than 50, add units that side can recruit to the side's unit list#

def create_side_unit_list(ai*, side)
	if( 
		teams[side].gold > 50, 
		recruits_of_side[side], 
		[]
	) + 
	units_of_side[side];

def evaluate_my_recruits_as_attackers(ai*)
	tomap( 
		map(
			my_recruits, 
			id
		), 
		map(
			my_recruits, 'my_unit',
			sum(
				map(
					enemies, 'enemy_side',
					evaluate_attacker_against_opponents(
						ai,
						my_unit,
						create_side_unit_list(
							ai, 
							enemy_side
						)
					)
				)
			)
		)
	);

def evaluate_my_recruits_as_defenders(ai*)
	tomap(
		map(
			my_recruits, 
			id
		),
		map( 
			my_recruits, 'my_unit',
			sum(
				map(
					enemies, 'enemy_side',
					evaluate_defender_against_opponents(
						ai,
						my_unit,
						create_side_unit_list(
							ai,
							enemy_side
						)
					)
				)
			)
		)
	);


# === 2 ===  now consider abilities and weapon specials  #

def abilities_weights()
	['skirmisher' -> 15, 'ambush' -> 10, 'nightstalk' -> 20, 'regenerates' -> 20, 'healing' -> 15, 'curing' -> 10, 'leadership' -> 20, 'illumination' -> 15, 'teleport' -> 10, 'steadfast' -> 15 ];

def weapon_specials_weights()
	[ 'backstab' -> 20 ,'slow' -> 10 ,'berserk' -> 20 ,'stones' -> 60 ,'plague' -> 10 ,'marksman' -> 30 ,'magical' -> 40 ,'charge' -> 30 ,'drains' -> 30,  'firststrike' -> 10, 'poison' -> 25 ];

def apply_abilities_weights( units_map )
	map( 
		units_map, 
		value +
		(
			value * 
			max(
				map(
					get_unit_type( key ).abilities, 'ability',
					abilities_weights()[ability]
				)
			)
		) / 100
	);

def apply_weapon_specials_weights( units_map )
	map(
		units_map, 
		value +
		(
			value *
			max(
				map(
					get_unit_type( key ).attacks, 'attack',
					vars.weapon_specials[attack.special]
				)
			)
		) / 100
	);

# since undead units don't get random traits and are balanced with that, we need to lower their evaluation a bit to match fairly the living units #

def undead_malus( units_map )
	map( 
		units_map, 
		if(
			get_unit_type(key).undead,
			( value * 90 ) / 100,
			value 
		)
	);

# === 3 ===  pit 1 and 2 together  #

def evaluate_attackers(ai*)
	change_numbers_to_percents(
		apply_abilities_weights(
			apply_weapon_specials_weights(
				undead_malus( 
					make_positive_only(
						evaluate_my_recruits_as_attackers( ai )	
					)
				)
			)
		)
	);

def evaluate_defenders(ai*)
	map(
		map(
			change_numbers_to_percents(
				apply_abilities_weights(
					apply_weapon_specials_weights(
						undead_malus( 
							make_positive_only(
								evaluate_my_recruits_as_defenders( ai )	
							)
						)
					)
				)
			),
			value / 3
		), 
		value +
		map(
			change_numbers_to_percents(
				units_hp_map(
					ai,
					my_recruits
				)
			),
		value * 2 / 3
		)[key]
	);

	#=========== we have evaluation of game state and units, time to combine them: ==========#
		#=========	recruitment_list_builder	=========#

def rlb_apply_eval(eval, attackers_map, defenders_map, offset)
	map(
		sumarize_maps_values(
			map(
				attackers_map, 
				value * (eval+offset)
			),
			map(
				defenders_map,
				value * ( (100 - eval) - offset )
			)
		),
		value / 100
	);

def rlb_remove_lowest( input_map, percent)
	filter(
		input_map, 
		value > 
		(
			(
				percent * sumarize_values(input_map)
			) / 100
		)
	);

def rlb_first_step(eval, attackers_map, defenders_map, offset)
	rlb_remove_lowest(
		rlb_apply_eval(
			eval,
			attackers_map,
			defenders_map,
			offset
		),
		10
	);

def recruitment_list_builder(eval, attackers_map, defenders_map)
	map(
		rlb_first_step(
			eval,
			attackers_map,
			defenders_map,
			40
		),
		(
			(
				value * 100
			) / 
			sumarize_values(
				rlb_first_step(
					eval,
					attackers_map,
					defenders_map,
					40
				)
			)
		)
	);

		# ========== choose the unit to recruit now ========= #

def unit_chooser(ai*,unit_map) 
	choose(
		keys(unit_map), 'unit_type',
		unit_map[unit_type] - 
		(
			(
				100 * 
				size(
					filter(
						my_units, 
						type = unit_type
					)
				)
			) / 
			size(my_units)
		)
	);

def unit_map_cost_filter(ai*, unit_map)
	filter( unit_map,
		get_unit_type(key).cost < my_side.gold
	);

		# ==========	Main formula section 	========== #

def initialize_weapon_specials_map(ai*)
	if(vars.weapon_specials_init != turn,
		[
			set_var('weapon_specials_init', turn),
			set_var('weapon_specials',
				map(
					weapon_specials_weights(),
					if( key = 'magical',
						units_average_defense(ai, enemy_units, 10),
						if( key = 'marksman',
							units_average_defense(ai, enemy_units, 10) - 10,
							value
						)
					)
				)
			)
		],
		[]
	);

def create_recruits_map(ai*)
	if(vars.recruits_map_creator != turn,
		[
			set_var('recruits_map_creator', turn ),
			set_var('recruits_map',
				debug_print('final unit evaluation: ', recruitment_list_builder(
					debug_print('current AI evaluation (0-100): ', eval(ai)),
					debug_print('attackers evaluation: ',evaluate_attackers(ai)),
					debug_print('defenders evaluation: ',evaluate_defenders(ai))
				))
			)
		],
		[]
	);

def castle_space(ai*)
	filter( map( castle_locs( my_leader.loc ), 'location', if( unit_at( location ), 1, 0 ) ), self = 0  ).size;

if(vars.turn_initialized = turn,
		if( my_leader.loc = nearest_keep( my_leader.loc ),
			if( 
				get_unit_type(
					choose(
						vars.recruits_map,
						-get_unit_type(key).cost
					).key
				).cost <
				my_side.gold,
				if( castle_space(self),
					recruit(debug_print(
						unit_chooser(
							self,
							unit_map_cost_filter(
								self,
								vars.recruits_map
							)
						)
					)),
					fallback()
				),
				fallback() 
			),
			if( my_leader.movement_left > 0,
				move( my_leader.loc, nearest_keep( my_leader.loc ) ),
				fallback()
			)
		),
	[set_var(debug_print('turn_initialized'), turn)] +
	initialize_weapon_specials_map(self) +
	create_recruits_map(self)
)

faiend
"
				[/team_formula]
			[/ai]
		[/multiplayer_side]
		[multiplayer_side]
			flag_rgb="magenta"
			id="Rebels"
			image="units/elves-wood/captain.png"
			leader="Elvish Captain,Elvish Hero,Elvish Ranger,Elvish Marksman,Elvish Druid,Elvish Sorceress,White Mage,Red Mage,Elder Wose"
			name=_ "Rebels"
			random_leader="Elvish Captain,Elvish Hero,Elvish Ranger,Elvish Marksman,Elvish Druid,Elvish Sorceress,Red Mage"
			recruit="Elvish Fighter,Elvish Archer,Mage,Elvish Shaman,Elvish Scout,Wose,Merman Hunter"
			terrain_liked="Ff, Fa, Ss, Ww"
			type="Elvish Captain"
			[ai]
				recruitment_pattern="fighter,fighter,archer,archer,mixed fighter,healer,scout"
				[team_formula]
					rulebase="fai 'recruitment.fai'
		# ===== Some general functions used later ==== #

def sumarize_values( input_map )
	sum(
		values(input_map)
	);

def lowest_value( input_map )
	choose( input_map, -value ).value;

def highest_value( input_map )
	choose( input_map, value ).value;

def change_numbers_to_percents( input_map )
	map( input_map, 
		(value*100) / highest_value(input_map) 
	);

def add_number_to_values( input_map, number )
	map( input_map, 
		value + number 
	);

#make sure we have only positive values in a map #

def make_positive_only( input_map )
	if( lowest_value( input_map ) < 0, 
		add_number_to_values( 
			input_map, 
			abs(lowest_value(input_map))
		), 
		input_map 
	);

def sumarize_maps_values( map_A, map_B )
	map( map_A + map_B, 
		value + map_A[key]
	);

		#===== Evaluation how good unit is on a map ===== #

# ==1==  evaluate average defense #
#gives map where key is id of terrain, and value is number of hexes of that terrain on a gamemap#

def locations_map(ai*) 
	tomap( 
		map( 
			map.terrain, 
			id 
		) 
	);

#filters terrain map, min_percent it minimal % of map that terrain has to occupy to be considered in later evaluations# 

def filtered_locations_map(ai*, min_percent)
	filter( 
		locations_map(ai) , 
		value >  (map.w * map.h) / ( 100 / min_percent ) 
	);

#returns average defense of the unit #

def unit_average_defense(ai*, unit, terrain_min_percent )
	sum( 
		values( 
			map(
				filtered_locations_map(ai,terrain_min_percent), 
				defense_on( 
					unit, 
					find(map.terrain,id=key).loc
				) *
				value
			) 
		) 
	) / 
	sum(
		values(
			filtered_locations_map(
				ai,
				terrain_min_percent
			)
		)
	);

#returns map of units from units_list and their average defense (more -> better) #

def map_units_average_defense(ai*, units_list, terrain_min_percent) 
	tomap(
		map( 
			units_list, 
			id 
		), 
		map( 
			units_list, 'unit', 
			unit_average_defense(
				ai, 
				unit, 
				terrain_min_percent 
			) 
		) 
	);

def units_average_defense(ai*, units_list, terrain_min_percent)
	sum(
		map( 
			units_list, 'unit', 
			unit_average_defense(
				ai, 
				unit, 
				terrain_min_percent 
			) 
		) 
	) /
	size(
		units_list
	);


# ==2== TODO: evaluate unit effectivness based on movement points and movement cost#


		#===== Evaluation of game state - how good is ai doing ===== #

# ==1== based on unit cost and current amount of gold #
# returns number between 0 and 100 where: 0 we are losing, 100 we are winning #

def units_cost_gold_eval(ai*)
	min(
		[
			(
				(
					sum(
						map(
							allies, 'team', 
							sum(
								map(
									units_of_side[team], 
									cost
								)
							) + 
							teams[team].gold 
						)
					) * 
					100
				) / 
				sum(
					map(
						enemies, 'team', 
						sum(
							map(
								units_of_side[team], 
								cost
							)
						) + 
						max(
							[teams[team].gold, 0]
						) 
					)
				)
			) / 2,
			100
		]
	);

# ==2== based on village possession #

def count_allied_villages(ai*)
	sum(
		map(
			allies, 'side', 
			size(
				villages_of_side[side]
			)
		)
	);

def count_enemy_villages(ai*)
	sum(
		map(
			enemies, 'side', 
			size(
				villages_of_side[side]
			)
		)
	);

# multipled by 1000 to increase precision #

def village_evaluation(ai*)
	(
		50000 + 
		(
			count_allied_villages(ai) - 
			count_enemy_villages(ai)
		) * 
		(
			50000 /
			size(
				villages
			)
		)
	) /
	1000;

# ==3== combined 2 of the above #

def eval(ai*)
	( 
		units_cost_gold_eval(ai) + 
		village_evaluation(ai)
	) / 
	2;

		#===== Evaluation how effective my units are against the enemy ===== #

#==1==  basic evaluation #

# evaluate how much damage unit can inflict - how much damage unit can get#

def evaluate_attacker_against_opponents(ai*, unit, enemy_units)
	sum( 
		map( 
			enemy_units, 'enemy_unit', 
			sum(
				map(
					[
						max_possible_damage_with_retaliation( unit, enemy_unit )
					],
					max(
						[
							self[0] - self[2],
							self[1] - self[3]
						]
					)
				) 
			)
		)
	);

def evaluate_defender_against_opponents(ai*, unit, enemy_units)
	-sum( 
		map( 
			enemy_units, 'enemy_unit', 
			sum(
				map(
					[
						max_possible_damage_with_retaliation( enemy_unit, unit )
					],
					max(
						[
							self[0] - self[2],
							self[1] - self[3]
						]
					)
				)
			)
		)
	);

def units_hp_map(ai*, units)
	tomap( 
		map(
			units, 
			id
		), 
		map( 
			units, 
			hitpoints
		)
	);

#in case side's gold is more than 50, add units that side can recruit to the side's unit list#

def create_side_unit_list(ai*, side)
	if( 
		teams[side].gold > 50, 
		recruits_of_side[side], 
		[]
	) + 
	units_of_side[side];

def evaluate_my_recruits_as_attackers(ai*)
	tomap( 
		map(
			my_recruits, 
			id
		), 
		map(
			my_recruits, 'my_unit',
			sum(
				map(
					enemies, 'enemy_side',
					evaluate_attacker_against_opponents(
						ai,
						my_unit,
						create_side_unit_list(
							ai, 
							enemy_side
						)
					)
				)
			)
		)
	);

def evaluate_my_recruits_as_defenders(ai*)
	tomap(
		map(
			my_recruits, 
			id
		),
		map( 
			my_recruits, 'my_unit',
			sum(
				map(
					enemies, 'enemy_side',
					evaluate_defender_against_opponents(
						ai,
						my_unit,
						create_side_unit_list(
							ai,
							enemy_side
						)
					)
				)
			)
		)
	);


# === 2 ===  now consider abilities and weapon specials  #

def abilities_weights()
	['skirmisher' -> 15, 'ambush' -> 10, 'nightstalk' -> 20, 'regenerates' -> 20, 'healing' -> 15, 'curing' -> 10, 'leadership' -> 20, 'illumination' -> 15, 'teleport' -> 10, 'steadfast' -> 15 ];

def weapon_specials_weights()
	[ 'backstab' -> 20 ,'slow' -> 10 ,'berserk' -> 20 ,'stones' -> 60 ,'plague' -> 10 ,'marksman' -> 30 ,'magical' -> 40 ,'charge' -> 30 ,'drains' -> 30,  'firststrike' -> 10, 'poison' -> 25 ];

def apply_abilities_weights( units_map )
	map( 
		units_map, 
		value +
		(
			value * 
			max(
				map(
					get_unit_type( key ).abilities, 'ability',
					abilities_weights()[ability]
				)
			)
		) / 100
	);

def apply_weapon_specials_weights( units_map )
	map(
		units_map, 
		value +
		(
			value *
			max(
				map(
					get_unit_type( key ).attacks, 'attack',
					vars.weapon_specials[attack.special]
				)
			)
		) / 100
	);

# since undead units don't get random traits and are balanced with that, we need to lower their evaluation a bit to match fairly the living units #

def undead_malus( units_map )
	map( 
		units_map, 
		if(
			get_unit_type(key).undead,
			( value * 90 ) / 100,
			value 
		)
	);

# === 3 ===  pit 1 and 2 together  #

def evaluate_attackers(ai*)
	change_numbers_to_percents(
		apply_abilities_weights(
			apply_weapon_specials_weights(
				undead_malus( 
					make_positive_only(
						evaluate_my_recruits_as_attackers( ai )	
					)
				)
			)
		)
	);

def evaluate_defenders(ai*)
	map(
		map(
			change_numbers_to_percents(
				apply_abilities_weights(
					apply_weapon_specials_weights(
						undead_malus( 
							make_positive_only(
								evaluate_my_recruits_as_defenders( ai )	
							)
						)
					)
				)
			),
			value / 3
		), 
		value +
		map(
			change_numbers_to_percents(
				units_hp_map(
					ai,
					my_recruits
				)
			),
		value * 2 / 3
		)[key]
	);

	#=========== we have evaluation of game state and units, time to combine them: ==========#
		#=========	recruitment_list_builder	=========#

def rlb_apply_eval(eval, attackers_map, defenders_map, offset)
	map(
		sumarize_maps_values(
			map(
				attackers_map, 
				value * (eval+offset)
			),
			map(
				defenders_map,
				value * ( (100 - eval) - offset )
			)
		),
		value / 100
	);

def rlb_remove_lowest( input_map, percent)
	filter(
		input_map, 
		value > 
		(
			(
				percent * sumarize_values(input_map)
			) / 100
		)
	);

def rlb_first_step(eval, attackers_map, defenders_map, offset)
	rlb_remove_lowest(
		rlb_apply_eval(
			eval,
			attackers_map,
			defenders_map,
			offset
		),
		10
	);

def recruitment_list_builder(eval, attackers_map, defenders_map)
	map(
		rlb_first_step(
			eval,
			attackers_map,
			defenders_map,
			40
		),
		(
			(
				value * 100
			) / 
			sumarize_values(
				rlb_first_step(
					eval,
					attackers_map,
					defenders_map,
					40
				)
			)
		)
	);

		# ========== choose the unit to recruit now ========= #

def unit_chooser(ai*,unit_map) 
	choose(
		keys(unit_map), 'unit_type',
		unit_map[unit_type] - 
		(
			(
				100 * 
				size(
					filter(
						my_units, 
						type = unit_type
					)
				)
			) / 
			size(my_units)
		)
	);

def unit_map_cost_filter(ai*, unit_map)
	filter( unit_map,
		get_unit_type(key).cost < my_side.gold
	);

		# ==========	Main formula section 	========== #

def initialize_weapon_specials_map(ai*)
	if(vars.weapon_specials_init != turn,
		[
			set_var('weapon_specials_init', turn),
			set_var('weapon_specials',
				map(
					weapon_specials_weights(),
					if( key = 'magical',
						units_average_defense(ai, enemy_units, 10),
						if( key = 'marksman',
							units_average_defense(ai, enemy_units, 10) - 10,
							value
						)
					)
				)
			)
		],
		[]
	);

def create_recruits_map(ai*)
	if(vars.recruits_map_creator != turn,
		[
			set_var('recruits_map_creator', turn ),
			set_var('recruits_map',
				debug_print('final unit evaluation: ', recruitment_list_builder(
					debug_print('current AI evaluation (0-100): ', eval(ai)),
					debug_print('attackers evaluation: ',evaluate_attackers(ai)),
					debug_print('defenders evaluation: ',evaluate_defenders(ai))
				))
			)
		],
		[]
	);

def castle_space(ai*)
	filter( map( castle_locs( my_leader.loc ), 'location', if( unit_at( location ), 1, 0 ) ), self = 0  ).size;

if(vars.turn_initialized = turn,
		if( my_leader.loc = nearest_keep( my_leader.loc ),
			if( 
				get_unit_type(
					choose(
						vars.recruits_map,
						-get_unit_type(key).cost
					).key
				).cost <
				my_side.gold,
				if( castle_space(self),
					recruit(debug_print(
						unit_chooser(
							self,
							unit_map_cost_filter(
								self,
								vars.recruits_map
							)
						)
					)),
					fallback()
				),
				fallback() 
			),
			if( my_leader.movement_left > 0,
				move( my_leader.loc, nearest_keep( my_leader.loc ) ),
				fallback()
			)
		),
	[set_var(debug_print('turn_initialized'), turn)] +
	initialize_weapon_specials_map(self) +
	create_recruits_map(self)
)

faiend
"
				[/team_formula]
			[/ai]
		[/multiplayer_side]
		[multiplayer_side]
			flag_rgb="magenta"
			id="Northerners"
			image="units/orcs/warrior.png"
			leader="Orcish Warrior,Troll,Troll Rocklobber,Orcish Crossbowman,Orcish Slayer"
			name=_ "Northerners"
			recruit="Orcish Grunt,Troll Whelp,Wolf Rider,Orcish Archer,Orcish Assassin,Naga Fighter,Goblin Spearman"
			terrain_liked="Hh, Ha, Mm, Ss"
			type="Orcish Warrior"
			[ai]
				recruitment_pattern="fighter,fighter,fighter,mixed fighter,archer,scout"
				[team_formula]
					rulebase="fai 'recruitment.fai'
		# ===== Some general functions used later ==== #

def sumarize_values( input_map )
	sum(
		values(input_map)
	);

def lowest_value( input_map )
	choose( input_map, -value ).value;

def highest_value( input_map )
	choose( input_map, value ).value;

def change_numbers_to_percents( input_map )
	map( input_map, 
		(value*100) / highest_value(input_map) 
	);

def add_number_to_values( input_map, number )
	map( input_map, 
		value + number 
	);

#make sure we have only positive values in a map #

def make_positive_only( input_map )
	if( lowest_value( input_map ) < 0, 
		add_number_to_values( 
			input_map, 
			abs(lowest_value(input_map))
		), 
		input_map 
	);

def sumarize_maps_values( map_A, map_B )
	map( map_A + map_B, 
		value + map_A[key]
	);

		#===== Evaluation how good unit is on a map ===== #

# ==1==  evaluate average defense #
#gives map where key is id of terrain, and value is number of hexes of that terrain on a gamemap#

def locations_map(ai*) 
	tomap( 
		map( 
			map.terrain, 
			id 
		) 
	);

#filters terrain map, min_percent it minimal % of map that terrain has to occupy to be considered in later evaluations# 

def filtered_locations_map(ai*, min_percent)
	filter( 
		locations_map(ai) , 
		value >  (map.w * map.h) / ( 100 / min_percent ) 
	);

#returns average defense of the unit #

def unit_average_defense(ai*, unit, terrain_min_percent )
	sum( 
		values( 
			map(
				filtered_locations_map(ai,terrain_min_percent), 
				defense_on( 
					unit, 
					find(map.terrain,id=key).loc
				) *
				value
			) 
		) 
	) / 
	sum(
		values(
			filtered_locations_map(
				ai,
				terrain_min_percent
			)
		)
	);

#returns map of units from units_list and their average defense (more -> better) #

def map_units_average_defense(ai*, units_list, terrain_min_percent) 
	tomap(
		map( 
			units_list, 
			id 
		), 
		map( 
			units_list, 'unit', 
			unit_average_defense(
				ai, 
				unit, 
				terrain_min_percent 
			) 
		) 
	);

def units_average_defense(ai*, units_list, terrain_min_percent)
	sum(
		map( 
			units_list, 'unit', 
			unit_average_defense(
				ai, 
				unit, 
				terrain_min_percent 
			) 
		) 
	) /
	size(
		units_list
	);


# ==2== TODO: evaluate unit effectivness based on movement points and movement cost#


		#===== Evaluation of game state - how good is ai doing ===== #

# ==1== based on unit cost and current amount of gold #
# returns number between 0 and 100 where: 0 we are losing, 100 we are winning #

def units_cost_gold_eval(ai*)
	min(
		[
			(
				(
					sum(
						map(
							allies, 'team', 
							sum(
								map(
									units_of_side[team], 
									cost
								)
							) + 
							teams[team].gold 
						)
					) * 
					100
				) / 
				sum(
					map(
						enemies, 'team', 
						sum(
							map(
								units_of_side[team], 
								cost
							)
						) + 
						max(
							[teams[team].gold, 0]
						) 
					)
				)
			) / 2,
			100
		]
	);

# ==2== based on village possession #

def count_allied_villages(ai*)
	sum(
		map(
			allies, 'side', 
			size(
				villages_of_side[side]
			)
		)
	);

def count_enemy_villages(ai*)
	sum(
		map(
			enemies, 'side', 
			size(
				villages_of_side[side]
			)
		)
	);

# multipled by 1000 to increase precision #

def village_evaluation(ai*)
	(
		50000 + 
		(
			count_allied_villages(ai) - 
			count_enemy_villages(ai)
		) * 
		(
			50000 /
			size(
				villages
			)
		)
	) /
	1000;

# ==3== combined 2 of the above #

def eval(ai*)
	( 
		units_cost_gold_eval(ai) + 
		village_evaluation(ai)
	) / 
	2;

		#===== Evaluation how effective my units are against the enemy ===== #

#==1==  basic evaluation #

# evaluate how much damage unit can inflict - how much damage unit can get#

def evaluate_attacker_against_opponents(ai*, unit, enemy_units)
	sum( 
		map( 
			enemy_units, 'enemy_unit', 
			sum(
				map(
					[
						max_possible_damage_with_retaliation( unit, enemy_unit )
					],
					max(
						[
							self[0] - self[2],
							self[1] - self[3]
						]
					)
				) 
			)
		)
	);

def evaluate_defender_against_opponents(ai*, unit, enemy_units)
	-sum( 
		map( 
			enemy_units, 'enemy_unit', 
			sum(
				map(
					[
						max_possible_damage_with_retaliation( enemy_unit, unit )
					],
					max(
						[
							self[0] - self[2],
							self[1] - self[3]
						]
					)
				)
			)
		)
	);

def units_hp_map(ai*, units)
	tomap( 
		map(
			units, 
			id
		), 
		map( 
			units, 
			hitpoints
		)
	);

#in case side's gold is more than 50, add units that side can recruit to the side's unit list#

def create_side_unit_list(ai*, side)
	if( 
		teams[side].gold > 50, 
		recruits_of_side[side], 
		[]
	) + 
	units_of_side[side];

def evaluate_my_recruits_as_attackers(ai*)
	tomap( 
		map(
			my_recruits, 
			id
		), 
		map(
			my_recruits, 'my_unit',
			sum(
				map(
					enemies, 'enemy_side',
					evaluate_attacker_against_opponents(
						ai,
						my_unit,
						create_side_unit_list(
							ai, 
							enemy_side
						)
					)
				)
			)
		)
	);

def evaluate_my_recruits_as_defenders(ai*)
	tomap(
		map(
			my_recruits, 
			id
		),
		map( 
			my_recruits, 'my_unit',
			sum(
				map(
					enemies, 'enemy_side',
					evaluate_defender_against_opponents(
						ai,
						my_unit,
						create_side_unit_list(
							ai,
							enemy_side
						)
					)
				)
			)
		)
	);


# === 2 ===  now consider abilities and weapon specials  #

def abilities_weights()
	['skirmisher' -> 15, 'ambush' -> 10, 'nightstalk' -> 20, 'regenerates' -> 20, 'healing' -> 15, 'curing' -> 10, 'leadership' -> 20, 'illumination' -> 15, 'teleport' -> 10, 'steadfast' -> 15 ];

def weapon_specials_weights()
	[ 'backstab' -> 20 ,'slow' -> 10 ,'berserk' -> 20 ,'stones' -> 60 ,'plague' -> 10 ,'marksman' -> 30 ,'magical' -> 40 ,'charge' -> 30 ,'drains' -> 30,  'firststrike' -> 10, 'poison' -> 25 ];

def apply_abilities_weights( units_map )
	map( 
		units_map, 
		value +
		(
			value * 
			max(
				map(
					get_unit_type( key ).abilities, 'ability',
					abilities_weights()[ability]
				)
			)
		) / 100
	);

def apply_weapon_specials_weights( units_map )
	map(
		units_map, 
		value +
		(
			value *
			max(
				map(
					get_unit_type( key ).attacks, 'attack',
					vars.weapon_specials[attack.special]
				)
			)
		) / 100
	);

# since undead units don't get random traits and are balanced with that, we need to lower their evaluation a bit to match fairly the living units #

def undead_malus( units_map )
	map( 
		units_map, 
		if(
			get_unit_type(key).undead,
			( value * 90 ) / 100,
			value 
		)
	);

# === 3 ===  pit 1 and 2 together  #

def evaluate_attackers(ai*)
	change_numbers_to_percents(
		apply_abilities_weights(
			apply_weapon_specials_weights(
				undead_malus( 
					make_positive_only(
						evaluate_my_recruits_as_attackers( ai )	
					)
				)
			)
		)
	);

def evaluate_defenders(ai*)
	map(
		map(
			change_numbers_to_percents(
				apply_abilities_weights(
					apply_weapon_specials_weights(
						undead_malus( 
							make_positive_only(
								evaluate_my_recruits_as_defenders( ai )	
							)
						)
					)
				)
			),
			value / 3
		), 
		value +
		map(
			change_numbers_to_percents(
				units_hp_map(
					ai,
					my_recruits
				)
			),
		value * 2 / 3
		)[key]
	);

	#=========== we have evaluation of game state and units, time to combine them: ==========#
		#=========	recruitment_list_builder	=========#

def rlb_apply_eval(eval, attackers_map, defenders_map, offset)
	map(
		sumarize_maps_values(
			map(
				attackers_map, 
				value * (eval+offset)
			),
			map(
				defenders_map,
				value * ( (100 - eval) - offset )
			)
		),
		value / 100
	);

def rlb_remove_lowest( input_map, percent)
	filter(
		input_map, 
		value > 
		(
			(
				percent * sumarize_values(input_map)
			) / 100
		)
	);

def rlb_first_step(eval, attackers_map, defenders_map, offset)
	rlb_remove_lowest(
		rlb_apply_eval(
			eval,
			attackers_map,
			defenders_map,
			offset
		),
		10
	);

def recruitment_list_builder(eval, attackers_map, defenders_map)
	map(
		rlb_first_step(
			eval,
			attackers_map,
			defenders_map,
			40
		),
		(
			(
				value * 100
			) / 
			sumarize_values(
				rlb_first_step(
					eval,
					attackers_map,
					defenders_map,
					40
				)
			)
		)
	);

		# ========== choose the unit to recruit now ========= #

def unit_chooser(ai*,unit_map) 
	choose(
		keys(unit_map), 'unit_type',
		unit_map[unit_type] - 
		(
			(
				100 * 
				size(
					filter(
						my_units, 
						type = unit_type
					)
				)
			) / 
			size(my_units)
		)
	);

def unit_map_cost_filter(ai*, unit_map)
	filter( unit_map,
		get_unit_type(key).cost < my_side.gold
	);

		# ==========	Main formula section 	========== #

def initialize_weapon_specials_map(ai*)
	if(vars.weapon_specials_init != turn,
		[
			set_var('weapon_specials_init', turn),
			set_var('weapon_specials',
				map(
					weapon_specials_weights(),
					if( key = 'magical',
						units_average_defense(ai, enemy_units, 10),
						if( key = 'marksman',
							units_average_defense(ai, enemy_units, 10) - 10,
							value
						)
					)
				)
			)
		],
		[]
	);

def create_recruits_map(ai*)
	if(vars.recruits_map_creator != turn,
		[
			set_var('recruits_map_creator', turn ),
			set_var('recruits_map',
				debug_print('final unit evaluation: ', recruitment_list_builder(
					debug_print('current AI evaluation (0-100): ', eval(ai)),
					debug_print('attackers evaluation: ',evaluate_attackers(ai)),
					debug_print('defenders evaluation: ',evaluate_defenders(ai))
				))
			)
		],
		[]
	);

def castle_space(ai*)
	filter( map( castle_locs( my_leader.loc ), 'location', if( unit_at( location ), 1, 0 ) ), self = 0  ).size;

if(vars.turn_initialized = turn,
		if( my_leader.loc = nearest_keep( my_leader.loc ),
			if( 
				get_unit_type(
					choose(
						vars.recruits_map,
						-get_unit_type(key).cost
					).key
				).cost <
				my_side.gold,
				if( castle_space(self),
					recruit(debug_print(
						unit_chooser(
							self,
							unit_map_cost_filter(
								self,
								vars.recruits_map
							)
						)
					)),
					fallback()
				),
				fallback() 
			),
			if( my_leader.movement_left > 0,
				move( my_leader.loc, nearest_keep( my_leader.loc ) ),
				fallback()
			)
		),
	[set_var(debug_print('turn_initialized'), turn)] +
	initialize_weapon_specials_map(self) +
	create_recruits_map(self)
)

faiend
"
				[/team_formula]
			[/ai]
		[/multiplayer_side]
		[multiplayer_side]
			flag_rgb="magenta"
			id="Undead"
			image="units/undead-necromancers/dark-sorcerer.png"
			leader="Dark Sorcerer,Revenant,Deathblade,Bone Shooter,Necrophage"
			name=_ "Undead"
			random_leader="Dark Sorcerer,Revenant,Deathblade,Bone Shooter"
			recruit="Skeleton,Skeleton Archer,Walking Corpse,Ghost,Vampire Bat,Dark Adept,Ghoul"
			terrain_liked="Ss, Hh, Ha, Ww"
			type="Dark Sorcerer"
			[ai]
				recruitment_pattern="fighter,fighter,archer,fighter,scout,archer"
				[team_formula]
					rulebase="fai 'recruitment.fai'
		# ===== Some general functions used later ==== #

def sumarize_values( input_map )
	sum(
		values(input_map)
	);

def lowest_value( input_map )
	choose( input_map, -value ).value;

def highest_value( input_map )
	choose( input_map, value ).value;

def change_numbers_to_percents( input_map )
	map( input_map, 
		(value*100) / highest_value(input_map) 
	);

def add_number_to_values( input_map, number )
	map( input_map, 
		value + number 
	);

#make sure we have only positive values in a map #

def make_positive_only( input_map )
	if( lowest_value( input_map ) < 0, 
		add_number_to_values( 
			input_map, 
			abs(lowest_value(input_map))
		), 
		input_map 
	);

def sumarize_maps_values( map_A, map_B )
	map( map_A + map_B, 
		value + map_A[key]
	);

		#===== Evaluation how good unit is on a map ===== #

# ==1==  evaluate average defense #
#gives map where key is id of terrain, and value is number of hexes of that terrain on a gamemap#

def locations_map(ai*) 
	tomap( 
		map( 
			map.terrain, 
			id 
		) 
	);

#filters terrain map, min_percent it minimal % of map that terrain has to occupy to be considered in later evaluations# 

def filtered_locations_map(ai*, min_percent)
	filter( 
		locations_map(ai) , 
		value >  (map.w * map.h) / ( 100 / min_percent ) 
	);

#returns average defense of the unit #

def unit_average_defense(ai*, unit, terrain_min_percent )
	sum( 
		values( 
			map(
				filtered_locations_map(ai,terrain_min_percent), 
				defense_on( 
					unit, 
					find(map.terrain,id=key).loc
				) *
				value
			) 
		) 
	) / 
	sum(
		values(
			filtered_locations_map(
				ai,
				terrain_min_percent
			)
		)
	);

#returns map of units from units_list and their average defense (more -> better) #

def map_units_average_defense(ai*, units_list, terrain_min_percent) 
	tomap(
		map( 
			units_list, 
			id 
		), 
		map( 
			units_list, 'unit', 
			unit_average_defense(
				ai, 
				unit, 
				terrain_min_percent 
			) 
		) 
	);

def units_average_defense(ai*, units_list, terrain_min_percent)
	sum(
		map( 
			units_list, 'unit', 
			unit_average_defense(
				ai, 
				unit, 
				terrain_min_percent 
			) 
		) 
	) /
	size(
		units_list
	);


# ==2== TODO: evaluate unit effectivness based on movement points and movement cost#


		#===== Evaluation of game state - how good is ai doing ===== #

# ==1== based on unit cost and current amount of gold #
# returns number between 0 and 100 where: 0 we are losing, 100 we are winning #

def units_cost_gold_eval(ai*)
	min(
		[
			(
				(
					sum(
						map(
							allies, 'team', 
							sum(
								map(
									units_of_side[team], 
									cost
								)
							) + 
							teams[team].gold 
						)
					) * 
					100
				) / 
				sum(
					map(
						enemies, 'team', 
						sum(
							map(
								units_of_side[team], 
								cost
							)
						) + 
						max(
							[teams[team].gold, 0]
						) 
					)
				)
			) / 2,
			100
		]
	);

# ==2== based on village possession #

def count_allied_villages(ai*)
	sum(
		map(
			allies, 'side', 
			size(
				villages_of_side[side]
			)
		)
	);

def count_enemy_villages(ai*)
	sum(
		map(
			enemies, 'side', 
			size(
				villages_of_side[side]
			)
		)
	);

# multipled by 1000 to increase precision #

def village_evaluation(ai*)
	(
		50000 + 
		(
			count_allied_villages(ai) - 
			count_enemy_villages(ai)
		) * 
		(
			50000 /
			size(
				villages
			)
		)
	) /
	1000;

# ==3== combined 2 of the above #

def eval(ai*)
	( 
		units_cost_gold_eval(ai) + 
		village_evaluation(ai)
	) / 
	2;

		#===== Evaluation how effective my units are against the enemy ===== #

#==1==  basic evaluation #

# evaluate how much damage unit can inflict - how much damage unit can get#

def evaluate_attacker_against_opponents(ai*, unit, enemy_units)
	sum( 
		map( 
			enemy_units, 'enemy_unit', 
			sum(
				map(
					[
						max_possible_damage_with_retaliation( unit, enemy_unit )
					],
					max(
						[
							self[0] - self[2],
							self[1] - self[3]
						]
					)
				) 
			)
		)
	);

def evaluate_defender_against_opponents(ai*, unit, enemy_units)
	-sum( 
		map( 
			enemy_units, 'enemy_unit', 
			sum(
				map(
					[
						max_possible_damage_with_retaliation( enemy_unit, unit )
					],
					max(
						[
							self[0] - self[2],
							self[1] - self[3]
						]
					)
				)
			)
		)
	);

def units_hp_map(ai*, units)
	tomap( 
		map(
			units, 
			id
		), 
		map( 
			units, 
			hitpoints
		)
	);

#in case side's gold is more than 50, add units that side can recruit to the side's unit list#

def create_side_unit_list(ai*, side)
	if( 
		teams[side].gold > 50, 
		recruits_of_side[side], 
		[]
	) + 
	units_of_side[side];

def evaluate_my_recruits_as_attackers(ai*)
	tomap( 
		map(
			my_recruits, 
			id
		), 
		map(
			my_recruits, 'my_unit',
			sum(
				map(
					enemies, 'enemy_side',
					evaluate_attacker_against_opponents(
						ai,
						my_unit,
						create_side_unit_list(
							ai, 
							enemy_side
						)
					)
				)
			)
		)
	);

def evaluate_my_recruits_as_defenders(ai*)
	tomap(
		map(
			my_recruits, 
			id
		),
		map( 
			my_recruits, 'my_unit',
			sum(
				map(
					enemies, 'enemy_side',
					evaluate_defender_against_opponents(
						ai,
						my_unit,
						create_side_unit_list(
							ai,
							enemy_side
						)
					)
				)
			)
		)
	);


# === 2 ===  now consider abilities and weapon specials  #

def abilities_weights()
	['skirmisher' -> 15, 'ambush' -> 10, 'nightstalk' -> 20, 'regenerates' -> 20, 'healing' -> 15, 'curing' -> 10, 'leadership' -> 20, 'illumination' -> 15, 'teleport' -> 10, 'steadfast' -> 15 ];

def weapon_specials_weights()
	[ 'backstab' -> 20 ,'slow' -> 10 ,'berserk' -> 20 ,'stones' -> 60 ,'plague' -> 10 ,'marksman' -> 30 ,'magical' -> 40 ,'charge' -> 30 ,'drains' -> 30,  'firststrike' -> 10, 'poison' -> 25 ];

def apply_abilities_weights( units_map )
	map( 
		units_map, 
		value +
		(
			value * 
			max(
				map(
					get_unit_type( key ).abilities, 'ability',
					abilities_weights()[ability]
				)
			)
		) / 100
	);

def apply_weapon_specials_weights( units_map )
	map(
		units_map, 
		value +
		(
			value *
			max(
				map(
					get_unit_type( key ).attacks, 'attack',
					vars.weapon_specials[attack.special]
				)
			)
		) / 100
	);

# since undead units don't get random traits and are balanced with that, we need to lower their evaluation a bit to match fairly the living units #

def undead_malus( units_map )
	map( 
		units_map, 
		if(
			get_unit_type(key).undead,
			( value * 90 ) / 100,
			value 
		)
	);

# === 3 ===  pit 1 and 2 together  #

def evaluate_attackers(ai*)
	change_numbers_to_percents(
		apply_abilities_weights(
			apply_weapon_specials_weights(
				undead_malus( 
					make_positive_only(
						evaluate_my_recruits_as_attackers( ai )	
					)
				)
			)
		)
	);

def evaluate_defenders(ai*)
	map(
		map(
			change_numbers_to_percents(
				apply_abilities_weights(
					apply_weapon_specials_weights(
						undead_malus( 
							make_positive_only(
								evaluate_my_recruits_as_defenders( ai )	
							)
						)
					)
				)
			),
			value / 3
		), 
		value +
		map(
			change_numbers_to_percents(
				units_hp_map(
					ai,
					my_recruits
				)
			),
		value * 2 / 3
		)[key]
	);

	#=========== we have evaluation of game state and units, time to combine them: ==========#
		#=========	recruitment_list_builder	=========#

def rlb_apply_eval(eval, attackers_map, defenders_map, offset)
	map(
		sumarize_maps_values(
			map(
				attackers_map, 
				value * (eval+offset)
			),
			map(
				defenders_map,
				value * ( (100 - eval) - offset )
			)
		),
		value / 100
	);

def rlb_remove_lowest( input_map, percent)
	filter(
		input_map, 
		value > 
		(
			(
				percent * sumarize_values(input_map)
			) / 100
		)
	);

def rlb_first_step(eval, attackers_map, defenders_map, offset)
	rlb_remove_lowest(
		rlb_apply_eval(
			eval,
			attackers_map,
			defenders_map,
			offset
		),
		10
	);

def recruitment_list_builder(eval, attackers_map, defenders_map)
	map(
		rlb_first_step(
			eval,
			attackers_map,
			defenders_map,
			40
		),
		(
			(
				value * 100
			) / 
			sumarize_values(
				rlb_first_step(
					eval,
					attackers_map,
					defenders_map,
					40
				)
			)
		)
	);

		# ========== choose the unit to recruit now ========= #

def unit_chooser(ai*,unit_map) 
	choose(
		keys(unit_map), 'unit_type',
		unit_map[unit_type] - 
		(
			(
				100 * 
				size(
					filter(
						my_units, 
						type = unit_type
					)
				)
			) / 
			size(my_units)
		)
	);

def unit_map_cost_filter(ai*, unit_map)
	filter( unit_map,
		get_unit_type(key).cost < my_side.gold
	);

		# ==========	Main formula section 	========== #

def initialize_weapon_specials_map(ai*)
	if(vars.weapon_specials_init != turn,
		[
			set_var('weapon_specials_init', turn),
			set_var('weapon_specials',
				map(
					weapon_specials_weights(),
					if( key = 'magical',
						units_average_defense(ai, enemy_units, 10),
						if( key = 'marksman',
							units_average_defense(ai, enemy_units, 10) - 10,
							value
						)
					)
				)
			)
		],
		[]
	);

def create_recruits_map(ai*)
	if(vars.recruits_map_creator != turn,
		[
			set_var('recruits_map_creator', turn ),
			set_var('recruits_map',
				debug_print('final unit evaluation: ', recruitment_list_builder(
					debug_print('current AI evaluation (0-100): ', eval(ai)),
					debug_print('attackers evaluation: ',evaluate_attackers(ai)),
					debug_print('defenders evaluation: ',evaluate_defenders(ai))
				))
			)
		],
		[]
	);

def castle_space(ai*)
	filter( map( castle_locs( my_leader.loc ), 'location', if( unit_at( location ), 1, 0 ) ), self = 0  ).size;

if(vars.turn_initialized = turn,
		if( my_leader.loc = nearest_keep( my_leader.loc ),
			if( 
				get_unit_type(
					choose(
						vars.recruits_map,
						-get_unit_type(key).cost
					).key
				).cost <
				my_side.gold,
				if( castle_space(self),
					recruit(debug_print(
						unit_chooser(
							self,
							unit_map_cost_filter(
								self,
								vars.recruits_map
							)
						)
					)),
					fallback()
				),
				fallback() 
			),
			if( my_leader.movement_left > 0,
				move( my_leader.loc, nearest_keep( my_leader.loc ) ),
				fallback()
			)
		),
	[set_var(debug_print('turn_initialized'), turn)] +
	initialize_weapon_specials_map(self) +
	create_recruits_map(self)
)

faiend
"
				[/team_formula]
			[/ai]
		[/multiplayer_side]
		[multiplayer_side]
			flag_rgb="magenta"
			id="Knalgan Alliance"
			image="units/dwarves/steelclad.png"
			leader="Dwarvish Steelclad,Dwarvish Thunderguard,Dwarvish Stalwart,Rogue,Trapper"
			name=_ "Knalgan Alliance"
			random_leader="Dwarvish Steelclad,Dwarvish Thunderguard,Rogue,Trapper"
			recruit="Dwarvish Guardsman,Dwarvish Fighter,Dwarvish Ulfserker,Dwarvish Thunderer,Thief,Poacher,Footpad,Gryphon Rider"
			terrain_liked="Hh, Ha, Mm"
			type="Dwarvish Steelclad"
			[ai]
				recruitment_pattern="fighter,fighter,fighter,mixed fighter,archer,scout"
				[team_formula]
					rulebase="fai 'recruitment.fai'
		# ===== Some general functions used later ==== #

def sumarize_values( input_map )
	sum(
		values(input_map)
	);

def lowest_value( input_map )
	choose( input_map, -value ).value;

def highest_value( input_map )
	choose( input_map, value ).value;

def change_numbers_to_percents( input_map )
	map( input_map, 
		(value*100) / highest_value(input_map) 
	);

def add_number_to_values( input_map, number )
	map( input_map, 
		value + number 
	);

#make sure we have only positive values in a map #

def make_positive_only( input_map )
	if( lowest_value( input_map ) < 0, 
		add_number_to_values( 
			input_map, 
			abs(lowest_value(input_map))
		), 
		input_map 
	);

def sumarize_maps_values( map_A, map_B )
	map( map_A + map_B, 
		value + map_A[key]
	);

		#===== Evaluation how good unit is on a map ===== #

# ==1==  evaluate average defense #
#gives map where key is id of terrain, and value is number of hexes of that terrain on a gamemap#

def locations_map(ai*) 
	tomap( 
		map( 
			map.terrain, 
			id 
		) 
	);

#filters terrain map, min_percent it minimal % of map that terrain has to occupy to be considered in later evaluations# 

def filtered_locations_map(ai*, min_percent)
	filter( 
		locations_map(ai) , 
		value >  (map.w * map.h) / ( 100 / min_percent ) 
	);

#returns average defense of the unit #

def unit_average_defense(ai*, unit, terrain_min_percent )
	sum( 
		values( 
			map(
				filtered_locations_map(ai,terrain_min_percent), 
				defense_on( 
					unit, 
					find(map.terrain,id=key).loc
				) *
				value
			) 
		) 
	) / 
	sum(
		values(
			filtered_locations_map(
				ai,
				terrain_min_percent
			)
		)
	);

#returns map of units from units_list and their average defense (more -> better) #

def map_units_average_defense(ai*, units_list, terrain_min_percent) 
	tomap(
		map( 
			units_list, 
			id 
		), 
		map( 
			units_list, 'unit', 
			unit_average_defense(
				ai, 
				unit, 
				terrain_min_percent 
			) 
		) 
	);

def units_average_defense(ai*, units_list, terrain_min_percent)
	sum(
		map( 
			units_list, 'unit', 
			unit_average_defense(
				ai, 
				unit, 
				terrain_min_percent 
			) 
		) 
	) /
	size(
		units_list
	);


# ==2== TODO: evaluate unit effectivness based on movement points and movement cost#


		#===== Evaluation of game state - how good is ai doing ===== #

# ==1== based on unit cost and current amount of gold #
# returns number between 0 and 100 where: 0 we are losing, 100 we are winning #

def units_cost_gold_eval(ai*)
	min(
		[
			(
				(
					sum(
						map(
							allies, 'team', 
							sum(
								map(
									units_of_side[team], 
									cost
								)
							) + 
							teams[team].gold 
						)
					) * 
					100
				) / 
				sum(
					map(
						enemies, 'team', 
						sum(
							map(
								units_of_side[team], 
								cost
							)
						) + 
						max(
							[teams[team].gold, 0]
						) 
					)
				)
			) / 2,
			100
		]
	);

# ==2== based on village possession #

def count_allied_villages(ai*)
	sum(
		map(
			allies, 'side', 
			size(
				villages_of_side[side]
			)
		)
	);

def count_enemy_villages(ai*)
	sum(
		map(
			enemies, 'side', 
			size(
				villages_of_side[side]
			)
		)
	);

# multipled by 1000 to increase precision #

def village_evaluation(ai*)
	(
		50000 + 
		(
			count_allied_villages(ai) - 
			count_enemy_villages(ai)
		) * 
		(
			50000 /
			size(
				villages
			)
		)
	) /
	1000;

# ==3== combined 2 of the above #

def eval(ai*)
	( 
		units_cost_gold_eval(ai) + 
		village_evaluation(ai)
	) / 
	2;

		#===== Evaluation how effective my units are against the enemy ===== #

#==1==  basic evaluation #

# evaluate how much damage unit can inflict - how much damage unit can get#

def evaluate_attacker_against_opponents(ai*, unit, enemy_units)
	sum( 
		map( 
			enemy_units, 'enemy_unit', 
			sum(
				map(
					[
						max_possible_damage_with_retaliation( unit, enemy_unit )
					],
					max(
						[
							self[0] - self[2],
							self[1] - self[3]
						]
					)
				) 
			)
		)
	);

def evaluate_defender_against_opponents(ai*, unit, enemy_units)
	-sum( 
		map( 
			enemy_units, 'enemy_unit', 
			sum(
				map(
					[
						max_possible_damage_with_retaliation( enemy_unit, unit )
					],
					max(
						[
							self[0] - self[2],
							self[1] - self[3]
						]
					)
				)
			)
		)
	);

def units_hp_map(ai*, units)
	tomap( 
		map(
			units, 
			id
		), 
		map( 
			units, 
			hitpoints
		)
	);

#in case side's gold is more than 50, add units that side can recruit to the side's unit list#

def create_side_unit_list(ai*, side)
	if( 
		teams[side].gold > 50, 
		recruits_of_side[side], 
		[]
	) + 
	units_of_side[side];

def evaluate_my_recruits_as_attackers(ai*)
	tomap( 
		map(
			my_recruits, 
			id
		), 
		map(
			my_recruits, 'my_unit',
			sum(
				map(
					enemies, 'enemy_side',
					evaluate_attacker_against_opponents(
						ai,
						my_unit,
						create_side_unit_list(
							ai, 
							enemy_side
						)
					)
				)
			)
		)
	);

def evaluate_my_recruits_as_defenders(ai*)
	tomap(
		map(
			my_recruits, 
			id
		),
		map( 
			my_recruits, 'my_unit',
			sum(
				map(
					enemies, 'enemy_side',
					evaluate_defender_against_opponents(
						ai,
						my_unit,
						create_side_unit_list(
							ai,
							enemy_side
						)
					)
				)
			)
		)
	);


# === 2 ===  now consider abilities and weapon specials  #

def abilities_weights()
	['skirmisher' -> 15, 'ambush' -> 10, 'nightstalk' -> 20, 'regenerates' -> 20, 'healing' -> 15, 'curing' -> 10, 'leadership' -> 20, 'illumination' -> 15, 'teleport' -> 10, 'steadfast' -> 15 ];

def weapon_specials_weights()
	[ 'backstab' -> 20 ,'slow' -> 10 ,'berserk' -> 20 ,'stones' -> 60 ,'plague' -> 10 ,'marksman' -> 30 ,'magical' -> 40 ,'charge' -> 30 ,'drains' -> 30,  'firststrike' -> 10, 'poison' -> 25 ];

def apply_abilities_weights( units_map )
	map( 
		units_map, 
		value +
		(
			value * 
			max(
				map(
					get_unit_type( key ).abilities, 'ability',
					abilities_weights()[ability]
				)
			)
		) / 100
	);

def apply_weapon_specials_weights( units_map )
	map(
		units_map, 
		value +
		(
			value *
			max(
				map(
					get_unit_type( key ).attacks, 'attack',
					vars.weapon_specials[attack.special]
				)
			)
		) / 100
	);

# since undead units don't get random traits and are balanced with that, we need to lower their evaluation a bit to match fairly the living units #

def undead_malus( units_map )
	map( 
		units_map, 
		if(
			get_unit_type(key).undead,
			( value * 90 ) / 100,
			value 
		)
	);

# === 3 ===  pit 1 and 2 together  #

def evaluate_attackers(ai*)
	change_numbers_to_percents(
		apply_abilities_weights(
			apply_weapon_specials_weights(
				undead_malus( 
					make_positive_only(
						evaluate_my_recruits_as_attackers( ai )	
					)
				)
			)
		)
	);

def evaluate_defenders(ai*)
	map(
		map(
			change_numbers_to_percents(
				apply_abilities_weights(
					apply_weapon_specials_weights(
						undead_malus( 
							make_positive_only(
								evaluate_my_recruits_as_defenders( ai )	
							)
						)
					)
				)
			),
			value / 3
		), 
		value +
		map(
			change_numbers_to_percents(
				units_hp_map(
					ai,
					my_recruits
				)
			),
		value * 2 / 3
		)[key]
	);

	#=========== we have evaluation of game state and units, time to combine them: ==========#
		#=========	recruitment_list_builder	=========#

def rlb_apply_eval(eval, attackers_map, defenders_map, offset)
	map(
		sumarize_maps_values(
			map(
				attackers_map, 
				value * (eval+offset)
			),
			map(
				defenders_map,
				value * ( (100 - eval) - offset )
			)
		),
		value / 100
	);

def rlb_remove_lowest( input_map, percent)
	filter(
		input_map, 
		value > 
		(
			(
				percent * sumarize_values(input_map)
			) / 100
		)
	);

def rlb_first_step(eval, attackers_map, defenders_map, offset)
	rlb_remove_lowest(
		rlb_apply_eval(
			eval,
			attackers_map,
			defenders_map,
			offset
		),
		10
	);

def recruitment_list_builder(eval, attackers_map, defenders_map)
	map(
		rlb_first_step(
			eval,
			attackers_map,
			defenders_map,
			40
		),
		(
			(
				value * 100
			) / 
			sumarize_values(
				rlb_first_step(
					eval,
					attackers_map,
					defenders_map,
					40
				)
			)
		)
	);

		# ========== choose the unit to recruit now ========= #

def unit_chooser(ai*,unit_map) 
	choose(
		keys(unit_map), 'unit_type',
		unit_map[unit_type] - 
		(
			(
				100 * 
				size(
					filter(
						my_units, 
						type = unit_type
					)
				)
			) / 
			size(my_units)
		)
	);

def unit_map_cost_filter(ai*, unit_map)
	filter( unit_map,
		get_unit_type(key).cost < my_side.gold
	);

		# ==========	Main formula section 	========== #

def initialize_weapon_specials_map(ai*)
	if(vars.weapon_specials_init != turn,
		[
			set_var('weapon_specials_init', turn),
			set_var('weapon_specials',
				map(
					weapon_specials_weights(),
					if( key = 'magical',
						units_average_defense(ai, enemy_units, 10),
						if( key = 'marksman',
							units_average_defense(ai, enemy_units, 10) - 10,
							value
						)
					)
				)
			)
		],
		[]
	);

def create_recruits_map(ai*)
	if(vars.recruits_map_creator != turn,
		[
			set_var('recruits_map_creator', turn ),
			set_var('recruits_map',
				debug_print('final unit evaluation: ', recruitment_list_builder(
					debug_print('current AI evaluation (0-100): ', eval(ai)),
					debug_print('attackers evaluation: ',evaluate_attackers(ai)),
					debug_print('defenders evaluation: ',evaluate_defenders(ai))
				))
			)
		],
		[]
	);

def castle_space(ai*)
	filter( map( castle_locs( my_leader.loc ), 'location', if( unit_at( location ), 1, 0 ) ), self = 0  ).size;

if(vars.turn_initialized = turn,
		if( my_leader.loc = nearest_keep( my_leader.loc ),
			if( 
				get_unit_type(
					choose(
						vars.recruits_map,
						-get_unit_type(key).cost
					).key
				).cost <
				my_side.gold,
				if( castle_space(self),
					recruit(debug_print(
						unit_chooser(
							self,
							unit_map_cost_filter(
								self,
								vars.recruits_map
							)
						)
					)),
					fallback()
				),
				fallback() 
			),
			if( my_leader.movement_left > 0,
				move( my_leader.loc, nearest_keep( my_leader.loc ) ),
				fallback()
			)
		),
	[set_var(debug_print('turn_initialized'), turn)] +
	initialize_weapon_specials_map(self) +
	create_recruits_map(self)
)

faiend
"
				[/team_formula]
			[/ai]
		[/multiplayer_side]
		[multiplayer_side]
			flag_rgb="magenta"
			id="Drakes"
			image="units/drakes/flare.png"
			leader="Drake Flare,Fire Drake,Drake Slasher,Drake Gladiator,Drake Warrior,Saurian Oracle,Saurian Soothsayer"
			name=_ "Drakes"
			random_leader="Drake Flare,Fire Drake,Drake Slasher,Drake Gladiator,Drake Warrior"
			recruit="Drake Burner,Drake Clasher,Drake Glider,Drake Fighter,Saurian Skirmisher,Saurian Augur"
			terrain_liked="Hh, Ha, Ds, Ss"
			type="Drake Flare"
			[ai]
				recruitment_pattern="fighter,fighter,archer,healer,scout,scout"
				[team_formula]
					rulebase="fai 'recruitment.fai'
		# ===== Some general functions used later ==== #

def sumarize_values( input_map )
	sum(
		values(input_map)
	);

def lowest_value( input_map )
	choose( input_map, -value ).value;

def highest_value( input_map )
	choose( input_map, value ).value;

def change_numbers_to_percents( input_map )
	map( input_map, 
		(value*100) / highest_value(input_map) 
	);

def add_number_to_values( input_map, number )
	map( input_map, 
		value + number 
	);

#make sure we have only positive values in a map #

def make_positive_only( input_map )
	if( lowest_value( input_map ) < 0, 
		add_number_to_values( 
			input_map, 
			abs(lowest_value(input_map))
		), 
		input_map 
	);

def sumarize_maps_values( map_A, map_B )
	map( map_A + map_B, 
		value + map_A[key]
	);

		#===== Evaluation how good unit is on a map ===== #

# ==1==  evaluate average defense #
#gives map where key is id of terrain, and value is number of hexes of that terrain on a gamemap#

def locations_map(ai*) 
	tomap( 
		map( 
			map.terrain, 
			id 
		) 
	);

#filters terrain map, min_percent it minimal % of map that terrain has to occupy to be considered in later evaluations# 

def filtered_locations_map(ai*, min_percent)
	filter( 
		locations_map(ai) , 
		value >  (map.w * map.h) / ( 100 / min_percent ) 
	);

#returns average defense of the unit #

def unit_average_defense(ai*, unit, terrain_min_percent )
	sum( 
		values( 
			map(
				filtered_locations_map(ai,terrain_min_percent), 
				defense_on( 
					unit, 
					find(map.terrain,id=key).loc
				) *
				value
			) 
		) 
	) / 
	sum(
		values(
			filtered_locations_map(
				ai,
				terrain_min_percent
			)
		)
	);

#returns map of units from units_list and their average defense (more -> better) #

def map_units_average_defense(ai*, units_list, terrain_min_percent) 
	tomap(
		map( 
			units_list, 
			id 
		), 
		map( 
			units_list, 'unit', 
			unit_average_defense(
				ai, 
				unit, 
				terrain_min_percent 
			) 
		) 
	);

def units_average_defense(ai*, units_list, terrain_min_percent)
	sum(
		map( 
			units_list, 'unit', 
			unit_average_defense(
				ai, 
				unit, 
				terrain_min_percent 
			) 
		) 
	) /
	size(
		units_list
	);


# ==2== TODO: evaluate unit effectivness based on movement points and movement cost#


		#===== Evaluation of game state - how good is ai doing ===== #

# ==1== based on unit cost and current amount of gold #
# returns number between 0 and 100 where: 0 we are losing, 100 we are winning #

def units_cost_gold_eval(ai*)
	min(
		[
			(
				(
					sum(
						map(
							allies, 'team', 
							sum(
								map(
									units_of_side[team], 
									cost
								)
							) + 
							teams[team].gold 
						)
					) * 
					100
				) / 
				sum(
					map(
						enemies, 'team', 
						sum(
							map(
								units_of_side[team], 
								cost
							)
						) + 
						max(
							[teams[team].gold, 0]
						) 
					)
				)
			) / 2,
			100
		]
	);

# ==2== based on village possession #

def count_allied_villages(ai*)
	sum(
		map(
			allies, 'side', 
			size(
				villages_of_side[side]
			)
		)
	);

def count_enemy_villages(ai*)
	sum(
		map(
			enemies, 'side', 
			size(
				villages_of_side[side]
			)
		)
	);

# multipled by 1000 to increase precision #

def village_evaluation(ai*)
	(
		50000 + 
		(
			count_allied_villages(ai) - 
			count_enemy_villages(ai)
		) * 
		(
			50000 /
			size(
				villages
			)
		)
	) /
	1000;

# ==3== combined 2 of the above #

def eval(ai*)
	( 
		units_cost_gold_eval(ai) + 
		village_evaluation(ai)
	) / 
	2;

		#===== Evaluation how effective my units are against the enemy ===== #

#==1==  basic evaluation #

# evaluate how much damage unit can inflict - how much damage unit can get#

def evaluate_attacker_against_opponents(ai*, unit, enemy_units)
	sum( 
		map( 
			enemy_units, 'enemy_unit', 
			sum(
				map(
					[
						max_possible_damage_with_retaliation( unit, enemy_unit )
					],
					max(
						[
							self[0] - self[2],
							self[1] - self[3]
						]
					)
				) 
			)
		)
	);

def evaluate_defender_against_opponents(ai*, unit, enemy_units)
	-sum( 
		map( 
			enemy_units, 'enemy_unit', 
			sum(
				map(
					[
						max_possible_damage_with_retaliation( enemy_unit, unit )
					],
					max(
						[
							self[0] - self[2],
							self[1] - self[3]
						]
					)
				)
			)
		)
	);

def units_hp_map(ai*, units)
	tomap( 
		map(
			units, 
			id
		), 
		map( 
			units, 
			hitpoints
		)
	);

#in case side's gold is more than 50, add units that side can recruit to the side's unit list#

def create_side_unit_list(ai*, side)
	if( 
		teams[side].gold > 50, 
		recruits_of_side[side], 
		[]
	) + 
	units_of_side[side];

def evaluate_my_recruits_as_attackers(ai*)
	tomap( 
		map(
			my_recruits, 
			id
		), 
		map(
			my_recruits, 'my_unit',
			sum(
				map(
					enemies, 'enemy_side',
					evaluate_attacker_against_opponents(
						ai,
						my_unit,
						create_side_unit_list(
							ai, 
							enemy_side
						)
					)
				)
			)
		)
	);

def evaluate_my_recruits_as_defenders(ai*)
	tomap(
		map(
			my_recruits, 
			id
		),
		map( 
			my_recruits, 'my_unit',
			sum(
				map(
					enemies, 'enemy_side',
					evaluate_defender_against_opponents(
						ai,
						my_unit,
						create_side_unit_list(
							ai,
							enemy_side
						)
					)
				)
			)
		)
	);


# === 2 ===  now consider abilities and weapon specials  #

def abilities_weights()
	['skirmisher' -> 15, 'ambush' -> 10, 'nightstalk' -> 20, 'regenerates' -> 20, 'healing' -> 15, 'curing' -> 10, 'leadership' -> 20, 'illumination' -> 15, 'teleport' -> 10, 'steadfast' -> 15 ];

def weapon_specials_weights()
	[ 'backstab' -> 20 ,'slow' -> 10 ,'berserk' -> 20 ,'stones' -> 60 ,'plague' -> 10 ,'marksman' -> 30 ,'magical' -> 40 ,'charge' -> 30 ,'drains' -> 30,  'firststrike' -> 10, 'poison' -> 25 ];

def apply_abilities_weights( units_map )
	map( 
		units_map, 
		value +
		(
			value * 
			max(
				map(
					get_unit_type( key ).abilities, 'ability',
					abilities_weights()[ability]
				)
			)
		) / 100
	);

def apply_weapon_specials_weights( units_map )
	map(
		units_map, 
		value +
		(
			value *
			max(
				map(
					get_unit_type( key ).attacks, 'attack',
					vars.weapon_specials[attack.special]
				)
			)
		) / 100
	);

# since undead units don't get random traits and are balanced with that, we need to lower their evaluation a bit to match fairly the living units #

def undead_malus( units_map )
	map( 
		units_map, 
		if(
			get_unit_type(key).undead,
			( value * 90 ) / 100,
			value 
		)
	);

# === 3 ===  pit 1 and 2 together  #

def evaluate_attackers(ai*)
	change_numbers_to_percents(
		apply_abilities_weights(
			apply_weapon_specials_weights(
				undead_malus( 
					make_positive_only(
						evaluate_my_recruits_as_attackers( ai )	
					)
				)
			)
		)
	);

def evaluate_defenders(ai*)
	map(
		map(
			change_numbers_to_percents(
				apply_abilities_weights(
					apply_weapon_specials_weights(
						undead_malus( 
							make_positive_only(
								evaluate_my_recruits_as_defenders( ai )	
							)
						)
					)
				)
			),
			value / 3
		), 
		value +
		map(
			change_numbers_to_percents(
				units_hp_map(
					ai,
					my_recruits
				)
			),
		value * 2 / 3
		)[key]
	);

	#=========== we have evaluation of game state and units, time to combine them: ==========#
		#=========	recruitment_list_builder	=========#

def rlb_apply_eval(eval, attackers_map, defenders_map, offset)
	map(
		sumarize_maps_values(
			map(
				attackers_map, 
				value * (eval+offset)
			),
			map(
				defenders_map,
				value * ( (100 - eval) - offset )
			)
		),
		value / 100
	);

def rlb_remove_lowest( input_map, percent)
	filter(
		input_map, 
		value > 
		(
			(
				percent * sumarize_values(input_map)
			) / 100
		)
	);

def rlb_first_step(eval, attackers_map, defenders_map, offset)
	rlb_remove_lowest(
		rlb_apply_eval(
			eval,
			attackers_map,
			defenders_map,
			offset
		),
		10
	);

def recruitment_list_builder(eval, attackers_map, defenders_map)
	map(
		rlb_first_step(
			eval,
			attackers_map,
			defenders_map,
			40
		),
		(
			(
				value * 100
			) / 
			sumarize_values(
				rlb_first_step(
					eval,
					attackers_map,
					defenders_map,
					40
				)
			)
		)
	);

		# ========== choose the unit to recruit now ========= #

def unit_chooser(ai*,unit_map) 
	choose(
		keys(unit_map), 'unit_type',
		unit_map[unit_type] - 
		(
			(
				100 * 
				size(
					filter(
						my_units, 
						type = unit_type
					)
				)
			) / 
			size(my_units)
		)
	);

def unit_map_cost_filter(ai*, unit_map)
	filter( unit_map,
		get_unit_type(key).cost < my_side.gold
	);

		# ==========	Main formula section 	========== #

def initialize_weapon_specials_map(ai*)
	if(vars.weapon_specials_init != turn,
		[
			set_var('weapon_specials_init', turn),
			set_var('weapon_specials',
				map(
					weapon_specials_weights(),
					if( key = 'magical',
						units_average_defense(ai, enemy_units, 10),
						if( key = 'marksman',
							units_average_defense(ai, enemy_units, 10) - 10,
							value
						)
					)
				)
			)
		],
		[]
	);

def create_recruits_map(ai*)
	if(vars.recruits_map_creator != turn,
		[
			set_var('recruits_map_creator', turn ),
			set_var('recruits_map',
				debug_print('final unit evaluation: ', recruitment_list_builder(
					debug_print('current AI evaluation (0-100): ', eval(ai)),
					debug_print('attackers evaluation: ',evaluate_attackers(ai)),
					debug_print('defenders evaluation: ',evaluate_defenders(ai))
				))
			)
		],
		[]
	);

def castle_space(ai*)
	filter( map( castle_locs( my_leader.loc ), 'location', if( unit_at( location ), 1, 0 ) ), self = 0  ).size;

if(vars.turn_initialized = turn,
		if( my_leader.loc = nearest_keep( my_leader.loc ),
			if( 
				get_unit_type(
					choose(
						vars.recruits_map,
						-get_unit_type(key).cost
					).key
				).cost <
				my_side.gold,
				if( castle_space(self),
					recruit(debug_print(
						unit_chooser(
							self,
							unit_map_cost_filter(
								self,
								vars.recruits_map
							)
						)
					)),
					fallback()
				),
				fallback() 
			),
			if( my_leader.movement_left > 0,
				move( my_leader.loc, nearest_keep( my_leader.loc ) ),
				fallback()
			)
		),
	[set_var(debug_print('turn_initialized'), turn)] +
	initialize_weapon_specials_map(self) +
	create_recruits_map(self)
)

faiend
"
				[/team_formula]
			[/ai]
		[/multiplayer_side]
		[event]
			name="prestart"
			[store_unit]
				kill="yes"
				variable="leaders_to_make_quick"
				[filter]
					canrecruit="yes"
					[filter_wml]
						max_moves="4"
					[/filter_wml]
				[/filter]
			[/store_unit]
			[set_variable]
				name="i"
				value="0"
			[/set_variable]
			[while]
				[variable]
					less_than="$leaders_to_make_quick.length"
					name="i"
				[/variable]
				[do]
					[set_variables]
						mode="merge"
						name="leaders_to_make_quick[$i].modifications"
						[literal]
							[trait]
#textdomain wesnoth
								female_name=_ "female^quick"
								id="quick"
								male_name=_ "quick"
								[effect]
									apply_to="movement"
									increase="1"
								[/effect]
								[effect]
									apply_to="hitpoints"
									increase_total="-5%"
								[/effect]
							[/trait]
						[/literal]
					[/set_variables]
					[clear_variable]
						name="leaders_to_make_quick[$i].max_moves,leaders_to_make_quick[$i].moves,leaders_to_make_quick[$i].max_hitpoints,leaders_to_make_quick[$i].hitpoints"
					[/clear_variable]
					[unstore_unit]
						variable="leaders_to_make_quick[$i]"
					[/unstore_unit]
					[set_variable]
						add="1"
						name="i"
					[/set_variable]
				[/do]
			[/while]
			[clear_variable]
				name="i"
			[/clear_variable]
			[clear_variable]
				name="leaders_to_make_quick"
			[/clear_variable]
		[/event]
	[/era]
	[side]
		allow_changes="yes"
		allow_player="yes"
		canrecruit="yes"
		colour="3"
		controller="human"
		current_player="The_kungfu_boy"
		flag_rgb="magenta"
		fog="yes"
		gender="male"
		gold="100"
		id="The_kungfu_boy1"
		image="units/undead-necromancers/dark-sorcerer.png"
		income="0"
		leader="Dark Sorcerer,Revenant,Deathblade,Bone Shooter,Necrophage"
		mp_countdown="yes"
		mp_countdown_action_bonus="20"
		mp_countdown_init_time="270"
		mp_countdown_reservoir_time="270"
		mp_countdown_turn_bonus="200"
		name="The_kungfu_boy"
		random_leader="Dark Sorcerer,Revenant,Deathblade,Bone Shooter"
		recruit="Skeleton,Skeleton Archer,Walking Corpse,Ghost,Vampire Bat,Dark Adept,Ghoul"
		save_id="The_kungfu_boy1"
		share_maps="no"
		share_view="yes"
		shroud="no"
		side="1"
		team_name="north"
		terrain_liked="Ss, Hh, Ha, Ww"
		type="Dark Sorcerer"
		user_team_name="wesnoth-multiplayerteamname^North"
		village_gold="2"
		[ai]
			recruitment_pattern="fighter,fighter,archer,fighter,scout,archer"
			villages_per_scout="8"
			[team_formula]
				rulebase="fai 'recruitment.fai'
		# ===== Some general functions used later ==== #

def sumarize_values( input_map )
	sum(
		values(input_map)
	);

def lowest_value( input_map )
	choose( input_map, -value ).value;

def highest_value( input_map )
	choose( input_map, value ).value;

def change_numbers_to_percents( input_map )
	map( input_map, 
		(value*100) / highest_value(input_map) 
	);

def add_number_to_values( input_map, number )
	map( input_map, 
		value + number 
	);

#make sure we have only positive values in a map #

def make_positive_only( input_map )
	if( lowest_value( input_map ) < 0, 
		add_number_to_values( 
			input_map, 
			abs(lowest_value(input_map))
		), 
		input_map 
	);

def sumarize_maps_values( map_A, map_B )
	map( map_A + map_B, 
		value + map_A[key]
	);

		#===== Evaluation how good unit is on a map ===== #

# ==1==  evaluate average defense #
#gives map where key is id of terrain, and value is number of hexes of that terrain on a gamemap#

def locations_map(ai*) 
	tomap( 
		map( 
			map.terrain, 
			id 
		) 
	);

#filters terrain map, min_percent it minimal % of map that terrain has to occupy to be considered in later evaluations# 

def filtered_locations_map(ai*, min_percent)
	filter( 
		locations_map(ai) , 
		value >  (map.w * map.h) / ( 100 / min_percent ) 
	);

#returns average defense of the unit #

def unit_average_defense(ai*, unit, terrain_min_percent )
	sum( 
		values( 
			map(
				filtered_locations_map(ai,terrain_min_percent), 
				defense_on( 
					unit, 
					find(map.terrain,id=key).loc
				) *
				value
			) 
		) 
	) / 
	sum(
		values(
			filtered_locations_map(
				ai,
				terrain_min_percent
			)
		)
	);

#returns map of units from units_list and their average defense (more -> better) #

def map_units_average_defense(ai*, units_list, terrain_min_percent) 
	tomap(
		map( 
			units_list, 
			id 
		), 
		map( 
			units_list, 'unit', 
			unit_average_defense(
				ai, 
				unit, 
				terrain_min_percent 
			) 
		) 
	);

def units_average_defense(ai*, units_list, terrain_min_percent)
	sum(
		map( 
			units_list, 'unit', 
			unit_average_defense(
				ai, 
				unit, 
				terrain_min_percent 
			) 
		) 
	) /
	size(
		units_list
	);


# ==2== TODO: evaluate unit effectivness based on movement points and movement cost#


		#===== Evaluation of game state - how good is ai doing ===== #

# ==1== based on unit cost and current amount of gold #
# returns number between 0 and 100 where: 0 we are losing, 100 we are winning #

def units_cost_gold_eval(ai*)
	min(
		[
			(
				(
					sum(
						map(
							allies, 'team', 
							sum(
								map(
									units_of_side[team], 
									cost
								)
							) + 
							teams[team].gold 
						)
					) * 
					100
				) / 
				sum(
					map(
						enemies, 'team', 
						sum(
							map(
								units_of_side[team], 
								cost
							)
						) + 
						max(
							[teams[team].gold, 0]
						) 
					)
				)
			) / 2,
			100
		]
	);

# ==2== based on village possession #

def count_allied_villages(ai*)
	sum(
		map(
			allies, 'side', 
			size(
				villages_of_side[side]
			)
		)
	);

def count_enemy_villages(ai*)
	sum(
		map(
			enemies, 'side', 
			size(
				villages_of_side[side]
			)
		)
	);

# multipled by 1000 to increase precision #

def village_evaluation(ai*)
	(
		50000 + 
		(
			count_allied_villages(ai) - 
			count_enemy_villages(ai)
		) * 
		(
			50000 /
			size(
				villages
			)
		)
	) /
	1000;

# ==3== combined 2 of the above #

def eval(ai*)
	( 
		units_cost_gold_eval(ai) + 
		village_evaluation(ai)
	) / 
	2;

		#===== Evaluation how effective my units are against the enemy ===== #

#==1==  basic evaluation #

# evaluate how much damage unit can inflict - how much damage unit can get#

def evaluate_attacker_against_opponents(ai*, unit, enemy_units)
	sum( 
		map( 
			enemy_units, 'enemy_unit', 
			sum(
				map(
					[
						max_possible_damage_with_retaliation( unit, enemy_unit )
					],
					max(
						[
							self[0] - self[2],
							self[1] - self[3]
						]
					)
				) 
			)
		)
	);

def evaluate_defender_against_opponents(ai*, unit, enemy_units)
	-sum( 
		map( 
			enemy_units, 'enemy_unit', 
			sum(
				map(
					[
						max_possible_damage_with_retaliation( enemy_unit, unit )
					],
					max(
						[
							self[0] - self[2],
							self[1] - self[3]
						]
					)
				)
			)
		)
	);

def units_hp_map(ai*, units)
	tomap( 
		map(
			units, 
			id
		), 
		map( 
			units, 
			hitpoints
		)
	);

#in case side's gold is more than 50, add units that side can recruit to the side's unit list#

def create_side_unit_list(ai*, side)
	if( 
		teams[side].gold > 50, 
		recruits_of_side[side], 
		[]
	) + 
	units_of_side[side];

def evaluate_my_recruits_as_attackers(ai*)
	tomap( 
		map(
			my_recruits, 
			id
		), 
		map(
			my_recruits, 'my_unit',
			sum(
				map(
					enemies, 'enemy_side',
					evaluate_attacker_against_opponents(
						ai,
						my_unit,
						create_side_unit_list(
							ai, 
							enemy_side
						)
					)
				)
			)
		)
	);

def evaluate_my_recruits_as_defenders(ai*)
	tomap(
		map(
			my_recruits, 
			id
		),
		map( 
			my_recruits, 'my_unit',
			sum(
				map(
					enemies, 'enemy_side',
					evaluate_defender_against_opponents(
						ai,
						my_unit,
						create_side_unit_list(
							ai,
							enemy_side
						)
					)
				)
			)
		)
	);


# === 2 ===  now consider abilities and weapon specials  #

def abilities_weights()
	['skirmisher' -> 15, 'ambush' -> 10, 'nightstalk' -> 20, 'regenerates' -> 20, 'healing' -> 15, 'curing' -> 10, 'leadership' -> 20, 'illumination' -> 15, 'teleport' -> 10, 'steadfast' -> 15 ];

def weapon_specials_weights()
	[ 'backstab' -> 20 ,'slow' -> 10 ,'berserk' -> 20 ,'stones' -> 60 ,'plague' -> 10 ,'marksman' -> 30 ,'magical' -> 40 ,'charge' -> 30 ,'drains' -> 30,  'firststrike' -> 10, 'poison' -> 25 ];

def apply_abilities_weights( units_map )
	map( 
		units_map, 
		value +
		(
			value * 
			max(
				map(
					get_unit_type( key ).abilities, 'ability',
					abilities_weights()[ability]
				)
			)
		) / 100
	);

def apply_weapon_specials_weights( units_map )
	map(
		units_map, 
		value +
		(
			value *
			max(
				map(
					get_unit_type( key ).attacks, 'attack',
					vars.weapon_specials[attack.special]
				)
			)
		) / 100
	);

# since undead units don't get random traits and are balanced with that, we need to lower their evaluation a bit to match fairly the living units #

def undead_malus( units_map )
	map( 
		units_map, 
		if(
			get_unit_type(key).undead,
			( value * 90 ) / 100,
			value 
		)
	);

# === 3 ===  pit 1 and 2 together  #

def evaluate_attackers(ai*)
	change_numbers_to_percents(
		apply_abilities_weights(
			apply_weapon_specials_weights(
				undead_malus( 
					make_positive_only(
						evaluate_my_recruits_as_attackers( ai )	
					)
				)
			)
		)
	);

def evaluate_defenders(ai*)
	map(
		map(
			change_numbers_to_percents(
				apply_abilities_weights(
					apply_weapon_specials_weights(
						undead_malus( 
							make_positive_only(
								evaluate_my_recruits_as_defenders( ai )	
							)
						)
					)
				)
			),
			value / 3
		), 
		value +
		map(
			change_numbers_to_percents(
				units_hp_map(
					ai,
					my_recruits
				)
			),
		value * 2 / 3
		)[key]
	);

	#=========== we have evaluation of game state and units, time to combine them: ==========#
		#=========	recruitment_list_builder	=========#

def rlb_apply_eval(eval, attackers_map, defenders_map, offset)
	map(
		sumarize_maps_values(
			map(
				attackers_map, 
				value * (eval+offset)
			),
			map(
				defenders_map,
				value * ( (100 - eval) - offset )
			)
		),
		value / 100
	);

def rlb_remove_lowest( input_map, percent)
	filter(
		input_map, 
		value > 
		(
			(
				percent * sumarize_values(input_map)
			) / 100
		)
	);

def rlb_first_step(eval, attackers_map, defenders_map, offset)
	rlb_remove_lowest(
		rlb_apply_eval(
			eval,
			attackers_map,
			defenders_map,
			offset
		),
		10
	);

def recruitment_list_builder(eval, attackers_map, defenders_map)
	map(
		rlb_first_step(
			eval,
			attackers_map,
			defenders_map,
			40
		),
		(
			(
				value * 100
			) / 
			sumarize_values(
				rlb_first_step(
					eval,
					attackers_map,
					defenders_map,
					40
				)
			)
		)
	);

		# ========== choose the unit to recruit now ========= #

def unit_chooser(ai*,unit_map) 
	choose(
		keys(unit_map), 'unit_type',
		unit_map[unit_type] - 
		(
			(
				100 * 
				size(
					filter(
						my_units, 
						type = unit_type
					)
				)
			) / 
			size(my_units)
		)
	);

def unit_map_cost_filter(ai*, unit_map)
	filter( unit_map,
		get_unit_type(key).cost < my_side.gold
	);

		# ==========	Main formula section 	========== #

def initialize_weapon_specials_map(ai*)
	if(vars.weapon_specials_init != turn,
		[
			set_var('weapon_specials_init', turn),
			set_var('weapon_specials',
				map(
					weapon_specials_weights(),
					if( key = 'magical',
						units_average_defense(ai, enemy_units, 10),
						if( key = 'marksman',
							units_average_defense(ai, enemy_units, 10) - 10,
							value
						)
					)
				)
			)
		],
		[]
	);

def create_recruits_map(ai*)
	if(vars.recruits_map_creator != turn,
		[
			set_var('recruits_map_creator', turn ),
			set_var('recruits_map',
				debug_print('final unit evaluation: ', recruitment_list_builder(
					debug_print('current AI evaluation (0-100): ', eval(ai)),
					debug_print('attackers evaluation: ',evaluate_attackers(ai)),
					debug_print('defenders evaluation: ',evaluate_defenders(ai))
				))
			)
		],
		[]
	);

def castle_space(ai*)
	filter( map( castle_locs( my_leader.loc ), 'location', if( unit_at( location ), 1, 0 ) ), self = 0  ).size;

if(vars.turn_initialized = turn,
		if( my_leader.loc = nearest_keep( my_leader.loc ),
			if( 
				get_unit_type(
					choose(
						vars.recruits_map,
						-get_unit_type(key).cost
					).key
				).cost <
				my_side.gold,
				if( castle_space(self),
					recruit(debug_print(
						unit_chooser(
							self,
							unit_map_cost_filter(
								self,
								vars.recruits_map
							)
						)
					)),
					fallback()
				),
				fallback() 
			),
			if( my_leader.movement_left > 0,
				move( my_leader.loc, nearest_keep( my_leader.loc ) ),
				fallback()
			)
		),
	[set_var(debug_print('turn_initialized'), turn)] +
	initialize_weapon_specials_map(self) +
	create_recruits_map(self)
)

faiend
"
			[/team_formula]
		[/ai]
		[ai]
			villages_per_scout="8"
		[/ai]
	[/side]
	[side]
		allow_changes="yes"
		allow_player="yes"
		canrecruit="yes"
		colour="1"
		controller="network"
		current_player="kamikaze"
		flag_rgb="magenta"
		fog="yes"
		gender="male"
		gold="100"
		id="kamikaze2"
		image="units/orcs/warrior.png"
		income="0"
		leader="Orcish Warrior,Troll,Troll Rocklobber,Orcish Crossbowman,Orcish Slayer"
		mp_countdown="yes"
		mp_countdown_action_bonus="20"
		mp_countdown_init_time="270"
		mp_countdown_reservoir_time="270"
		mp_countdown_turn_bonus="200"
		name="kamikaze"
		recruit="Orcish Grunt,Troll Whelp,Wolf Rider,Orcish Archer,Orcish Assassin,Naga Fighter,Goblin Spearman"
		save_id="kamikaze2"
		share_maps="no"
		share_view="yes"
		shroud="no"
		side="2"
		team_name="south"
		terrain_liked="Hh, Ha, Mm, Ss"
		type="Orcish Crossbowman"
		user_team_name="wesnoth-multiplayerteamname^South"
		village_gold="2"
		[ai]
			recruitment_pattern="fighter,fighter,fighter,mixed fighter,archer,scout"
			villages_per_scout="8"
			[team_formula]
				rulebase="fai 'recruitment.fai'
		# ===== Some general functions used later ==== #

def sumarize_values( input_map )
	sum(
		values(input_map)
	);

def lowest_value( input_map )
	choose( input_map, -value ).value;

def highest_value( input_map )
	choose( input_map, value ).value;

def change_numbers_to_percents( input_map )
	map( input_map, 
		(value*100) / highest_value(input_map) 
	);

def add_number_to_values( input_map, number )
	map( input_map, 
		value + number 
	);

#make sure we have only positive values in a map #

def make_positive_only( input_map )
	if( lowest_value( input_map ) < 0, 
		add_number_to_values( 
			input_map, 
			abs(lowest_value(input_map))
		), 
		input_map 
	);

def sumarize_maps_values( map_A, map_B )
	map( map_A + map_B, 
		value + map_A[key]
	);

		#===== Evaluation how good unit is on a map ===== #

# ==1==  evaluate average defense #
#gives map where key is id of terrain, and value is number of hexes of that terrain on a gamemap#

def locations_map(ai*) 
	tomap( 
		map( 
			map.terrain, 
			id 
		) 
	);

#filters terrain map, min_percent it minimal % of map that terrain has to occupy to be considered in later evaluations# 

def filtered_locations_map(ai*, min_percent)
	filter( 
		locations_map(ai) , 
		value >  (map.w * map.h) / ( 100 / min_percent ) 
	);

#returns average defense of the unit #

def unit_average_defense(ai*, unit, terrain_min_percent )
	sum( 
		values( 
			map(
				filtered_locations_map(ai,terrain_min_percent), 
				defense_on( 
					unit, 
					find(map.terrain,id=key).loc
				) *
				value
			) 
		) 
	) / 
	sum(
		values(
			filtered_locations_map(
				ai,
				terrain_min_percent
			)
		)
	);

#returns map of units from units_list and their average defense (more -> better) #

def map_units_average_defense(ai*, units_list, terrain_min_percent) 
	tomap(
		map( 
			units_list, 
			id 
		), 
		map( 
			units_list, 'unit', 
			unit_average_defense(
				ai, 
				unit, 
				terrain_min_percent 
			) 
		) 
	);

def units_average_defense(ai*, units_list, terrain_min_percent)
	sum(
		map( 
			units_list, 'unit', 
			unit_average_defense(
				ai, 
				unit, 
				terrain_min_percent 
			) 
		) 
	) /
	size(
		units_list
	);


# ==2== TODO: evaluate unit effectivness based on movement points and movement cost#


		#===== Evaluation of game state - how good is ai doing ===== #

# ==1== based on unit cost and current amount of gold #
# returns number between 0 and 100 where: 0 we are losing, 100 we are winning #

def units_cost_gold_eval(ai*)
	min(
		[
			(
				(
					sum(
						map(
							allies, 'team', 
							sum(
								map(
									units_of_side[team], 
									cost
								)
							) + 
							teams[team].gold 
						)
					) * 
					100
				) / 
				sum(
					map(
						enemies, 'team', 
						sum(
							map(
								units_of_side[team], 
								cost
							)
						) + 
						max(
							[teams[team].gold, 0]
						) 
					)
				)
			) / 2,
			100
		]
	);

# ==2== based on village possession #

def count_allied_villages(ai*)
	sum(
		map(
			allies, 'side', 
			size(
				villages_of_side[side]
			)
		)
	);

def count_enemy_villages(ai*)
	sum(
		map(
			enemies, 'side', 
			size(
				villages_of_side[side]
			)
		)
	);

# multipled by 1000 to increase precision #

def village_evaluation(ai*)
	(
		50000 + 
		(
			count_allied_villages(ai) - 
			count_enemy_villages(ai)
		) * 
		(
			50000 /
			size(
				villages
			)
		)
	) /
	1000;

# ==3== combined 2 of the above #

def eval(ai*)
	( 
		units_cost_gold_eval(ai) + 
		village_evaluation(ai)
	) / 
	2;

		#===== Evaluation how effective my units are against the enemy ===== #

#==1==  basic evaluation #

# evaluate how much damage unit can inflict - how much damage unit can get#

def evaluate_attacker_against_opponents(ai*, unit, enemy_units)
	sum( 
		map( 
			enemy_units, 'enemy_unit', 
			sum(
				map(
					[
						max_possible_damage_with_retaliation( unit, enemy_unit )
					],
					max(
						[
							self[0] - self[2],
							self[1] - self[3]
						]
					)
				) 
			)
		)
	);

def evaluate_defender_against_opponents(ai*, unit, enemy_units)
	-sum( 
		map( 
			enemy_units, 'enemy_unit', 
			sum(
				map(
					[
						max_possible_damage_with_retaliation( enemy_unit, unit )
					],
					max(
						[
							self[0] - self[2],
							self[1] - self[3]
						]
					)
				)
			)
		)
	);

def units_hp_map(ai*, units)
	tomap( 
		map(
			units, 
			id
		), 
		map( 
			units, 
			hitpoints
		)
	);

#in case side's gold is more than 50, add units that side can recruit to the side's unit list#

def create_side_unit_list(ai*, side)
	if( 
		teams[side].gold > 50, 
		recruits_of_side[side], 
		[]
	) + 
	units_of_side[side];

def evaluate_my_recruits_as_attackers(ai*)
	tomap( 
		map(
			my_recruits, 
			id
		), 
		map(
			my_recruits, 'my_unit',
			sum(
				map(
					enemies, 'enemy_side',
					evaluate_attacker_against_opponents(
						ai,
						my_unit,
						create_side_unit_list(
							ai, 
							enemy_side
						)
					)
				)
			)
		)
	);

def evaluate_my_recruits_as_defenders(ai*)
	tomap(
		map(
			my_recruits, 
			id
		),
		map( 
			my_recruits, 'my_unit',
			sum(
				map(
					enemies, 'enemy_side',
					evaluate_defender_against_opponents(
						ai,
						my_unit,
						create_side_unit_list(
							ai,
							enemy_side
						)
					)
				)
			)
		)
	);


# === 2 ===  now consider abilities and weapon specials  #

def abilities_weights()
	['skirmisher' -> 15, 'ambush' -> 10, 'nightstalk' -> 20, 'regenerates' -> 20, 'healing' -> 15, 'curing' -> 10, 'leadership' -> 20, 'illumination' -> 15, 'teleport' -> 10, 'steadfast' -> 15 ];

def weapon_specials_weights()
	[ 'backstab' -> 20 ,'slow' -> 10 ,'berserk' -> 20 ,'stones' -> 60 ,'plague' -> 10 ,'marksman' -> 30 ,'magical' -> 40 ,'charge' -> 30 ,'drains' -> 30,  'firststrike' -> 10, 'poison' -> 25 ];

def apply_abilities_weights( units_map )
	map( 
		units_map, 
		value +
		(
			value * 
			max(
				map(
					get_unit_type( key ).abilities, 'ability',
					abilities_weights()[ability]
				)
			)
		) / 100
	);

def apply_weapon_specials_weights( units_map )
	map(
		units_map, 
		value +
		(
			value *
			max(
				map(
					get_unit_type( key ).attacks, 'attack',
					vars.weapon_specials[attack.special]
				)
			)
		) / 100
	);

# since undead units don't get random traits and are balanced with that, we need to lower their evaluation a bit to match fairly the living units #

def undead_malus( units_map )
	map( 
		units_map, 
		if(
			get_unit_type(key).undead,
			( value * 90 ) / 100,
			value 
		)
	);

# === 3 ===  pit 1 and 2 together  #

def evaluate_attackers(ai*)
	change_numbers_to_percents(
		apply_abilities_weights(
			apply_weapon_specials_weights(
				undead_malus( 
					make_positive_only(
						evaluate_my_recruits_as_attackers( ai )	
					)
				)
			)
		)
	);

def evaluate_defenders(ai*)
	map(
		map(
			change_numbers_to_percents(
				apply_abilities_weights(
					apply_weapon_specials_weights(
						undead_malus( 
							make_positive_only(
								evaluate_my_recruits_as_defenders( ai )	
							)
						)
					)
				)
			),
			value / 3
		), 
		value +
		map(
			change_numbers_to_percents(
				units_hp_map(
					ai,
					my_recruits
				)
			),
		value * 2 / 3
		)[key]
	);

	#=========== we have evaluation of game state and units, time to combine them: ==========#
		#=========	recruitment_list_builder	=========#

def rlb_apply_eval(eval, attackers_map, defenders_map, offset)
	map(
		sumarize_maps_values(
			map(
				attackers_map, 
				value * (eval+offset)
			),
			map(
				defenders_map,
				value * ( (100 - eval) - offset )
			)
		),
		value / 100
	);

def rlb_remove_lowest( input_map, percent)
	filter(
		input_map, 
		value > 
		(
			(
				percent * sumarize_values(input_map)
			) / 100
		)
	);

def rlb_first_step(eval, attackers_map, defenders_map, offset)
	rlb_remove_lowest(
		rlb_apply_eval(
			eval,
			attackers_map,
			defenders_map,
			offset
		),
		10
	);

def recruitment_list_builder(eval, attackers_map, defenders_map)
	map(
		rlb_first_step(
			eval,
			attackers_map,
			defenders_map,
			40
		),
		(
			(
				value * 100
			) / 
			sumarize_values(
				rlb_first_step(
					eval,
					attackers_map,
					defenders_map,
					40
				)
			)
		)
	);

		# ========== choose the unit to recruit now ========= #

def unit_chooser(ai*,unit_map) 
	choose(
		keys(unit_map), 'unit_type',
		unit_map[unit_type] - 
		(
			(
				100 * 
				size(
					filter(
						my_units, 
						type = unit_type
					)
				)
			) / 
			size(my_units)
		)
	);

def unit_map_cost_filter(ai*, unit_map)
	filter( unit_map,
		get_unit_type(key).cost < my_side.gold
	);

		# ==========	Main formula section 	========== #

def initialize_weapon_specials_map(ai*)
	if(vars.weapon_specials_init != turn,
		[
			set_var('weapon_specials_init', turn),
			set_var('weapon_specials',
				map(
					weapon_specials_weights(),
					if( key = 'magical',
						units_average_defense(ai, enemy_units, 10),
						if( key = 'marksman',
							units_average_defense(ai, enemy_units, 10) - 10,
							value
						)
					)
				)
			)
		],
		[]
	);

def create_recruits_map(ai*)
	if(vars.recruits_map_creator != turn,
		[
			set_var('recruits_map_creator', turn ),
			set_var('recruits_map',
				debug_print('final unit evaluation: ', recruitment_list_builder(
					debug_print('current AI evaluation (0-100): ', eval(ai)),
					debug_print('attackers evaluation: ',evaluate_attackers(ai)),
					debug_print('defenders evaluation: ',evaluate_defenders(ai))
				))
			)
		],
		[]
	);

def castle_space(ai*)
	filter( map( castle_locs( my_leader.loc ), 'location', if( unit_at( location ), 1, 0 ) ), self = 0  ).size;

if(vars.turn_initialized = turn,
		if( my_leader.loc = nearest_keep( my_leader.loc ),
			if( 
				get_unit_type(
					choose(
						vars.recruits_map,
						-get_unit_type(key).cost
					).key
				).cost <
				my_side.gold,
				if( castle_space(self),
					recruit(debug_print(
						unit_chooser(
							self,
							unit_map_cost_filter(
								self,
								vars.recruits_map
							)
						)
					)),
					fallback()
				),
				fallback() 
			),
			if( my_leader.movement_left > 0,
				move( my_leader.loc, nearest_keep( my_leader.loc ) ),
				fallback()
			)
		),
	[set_var(debug_print('turn_initialized'), turn)] +
	initialize_weapon_specials_map(self) +
	create_recruits_map(self)
)

faiend
"
			[/team_formula]
		[/ai]
		[ai]
			villages_per_scout="8"
		[/ai]
	[/side]
[/replay_start]
[statistics]
	mid_scenario="yes"
	[scenario]
		scenario="2p - Hamlets"
		[team]
			[recruits]
				Dark Adept="5"
				Ghost="1"
				Ghoul="3"
				Skeleton="2"
				Vampire Bat="1"
				Walking Corpse="6"
			[/recruits]
			[recalls]
			[/recalls]
			[advances]
				Wraith="1"
			[/advances]
			[deaths]
				Dark Adept="4"
				Dark Sorcerer="1"
				Ghoul="3"
				Skeleton="1"
				Vampire Bat="1"
				Walking Corpse="6"
			[/deaths]
			[killed]
				Goblin Spearman="1"
				Orcish Archer="3"
				Orcish Grunt="1"
				Troll Whelp="2"
				Wolf Rider="1"
			[/killed]
			[attacks]
				[sequence]
					s010="2"
					s011="1"
					s1="1"
					s101="1"
					_num="40"
				[/sequence]
				[sequence]
					s001="2"
					s01="1"
					s010="1"
					s110="1"
					_num="50"
				[/sequence]
				[sequence]
					s000="1"
					s01="2"
					s011="1"
					s1="2"
					s10="1"
					s100="1"
					s11="1"
					s110="1"
					s111="1"
					_num="60"
				[/sequence]
				[sequence]
					s0="1"
					s00="1"
					s01="4"
					s1="2"
					s10="6"
					s11="8"
					s111="2"
					_num="70"
				[/sequence]
			[/attacks]
			[defends]
				[sequence]
					s="28"
					_num="0"
				[/sequence]
				[sequence]
					s000="1"
					_num="40"
				[/sequence]
				[sequence]
					s101="2"
					s111="1"
					_num="50"
				[/sequence]
				[sequence]
					s000="2"
					s010="1"
					s1="1"
					s101="1"
					s11="1"
					_num="60"
				[/sequence]
				[sequence]
					s="3"
					s01="1"
					s011="1"
					s1="2"
					s10="1"
					s11="1"
					s110="1"
					s111="3"
					_num="70"
				[/sequence]
			[/defends]
			recruit_cost="239"
			recall_cost="0"
			damage_inflicted="532"
			damage_taken="505"
			expected_damage_inflicted="514531"
			expected_damage_taken="521954"
			turn_damage_inflicted="56"
			turn_damage_taken="51"
			turn_expected_damage_inflicted="56232"
			turn_expected_damage_taken="27320"
			save_id="The_kungfu_boy1"
		[/team]
		[team]
			[recruits]
				Goblin Spearman="1"
				Orcish Archer="5"
				Orcish Grunt="1"
				Troll Whelp="10"
				Wolf Rider="2"
			[/recruits]
			[recalls]
			[/recalls]
			[advances]
				Goblin Knight="1"
				Troll="1"
			[/advances]
			[deaths]
				Goblin Spearman="1"
				Orcish Archer="3"
				Orcish Grunt="1"
				Troll Whelp="2"
				Wolf Rider="1"
			[/deaths]
			[killed]
				Dark Adept="4"
				Dark Sorcerer="1"
				Ghoul="3"
				Skeleton="1"
				Vampire Bat="1"
				Walking Corpse="6"
			[/killed]
			[attacks]
				[sequence]
					s00="7"
					s01="1"
					s11="1"
					_num="40"
				[/sequence]
				[sequence]
					s00="3"
					s001="1"
					s01="3"
					s1="2"
					s10="3"
					s11="3"
					_num="50"
				[/sequence]
				[sequence]
					s00="3"
					s000="1"
					s01="5"
					s010="1"
					s011="3"
					s1="2"
					s10="5"
					s100="1"
					s11="5"
					s111="1"
					_num="60"
				[/sequence]
			[/attacks]
			[defends]
				[sequence]
					s="10"
					_num="0"
				[/sequence]
				[sequence]
					s01="1"
					_num="40"
				[/sequence]
				[sequence]
					s00="1"
					s01="1"
					s1="1"
					s10="2"
					s100="1"
					s11="3"
					_num="50"
				[/sequence]
				[sequence]
					s="3"
					s00="1"
					s001="1"
					s01="2"
					s1="6"
					s10="2"
					s101="1"
					s11="6"
					s111="3"
					_num="60"
				[/sequence]
			[/defends]
			recruit_cost="255"
			recall_cost="0"
			damage_inflicted="505"
			damage_taken="532"
			expected_damage_inflicted="521954"
			expected_damage_taken="514531"
			turn_damage_inflicted="18"
			turn_damage_taken="3"
			turn_expected_damage_inflicted="11760"
			turn_expected_damage_taken="4788"
			save_id="kamikaze2"
		[/team]
	[/scenario]
[/statistics]
