label="2p - Fallenstar Lake replay"
version="1.6"
completion="running"
campaign_type="multiplayer"
difficulty="NORMAL"
random_seed="2765"
random_calls="0"
next_underlying_unit_id="78"
end_text_duration="0"
[variables]
[/variables]
[replay]
	[command]
		[start]
		[/start]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="El_Sartorio has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="ryuuk666 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="laure has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="0"
			x="2"
			y="6"
		[/recruit]
		[random]
			value="11212"
		[/random]
		[random]
			value="16237"
		[/random]
		[random]
			value="27225"
		[/random]
		[random]
			value="6679"
		[/random]
		[random]
			value="5003"
		[/random]
		[random]
			value="32405"
		[/random]
		[random]
			value="8946"
		[/random]
		[random]
			value="603"
		[/random]
		[random]
			value="18383"
		[/random]
		[random]
			value="12506"
		[/random]
		[random]
			value="23610"
		[/random]
		[random]
			value="11908"
		[/random]
		[random]
			value="25233"
		[/random]
		[random]
			value="3354"
		[/random]
		[random]
			value="8995"
			[results]
				checksum="pMyPwoKvbBq0MCQtxRPyPu1PqOvyvtVtPtsuCMyPNLLqFJRxvqM3FDTGMqHwEVMDODuIOJsNEsPcOusOKDwebPsxOruODoP.K+zDJqnqswJG0PpQ,OvAQ30CF>el1cth"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="0"
			x="1"
			y="7"
		[/recruit]
		[random]
			value="1120"
		[/random]
		[random]
			value="4060"
		[/random]
		[random]
			value="16112"
		[/random]
		[random]
			value="19850"
		[/random]
		[random]
			value="23791"
		[/random]
		[random]
			value="4371"
		[/random]
		[random]
			value="20957"
		[/random]
		[random]
			value="11086"
		[/random]
		[random]
			value="28993"
		[/random]
		[random]
			value="30597"
		[/random]
		[random]
			value="12183"
		[/random]
		[random]
			value="27955"
		[/random]
		[random]
			value="28566"
		[/random]
		[random]
			value="12475"
		[/random]
		[random]
			value="26256"
			[results]
				checksum="pMyPvoKvbBq0MCQtxRPyPu1PqOvyvtVtPtsuCMyPNLLqFJRxvqM3FDTGMqHwEVMDODuIOJsNEAPcOusOKDwebPsxOruODoP.K+zDJqnqswJL0PpQ,RvAQ30CF>ml1cth"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="3"
			x="1"
			y="8"
		[/recruit]
		[random]
			value="15942"
		[/random]
		[random]
			value="28345"
		[/random]
		[random]
			value="14859"
		[/random]
		[random]
			value="23816"
		[/random]
		[random]
			value="21610"
		[/random]
		[random]
			value="16294"
		[/random]
		[random]
			value="29307"
		[/random]
		[random]
			value="592"
		[/random]
		[random]
			value="2048"
		[/random]
		[random]
			value="3284"
		[/random]
		[random]
			value="23643"
		[/random]
		[random]
			value="13485"
		[/random]
		[random]
			value="29750"
		[/random]
		[random]
			value="17548"
		[/random]
		[random]
			value="11621"
			[results]
				checksum="eKEMoMsJ2Sm2IxNK-ruIvyJD8uFQquOORqLQAKsDuHBwnqvBFyQvVsL8qHTmQQNRqrWuTuTxDUyIDPxfDLuyOcqNHBnCR5lyBlS<1Ip648,gYgdg-Lb7,b2<2j86>4eh"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="2"
			x="2"
			y="8"
		[/recruit]
		[random]
			value="14358"
		[/random]
		[random]
			value="26003"
		[/random]
		[random]
			value="9251"
		[/random]
		[random]
			value="16462"
		[/random]
		[random]
			value="7526"
		[/random]
		[random]
			value="1472"
		[/random]
		[random]
			value="20608"
		[/random]
		[random]
			value="7368"
		[/random]
		[random]
			value="19079"
		[/random]
		[random]
			value="245"
		[/random]
		[random]
			value="30810"
		[/random]
		[random]
			value="29965"
		[/random]
		[random]
			value="32131"
		[/random]
		[random]
			value="13025"
		[/random]
		[random]
			value="1845"
			[results]
				checksum="RUQsCRORlSP,DLsxDMMfFuzJRDJCyOyPpHMVsOIMzEOKRzPuHEfJqwNzzmyJIhVwVwSxvLyMAS8wEVRB+JCszfJzd4jC+rc<MF13amk4nil5K7b35>-yp,-98,eyb6ac"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="3"
			x="1"
			y="9"
		[/recruit]
		[random]
			value="20354"
		[/random]
		[random]
			value="11440"
		[/random]
		[random]
			value="14600"
		[/random]
		[random]
			value="3017"
		[/random]
		[random]
			value="16857"
		[/random]
		[random]
			value="5025"
		[/random]
		[random]
			value="1427"
		[/random]
		[random]
			value="28748"
		[/random]
		[random]
			value="19235"
		[/random]
		[random]
			value="5001"
		[/random]
		[random]
			value="29125"
		[/random]
		[random]
			value="10802"
		[/random]
		[random]
			value="23352"
		[/random]
		[random]
			value="32305"
		[/random]
		[random]
			value="25688"
			[results]
				checksum="eKEMoMsJ2Sm2IxNK-ruIvyJD8uFQquOORqLQAKsDuHBwnqvBFyQvVsL8qHTmQQNRqrWuTuTxDUFKDPxfDLuyOcqNHBnCR5lymlS<1Ip648,gYgdg-Lb7,b2<2j8d.4eh"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="2,3,4,5,6"
			y="7,8,8,8,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Wargon has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[recruit]
			value="6"
			x="41"
			y="9"
		[/recruit]
		[random]
			value="109"
		[/random]
		[random]
			value="30811"
		[/random]
		[random]
			value="3936"
		[/random]
		[random]
			value="24274"
		[/random]
		[random]
			value="16424"
		[/random]
		[random]
			value="17812"
		[/random]
		[random]
			value="12213"
		[/random]
		[random]
			value="24081"
		[/random]
		[random]
			value="14582"
		[/random]
		[random]
			value="12749"
		[/random]
		[random]
			value="14433"
		[/random]
		[random]
			value="26699"
		[/random]
		[random]
			value="2254"
		[/random]
		[random]
			value="25843"
		[/random]
		[random]
			value="27692"
			[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="6"
			x="40"
			y="6"
		[/recruit]
		[random]
			value="20"
		[/random]
		[random]
			value="12134"
		[/random]
		[random]
			value="28542"
		[/random]
		[random]
			value="14592"
		[/random]
		[random]
			value="9033"
		[/random]
		[random]
			value="9076"
		[/random]
		[random]
			value="27537"
		[/random]
		[random]
			value="26701"
		[/random]
		[random]
			value="9745"
		[/random]
		[random]
			value="30543"
		[/random]
		[random]
			value="12451"
		[/random]
		[random]
			value="22383"
		[/random]
		[random]
			value="7398"
		[/random]
		[random]
			value="18526"
		[/random]
		[random]
			value="5647"
			[results]
				checksum="J59kONwuL-Q+>062sP>0636mC5373eQ6,a5n2j.dTe2hl89<fZ.a.g-4+XcWi.Xef>.1Xyja86>c+>fg4o.2cih1iXal6r,8m4,Z.v3Dnk4Yd84dfCd5sga,Y<,06m7r"
			[/results]
		[/random]
	[/command]
	[command]
		[recruit]
			value="3"
			x="40"
			y="8"
		[/recruit]
		[random]
			value="8696"
		[/random]
		[random]
			value="30742"
		[/random]
		[random]
			value="5913"
		[/random]
		[random]
			value="5868"
		[/random]
		[random]
			value="32267"
		[/random]
		[random]
			value="23895"
		[/random]
		[random]
			value="26662"
		[/random]
		[random]
			value="22930"
		[/random]
		[random]
			value="27635"
		[/random]
		[random]
			value="27732"
		[/random]
		[random]
			value="16981"
		[/random]
		[random]
			value="466"
		[/random]
		[random]
			value="27145"
		[/random]
		[random]
			value="15310"
		[/random]
		[random]
			value="27635"
			[results]
				checksum="H-Q.4kSU1kP6gOQR,wHJxusL-.Ekr06z8QM,E>N>OoNiAM-x,w+es6q9HO5BeFhCwtP2J9TQGVxvQw8SMUFUUA1FGHuc9g.x6zCvNjoC,6pf75HoLfpj9>yBpy8oYyof"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="40,39,38,37,36"
			y="7,8,8,9,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Shmoe has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="6,7,8,9,10,10"
			y="8,8,8,9,8,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="6"
			x="11"
			y="8"
		[/recruit]
		[random]
			value="11509"
		[/random]
		[random]
			value="2381"
		[/random]
		[random]
			value="9947"
		[/random]
		[random]
			value="20388"
		[/random]
		[random]
			value="17761"
		[/random]
		[random]
			value="30352"
		[/random]
		[random]
			value="17345"
		[/random]
		[random]
			value="12829"
		[/random]
		[random]
			value="15532"
		[/random]
		[random]
			value="21959"
		[/random]
		[random]
			value="29456"
		[/random]
		[random]
			value="26780"
		[/random]
		[random]
			value="18991"
		[/random]
		[random]
			value="8061"
		[/random]
		[random]
			value="12143"
			[results]
				checksum="XBfX4cmcHYau810h3t9co8gj2UWo-1,n-62ad7l9i<dX9dX-4o9W2w2-6hZd9kbd.d07gZj2f,ei>ybXfdk5k4Nw>d595,cp6dzgA.Zj4982<j3D1<4M26i7zO.<BtyI"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="2,2,3,4,5,6,7"
			y="6,5,5,4,5,5,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="1,2,2,3,4,5"
			y="7,6,5,5,4,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="1,2,2,2,3,4"
			y="8,7,6,5,5,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="2,2,2,2,3,3,4"
			y="8,9,10,11,12,13,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="1,1,1,1,2,2"
			y="9,10,11,12,12,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="41,41,41,40,40,40,40,39"
			y="9,10,11,11,12,13,14,15"
		[/move]
	[/command]
	[command]
		[move]
			x="40,40,39,38,37,36,35,34"
			y="6,5,5,4,4,3,4,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="NecroNerd has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="40,39,38,37,36,35"
			y="8,9,9,10,10,11"
		[/move]
	[/command]
	[command]
		[move]
			x="36,35,34,33,32,32,31"
			y="8,8,8,9,9,10,11"
		[/move]
	[/command]
	[command]
		[recruit]
			value="3"
			x="31"
			y="12"
		[/recruit]
		[random]
			value="4152"
		[/random]
		[random]
			value="4659"
		[/random]
		[random]
			value="9965"
		[/random]
		[random]
			value="9902"
		[/random]
		[random]
			value="972"
		[/random]
		[random]
			value="21697"
		[/random]
		[random]
			value="28838"
		[/random]
		[random]
			value="22936"
		[/random]
		[random]
			value="28180"
		[/random]
		[random]
			value="29466"
		[/random]
		[random]
			value="19269"
		[/random]
		[random]
			value="16640"
		[/random]
		[random]
			value="2382"
		[/random]
		[random]
			value="1881"
		[/random]
		[random]
			value="19973"
			[results]
				checksum="H-Q.4kSV1kP6gOQR,wHJxusL-.Ekr06z8QM,E>N>OoNiAM-x,w+es6q9HO5BeFhCwtP2J9TQGVxvRw8SMUFUUA1FGHuc9g.x6zCvNjoC,6pf72FoLfpj9>yBpy8oYzof"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="azlad666 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="4"
			x="30"
			y="12"
		[/recruit]
		[random]
			value="919"
		[/random]
		[random]
			value="15715"
		[/random]
		[random]
			value="10467"
		[/random]
		[random]
			value="7148"
		[/random]
		[random]
			value="24999"
		[/random]
		[random]
			value="13735"
		[/random]
		[random]
			value="1281"
		[/random]
		[random]
			value="17429"
		[/random]
		[random]
			value="4578"
		[/random]
		[random]
			value="4108"
		[/random]
		[random]
			value="1227"
		[/random]
		[random]
			value="9989"
		[/random]
		[random]
			value="5221"
		[/random]
		[random]
			value="4048"
		[/random]
		[random]
			value="21468"
			[results]
				checksum="jfC5opl9mneud6314Hg106a+elObfd5dh>d-kgk5j40fd5c,laoh2>q4W68<jj1,,Bh1+4l10mji-+Ug681h64jGjKk7ELYl9YI95gAxGxnvPuSIVEH>yBMtLAwyHUER"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="teddyk has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Mabuse has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Caro has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Matolotor1 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="4,5,6,7,8,9,9,10"
			y="13,14,13,13,13,14,15,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="2,2,3"
			y="13,14,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Unreal has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11,12,13,13"
			y="8,9,9,10,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="10,11,11,11,11"
			y="7,8,9,10,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="full_metal_jacket has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="4,5,6,7,8"
			y="4,5,5,5,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="5,6,7,8,9"
			y="4,3,3,2,3"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="7,8,9,10,11,12,13"
			y="5,5,6,6,7,7,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="35,34,33,33,33,33,32"
			y="11,11,12,13,14,15,15"
		[/move]
	[/command]
	[command]
		[move]
			x="39,39,39,38,38,38,38,37"
			y="15,16,17,17,18,19,20,21"
		[/move]
	[/command]
	[command]
		[move]
			x="34,33,32,31,30,29,28,27"
			y="4,5,5,5,4,5,4,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Hotring has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="FordPrefect2 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Gen_Italia has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Hotring has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="30,29,28"
			y="12,13,12"
		[/move]
	[/command]
	[command]
		[move]
			x="31,30,29,29,29,28,27"
			y="12,12,13,14,15,15,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="tbal has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="1"
			x="30"
			y="12"
		[/recruit]
		[random]
			value="6023"
		[/random]
		[random]
			value="26648"
		[/random]
		[random]
			value="4665"
		[/random]
		[random]
			value="19591"
		[/random]
		[random]
			value="3838"
		[/random]
		[random]
			value="24874"
		[/random]
		[random]
			value="5346"
		[/random]
		[random]
			value="22067"
		[/random]
		[random]
			value="11076"
		[/random]
		[random]
			value="5555"
		[/random]
		[random]
			value="15221"
		[/random]
		[random]
			value="29997"
		[/random]
		[random]
			value="30845"
		[/random]
		[random]
			value="2262"
		[/random]
		[random]
			value="17885"
			[results]
				checksum="00J7>Z06wXgrZjiwa9d7cad.emOn+5f,-+.9cf<<+W1-4egW6m2jahna90i9fa3b.ld3k,h+bA1+Z...>9<ImYcB->dd8+XYVckKYca0dYfE>bqAh-anyQoXDDBuuCCO"
			[/results]
		[/random]
	[/command]
	[command]
		[recruit]
			value="5"
			x="31"
			y="12"
		[/recruit]
		[random]
			value="28025"
		[/random]
		[random]
			value="28459"
		[/random]
		[random]
			value="14633"
		[/random]
		[random]
			value="7841"
		[/random]
		[random]
			value="20946"
		[/random]
		[random]
			value="17319"
		[/random]
		[random]
			value="26974"
		[/random]
		[random]
			value="28231"
		[/random]
		[random]
			value="1619"
		[/random]
		[random]
			value="28424"
		[/random]
		[random]
			value="29390"
		[/random]
		[random]
			value="31871"
		[/random]
		[random]
			value="29777"
		[/random]
		[random]
			value="4705"
		[/random]
		[random]
			value="6927"
			[results]
				checksum="SU39RsIPnopbtoBBt5yPBdjCxIoyMyJsCAbPtOQpxQRNpnMsQGGGqEpPQwrEETo0BNqQDyBuEICFSQFuTGrqGMJbRBzNpHETGFOwJPvMPJFf8IBNyQOKRJUZDRgOWmID"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="31,30,29,28,27,27,26"
			y="11,11,11,10,10,9,8"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="3,3,4,4,4,4"
			y="15,16,16,17,18,19"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="10,10,10,10,10,11,12"
			y="15,16,17,18,19,20,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="alexrau54 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,12,13,14"
			y="11,11,12,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,14,15,16"
			y="7,7,8,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="8,9,10,11,12,13"
			y="4,4,4,4,3,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,10,11,12,13,14"
			y="3,2,3,3,4,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Darkmod has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="37,36,35,34,33,32,31,30"
			y="21,20,20,20,20,20,21,20"
		[/move]
	[/command]
	[command]
		[move]
			x="26,27,27,28,29,30,31"
			y="8,9,10,10,11,11,11"
		[/move]
	[/command]
	[command]
		[move]
			x="27,26"
			y="5,5"
		[/move]
	[/command]
	[command]
		[move]
			x="27,26,25,24,23,23"
			y="16,15,15,14,14,13"
		[/move]
	[/command]
	[command]
		[move]
			x="23,22"
			y="13,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="un1ted has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="28,27,26,25,24,23,22"
			y="12,12,11,11,10,11,11"
		[/move]
	[/command]
	[command]
		[move]
			x="30,29,28,27,26,25"
			y="12,12,11,11,10,10"
		[/move]
	[/command]
	[command]
		[move]
			x="31,30,29,28,27,26"
			y="12,11,11,10,10,9"
		[/move]
	[/command]
	[command]
		[move]
			x="26,25,24"
			y="5,6,6"
		[/move]
	[/command]
	[command]
		[move]
			x="24,23"
			y="6,7"
		[/move]
	[/command]
	[command]
		[move]
			x="23,22"
			y="7,6"
		[/move]
	[/command]
	[command]
		[move]
			x="32,31,30,29,28,28,27"
			y="15,15,14,14,13,12,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Cargaroth has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="2"
			x="30"
			y="12"
		[/recruit]
		[random]
			value="22205"
		[/random]
		[random]
			value="28033"
		[/random]
		[random]
			value="25501"
		[/random]
		[random]
			value="13125"
		[/random]
		[random]
			value="19144"
		[/random]
		[random]
			value="23420"
		[/random]
		[random]
			value="9108"
		[/random]
		[random]
			value="7397"
		[/random]
		[random]
			value="15254"
		[/random]
		[random]
			value="325"
		[/random]
		[random]
			value="17891"
		[/random]
		[random]
			value="1593"
		[/random]
		[random]
			value="27923"
		[/random]
		[random]
			value="2470"
		[/random]
		[random]
			value="9851"
			[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="Skarakor has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="slajerek has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,14,15"
			y="4,4,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Danu has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="14,14,13"
			y="4,5,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="14,13,12,11"
			y="12,12,11,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="0"
			x="11"
			y="12"
		[/recruit]
		[random]
			value="1844"
		[/random]
		[random]
			value="19638"
		[/random]
		[random]
			value="23584"
		[/random]
		[random]
			value="3967"
		[/random]
		[random]
			value="3137"
		[/random]
		[random]
			value="24143"
		[/random]
		[random]
			value="10326"
		[/random]
		[random]
			value="32281"
		[/random]
		[random]
			value="17398"
		[/random]
		[random]
			value="13535"
		[/random]
		[random]
			value="4820"
		[/random]
		[random]
			value="15960"
		[/random]
		[random]
			value="9555"
		[/random]
		[random]
			value="18107"
		[/random]
		[random]
			value="26283"
			[results]
				checksum="pMyPvoKvbBq0MCQtxRPyPu1PqOvyvtVtPtsuCMyPNLLqFJRxvqM3FDTGMqHwEVMDODuIOJsNEAPcOusOKDwebPsxOruODoP.K+zDJqnqswJL0PpQ,RvAQ30CF>ml1cth"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Calandryl has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,14,14,14,15"
			y="11,11,12,13,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,13,14,15,15,15"
			y="20,19,19,18,18,17,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="quest has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="25,24,24"
			y="10,9,8"
		[/move]
	[/command]
	[command]
		[move]
			x="24,23"
			y="8,8"
		[/move]
	[/command]
	[command]
		[move]
			x="23,22"
			y="8,7"
		[/move]
	[/command]
	[command]
		[move]
			x="26,25,24,23,22"
			y="9,10,9,9,9"
		[/move]
	[/command]
	[command]
		[move]
			x="30,29,28,27,26,25"
			y="12,12,11,11,10,10"
		[/move]
	[/command]
	[command]
		[move]
			x="30,29,28,27"
			y="20,21,20,21"
		[/move]
	[/command]
	[command]
		[move]
			x="27,26"
			y="21,20"
		[/move]
	[/command]
	[command]
		[move]
			x="26,25"
			y="20,21"
		[/move]
	[/command]
	[command]
		[move]
			x="25,24"
			y="21,20"
		[/move]
	[/command]
	[command]
		[move]
			x="24,23"
			y="20,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="DeadEye has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="22,21"
			y="11,11"
		[/move]
	[/command]
	[command]
		[move]
			x="21,20"
			y="11,10"
		[/move]
	[/command]
	[command]
		[move]
			x="20,19"
			y="10,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="angus has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="22,21"
			y="7,8"
		[/move]
	[/command]
	[command]
		[move]
			x="21,20"
			y="8,7"
		[/move]
	[/command]
	[command]
		[move]
			x="22,21"
			y="6,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="azlad666 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="20,21"
			y="7,8"
		[/move]
	[/command]
	[command]
		[move]
			x="21,22"
			y="7,6"
		[/move]
	[/command]
	[command]
		[move]
			x="19,20,21,22"
			y="10,10,11,11"
		[/move]
	[/command]
	[command]
		[move]
			x="27,26,25,24,23,22"
			y="12,11,11,10,11,10"
		[/move]
	[/command]
	[command]
		[move]
			x="22,22,22,22,22"
			y="12,11,10,9,8"
		[/move]
	[/command]
	[command]
		[recruit]
			value="5"
			x="30"
			y="12"
		[/recruit]
		[random]
			value="11013"
		[/random]
		[random]
			value="2975"
		[/random]
		[random]
			value="12867"
		[/random]
		[random]
			value="24239"
		[/random]
		[random]
			value="19282"
		[/random]
		[random]
			value="30433"
		[/random]
		[random]
			value="2620"
		[/random]
		[random]
			value="3778"
		[/random]
		[random]
			value="860"
		[/random]
		[random]
			value="9532"
		[/random]
		[random]
			value="28165"
		[/random]
		[random]
			value="16411"
		[/random]
		[random]
			value="23924"
		[/random]
		[random]
			value="16327"
		[/random]
		[random]
			value="18983"
			[results]
				checksum="SU39RsCPnopbtoBBs5yPBdjCxIoyMyJsCAbPtOQpxQRNpnMsQGGGqEpPQwrEETo0BNqQDyBuEICFSQFuTGrqGGJbRBzNpHETGFOwJPvMPJFf8IBNyQOKRJUZDRgO-mID"
			[/results]
		[/random]
	[/command]
	[command]
		[recruit]
			value="2"
			x="31"
			y="12"
		[/recruit]
		[random]
			value="4134"
		[/random]
		[random]
			value="29320"
		[/random]
		[random]
			value="32000"
		[/random]
		[random]
			value="14575"
		[/random]
		[random]
			value="25233"
		[/random]
		[random]
			value="16136"
		[/random]
		[random]
			value="2170"
		[/random]
		[random]
			value="3795"
		[/random]
		[random]
			value="5679"
		[/random]
		[random]
			value="10647"
		[/random]
		[random]
			value="18650"
		[/random]
		[random]
			value="7379"
		[/random]
		[random]
			value="4366"
		[/random]
		[random]
			value="5013"
		[/random]
		[random]
			value="8011"
			[results]
				checksum="<3k85mndU3eF>a,..P305kg7W0d6cpzj<c3>k7>a,+alX1ah,2Wi<0o.-bnee7bo56d2incd,4Z6occi45H-f-5057b>02aa.o6Z+40CN5c8b.<X,47J.7v3b3e4xt<3"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="31,31,30,30,30,30,29"
			y="11,12,12,13,14,15,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Wif-Fear has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="led has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Cassandra has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="slajerek has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="252000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11,11,11,10"
			y="11,10,9,8,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,12,13,13,14"
			y="12,11,11,10,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="15,15,15,15,14"
			y="16,15,14,13,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="15,15,16"
			y="14,15,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="16,17,18,19,20"
			y="15,15,15,15,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="nirob has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="4,4,5"
			y="19,20,21"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Lodgers has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="5"
			x="11"
			y="7"
		[/recruit]
		[random]
			value="12497"
		[/random]
		[random]
			value="9764"
		[/random]
		[random]
			value="6456"
		[/random]
		[random]
			value="22405"
		[/random]
		[random]
			value="25582"
		[/random]
		[random]
			value="32501"
		[/random]
		[random]
			value="27278"
		[/random]
		[random]
			value="14697"
		[/random]
		[random]
			value="215"
		[/random]
		[random]
			value="5053"
		[/random]
		[random]
			value="20456"
		[/random]
		[random]
			value="27524"
		[/random]
		[random]
			value="23625"
		[/random]
		[random]
			value="25432"
		[/random]
		[random]
			value="5506"
			[results]
				checksum="-n9uN+-Dy+EeNPrPbGMNQXtz0Ipzwss1tysRRKOwxuoVBywHrwxEqutHtKzE>BNMxHQOHFw.RFKFnqypNKoM8mwoFomIhFlq1.CLW<<ddBfkHDONNHvMSO1I9LGCHpAC"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Boucman has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="15,15,15,14"
			y="5,6,7,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,14,15"
			y="6,5,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="21,21"
			y="8,9"
		[/move]
	[/command]
	[command]
		[move]
			x="21,21,21,21,21,21,20"
			y="9,10,11,12,13,14,14"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="20"
				y="14"
			[/source]
			[destination]
				x="20"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="28940"
			[results]
				chance="50"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="3404"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="5643"
			[results]
				chance="50"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="13197"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="5700"
			[results]
				chance="50"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="23028"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="19524"
			[results]
				chance="50"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Sotamos has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="23,22"
			y="20,20"
		[/move]
	[/command]
	[command]
		[move]
			x="22,21"
			y="20,20"
		[/move]
	[/command]
	[command]
		[move]
			x="21,20"
			y="20,20"
		[/move]
	[/command]
	[command]
		[move]
			x="20,19"
			y="20,20"
		[/move]
	[/command]
	[command]
		[move]
			x="19,18"
			y="20,20"
		[/move]
	[/command]
	[command]
		[move]
			x="18,17"
			y="20,21"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Reriel has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="17,16,15"
			y="21,20,21"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Tyrion has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="joueur has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="29,28,27,27,27"
			y="16,16,17,18,19"
		[/move]
	[/command]
	[command]
		[recruit]
			value="4"
			x="26"
			y="20"
		[/recruit]
		[random]
			value="8325"
		[/random]
		[random]
			value="15341"
		[/random]
		[random]
			value="11296"
		[/random]
		[random]
			value="22833"
		[/random]
		[random]
			value="18992"
		[/random]
		[random]
			value="31504"
		[/random]
		[random]
			value="22404"
		[/random]
		[random]
			value="17631"
		[/random]
		[random]
			value="17627"
		[/random]
		[random]
			value="15408"
		[/random]
		[random]
			value="16904"
		[/random]
		[random]
			value="14318"
		[/random]
		[random]
			value="7970"
		[/random]
		[random]
			value="12612"
		[/random]
		[random]
			value="31826"
			[results]
				checksum="jfC5opl9pneud6314Hg106a+elObfd5dh>d-kgk5j40fd5c,laoh2>q4W68<jj1,,Bh1+4l10mji0.Ug681h64jGjKk7ELYl9YI95gAxGxnvPuSIVEH>yBMtLAwyHPDR"
			[/results]
		[/random]
	[/command]
	[command]
		[recruit]
			value="4"
			x="25"
			y="19"
		[/recruit]
		[random]
			value="18393"
		[/random]
		[random]
			value="7647"
		[/random]
		[random]
			value="22655"
		[/random]
		[random]
			value="20344"
		[/random]
		[random]
			value="7987"
		[/random]
		[random]
			value="22141"
		[/random]
		[random]
			value="12249"
		[/random]
		[random]
			value="3593"
		[/random]
		[random]
			value="15582"
		[/random]
		[random]
			value="31654"
		[/random]
		[random]
			value="10026"
		[/random]
		[random]
			value="20473"
		[/random]
		[random]
			value="27303"
		[/random]
		[random]
			value="21947"
		[/random]
		[random]
			value="13273"
			[results]
				checksum="6hs5opl9mneud6314Hg106a+elObfd5dh>d-kgk5j40fd5c,laoh2>q4W68<jj1,,Bh1+4l10mji0YUg681h64jGjKk7ELbfXlO69>IPFNIDBGnBCSO3srDyLKztBBHx"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Gibar has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="30,29,28,27,26"
			y="12,12,11,11,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="HAOS has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="31,30,29,28,27,26,25"
			y="12,11,11,10,10,9,9"
		[/move]
	[/command]
	[command]
		[move]
			x="22,21"
			y="6,7"
		[/move]
	[/command]
	[command]
		[move]
			x="21,20"
			y="7,7"
		[/move]
	[/command]
	[command]
		[move]
			x="20,21,22"
			y="7,7,6"
		[/move]
	[/command]
	[command]
		[move]
			x="22,23"
			y="11,11"
		[/move]
	[/command]
	[command]
		[move]
			x="22,23"
			y="10,10"
		[/move]
	[/command]
	[command]
		[move]
			x="22,23"
			y="9,9"
		[/move]
	[/command]
	[command]
		[move]
			x="23,24"
			y="11,10"
		[/move]
	[/command]
	[command]
		[move]
			x="23,24"
			y="10,9"
		[/move]
	[/command]
	[command]
		[move]
			x="23,24"
			y="9,8"
		[/move]
	[/command]
	[command]
		[move]
			x="22,23"
			y="8,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Pain has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="22,23"
			y="6,7"
		[/move]
	[/command]
	[command]
		[move]
			x="23,24"
			y="8,7"
		[/move]
	[/command]
	[command]
		[move]
			x="23,24"
			y="7,6"
		[/move]
	[/command]
	[command]
		[move]
			x="25,25,25"
			y="10,9,8"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="207000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="quest1 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="20"
				y="15"
			[/source]
			[destination]
				x="20"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="24531"
			[results]
				chance="40"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="2454"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="4121"
			[results]
				chance="40"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="16978"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="7195"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="17586"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="5686"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="14,15,15,15,16,17,18,19"
			y="12,13,14,15,15,15,14,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="19"
				y="14"
			[/source]
			[destination]
				x="20"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="9327"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="24056"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="4291"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="10115"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="13176"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="2440"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="19057"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="9443"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="16,16,17,17,18"
			y="8,9,10,11,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="14,15,16,16,17"
			y="9,10,10,11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="14,15,16"
			y="7,8,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="15,16,17,18"
			y="5,5,6,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11,11,12,13,13"
			y="7,8,9,9,10,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="5,6,7,8,9,10"
			y="21,20,20,20,20,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="4"
			x="11"
			y="8"
		[/recruit]
		[random]
			value="19311"
		[/random]
		[random]
			value="30192"
		[/random]
		[random]
			value="19968"
		[/random]
		[random]
			value="17224"
		[/random]
		[random]
			value="7805"
		[/random]
		[random]
			value="356"
		[/random]
		[random]
			value="18953"
		[/random]
		[random]
			value="28475"
		[/random]
		[random]
			value="18615"
		[/random]
		[random]
			value="19897"
		[/random]
		[random]
			value="1091"
		[/random]
		[random]
			value="25128"
		[/random]
		[random]
			value="3420"
		[/random]
		[random]
			value="8385"
		[/random]
		[random]
			value="15490"
			[results]
				checksum="KcwfALHM1AKcptV75qVBLNNDjB+ho.t0,fnp91.7>Yl1cF7<01e5yd,9+0e3j4jcb6cifadb1-6cKf37b2ifil7.WgZ2.h<5-XxS+j>k2403-p8TA9v9PQDp80F<5210"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Polycentropsis has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="10,11,12,13,14,15"
			y="7,7,7,7,6,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="20,21,22,23,24,25,26,27"
			y="14,14,14,15,15,16,15,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Blood_BR has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="tsr has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="15,16,17,18,19,20,21,22,23"
			y="21,20,21,20,20,20,21,20,20"
		[/move]
	[/command]
	[command]
		[move]
			x="24,25"
			y="10,10"
		[/move]
	[/command]
	[command]
		[move]
			x="25,26"
			y="10,9"
		[/move]
	[/command]
	[command]
		[move]
			x="26,25"
			y="10,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="AdanoS has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="25,24"
			y="19,19"
		[/move]
	[/command]
	[command]
		[move]
			x="24,25"
			y="19,19"
		[/move]
	[/command]
	[command]
		[move]
			x="26,26,25,24"
			y="20,19,19,19"
		[/move]
	[/command]
	[command]
		[recruit]
			value="2"
			x="26"
			y="20"
		[/recruit]
		[random]
			value="17068"
		[/random]
		[random]
			value="21691"
		[/random]
		[random]
			value="8296"
		[/random]
		[random]
			value="2760"
		[/random]
		[random]
			value="10911"
		[/random]
		[random]
			value="6306"
		[/random]
		[random]
			value="26287"
		[/random]
		[random]
			value="29236"
		[/random]
		[random]
			value="29906"
		[/random]
		[random]
			value="10978"
		[/random]
		[random]
			value="1701"
		[/random]
		[random]
			value="4727"
		[/random]
		[random]
			value="1758"
		[/random]
		[random]
			value="17026"
		[/random]
		[random]
			value="25534"
			[results]
				checksum="<3k85mndU3eF>a,..P305kg7W0d6cpzj<c3>k7>a,+alX1ah,2Wi<0o.-bnee7bo56d2incd,4Z6occi45H-f-5057b>02aa.o6Z+40CN5c8b.<X,47J.7v3b3e4xt<3"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="slajerek has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="The_Mighty_Quinn has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="27,27,27,27,27"
			y="19,18,17,16,15"
		[/move]
	[/command]
	[command]
		[move]
			x="25,26"
			y="9,8"
		[/move]
	[/command]
	[command]
		[move]
			x="24,25"
			y="9,9"
		[/move]
	[/command]
	[command]
		[move]
			x="25,26"
			y="8,7"
		[/move]
	[/command]
	[command]
		[move]
			x="24,25"
			y="8,8"
		[/move]
	[/command]
	[command]
		[move]
			x="26,27"
			y="9,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="I17 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="25,26"
			y="10,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="jugador has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="24,25"
			y="7,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="druith has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="25,25,26"
			y="8,7,6"
		[/move]
	[/command]
	[command]
		[move]
			x="24,25"
			y="6,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="VooDo has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="25,25"
			y="9,8"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="113000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="20,21,22,23,24,25,26"
			y="15,15,14,15,15,15,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="26"
				y="15"
			[/source]
			[destination]
				x="27"
				y="16"
			[/destination]
		[/attack]
		[random]
			value="24181"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="31522"
			[results]
				chance="40"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="8226"
			[results]
				chance="40"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="31990"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="3279"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="22508"
			[results]
				chance="40"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="21531"
			[results]
				chance="40"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Ore has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="10,11,12"
			y="20,20,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,19"
			y="11,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="19,20"
			y="11,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="JamesObscura has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="17,18"
			y="12,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,12,12,13,14,15"
			y="8,8,9,10,10,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="15,16"
			y="11,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Volstagg has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,14,15,16,17"
			y="11,11,12,11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="19,19,20,21"
			y="14,13,12,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="21,22,23,24"
			y="12,12,13,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="TaNKo has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="310000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="zonination has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="27,27,27,28,29,29,30"
			y="16,17,18,18,19,20,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Zoni has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="26,26,25,25,25,26"
			y="20,19,19,18,17,16"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="26"
				y="16"
			[/source]
			[destination]
				x="26"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="6049"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="12055"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="21746"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Cassandra has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="calor has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="25,25,26,27,27"
			y="19,18,17,17,16"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="27"
				y="16"
			[/source]
			[destination]
				x="26"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="23252"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="21704"
			[results]
				chance="40"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="28289"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="9726"
			[results]
				chance="40"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="30839"
			[results]
				chance="40"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="26,27"
			y="8,8"
		[/move]
	[/command]
	[command]
		[move]
			x="26,26"
			y="9,8"
		[/move]
	[/command]
	[command]
		[move]
			x="26,27"
			y="7,7"
		[/move]
	[/command]
	[command]
		[move]
			x="25,26,26,26,27"
			y="8,7,6,5,5"
		[/move]
	[/command]
	[command]
		[move]
			x="26,27"
			y="6,6"
		[/move]
	[/command]
	[command]
		[move]
			x="25,26"
			y="7,6"
		[/move]
	[/command]
	[command]
		[move]
			x="25,26"
			y="6,5"
		[/move]
	[/command]
	[command]
		[move]
			x="27,28"
			y="9,8"
		[/move]
	[/command]
	[command]
		[move]
			x="27,28"
			y="8,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="vampek has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Gambit has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="27,28,28,27,27,27"
			y="15,15,16,17,18,19"
		[/move]
	[/command]
	[command]
		[recruit]
			value="2"
			x="25"
			y="19"
		[/recruit]
		[random]
			value="31687"
		[/random]
		[random]
			value="10929"
		[/random]
		[random]
			value="22366"
		[/random]
		[random]
			value="17737"
		[/random]
		[random]
			value="32549"
		[/random]
		[random]
			value="26732"
		[/random]
		[random]
			value="17144"
		[/random]
		[random]
			value="8029"
		[/random]
		[random]
			value="30849"
		[/random]
		[random]
			value="19149"
		[/random]
		[random]
			value="175"
		[/random]
		[random]
			value="18152"
		[/random]
		[random]
			value="12817"
		[/random]
		[random]
			value="5834"
		[/random]
		[random]
			value="5875"
			[results]
				checksum="<3k85mndU3eF>a,..P305kg7W0d6cpzj<c3>k7>a,+alX1ah,2Wi<0o.-bnee7bo56d2incd,4Z6occi45H-f-5057b>02aa.o6Z+40CN5c8b.<X,47J.7v3b3e4xt<3"
			[/results]
		[/random]
	[/command]
	[command]
		[recruit]
			value="0"
			x="26"
			y="20"
		[/recruit]
		[random]
			value="27930"
		[/random]
		[random]
			value="14102"
		[/random]
		[random]
			value="12987"
		[/random]
		[random]
			value="19627"
		[/random]
		[random]
			value="19244"
		[/random]
		[random]
			value="20970"
		[/random]
		[random]
			value="16735"
		[/random]
		[random]
			value="2207"
		[/random]
		[random]
			value="20468"
		[/random]
		[random]
			value="18666"
		[/random]
		[random]
			value="16024"
		[/random]
		[random]
			value="5000"
		[/random]
		[random]
			value="11196"
		[/random]
		[random]
			value="13126"
			[results]
				checksum="TtCMTozq7Vy-vHfNG<LtqmzARfmmFqV+ryEAuy4CQEqETFPCHGCyrKADxItsJVFvuOxEx3PuvGswNKRdEuCIrvtwzIGzixTLICN<rDI4RC8pMORdj<Pya5jb,a-,394R"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Mortak has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="23,24"
			y="20,20"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="172000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="danibgoode has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Chalion has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,24,25,26,27"
			y="13,14,15,15,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="27"
				y="15"
			[/source]
			[destination]
				x="27"
				y="16"
			[/destination]
		[/attack]
		[random]
			value="17617"
			[results]
				chance="40"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="18553"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="25782"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="27199"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="10377"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="408"
			[results]
				chance="40"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Vormek has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Mythological has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="King_Marco has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="26"
				y="15"
			[/source]
			[destination]
				x="27"
				y="16"
			[/destination]
		[/attack]
		[random]
			value="28740"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="16918"
			[results]
				chance="40"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="16243"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="22285"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="4844"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="alpha1 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="15,14,13,12,11,10"
			y="7,6,7,7,8,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="6"
			x="11"
			y="8"
		[/recruit]
		[random]
			value="6551"
		[/random]
		[random]
			value="23770"
		[/random]
		[random]
			value="1515"
		[/random]
		[random]
			value="29463"
		[/random]
		[random]
			value="28586"
		[/random]
		[random]
			value="30234"
		[/random]
		[random]
			value="21756"
		[/random]
		[random]
			value="28080"
		[/random]
		[random]
			value="8122"
		[/random]
		[random]
			value="158"
		[/random]
		[random]
			value="30360"
		[/random]
		[random]
			value="4522"
		[/random]
		[random]
			value="13473"
		[/random]
		[random]
			value="28070"
		[/random]
		[random]
			value="8586"
			[results]
				checksum="XBfX4cmdHYau810h3t9co8gj2UWo-1,n-62ad7l9i<dX9dX-4o9W2w2-6hZd9kbd.d07gZj2f,ei5ybXfdk5k4Nw>d595,cp6dzgA.Zj4982<j6D1<4M96i7zO.<BDyI"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="27,28,29,29,29,29,28"
			y="16,16,16,15,14,13,12"
		[/move]
	[/command]
	[command]
		[move]
			x="30,30,29,28,27,27,27"
			y="20,19,19,18,18,17,16"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="27"
				y="16"
			[/source]
			[destination]
				x="26"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="3583"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="31174"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="24494"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="19007"
			[results]
				chance="40"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="9933"
			[results]
				chance="40"
				damage="4"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="24,23,22"
			y="20,20,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Gnome has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="22,21"
			y="20,21"
		[/move]
	[/command]
	[command]
		[move]
			x="21,20"
			y="21,21"
		[/move]
	[/command]
	[command]
		[move]
			x="20,19"
			y="21,21"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="shagal has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="24,23,22,21,20,19"
			y="19,20,20,21,20,20"
		[/move]
	[/command]
	[command]
		[move]
			x="26,25,24,23,22"
			y="20,21,20,20,20"
		[/move]
	[/command]
	[command]
		[move]
			x="25,24,23,22,21,20"
			y="19,19,20,20,21,20"
		[/move]
	[/command]
	[command]
		[recruit]
			value="3"
			x="25"
			y="19"
		[/recruit]
		[random]
			value="3179"
		[/random]
		[random]
			value="10250"
		[/random]
		[random]
			value="24980"
		[/random]
		[random]
			value="12209"
		[/random]
		[random]
			value="13660"
		[/random]
		[random]
			value="29638"
		[/random]
		[random]
			value="11251"
		[/random]
		[random]
			value="17437"
		[/random]
		[random]
			value="10427"
		[/random]
		[random]
			value="26116"
		[/random]
		[random]
			value="21873"
		[/random]
		[random]
			value="5953"
		[/random]
		[random]
			value="20415"
		[/random]
		[random]
			value="25064"
		[/random]
		[random]
			value="6192"
			[results]
				checksum="H-Q.4kSV1kP6gOQR,wHJxusL-.Ekr06z8QM,E>N>OoNiAM-x,w+es6q9HO5BeFhCwtP2J9TQGVxuTw8SMUFUUA1FGHuc9g0x6zCvNjoC,6pf72FoLfpj9>yBpy8oZxof"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Equinox has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="27,27,27,28,28"
			y="19,18,17,16,15"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="28"
				y="15"
			[/source]
			[destination]
				x="27"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="18735"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="5746"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="31911"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Majestic_ has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="26,25,25,26"
			y="16,16,15,14"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="26"
				y="14"
			[/source]
			[destination]
				x="27"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="3471"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="8882"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="22154"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Vaako has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="26,25"
			y="8,9"
		[/move]
	[/command]
	[command]
		[move]
			x="25,24"
			y="9,9"
		[/move]
	[/command]
	[command]
		[move]
			x="24,23"
			y="9,10"
		[/move]
	[/command]
	[command]
		[move]
			x="28,27,26,25,24,23,22"
			y="7,8,8,8,7,7,6"
		[/move]
	[/command]
	[command]
		[move]
			x="27,26,25,24,23"
			y="6,6,7,7,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="morkyyy has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="28,27,26,25,24"
			y="8,9,8,8,8"
		[/move]
	[/command]
	[command]
		[move]
			x="27,26,26,25,24"
			y="7,7,8,9,9"
		[/move]
	[/command]
	[command]
		[move]
			x="26,25,24"
			y="5,6,6"
		[/move]
	[/command]
	[command]
		[move]
			x="24,23"
			y="6,6"
		[/move]
	[/command]
	[command]
		[move]
			x="26,26,26,26,25"
			y="6,7,8,9,10"
		[/move]
	[/command]
	[command]
		[move]
			x="27,26,25,24,23"
			y="5,5,6,6,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="zxa has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="182000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="wsx_ has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Jess has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="27"
				y="15"
			[/source]
			[destination]
				x="27"
				y="16"
			[/destination]
		[/attack]
		[random]
			value="7419"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="5130"
			[results]
				chance="40"
				damage="5"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[choose]
			value="0"
		[/choose]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11,11,11,12"
			y="8,9,10,11,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="0"
			x="11"
			y="7"
		[/recruit]
		[random]
			value="5515"
		[/random]
		[random]
			value="30896"
		[/random]
		[random]
			value="25960"
		[/random]
		[random]
			value="21883"
		[/random]
		[random]
			value="14460"
		[/random]
		[random]
			value="13308"
		[/random]
		[random]
			value="22883"
		[/random]
		[random]
			value="20775"
		[/random]
		[random]
			value="25315"
		[/random]
		[random]
			value="28612"
		[/random]
		[random]
			value="15190"
		[/random]
		[random]
			value="6319"
		[/random]
		[random]
			value="15466"
		[/random]
		[random]
			value="27161"
		[/random]
		[random]
			value="29148"
			[results]
				checksum="pMyPwoKvbBq0MCQtxRPyPu1PqOvyvtVtPtsuCMyPNLLqFJRxvqM3FDTGMqHwEVMDODuIOJsNErPcOusOKDwebPsxOruODoP.K+zDJqnqswJL0PpQ,RvAQ30CF>hl1cth"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="0"
			x="11"
			y="8"
		[/recruit]
		[random]
			value="15707"
		[/random]
		[random]
			value="4494"
		[/random]
		[random]
			value="2684"
		[/random]
		[random]
			value="13643"
		[/random]
		[random]
			value="20869"
		[/random]
		[random]
			value="20117"
		[/random]
		[random]
			value="11038"
		[/random]
		[random]
			value="32652"
		[/random]
		[random]
			value="21652"
		[/random]
		[random]
			value="27953"
		[/random]
		[random]
			value="28716"
		[/random]
		[random]
			value="1267"
		[/random]
		[random]
			value="8428"
		[/random]
		[random]
			value="25544"
		[/random]
		[random]
			value="9677"
			[results]
				checksum="pMyPvoKvbBq0MCQtxRPyPu1PqOvyvtVtPtsuCMyPNLLqFJRxvqM3FDTGMqHwEVMDODuIOJsNEAPcOusOKDwebPsxOruODoP.K+zDJqnqswJL0PpQ,RvAQ30CF>ml1cth"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Rywen has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Fazyluck has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="10,11,12,13,14"
			y="7,7,7,7,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="20,19,18,17,16,16"
			y="11,11,10,11,11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,17,16,15"
			y="6,6,5,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,13,13,14"
			y="20,20,19,18"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="14,13,13"
			y="18,19,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Pentarctagon has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,17,16,15,15,15"
			y="11,11,11,12,13,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="17,16,15,15,15"
			y="12,12,13,14,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Jaguar has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Arxyn has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Dario has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="19,18,18,17,17,16,15,15"
			y="21,20,19,19,18,17,17,16"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="15"
				y="16"
			[/source]
			[destination]
				x="15"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="14780"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="27652"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="11174"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="11734"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="BwanaFlagada has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="20,19,18,17,16,15"
			y="20,20,20,21,20,21"
		[/move]
	[/command]
	[command]
		[move]
			x="19,18,17,16,15"
			y="20,19,19,19,19"
		[/move]
	[/command]
	[command]
		[move]
			x="22,21,20,19,19"
			y="20,21,20,20,19"
		[/move]
	[/command]
	[command]
		[move]
			x="25,24,23,22,21,20,19"
			y="19,19,20,20,20,20,20"
		[/move]
	[/command]
	[command]
		[move]
			x="27,26,25,24,23,22,21,20"
			y="16,15,15,14,15,14,14,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Blood147 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="26,25,24,23,23,22,22"
			y="14,15,14,14,13,12,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Ulrok has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="pandora has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="28,28,28,27,27,26"
			y="12,11,10,10,9,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Mac has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="23,22,21"
			y="10,10,10"
		[/move]
	[/command]
	[command]
		[move]
			x="21,20,19"
			y="10,10,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Wammer has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="23,22,21,20,19,18"
			y="8,7,7,6,7,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Kriegarsch has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="24,23,22,21,20"
			y="8,9,9,9,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Epilo has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="elkapitano has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="20,19"
			y="8,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Inuyasha1987 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Spree has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="koko09 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="25,24,23,22,21,20"
			y="10,10,10,9,9,9"
		[/move]
	[/command]
	[command]
		[move]
			x="24,23,22,21,20"
			y="9,9,9,9,8"
		[/move]
	[/command]
	[command]
		[move]
			x="22,21,20,19"
			y="6,6,6,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Araja has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="23,22,21"
			y="6,5,5"
		[/move]
	[/command]
	[command]
		[move]
			x="21,20,19,18"
			y="5,4,4,3"
		[/move]
	[/command]
	[command]
		[move]
			x="23,23,23,22,21"
			y="7,8,9,9,10"
		[/move]
	[/command]
	[command]
		[move]
			x="28,27,27,27,27"
			y="15,16,17,18,19"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="nlorem has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="1"
			x="25"
			y="19"
		[/recruit]
		[random]
			value="2301"
		[/random]
		[random]
			value="25845"
		[/random]
		[random]
			value="863"
		[/random]
		[random]
			value="12124"
		[/random]
		[random]
			value="31526"
		[/random]
		[random]
			value="14391"
		[/random]
		[random]
			value="12453"
		[/random]
		[random]
			value="17833"
		[/random]
		[random]
			value="9258"
		[/random]
		[random]
			value="9901"
		[/random]
		[random]
			value="8448"
		[/random]
		[random]
			value="22687"
		[/random]
		[random]
			value="31083"
		[/random]
		[random]
			value="19904"
		[/random]
		[random]
			value="17286"
			[results]
				checksum="00J7>Z06rXgrZjiwa9d7cad.emOn+5f,-+.9cf<<+W1-4egW6m2jahna90i9fa3b.ld3k,h+bA1+Z3..>9<ImYcB->dd8+XYVckKYca0dYfE>btqe-anyQoXDDBuuCMO"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="27,27,27"
			y="19,18,17"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="146000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="15,14"
			y="15,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="14"
				y="15"
			[/source]
			[destination]
				x="15"
				y="16"
			[/destination]
		[/attack]
		[random]
			value="2635"
			[results]
				chance="70"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="15282"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="15205"
			[results]
				chance="70"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="15,16,16"
			y="14,14,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="16"
				y="15"
			[/source]
			[destination]
				x="15"
				y="16"
			[/destination]
		[/attack]
		[random]
			value="374"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="20077"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="13147"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="16,16,15,15,15,15"
			y="10,11,12,13,14,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="15"
				y="15"
			[/source]
			[destination]
				x="15"
				y="16"
			[/destination]
		[/attack]
		[random]
			value="11486"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="20663"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="772"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="10895"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="9674"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,12,13"
			y="11,12,13,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,12"
			y="20,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,12,13,14"
			y="8,8,9,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,12,13,14"
			y="7,7,8,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="14,13,12,11,10"
			y="7,7,7,8,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="3"
			x="11"
			y="7"
		[/recruit]
		[random]
			value="22809"
		[/random]
		[random]
			value="17414"
		[/random]
		[random]
			value="26759"
		[/random]
		[random]
			value="10071"
		[/random]
		[random]
			value="4443"
		[/random]
		[random]
			value="7588"
		[/random]
		[random]
			value="8380"
		[/random]
		[random]
			value="19152"
		[/random]
		[random]
			value="28908"
		[/random]
		[random]
			value="5693"
		[/random]
		[random]
			value="4432"
		[/random]
		[random]
			value="2360"
		[/random]
		[random]
			value="10123"
		[/random]
		[random]
			value="13855"
		[/random]
		[random]
			value="6825"
			[results]
				checksum="eKEMoMtJ2Sm2IxNK-ruIvyJD8uFQquOORqLQAKsDuHBwnqvBFyQvVsL8qHTmQQNRqrWuTuTxDUFQDPxfDLuyOcqNHBnCR5lymlS<1Ip648,gYmdg-Lb7,b2<2j8d74eh"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="3"
			x="11"
			y="8"
		[/recruit]
		[random]
			value="24381"
		[/random]
		[random]
			value="9046"
		[/random]
		[random]
			value="1891"
		[/random]
		[random]
			value="24165"
		[/random]
		[random]
			value="21327"
		[/random]
		[random]
			value="15469"
		[/random]
		[random]
			value="18548"
		[/random]
		[random]
			value="12657"
		[/random]
		[random]
			value="26032"
		[/random]
		[random]
			value="30718"
		[/random]
		[random]
			value="32229"
		[/random]
		[random]
			value="6120"
		[/random]
		[random]
			value="24617"
		[/random]
		[random]
			value="14395"
		[/random]
		[random]
			value="631"
			[results]
				checksum="eKEMoMtJ2Sm2IxNK-ruIvyJD8uFQquOORqLQAKsDuHBwnqvBFyQvVsL8qHTmQQNRqrWuTuTxDUFQDPxfDLuyOcqNHBnCR5lymlS<1Ip648,gYgdg-Lb7,b2<2j8d74eh"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="15,15,15,14"
			y="19,18,17,16"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="14"
				y="16"
			[/source]
			[destination]
				x="14"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="2708"
			[results]
				chance="60"
				damage="12"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="6442"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="28931"
			[results]
				chance="60"
				damage="12"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="holzhase has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="15,14,13,12,11,10"
			y="16,16,16,15,16,15"
		[/move]
	[/command]
	[command]
		[move]
			x="15,15,15,15,15,15"
			y="21,20,19,18,17,16"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="15"
				y="16"
			[/source]
			[destination]
				x="15"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="32582"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="17288"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="9372"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="19,18,18,17,16"
			y="19,18,17,17,16"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="16"
				y="16"
			[/source]
			[destination]
				x="16"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="25940"
			[results]
				chance="60"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="6365"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="26121"
			[results]
				chance="60"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="3155"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="24799"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="20,19,18,17"
			y="14,15,15,15"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="17"
				y="15"
			[/source]
			[destination]
				x="16"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="8375"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="24395"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="26419"
			[results]
				chance="60"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="26465"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="27446"
			[results]
				chance="60"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="17500"
			[results]
				chance="60"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="19,19,18,18,17,17"
			y="20,19,18,17,17,16"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="1"
			weapon="1"
			[source]
				x="17"
				y="16"
			[/source]
			[destination]
				x="16"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="16813"
			[results]
				chance="60"
				damage="4"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="25,24,23,22,21,20,19,18,17"
			y="19,18,18,18,19,18,18,17,17"
		[/move]
	[/command]
	[command]
		[move]
			x="27,27,28,29,29,29,30"
			y="17,16,15,15,14,13,12"
		[/move]
	[/command]
	[command]
		[recruit]
			value="2"
			x="31"
			y="12"
		[/recruit]
		[random]
			value="5542"
		[/random]
		[random]
			value="22656"
		[/random]
		[random]
			value="21026"
		[/random]
		[random]
			value="9503"
		[/random]
		[random]
			value="6444"
		[/random]
		[random]
			value="12261"
		[/random]
		[random]
			value="9550"
		[/random]
		[random]
			value="8647"
		[/random]
		[random]
			value="14829"
		[/random]
		[random]
			value="7610"
		[/random]
		[random]
			value="11976"
		[/random]
		[random]
			value="17071"
		[/random]
		[random]
			value="31859"
		[/random]
		[random]
			value="20143"
		[/random]
		[random]
			value="31117"
			[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]
		sent="yes"
		[speak]
			id="server"
			message="Take-Shyo has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="0"
			x="31"
			y="11"
		[/recruit]
		[random]
			value="23713"
		[/random]
		[random]
			value="4884"
		[/random]
		[random]
			value="26408"
		[/random]
		[random]
			value="32215"
		[/random]
		[random]
			value="21881"
		[/random]
		[random]
			value="15919"
		[/random]
		[random]
			value="11558"
		[/random]
		[random]
			value="15658"
		[/random]
		[random]
			value="11737"
		[/random]
		[random]
			value="4938"
		[/random]
		[random]
			value="12134"
		[/random]
		[random]
			value="23795"
		[/random]
		[random]
			value="22814"
		[/random]
		[random]
			value="30426"
			[results]
				checksum="TtCMTozq7Vo-vHfNG<LtrmzARfmmFqV+ryEAuy4CQEqETFPCHGCyrKADxItsJVFvuOxEx3PuvGswNKRdEuCIrvtwzKGzixTLICN<rDI4RC8pJORdj<Pya5jb,a-,394R"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="22,21,20,19,18,17"
			y="11,11,10,10,9,9"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="2"
			[source]
				x="17"
				y="9"
			[/source]
			[destination]
				x="16"
				y="8"
			[/destination]
		[/attack]
		[random]
			value="31657"
			[results]
				chance="60"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="27760"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Blood147 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="20,19,18,17"
			y="8,9,8,8"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="2"
			[source]
				x="17"
				y="8"
			[/source]
			[destination]
				x="16"
				y="8"
			[/destination]
		[/attack]
		[random]
			value="18848"
			[results]
				chance="60"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="9646"
			[results]
				chance="60"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="19,18,17,16"
			y="6,6,7,7"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="2"
			[source]
				x="16"
				y="7"
			[/source]
			[destination]
				x="16"
				y="8"
			[/destination]
		[/attack]
		[random]
			value="20942"
			[results]
				chance="60"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="6211"
			[results]
				chance="60"
				damage="10"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="19,18,18,17"
			y="10,10,11,12"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="17"
				y="12"
			[/source]
			[destination]
				x="16"
				y="12"
			[/destination]
		[/attack]
		[random]
			value="10187"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="9377"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="4697"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="9657"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="19,18,17,16"
			y="8,8,9,8"
		[/move]
	[/command]
	[command]
		[move]
			x="21,20,19,18,17,16"
			y="10,10,11,10,11,11"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="1"
			weapon="1"
			[source]
				x="16"
				y="11"
			[/source]
			[destination]
				x="16"
				y="12"
			[/destination]
		[/attack]
		[random]
			value="12906"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="30860"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="6338"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="12266"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="18651"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="5474"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="grubsteak has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="18,17,16,15,14"
			y="6,7,6,7,7"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="14"
				y="7"
			[/source]
			[destination]
				x="14"
				y="8"
			[/destination]
		[/attack]
		[random]
			value="4944"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="19455"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="8394"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="13476"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="18,17,17,17,17,16,16,15"
			y="3,4,5,6,7,7,8,9"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="15"
				y="9"
			[/source]
			[destination]
				x="14"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="18120"
			[results]
				chance="50"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="19697"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="10406"
			[results]
				chance="50"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="13773"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="23835"
			[results]
				chance="50"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="chenry has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="20,19,18,17,16,15"
			y="9,10,10,10,10,10"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="1"
			weapon="1"
			[source]
				x="15"
				y="10"
			[/source]
			[destination]
				x="14"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="5995"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="26482"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="29103"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="2958"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1188"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="25575"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="26,25,24,23,22,21,20"
			y="8,9,9,10,9,10,9"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Icecube has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Ric has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Nippel_Kneiferius has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,12,13"
			y="8,7,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="13"
				y="8"
			[/source]
			[destination]
				x="14"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="4849"
			[results]
				chance="50"
				damage="12"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="14476"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="14038"
			[results]
				chance="50"
				damage="12"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="15697"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="solange1 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="14"
				y="8"
			[/source]
			[destination]
				x="14"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="8566"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="28112"
			[results]
				chance="50"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="202"
			[results]
				chance="50"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,12,13"
			y="7,6,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="13"
				y="7"
			[/source]
			[destination]
				x="14"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="30014"
			[results]
				chance="50"
				damage="9"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="0"
			x="11"
			y="8"
		[/recruit]
		[random]
			value="11630"
		[/random]
		[random]
			value="27312"
		[/random]
		[random]
			value="30061"
		[/random]
		[random]
			value="14939"
		[/random]
		[random]
			value="30224"
		[/random]
		[random]
			value="13734"
		[/random]
		[random]
			value="10297"
		[/random]
		[random]
			value="24624"
		[/random]
		[random]
			value="24103"
		[/random]
		[random]
			value="13271"
		[/random]
		[random]
			value="16506"
		[/random]
		[random]
			value="15401"
		[/random]
		[random]
			value="17478"
		[/random]
		[random]
			value="23202"
		[/random]
		[random]
			value="27370"
			[results]
				checksum="pMyPwoKvbBq0MCQtxRPyPu1PqOvyvtVtPtsuCMyPNLLqFJRxvqM3FDTGMqHwEVMDODuIOJsNEsPcOusOKDwebPsxOruODoP.K+zDJqnqswJG0PpQ,OvAQ30CF>el1cth"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="0"
			x="11"
			y="7"
		[/recruit]
		[random]
			value="27175"
		[/random]
		[random]
			value="27797"
		[/random]
		[random]
			value="23367"
		[/random]
		[random]
			value="2799"
		[/random]
		[random]
			value="12207"
		[/random]
		[random]
			value="29046"
		[/random]
		[random]
			value="31361"
		[/random]
		[random]
			value="6379"
		[/random]
		[random]
			value="25337"
		[/random]
		[random]
			value="24346"
		[/random]
		[random]
			value="15689"
		[/random]
		[random]
			value="18098"
		[/random]
		[random]
			value="11140"
		[/random]
		[random]
			value="29465"
		[/random]
		[random]
			value="3756"
			[results]
				checksum="pMyPwoKvbBq0MCQtxRPyPu1PqOvyvtVtPtsuCMyPNLLqFJRxvqM3FDTGMqHwEVMDODuIOJsNErPcOusOKDwebPsxOruODoP.K+zDJqnqswJL0PpQ,RvAQ30CF>hl1cth"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Striker has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="20-0 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,11,10,10,10,10"
			y="20,20,19,18,17,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="10"
				y="16"
			[/source]
			[destination]
				x="10"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="14591"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="31254"
			[results]
				chance="70"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="15427"
			[results]
				chance="50"
				damage="9"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="29879"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="14444"
			[results]
				chance="70"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Marckraft has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="16,15,14,13,12,11"
			y="12,13,13,14,14,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="11"
				y="15"
			[/source]
			[destination]
				x="10"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="8201"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="25821"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="115"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,12,12,11"
			y="14,14,15,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="11"
				y="16"
			[/source]
			[destination]
				x="10"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="19721"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="29304"
			[results]
				chance="40"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="9083"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="4600"
			[results]
				chance="40"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="30408"
			[results]
				chance="50"
				damage="5"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="15,15,14,13,12,11,10"
			y="15,14,13,14,14,15,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="nil has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="14"
				y="9"
			[/source]
			[destination]
				x="15"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="10295"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="25920"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="30064"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="17,16,15,14,13,12"
			y="15,15,16,15,16,16"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="12"
				y="16"
			[/source]
			[destination]
				x="11"
				y="16"
			[/destination]
		[/attack]
		[random]
			value="26611"
			[results]
				chance="40"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="21590"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="8666"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="19623"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="2192"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="17676"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="12915"
			[results]
				chance="40"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="17,16,15,15,14,13,12,11"
			y="16,16,17,18,18,18,17,17"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="11"
				y="17"
			[/source]
			[destination]
				x="10"
				y="16"
			[/destination]
		[/attack]
		[random]
			value="17144"
			[results]
				chance="70"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="7534"
			[results]
				chance="70"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="7827"
			[results]
				chance="70"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="17,16,15,14,13,13,12"
			y="17,17,18,18,19,20,20"
		[/move]
	[/command]
	[command]
		[move]
			x="15,14,13,12,11,10"
			y="16,16,17,17,18,17"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="2"
			[source]
				x="10"
				y="17"
			[/source]
			[destination]
				x="10"
				y="16"
			[/destination]
		[/attack]
		[random]
			value="24459"
			[results]
				chance="70"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="26363"
			[results]
				chance="70"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="16,15,14,13,12"
			y="16,16,16,16,15"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="12"
				y="15"
			[/source]
			[destination]
				x="11"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="21224"
			[results]
				chance="60"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="17805"
			[results]
				chance="60"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="18147"
			[results]
				chance="60"
				damage="7"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="14,13,13,12,11"
			y="16,16,15,14,15"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="11"
				y="15"
			[/source]
			[destination]
				x="11"
				y="16"
			[/destination]
		[/attack]
		[random]
			value="28312"
			[results]
				chance="40"
				damage="12"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="20,19,18,17,16,15,14"
			y="9,10,10,11,11,12,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="horkheimer has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="cabeza has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="17,16,15,14"
			y="12,11,11,10"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="14"
				y="10"
			[/source]
			[destination]
				x="14"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="1815"
			[results]
				chance="50"
				damage="9"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="17,16,15,14,13,13"
			y="9,9,10,10,10,9"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="2"
			[source]
				x="13"
				y="9"
			[/source]
			[destination]
				x="13"
				y="8"
			[/destination]
		[/attack]
		[random]
			value="23447"
			[results]
				chance="60"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="2732"
			[results]
				chance="60"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="KarmaLooz has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="17,16,15,14"
			y="8,7,7,7"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="2"
			[source]
				x="14"
				y="7"
			[/source]
			[destination]
				x="13"
				y="8"
			[/destination]
		[/attack]
		[random]
			value="26897"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="29413"
			[results]
				chance="60"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="16,15,14,13,12,12"
			y="11,11,10,10,9,8"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="12"
				y="8"
			[/source]
			[destination]
				x="13"
				y="8"
			[/destination]
		[/attack]
		[random]
			value="29900"
			[results]
				chance="60"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="20238"
			[results]
				chance="60"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="16454"
			[results]
				chance="60"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="paradule has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="16,15,14"
			y="7,7,6"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="2"
			[source]
				x="14"
				y="6"
			[/source]
			[destination]
				x="13"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="20546"
			[results]
				chance="70"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="5665"
			[results]
				chance="70"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="15,14"
			y="10,9"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="1"
			weapon="1"
			[source]
				x="14"
				y="9"
			[/source]
			[destination]
				x="14"
				y="8"
			[/destination]
		[/attack]
		[random]
			value="21154"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="19217"
			[results]
				chance="30"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="31808"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="22508"
			[results]
				chance="30"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="3291"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="26690"
			[results]
				chance="30"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Nano has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Nippel_Kneiferius has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="16,15"
			y="8,8"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="15"
				y="8"
			[/source]
			[destination]
				x="14"
				y="8"
			[/destination]
		[/attack]
		[random]
			value="15252"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="4337"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="2919"
			[results]
				chance="40"
				damage="12"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="19398"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="15,16"
			y="9,8"
		[/move]
	[/command]
	[command]
		[move]
			x="31,30,29,28,27,26,25"
			y="12,12,12,11,11,10,10"
		[/move]
	[/command]
	[command]
		[move]
			x="31,30,29,28,27,26"
			y="11,11,11,10,10,9"
		[/move]
	[/command]
	[command]
		[recruit]
			value="3"
			x="31"
			y="12"
		[/recruit]
		[random]
			value="15155"
		[/random]
		[random]
			value="7083"
		[/random]
		[random]
			value="21614"
		[/random]
		[random]
			value="1297"
		[/random]
		[random]
			value="26130"
		[/random]
		[random]
			value="8004"
		[/random]
		[random]
			value="59"
		[/random]
		[random]
			value="5152"
		[/random]
		[random]
			value="24258"
		[/random]
		[random]
			value="11230"
		[/random]
		[random]
			value="15794"
		[/random]
		[random]
			value="23597"
		[/random]
		[random]
			value="1678"
		[/random]
		[random]
			value="12516"
		[/random]
		[random]
			value="17570"
			[results]
				checksum="H-Q.4kSU1kP6gOQR,wHJxusL-.Ekr06z8QM,E>N>OoNiAM-x,w+es6q9HO5BeFhCwtP2J9TQGVxvPw8SMUFUUA1FGHuc9g0x6zCvNjoC,6pf72FoLfpj9>yBpy8oYBof"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="SIN has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="jac2 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Hannes has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Drake has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Blood147 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="dumbledore has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Domestos has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Gorthaur has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="dusancic has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="plutopl has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="dumbledore has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Gniark has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="nil has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="noname has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Benn has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="dr_snuggles has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Hirgwath has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="DeadEye has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="super_rambo has logged into the lobby"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="salvador1"
			message="you here?"
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="meltdow77 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Dharokan has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="dumbledore has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Bruce has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Killiranix has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="stella has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="checkers has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="war has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="G-Lo has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Benn has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="NotANumber has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Gorthaur has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="krotop has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="KiraAlexis has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="dim has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="killz has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="DeadEye has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="UnnamedPlayer has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="FordPrefect2 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="salvador1_ has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="gerrh has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="salvador1_ has the same IP as: , salvador1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="zhengtonic has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="The2ndclory has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="MortalCoil has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="nipnop has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="dr_snuggles has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="IsANumber has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Pagan has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Nami has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Kolbur has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Wsad has logged into the lobby"
		[/speak]
	[/command]
[/replay]
[snapshot]
[/snapshot]
[replay_start]
	current_tod="0"
	description="Long ago, a great star fell from the heavens, leaving its mark on this coniferous region."
	experience_modifier="70"
	hash=",l0WIdlvwhRv2MrLw7-GzItIrHmf3t<e7aikaCC34Hxs1Bn-aQuq5Zg0NcCm1unEf0+QkII+JmJPfX<NMtPzI5V3pyr.3QqT40HMe+f8q.0Lf0JTNoLKvhjpkCKXq9hq"
	id="multiplayer_Fallenstar_Lake"
	map_data="border_size=1
usage=map

Mm^Xm       , Mm^Xm       , Mm          , Hh          , Mm          , Hh          , Hh          , Gg          , Rd          , Rd          , Gg          , Wwf         , Wwf         , Gg          , Mm          , Hh          , Gs^Fp       , Gs^Fp       , Gg          , Wwf         , Hh          , Ce          , Hh          , Wwf         , Gg          , Gs^Fp       , Mm          , Hh          , Gs^Fp       , Gg          , Wwf         , Wwf         , Gg          , Rd          , Rd          , Ggf         , Hh          , Hh          , Mm          , Hh          , Mm          , Mm          , Mm^Xm       
Mm          , Mm^Xm       , Mm          , Mm          , Hh          , Hh          , Rd          , Rd^Uf       , Mm          , Gs^Fp       , Hh          , Gg          , Wwf         , Gg          , Gg          , Hh          , Gg          , Hh          , Gg          , Wwf         , Wwf         , Ce          , Wwf         , Wwf         , Gg          , Hh          , Gg          , Hh          , Gg          , Gg          , Wwf         , Gg          , Hh          , Gs^Fp       , Mm          , Rd^Uf       , Rd          , Hh          , Hh          , Mm          , Mm          , Mm^Xm       , Mm^Xm       
Mm^Xm       , Mm^Xm       , Mm          , Mm          , Hh          , Gg          , Rd          , Gg          , Gg          , Hh          , Gg          , Gg          , Gg          , Wwf         , Gg          , Gg          , Gg          , Gg          , Gg          , Gs^Fp       , Gg          , Wwf         , Ggf         , Gs^Fp       , Gg          , Gg          , Gg          , Gg          , Gg          , Wwf         , Gg          , Gg          , Gg          , Hh          , Gg          , Gg          , Rd          , Ggf         , Hh          , Mm          , Mm          , Mm^Xm       , Mm          
Mm          , Mm          , Mm          , Gs^Fp       , Gs^Fp       , Gs^Fp       , Rd          , Gs^Fp       , Ggf         , Gg          , Gs^Fp       , Gg          , Gg          , Wwf         , Wwf         , Wwf         , Wwf         , Gg          , Ce          , Gg          , Gg          , Wwf         , Gg          , Gg          , Ce          , Gg          , Wwf         , Wwf         , Wwf         , Wwf         , Gg          , Gg          , Gs^Fp       , Gg          , Gg          , Gs^Fp       , Rd          , Gs^Fp       , Gs^Fp       , Gs^Fp       , Mm          , Mm^Xm       , Mm          
Hh          , Gs^Fp       , Gs^Fp       , Hh          , Rd          , Rd          , Gs^Fp       , Hh          , Gg^Vh       , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Wwf         , Gg          , Gs^Fp       , Gs^Fp       , Wwf         , Wwf         , Wwf         , Gs^Fp       , Gs^Fp       , Gg          , Wwf         , Gg          , Gg          , Gg          , Gg          , Ggf         , Gg          , Gg          , Gg^Vh       , Hh          , Gs^Fp       , Rd          , Rd          , Hh          , Gs^Fp       , Gs^Fp       , Hh          
Gs^Fp       , Gs^Fp       , Rd          , Rd          , Gs^Fp       , Rd          , Rd          , Rd          , Rd          , Gg          , Gg          , Gg          , Rd          , Hh          , Gs^Fp       , Ss^Vhs      , Ggf         , Wwf         , Wwf         , Wwf         , Wwf         , Hh          , Wwf         , Wwf         , Wwf         , Wwf         , Ggf         , Ss^Vhs      , Gs^Fp       , Hh          , Rd          , Gg          , Gg          , Gg          , Rd          , Rd          , Rd          , Rd          , Gs^Fp       , Rd          , Rd          , Gs^Fp       , Gs^Fp       
Gs^Fp       , Gs^Fp       , Ce          , Gs^Fp       , Gs^Fp       , Mm          , Gs^Fp       , Gs^Fp       , Hh          , Rd          , Rd          , Rd          , Gs^Fp       , Mm          , Gg          , Gg          , Gg          , Gg          , Hh          , Mm          , Ce          , Wwf         , Ce          , Mm          , Hh          , Gg          , Gg          , Ggf         , Gg          , Mm          , Gs^Fp       , Rd          , Rd          , Rd          , Hh          , Gg          , Gs^Fp       , Mm          , Gs^Fp       , Gs^Fp       , Ce          , Gs^Fp       , Gs^Fp       
Ce          , Ce          , 1 Ke        , Gs^Fp       , Rr          , Hh          , Rd          , Hh          , Mm          , Gs^Fp       , Ke          , Ce          , Gg          , Gg          , Rd^Uf       , Gg          , Gg          , Gg          , Gg          , Hh          , Wwf         , Wwf         , Wwf         , Hh          , Gg          , Gg          , Gg          , Gg          , Rd^Uf       , Gg          , Gg          , Ce          , Ke          , Gs^Fp       , Mm          , Gs^Fp       , Hh          , Hh          , Rr          , Gs^Fp       , 2 Ke        , Ce          , Ce          
Ce          , Ce          , Ce          , Rr          , Rr          , Gs^Fp       , Mm^Vhh      , Rd          , Rd          , Hh          , Ggf         , Ce          , Gg          , Hh          , Mm          , Rd          , Gg^Ve       , Gg          , Wwf         , Wwf         , Gg^Fp       , Ww          , Gg^Fp       , Wwf         , Wwf         , Gg          , Gg^Ve       , Rd          , Mm          , Hh          , Gg          , Ce          , Ggf         , Hh          , Rd          , Rd          , Mm^Vhh      , Gs^Fp       , Rr          , Rr          , Ce          , Ce          , Ce          
Ce          , Ce          , Gs^Fp       , Gs^Fp       , Rr          , Hh          , Gs^Fp       , Rd^Uf       , Gg          , Gg          , Gg          , Gg          , Gg          , Hh          , Gs^Fp       , Gg          , Wwf         , Gg          , Wwf         , Gg          , Gg          , Wwf         , Gg          , Gg          , Wwf         , Gg          , Wwf         , Gg          , Gs^Fp       , Hh          , Gg          , Gg          , Gg          , Gg          , Gg          , Rd^Uf       , Gs^Fp       , Gg          , Rr          , Gs^Fp       , Gs^Fp       , Ce          , Ce          
Wwf         , Wwf         , Wwf         , Rr          , Gs^Fp       , Rr          , Rr          , Gg          , Gs^Fp       , Hh          , Gg          , Gg          , Gs^Fp       , Gg          , Gg          , Wwf         , Gg          , Wwf         , Gg          , Gg          , Gg          , Wwf         , Gg          , Gg          , Gg          , Wwf         , Gg          , Wwf         , Gg          , Gg          , Gs^Fp       , Gg          , Gg          , Hh          , Gs^Fp       , Gg          , Rr          , Rr          , Gs^Fp       , Rr          , Rr          , Wwf         , Wwf         
Gg          , Gg          , Wwf         , Gs^Fp       , Ggf         , Hh          , Gg          , Rr          , Rr          , Gs^Fp       , Rr          , Ke          , Wwf         , Wwf         , Wwf         , Wwf         , Gg          , Gg          , Mm          , Gg          , Hh          , Wwf         , Hh          , Gg          , Mm          , Gg          , Gg          , Wwf         , Wwf         , Wwf         , Wwf         , Ke          , Rr          , Gs^Fp       , Rr          , Rr          , Gg          , Hh          , Rr          , Gs^Fp       , Wwf         , Wwf         , Wwf         
Wwf         , Wwf         , Gg          , Wwf         , Gs^Fp       , Gs^Fp       , Mm          , Hh          , Gs^Fp       , Rr          , Gs^Fp       , Ce          , Ke          , Rr          , Gg^Vh       , Gg          , Hh          , Hh          , Mm^Xm       , Mm^Xm       , Wwf         , Wwf         , Wwf         , Mm^Xm       , Mm^Xm       , Hh          , Hh          , Gg          , Gg^Vh       , Rr          , Ke          , Ce          , Gs^Fp       , Rr          , Gs^Fp       , Hh          , Mm          , Gs^Fp       , Gs^Fp       , Wwf         , Rr          , Gs^Fp       , Gs^Fp       
Gs^Fp       , Gs^Fp       , Gg          , Wwf         , Wwf         , Gs^Fp       , Wwf         , Wwf         , Rr          , Rr          , Gg          , Gg          , Rr          , Rr          , Gg          , Gg          , Mm^Xm       , Mm^Xm       , Gs^Fp       , Wwf         , Ww          , Ww          , Ww          , Wwf         , Gs^Fp       , Mm^Xm       , Mm^Xm       , Gg          , Gg          , Rr          , Rr          , Gg          , Gg          , Rr          , Rr          , Wwf         , Wwf         , Gs^Fp       , Wwf         , Wwf         , Wwf         , Gs^Fp       , Hh          
Gs^Fp       , Gs^Fp       , Gg          , Gg^Fp       , Wwf         , Wwf         , Hh          , Mm          , Hh          , Gg          , Hh          , Gs^Fp       , Gg          , Gg          , Gs^Fp       , Ggf         , Mm          , Mm^Xm       , Wwf         , Wwf         , Ww          , Ww          , Ww          , Wwf         , Wwf         , Mm^Xm       , Mm          , Gg          , Gs^Fp       , Gg          , Gg          , Gs^Fp       , Hh          , Gg          , Hh          , Mm          , Hh          , Wwf         , Wwf         , Gs^Fp       , Gg          , Wwf         , Wwf         
Rd          , Rd          , Gg          , Gg^Ve       , Wwf         , Hh          , Mm          , Gs^Fp       , Gs^Fp       , Gg          , Gg^Ve       , Gg          , Gg          , Gg          , Gg          , Gg          , Wwf         , Wwf         , Ww          , Ww          , Wo          , Wo          , Wo          , Ww          , Ww          , Wwf         , Wwf         , Gg          , Gg          , Gg          , Gg          , Gg          , Gg^Ve       , Gg          , Gs^Fp       , Gs^Fp       , Mm          , Hh          , Wwf         , Gg^Ve       , Gg          , Gg          , Rd          
Hh          , Gg          , Gs^Fp       , Gg          , Gg          , Wwf         , Wwf         , Rr          , Rr          , Rr          , Rr          , Wwf         , Wwf         , Gg          , Hh          , Ss^Vhs      , Wwf         , Ww          , Ww          , Wo          , Wo          , Wo          , Wo          , Wo          , Ww          , Ww          , Wwf         , Ss^Vhs      , Hh          , Gg          , Wwf         , Wwf         , Rr          , Rr          , Rr          , Rr          , Wwf         , Wwf         , Gs^Fp       , Gg          , Gs^Fp       , Rd          , Gg          
Rd^Uf       , Rd          , Mm          , Gs^Fp       , Ggf         , Gg          , Ww          , Hh          , Gg          , Gs^Fp       , Rr          , Rr          , Wwf         , Mm          , Mm^Xm       , Wwf         , Rr          , Wwf         , Wwf         , Ww          , Wo          , Mm^Xm       , Wo          , Ww          , Wwf         , Wwf         , Rr          , Wwf         , Mm^Xm       , Mm          , Wwf         , Rr          , Rr          , Gs^Fp       , Gg          , Hh          , Ww          , Gg          , Gg          , Hh          , Mm          , Rd          , Hh          
Rd^Uf       , Rd          , Rd          , Hh          , Gg          , Gg          , Ww          , Gs^Fp       , Gg          , Gg          , Rr          , Hh          , Mm          , Wwf         , Wwf         , Wwf         , Mm^Xm       , Gs^Fp       , Wwf         , Ww          , Ww          , Wo          , Ww          , Ww          , Wwf         , Gs^Fp       , Mm^Xm       , Wwf         , Wwf         , Wwf         , Mm          , Hh          , Rr          , Gg          , Gg          , Gs^Fp       , Ww          , Gg          , Gg          , Gs^Fp       , Rd          , Rd          , Rd          
Gs^Fp       , Gs^Fp       , Gs^Fp       , Gg          , Gg          , Ww          , Gg          , Hh          , Gg          , Rr          , Rr          , Hh          , Wwf         , Wwf         , Gg^Uf       , Ke          , Ce          , Ce          , Hh          , Wwf         , Ww          , Ww          , Ww          , Wwf         , Hh          , Ce          , Ce          , Ke          , Gg^Uf       , Wwf         , Wwf         , Hh          , Rr          , Rr          , Gg          , Hh          , Gg          , Ww          , Gg          , Rd          , Gs^Fp       , Gs^Fp       , Gs^Fp       
Mm          , Hh          , Rd^Uf       , Gg          , Gg          , Wwf         , Wwf         , Gg          , Gg          , Gg          , Wwf         , Wwf         , Ss^Vhs      , Wwf         , Gs^Fp       , Hh          , Ce          , Mm^Xm       , Wwf         , Wwf         , Wwf         , Wwf         , Wwf         , Wwf         , Wwf         , Mm^Xm       , Ce          , Hh          , Gs^Fp       , Wwf         , Ss^Vhs      , Wwf         , Wwf         , Gg          , Gg          , Gg          , Wwf         , Wwf         , Gg          , Gg          , Rd^Uf       , Hh          , Hh          
Gs^Fp       , Gs^Fp       , Rd          , Rd          , Rd          , Gg^Ve       , Gg          , Ww          , Ww          , Ww          , Ww          , Gg          , Ss          , Gg          , Ss          , Ce          , Ss          , Wwf         , Mm^Xm       , Gs^Fp       , Hh          , Hh          , Hh          , Gs^Fp       , Mm^Xm       , Wwf         , Ss          , Ce          , Ss          , Gg          , Ss          , Gg          , Ww          , Ww          , Ww          , Ww          , Gg          , Gg^Ve       , Rd          , Rd          , Rd          , Gs^Fp       , Gs^Fp       
Mm          , Hh          , Gs^Fp       , Mm          , Hh          , Rd          , Gs^Fp       , Gg          , Gs^Fp       , Gs^Fp       , Ww          , Gs^Fp       , Mm          , Ss          , Gs^Fp       , Ss          , Mm^Xm       , Hh          , Mm^Xm       , Mm^Xm       , Mm^Xm       , Mm^Xm       , Mm^Xm       , Mm^Xm       , Mm^Xm       , Hh          , Mm^Xm       , Ss          , Gs^Fp       , Ss          , Mm          , Gg^Fp       , Ww          , Gg^Fp       , Hh          , Gg          , Gs^Fp       , Rd          , Hh          , Mm          , Hh          , Mm          , Mm          
Mm          , Mm          , Hh          , Hh          , Gs^Fp       , Rd^Uf       , Hh          , Gg          , Hh          , Ww          , Hh          , Hh          , Hh          , Gs^Fp       , Hh          , Mm          , Mm^Xm       , Mm          , Mm          , Mm          , Mm^Xm       , Mm          , Mm          , Mm          , Mm^Xm       , Mm          , Mm^Xm       , Hh          , Gs^Fp       , Gs^Fp       , Hh          , Hh          , Hh          , Ww          , Gs^Fp       , Gs^Fp       , Hh          , Rd^Uf       , Gs^Fp       , Mm          , Hh          , Mm          , Mm          
"
	mp_countdown="yes"
	mp_countdown_action_bonus="13"
	mp_countdown_init_time="270"
	mp_countdown_reservoir_time="330"
	mp_countdown_turn_bonus="60"
	mp_fog="yes"
	mp_shroud="no"
	mp_use_map_settings="yes"
	mp_village_gold="2"
	name="2p - Fallenstar Lake"
	next_underlying_unit_id="0"
	objectives="Victory:
@Defeat enemy leader(s)"
	observer="yes"
	random_seed="2765"
	random_start_time="no"
	scenario="Laddergame LordMaryn"
	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="1"
		controller="human"
		current_player="LordMaryn"
		flag_rgb="magenta"
		fog="yes"
		gender="male"
		gold="100"
		id="LordMaryn1"
		image="units/human-loyalists/lieutenant.png"
		income="0"
		leader="Lieutenant,Swordsman,Pikeman,Javelineer,Shock Trooper,Longbowman,White Mage,Red Mage"
		mp_countdown="yes"
		mp_countdown_action_bonus="13"
		mp_countdown_init_time="270"
		mp_countdown_reservoir_time="330"
		mp_countdown_turn_bonus="60"
		name="LordMaryn"
		random_leader="Lieutenant,Swordsman,Pikeman,Javelineer,Longbowman,Red Mage"
		recruit="Cavalryman,Horseman,Spearman,Fencer,Heavy Infantryman,Bowman,Mage,Merman Fighter"
		save_id="LordMaryn1"
		share_maps="no"
		share_view="yes"
		shroud="no"
		side="1"
		team_name="west"
		terrain_liked="Gg, Ww, Wo"
		type="Shock Trooper"
		user_team_name="wesnoth-multiplayerteamname^West"
		village_gold="2"
		[ai]
			recruitment_pattern="fighter,fighter,fighter,archer,mixed fighter,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]
	[side]
		allow_changes="yes"
		allow_player="yes"
		canrecruit="yes"
		colour="2"
		controller="network"
		current_player="salvador1"
		flag_rgb="magenta"
		fog="yes"
		gender="male"
		gold="100"
		id="salvador12"
		image="units/orcs/warrior.png"
		income="0"
		leader="Orcish Warrior,Troll,Troll Rocklobber,Orcish Crossbowman,Orcish Slayer"
		mp_countdown="yes"
		mp_countdown_action_bonus="13"
		mp_countdown_init_time="270"
		mp_countdown_reservoir_time="330"
		mp_countdown_turn_bonus="60"
		name="salvador1"
		recruit="Orcish Grunt,Troll Whelp,Wolf Rider,Orcish Archer,Orcish Assassin,Naga Fighter,Goblin Spearman"
		save_id="salvador12"
		share_maps="no"
		share_view="yes"
		shroud="no"
		side="2"
		team_name="east"
		terrain_liked="Hh, Ha, Mm, Ss"
		type="Orcish Slayer"
		user_team_name="wesnoth-multiplayerteamname^East"
		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 - Fallenstar Lake"
		[team]
			[recruits]
				Bowman="7"
				Fencer="1"
				Heavy Infantryman="4"
				Horseman="1"
				Mage="1"
				Merman Fighter="2"
			[/recruits]
			[recalls]
			[/recalls]
			[advances]
			[/advances]
			[deaths]
				Bowman="3"
				Fencer="1"
				Heavy Infantryman="1"
				Mage="1"
				Merman Fighter="2"
			[/deaths]
			[killed]
				Troll Whelp="1"
				Wolf Rider="1"
			[/killed]
			[attacks]
				[sequence]
					s000="1"
					s010="1"
					s1="1"
					s1000="1"
					s1001="1"
					s110="1"
					_num="40"
				[/sequence]
				[sequence]
					s00="1"
					s001="1"
					s01="1"
					s011="1"
					s1="1"
					s101="1"
					s11="1"
					s111="1"
					_num="50"
				[/sequence]
				[sequence]
					s010="1"
					_num="60"
				[/sequence]
				[sequence]
					s101="1"
					_num="70"
				[/sequence]
			[/attacks]
			[defends]
				[sequence]
					s="13"
					_num="0"
				[/sequence]
				[sequence]
					s110="1"
					_num="30"
				[/sequence]
				[sequence]
					s00="1"
					s000="2"
					s01="1"
					s010="1"
					s101="1"
					s111="1"
					_num="40"
				[/sequence]
				[sequence]
					s0="1"
					s00="2"
					s1="1"
					_num="50"
				[/sequence]
				[sequence]
					s="2"
					s00="1"
					s01="1"
					s1="1"
					s10="1"
					_num="60"
				[/sequence]
				[sequence]
					s="1"
					_num="70"
				[/sequence]
			[/defends]
			recruit_cost="261"
			recall_cost="0"
			damage_inflicted="201"
			damage_taken="367"
			expected_damage_inflicted="180006"
			expected_damage_taken="362794"
			turn_damage_inflicted="0"
			turn_damage_taken="0"
			turn_expected_damage_inflicted="0"
			turn_expected_damage_taken="0"
			save_id="LordMaryn1"
		[/team]
		[team]
			[recruits]
				Goblin Spearman="2"
				Naga Fighter="2"
				Orcish Archer="5"
				Orcish Assassin="4"
				Orcish Grunt="3"
				Troll Whelp="2"
				Wolf Rider="2"
			[/recruits]
			[recalls]
			[/recalls]
			[advances]
				Naga Warrior="1"
			[/advances]
			[deaths]
				Troll Whelp="1"
				Wolf Rider="1"
			[/deaths]
			[killed]
				Bowman="3"
				Fencer="1"
				Heavy Infantryman="1"
				Mage="1"
				Merman Fighter="2"
			[/killed]
			[attacks]
				[sequence]
					s00="2"
					s000="2"
					s001="1"
					s01="1"
					s1="1"
					s1001="1"
					_num="40"
				[/sequence]
				[sequence]
					s00="1"
					s1="1"
					s111="1"
					s1111="1"
					_num="50"
				[/sequence]
				[sequence]
					s000="1"
					s001="1"
					s01="1"
					s010="1"
					s0111="1"
					s1="1"
					s10="1"
					s11="5"
					s110="2"
					s111="3"
					_num="60"
				[/sequence]
				[sequence]
					s11="2"
					s111="1"
					_num="70"
				[/sequence]
			[/attacks]
			[defends]
				[sequence]
					s="5"
					_num="0"
				[/sequence]
				[sequence]
					s00="1"
					s0100="1"
					s1="1"
					s10="1"
					s1011="1"
					s11="1"
					_num="40"
				[/sequence]
				[sequence]
					s0000="1"
					_num="50"
				[/sequence]
				[sequence]
					s00="1"
					s000="1"
					_num="60"
				[/sequence]
				[sequence]
					s="1"
					s101="1"
					_num="70"
				[/sequence]
			[/defends]
			recruit_cost="280"
			recall_cost="0"
			damage_inflicted="367"
			damage_taken="201"
			expected_damage_inflicted="362794"
			expected_damage_taken="180006"
			turn_damage_inflicted="147"
			turn_damage_taken="22"
			turn_expected_damage_inflicted="110297"
			turn_expected_damage_taken="23403"
			save_id="salvador12"
		[/team]
	[/scenario]
[/statistics]
