label="2neves"
version="1.6"
completion="victory"
campaign_type="multiplayer"
difficulty="NORMAL"
random_seed="32449"
random_calls="0"
next_underlying_unit_id="48"
end_text_duration="0"
[variables]
[/variables]
[replay]
	[command]
		[start]
		[/start]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="joueur has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="DEWD has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Staycool has logged into the lobby"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="zako"
			message="hf & gl"
			side="1"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="2"
			x="18"
			y="5"
		[/recruit]
		[random]
			value="27578"
		[/random]
		[random]
			value="31073"
		[/random]
		[random]
			value="11542"
		[/random]
		[random]
			value="9896"
		[/random]
		[random]
			value="15317"
		[/random]
		[random]
			value="30422"
		[/random]
		[random]
			value="5544"
		[/random]
		[random]
			value="19299"
		[/random]
		[random]
			value="11918"
		[/random]
		[random]
			value="1838"
		[/random]
		[random]
			value="2390"
		[/random]
		[random]
			value="26479"
		[/random]
		[random]
			value="17763"
			[results]
				checksum="TuuzMJvu3JOmTCCoKGpBJPA6SCMFtLEzKIxOCmtqSOKJLCFwmIsr1QENmxPFHFw.RFKFnqypNLqM8mwoForIhF8xkkBsH9ih>N4ftxqADyQNdDsofqQwNFrCg8vPGzPi"
			[/results]
		[/random]
	[/command]
	[command]
		[recruit]
			value="6"
			x="19"
			y="5"
		[/recruit]
		[random]
			value="8902"
		[/random]
		[random]
			value="19482"
		[/random]
		[random]
			value="10385"
		[/random]
		[random]
			value="18306"
		[/random]
		[random]
			value="21665"
		[/random]
		[random]
			value="6818"
		[/random]
		[random]
			value="16120"
		[/random]
		[random]
			value="29593"
		[/random]
		[random]
			value="8891"
		[/random]
		[random]
			value="22647"
		[/random]
		[random]
			value="12109"
		[/random]
		[random]
			value="15961"
		[/random]
		[random]
			value="9082"
			[results]
				checksum="RqMsBKzD0FKjsFwUULNJZmGIxrMqRUrwAqFDQBsGIPzPLBOztLbGuuQUIGIP7KIRwurIsmHBB+FVoqJyy6J8xkkBsfg-8bR7eEHFHBVJRlsCL4wQFtHLK,fBFKhGav7k"
			[/results]
		[/random]
	[/command]
	[command]
		[recruit]
			value="5"
			x="20"
			y="4"
		[/recruit]
		[random]
			value="31719"
		[/random]
		[random]
			value="3916"
		[/random]
		[random]
			value="25220"
		[/random]
		[random]
			value="16723"
		[/random]
		[random]
			value="22897"
		[/random]
		[random]
			value="31139"
		[/random]
		[random]
			value="3287"
		[/random]
		[random]
			value="12174"
		[/random]
		[random]
			value="19301"
		[/random]
		[random]
			value="24861"
		[/random]
		[random]
			value="17581"
		[/random]
		[random]
			value="19078"
		[/random]
		[random]
			value="2898"
		[/random]
		[random]
			value="26137"
		[/random]
		[random]
			value="437"
			[results]
				checksum="wmNOCQ,<jCB,xNaeN9c8kBjp>f.33i3,bi2g6odf4d42johapi+j5>4.,j0+4d89dk>9,2l6x.fc-I>-,WJ2j2m>8oQ0birbp4<4OkUyc1lTJvFiKQ-515ck2<Ih5Kjg"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Neves"
			message="thx same and if i was disconnected again, wait me, i ll be back"
			side="2"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="zako"
			message="ic"
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="mohomine has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="2"
			x="24"
			y="5"
		[/recruit]
		[random]
			value="18927"
		[/random]
		[random]
			value="14490"
		[/random]
		[random]
			value="28256"
		[/random]
		[random]
			value="16492"
		[/random]
		[random]
			value="17952"
		[/random]
		[random]
			value="32680"
		[/random]
		[random]
			value="30873"
		[/random]
		[random]
			value="19676"
		[/random]
		[random]
			value="17341"
		[/random]
		[random]
			value="12622"
		[/random]
		[random]
			value="10865"
		[/random]
		[random]
			value="4149"
		[/random]
		[random]
			value="26448"
			[results]
				checksum="TuuzMJvu3JOmTCCoKGpBJPA6SCMFtLEzKIxOCmtqSOKJLCFwmIsr1QENmxPFHFw.RFKFnqypNLqM8mwoForIhF8xkkBsH9ih>N4ftxqADyQNdDsofqQwNFrCg8vPGzPi"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="lukasz2 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="4"
			x="22"
			y="4"
		[/recruit]
		[random]
			value="17513"
		[/random]
		[random]
			value="3859"
		[/random]
		[random]
			value="26671"
		[/random]
		[random]
			value="11900"
		[/random]
		[random]
			value="12260"
		[/random]
		[random]
			value="4912"
		[/random]
		[random]
			value="17774"
		[/random]
		[random]
			value="8768"
		[/random]
		[random]
			value="22869"
		[/random]
		[random]
			value="4839"
		[/random]
		[random]
			value="13172"
		[/random]
		[random]
			value="27888"
		[/random]
		[random]
			value="9793"
			[results]
				checksum="fEAwEAF+1Gub.aUZJ5kiOGDqZxM8i-LoLYEs-E3jSJv0zT>8cpf6b>5Im2-i0051mfOa-a-d4,d8b>dr3-aeWym.7BZSugG6.eC5RE539gmeoJZ4jM-lYWmgBNCho0u4"
			[/results]
		[/random]
	[/command]
	[command]
		[recruit]
			value="5"
			x="23"
			y="5"
		[/recruit]
		[random]
			value="32065"
		[/random]
		[random]
			value="31534"
		[/random]
		[random]
			value="31290"
		[/random]
		[random]
			value="9865"
		[/random]
		[random]
			value="10612"
		[/random]
		[random]
			value="15521"
		[/random]
		[random]
			value="21761"
		[/random]
		[random]
			value="25884"
		[/random]
		[random]
			value="31818"
		[/random]
		[random]
			value="9906"
		[/random]
		[random]
			value="17489"
		[/random]
		[random]
			value="3809"
		[/random]
		[random]
			value="5909"
		[/random]
		[random]
			value="4160"
		[/random]
		[random]
			value="21280"
			[results]
				checksum="wmNPCQ,<jCB,xNaeN9c8kBjp>f.33i3,bi2g6odf4d42johapi+j5>4.,j0+4d89dk>9,2l6z.fc-I>-,WJ2j2m>8oQ0birbp4<4OkUyc1oTJvFiKQ-515ck2,Ih5Kjg"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="21,20,19,18,17"
			y="4,4,4,3,3"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="5"
			x="21"
			y="18"
		[/recruit]
		[random]
			value="28189"
		[/random]
		[random]
			value="9883"
		[/random]
		[random]
			value="3506"
		[/random]
		[random]
			value="31658"
		[/random]
		[random]
			value="2360"
		[/random]
		[random]
			value="22175"
		[/random]
		[random]
			value="22242"
		[/random]
		[random]
			value="31908"
		[/random]
		[random]
			value="14318"
		[/random]
		[random]
			value="24525"
		[/random]
		[random]
			value="31915"
		[/random]
		[random]
			value="17298"
		[/random]
		[random]
			value="17800"
		[/random]
		[random]
			value="28184"
		[/random]
		[random]
			value="4545"
			[results]
				checksum="-n9vN+-Dy+EeNQrPbGMNQXtz0Ipzwss1tysRRKOwxuoVBywHrwxEqutHtKzE>BNMxHQOHFw.RFKFnqypNKpM8mwoFomIhFlq1.CLW<<ddBfkHDONNHvHQO1I9LGCHpAC"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="5"
			x="23"
			y="22"
		[/recruit]
		[random]
			value="3215"
		[/random]
		[random]
			value="27794"
		[/random]
		[random]
			value="12070"
		[/random]
		[random]
			value="14211"
		[/random]
		[random]
			value="1618"
		[/random]
		[random]
			value="6559"
		[/random]
		[random]
			value="31290"
		[/random]
		[random]
			value="31704"
		[/random]
		[random]
			value="29660"
		[/random]
		[random]
			value="8097"
		[/random]
		[random]
			value="402"
		[/random]
		[random]
			value="2546"
		[/random]
		[random]
			value="3176"
		[/random]
		[random]
			value="32694"
		[/random]
		[random]
			value="3430"
			[results]
				checksum="-n9sN+-Dy+EeNQrPbGMNQXtz0Ipzwss1tysRRKOwxuoVBywHrwxEqutHtKzE>BNMxHQOHFw.RFKFnqypNKqM8mwoFomIhFlq1.CL-<<ddBfkHDONNHvMSO1I9LGCHpAC"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="6"
			x="23"
			y="22"
		[/recruit]
		[random]
			value="15558"
		[/random]
		[random]
			value="25715"
		[/random]
		[random]
			value="16588"
		[/random]
		[random]
			value="24081"
		[/random]
		[random]
			value="10757"
		[/random]
		[random]
			value="27345"
		[/random]
		[random]
			value="19114"
		[/random]
		[random]
			value="21462"
		[/random]
		[random]
			value="20440"
		[/random]
		[random]
			value="8239"
		[/random]
		[random]
			value="321"
		[/random]
		[random]
			value="19000"
		[/random]
		[random]
			value="17272"
		[/random]
		[random]
			value="20794"
		[/random]
		[random]
			value="6559"
			[results]
				checksum="XBfX4cmcHYau810h3t9co8gj2UWo-1,n-62ad7l9i<dX9dX-4o9W2w2-6hZd9kbd.d07gZj2f,ei2ybXfdk5k4Nw>d595,cp6dzgA.Zj4982<j6D1<4M26i7zO.<BEyI"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="3"
			x="22"
			y="22"
		[/recruit]
		[random]
			value="14360"
		[/random]
		[random]
			value="5285"
		[/random]
		[random]
			value="10983"
		[/random]
		[random]
			value="3157"
		[/random]
		[random]
			value="17309"
		[/random]
		[random]
			value="29307"
		[/random]
		[random]
			value="29039"
		[/random]
		[random]
			value="29917"
		[/random]
		[random]
			value="16607"
		[/random]
		[random]
			value="5222"
		[/random]
		[random]
			value="987"
		[/random]
		[random]
			value="1356"
		[/random]
		[random]
			value="10172"
		[/random]
		[random]
			value="18841"
		[/random]
		[random]
			value="4134"
			[results]
				checksum="eKEMoMsJ2Sm2IxNK-ruIvyJD8uFQquOORqLQAKsDuHBwnqvBFyQvVsL8qHTmQQNRqrWuTuTxDUyIDPxfDLuyOcqNHBnCR5lyBlS<1Ip648,gYgdg-Lb7,b2<2j86>4eh"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="4"
			x="22"
			y="19"
		[/recruit]
		[random]
			value="30438"
		[/random]
		[random]
			value="21035"
		[/random]
		[random]
			value="18909"
		[/random]
		[random]
			value="22706"
		[/random]
		[random]
			value="21283"
		[/random]
		[random]
			value="5358"
		[/random]
		[random]
			value="2662"
		[/random]
		[random]
			value="20202"
		[/random]
		[random]
			value="21065"
		[/random]
		[random]
			value="22104"
		[/random]
		[random]
			value="23764"
		[/random]
		[random]
			value="6617"
		[/random]
		[random]
			value="6155"
		[/random]
		[random]
			value="18848"
		[/random]
		[random]
			value="3222"
			[results]
				checksum="rhRteuCn>Im>OtyS+7ckzAuBMm0+Z8dI9a<pk8651Wl8Z5w.cldpBX>77bllckl2Y+5>aaii6<81Akljb2ifil7.WgZ2.h<5-XxS+j>k2403-o4TA9v1-xH1iTk+kX8Y"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="21,22,23,24,25"
			y="21,20,20,20,21"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="19,18,18,17,17"
			y="5,5,6,7,8"
		[/move]
	[/command]
	[command]
		[move]
			x="20,19,18,17,16,15,14,13,12"
			y="4,5,4,5,4,5,4,5,4"
		[/move]
	[/command]
	[command]
		[move]
			x="18,17,16,15,14,13"
			y="5,6,6,7,7,8"
		[/move]
	[/command]
	[command]
		[move]
			x="17,18,19,20,21"
			y="3,3,4,4,4"
		[/move]
	[/command]
	[command]
		[move]
			x="22,22,22,22,22,22"
			y="4,5,6,7,8,9"
		[/move]
	[/command]
	[command]
		[move]
			x="23,24,25,26,27,28,29,30,31"
			y="5,4,5,5,6,6,6,5,6"
		[/move]
	[/command]
	[command]
		[move]
			x="24,25,25,26,26,27"
			y="5,6,7,7,8,9"
		[/move]
	[/command]
	[command]
		[recruit]
			value="0"
			x="24"
			y="5"
		[/recruit]
		[random]
			value="20429"
		[/random]
		[random]
			value="2372"
		[/random]
		[random]
			value="23321"
		[/random]
		[random]
			value="19870"
		[/random]
		[random]
			value="21999"
		[/random]
		[random]
			value="5515"
		[/random]
		[random]
			value="9339"
		[/random]
		[random]
			value="18450"
		[/random]
		[random]
			value="32519"
		[/random]
		[random]
			value="31790"
		[/random]
		[random]
			value="18707"
		[/random]
		[random]
			value="22027"
		[/random]
		[random]
			value="21022"
		[/random]
		[random]
			value="15136"
		[/random]
		[random]
			value="21973"
			[results]
				checksum="LhGI28qHcsJn9Niqer4mpRo6wD4zsHnKP1Hy+wP.,jg1d-5cL>71745hhbgk5n1,oc<nn6f23854.p5418om4H8bFWB0pjc+cZng<m8e6X68+vn>t55bKrqZdmOCaJmI"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="zclmc has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,26,27,28,29,30"
			y="21,20,20,19,20,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="23,22,21,21,21,21,20"
			y="20,19,19,18,17,16,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,23,24,24,25,25"
			y="20,20,19,18,18,17"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,25,26,27,28,29"
			y="19,19,18,18,17,17"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Akarias has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="29,30,31"
			y="17,16,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="gracz has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="20,19,18,17,16,15"
			y="20,20,19,19,19,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Hieronymus has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="19,18,17,16,15,14"
			y="20,19,19,18,19,18"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="wtaea has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="12,12,12,12"
			y="4,5,6,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="bob has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="13,12,12,12,11"
			y="8,8,9,10,11"
		[/move]
	[/command]
	[command]
		[move]
			x="31,31,31,31,31,31,31"
			y="6,7,8,9,10,11,12"
		[/move]
	[/command]
	[command]
		[move]
			x="31,31,31"
			y="12,11,10"
		[/move]
	[/command]
	[command]
		[move]
			x="22,23,24,25,26,26"
			y="9,9,8,9,9,10"
		[/move]
	[/command]
	[command]
		[move]
			x="27,28,29,30,31"
			y="9,9,10,10,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="ck has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="24,24,24,24,25"
			y="5,6,7,8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="mike has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="3"
			x="24"
			y="5"
		[/recruit]
		[random]
			value="2920"
		[/random]
		[random]
			value="31230"
		[/random]
		[random]
			value="11995"
		[/random]
		[random]
			value="28380"
		[/random]
		[random]
			value="12737"
		[/random]
		[random]
			value="17479"
		[/random]
		[random]
			value="3905"
		[/random]
		[random]
			value="10790"
		[/random]
		[random]
			value="7090"
		[/random]
		[random]
			value="8012"
		[/random]
		[random]
			value="28399"
		[/random]
		[random]
			value="1824"
		[/random]
		[random]
			value="9718"
			[results]
				checksum="wIq0h4Aje6ZNhfnNl+7b,Ha4jCJxd>Z4D>emIBh6hCW2BmtJ8j1v.9xmODNURxriEsBIuurvENcQBQBPqyPrRxP5tBQME,Ezpfu49w6JQVkN94JBwVAIsdMAIZHHpExA"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="12,12,12"
			y="7,8,9"
		[/move]
	[/command]
	[command]
		[move]
			x="17,17,16,15,14"
			y="8,7,6,7,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="darmi has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Artem has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="31,31,31,31,31"
			y="16,15,14,13,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="31"
				y="12"
			[/source]
			[destination]
				x="31"
				y="11"
			[/destination]
		[/attack]
		[random]
			value="12566"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="12874"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="6549"
			[results]
				chance="60"
				damage="18"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="15635"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="7253"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="pkz has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="AdoA has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="30,29,28,27,26,25"
			y="20,20,19,20,19,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,25,26,27,28,29,30"
			y="17,18,18,18,17,17,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="20,20,20,19,19"
			y="15,14,13,13,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="19,20"
			y="12,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="15,14,13,12,11"
			y="20,19,19,19,19"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="14,15,16,16,16,16"
			y="18,18,17,16,15,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="jrika has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="beaster has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="winiar has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Achilles has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="26,27,28,29,30"
			y="10,11,11,12,12"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="30"
				y="12"
			[/source]
			[destination]
				x="31"
				y="12"
			[/destination]
		[/attack]
		[random]
			value="12018"
			[results]
				chance="60"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="23599"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="16829"
			[results]
				chance="60"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="25,26,27,28,29,30"
			y="9,9,10,10,11,11"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="30"
				y="11"
			[/source]
			[destination]
				x="31"
				y="12"
			[/destination]
		[/attack]
		[random]
			value="15374"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="15489"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="31,32,32"
			y="10,10,11"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="32"
				y="11"
			[/source]
			[destination]
				x="31"
				y="12"
			[/destination]
		[/attack]
		[random]
			value="20137"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="2829"
			[results]
				chance="40"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="4223"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="7387"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="LittleOmar has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="31"
				y="11"
			[/source]
			[destination]
				x="31"
				y="12"
			[/destination]
		[/attack]
		[random]
			value="26244"
			[results]
				chance="60"
				damage="3"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="24,25,25,26,26,27"
			y="5,6,7,7,8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="TheGreatRings has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="0"
			x="18"
			y="5"
		[/recruit]
		[random]
			value="30662"
		[/random]
		[random]
			value="30109"
		[/random]
		[random]
			value="12322"
		[/random]
		[random]
			value="11179"
		[/random]
		[random]
			value="8759"
		[/random]
		[random]
			value="970"
		[/random]
		[random]
			value="19806"
		[/random]
		[random]
			value="11247"
		[/random]
		[random]
			value="3013"
		[/random]
		[random]
			value="12627"
		[/random]
		[random]
			value="2662"
		[/random]
		[random]
			value="5928"
		[/random]
		[random]
			value="2394"
		[/random]
		[random]
			value="2061"
		[/random]
		[random]
			value="28684"
			[results]
				checksum="xNa6Bryn.D--c-i+04IRoaOL-EyQnvClJF7qE383X-fb-Zy1ji46+2f+9l+5<foc<nn6f23854.o1418om4H8bFWB0pjc+cZng<m8e6X68+vn>t55bKrqZdmOCaJmIaF"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Seros has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="TheGreatMckay has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="11,11"
			y="11,10"
		[/move]
	[/command]
	[command]
		[move]
			x="12,12,11,10,9"
			y="9,10,11,11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="daffodil has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="9,9"
			y="12,13"
		[/move]
	[/command]
	[command]
		[move]
			x="14,13,12,12"
			y="7,8,8,9"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Therian has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="df has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,24,23,22,21"
			y="20,19,20,20,21"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="5"
			x="24"
			y="19"
		[/recruit]
		[random]
			value="14654"
		[/random]
		[random]
			value="6728"
		[/random]
		[random]
			value="4811"
		[/random]
		[random]
			value="28171"
		[/random]
		[random]
			value="1760"
		[/random]
		[random]
			value="4567"
		[/random]
		[random]
			value="12546"
		[/random]
		[random]
			value="4609"
		[/random]
		[random]
			value="30577"
		[/random]
		[random]
			value="8708"
		[/random]
		[random]
			value="29973"
		[/random]
		[random]
			value="6453"
		[/random]
		[random]
			value="21451"
		[/random]
		[random]
			value="29268"
		[/random]
		[random]
			value="8777"
			[results]
				checksum="jup,4nc1oNO1LLyKmJLIEhoF>vyBA6mszOAMDTywuzyODCrTtRLwFwmIsr1QENmxPFHFw.RFKFnqypNLtM8mwoFomIhFlq1.CLW<<ddBfkHDONNHvHQO1I9LGCHpACmL"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="0"
			x="18"
			y="19"
		[/recruit]
		[random]
			value="6773"
		[/random]
		[random]
			value="19540"
		[/random]
		[random]
			value="11253"
		[/random]
		[random]
			value="900"
		[/random]
		[random]
			value="22259"
		[/random]
		[random]
			value="22012"
		[/random]
		[random]
			value="5586"
		[/random]
		[random]
			value="25777"
		[/random]
		[random]
			value="15712"
		[/random]
		[random]
			value="21024"
		[/random]
		[random]
			value="11113"
		[/random]
		[random]
			value="15646"
		[/random]
		[random]
			value="17093"
		[/random]
		[random]
			value="1838"
		[/random]
		[random]
			value="26823"
			[results]
				checksum="pMyPvoKvbBq0MCQtxRPyPu1PqOvyvtVtPtsuCMyPNLLqFJRxvqM3FDTGMqHwEVMDODuIOJsNEpPcOusOKDwebPsxOruODoP.K+zDJqnqswJG0PpQ,RvAQ30CF>bl1cth"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11"
			y="19,18"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Peti has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11,11,11"
			y="18,17,16,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="16,15,14,13,12"
			y="14,15,14,15,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="20,20,21"
			y="11,10,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="mmm123 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="21,22"
			y="10,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="mond has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="ilia has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="30,30"
			y="16,17"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="verolese_BR has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Psydefisch has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="32,32,32,32"
			y="11,12,13,14"
		[/move]
	[/command]
	[command]
		[move]
			x="30,30,30,30,31"
			y="12,13,14,15,16"
		[/move]
	[/command]
	[command]
		[move]
			x="30,30,30,30,30"
			y="11,12,13,14,15"
		[/move]
	[/command]
	[command]
		[move]
			x="31,30,30,30,30"
			y="11,11,12,13,14"
		[/move]
	[/command]
	[command]
		[move]
			x="27,27,27,28,28,29"
			y="9,10,11,11,12,13"
		[/move]
	[/command]
	[command]
		[move]
			x="32,32,32,32,32,31"
			y="14,13,12,11,10,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="LittleOmar has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Intel has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Artem has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="18,17"
			y="5,6"
		[/move]
	[/command]
	[command]
		[recruit]
			value="0"
			x="18"
			y="5"
		[/recruit]
		[random]
			value="6951"
		[/random]
		[random]
			value="32639"
		[/random]
		[random]
			value="25377"
		[/random]
		[random]
			value="23211"
		[/random]
		[random]
			value="20330"
		[/random]
		[random]
			value="22279"
		[/random]
		[random]
			value="26325"
		[/random]
		[random]
			value="31463"
		[/random]
		[random]
			value="3568"
		[/random]
		[random]
			value="23046"
		[/random]
		[random]
			value="19811"
		[/random]
		[random]
			value="30429"
		[/random]
		[random]
			value="4207"
		[/random]
		[random]
			value="24493"
		[/random]
		[random]
			value="17479"
			[results]
				checksum="LhGI28qHcsJn9Niqer4mpRo6wD4zsHnKP1Hy+wP.,jg1d-5cL>71745hhbgk5n1,oc<nn6f23854.p5418om4H8bFWB0pjc+cZng<m8e6X68+vn>t55bKrqZdmOCaJmI"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="21,22,22,22,22,23,23"
			y="4,4,5,6,7,8,9"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="23"
				y="9"
			[/source]
			[destination]
				x="22"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="31043"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="29448"
			[results]
				chance="60"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="19799"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="21705"
			[results]
				chance="60"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="22842"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="28311"
			[results]
				chance="60"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="20437"
			[results]
				chance="40"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="5161"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="TheGreatMckay has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="17,18,19,20,21,22"
			y="6,6,7,7,8,8"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="22"
				y="8"
			[/source]
			[destination]
				x="22"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="16819"
			[results]
				chance="70"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="9428"
			[results]
				chance="70"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="11,11"
			y="10,9"
		[/move]
	[/command]
	[command]
		[move]
			x="12,12"
			y="9,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Donnerschlag has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="darmi has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="9,9,9,9"
			y="13,14,15,16"
		[/move]
	[/command]
	[command]
		[move]
			x="9,9,9,9,9,9"
			y="16,17,18,19,20,21"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="valikan_cz has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,17,16,15"
			y="19,19,19,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="15,14,13"
			y="20,20,21"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,13"
			y="14,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,13,13,12,11"
			y="14,13,12,11,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,12,12,12,11"
			y="15,14,13,12,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,22,22,23,23,22"
			y="9,10,11,12,13,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="30,30,30,30"
			y="17,18,19,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,24"
			y="19,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,25"
			y="20,21"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="super_rambo has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="5"
			x="24"
			y="19"
		[/recruit]
		[random]
			value="6718"
		[/random]
		[random]
			value="7388"
		[/random]
		[random]
			value="9841"
		[/random]
		[random]
			value="15508"
		[/random]
		[random]
			value="27642"
		[/random]
		[random]
			value="10503"
		[/random]
		[random]
			value="28180"
		[/random]
		[random]
			value="20610"
		[/random]
		[random]
			value="25065"
		[/random]
		[random]
			value="23373"
		[/random]
		[random]
			value="8005"
		[/random]
		[random]
			value="22562"
		[/random]
		[random]
			value="8109"
		[/random]
		[random]
			value="12636"
		[/random]
		[random]
			value="18253"
			[results]
				checksum="irp,4nc1oNO1LLyKmJLIEhoF>vyBA6mszOAMDTywuzyODCrTtRLwFwmIsr1QENmxPFHFw.RFKFnqypNKoM8mwoFomIhFlq1.CLW<<ddBfkHDONNHvMSO1I9LGCHpACmL"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="31,31,31,31,31,31"
			y="10,11,12,13,14,15"
		[/move]
	[/command]
	[command]
		[move]
			x="30,30,30,30,30"
			y="15,16,17,18,19"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="1"
			weapon="0"
			[source]
				x="30"
				y="19"
			[/source]
			[destination]
				x="30"
				y="20"
			[/destination]
		[/attack]
		[random]
			value="10089"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="24505"
			[results]
				chance="70"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="28354"
			[results]
				chance="70"
				damage="12"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="3912"
			[results]
				chance="70"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="32128"
			[results]
				chance="70"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="31,31,31,31,31"
			y="16,17,18,19,20"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="1"
			weapon="1"
			[source]
				x="31"
				y="20"
			[/source]
			[destination]
				x="30"
				y="20"
			[/destination]
		[/attack]
		[random]
			value="22694"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="4319"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="209"
			[results]
				chance="40"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="29034"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="19268"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="22654"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="valikan_cz has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Biscas has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Arcady has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="30,30,31"
			y="14,15,16"
		[/move]
	[/command]
	[command]
		[move]
			x="29,29,30,30,31,31"
			y="13,14,14,15,16,17"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="hatten has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="31,30,29,28"
			y="15,15,16,15"
		[/move]
	[/command]
	[command]
		[move]
			x="18,17,16,15,14,13"
			y="5,6,6,7,7,8"
		[/move]
	[/command]
	[command]
		[move]
			x="22,21,20,19,18,17,16"
			y="8,8,7,7,6,7,6"
		[/move]
	[/command]
	[command]
		[move]
			x="23,22"
			y="9,9"
		[/move]
	[/command]
	[command]
		[move]
			x="11,10,9,9,10"
			y="9,9,10,11,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="fire-fighter has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="10"
				y="11"
			[/source]
			[destination]
				x="11"
				y="12"
			[/destination]
		[/attack]
		[random]
			value="14732"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="5081"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="31856"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="30443"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="12,11,10,9"
			y="8,9,9,10"
		[/move]
	[/command]
	[command]
		[move]
			x="9,10,10,11"
			y="21,20,19,19"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,13,13,12"
			y="21,20,19,18"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="12"
				y="18"
			[/source]
			[destination]
				x="11"
				y="19"
			[/destination]
		[/attack]
		[random]
			value="9168"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="19881"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="7599"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,12,12,11,10"
			y="12,11,10,10,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="10"
				y="9"
			[/source]
			[destination]
				x="9"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="5622"
			[results]
				chance="70"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="3014"
			[results]
				chance="70"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="9844"
			[results]
				chance="70"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,10"
			y="11,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="10"
				y="10"
			[/source]
			[destination]
				x="9"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="6875"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="8860"
			[results]
				chance="70"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="17066"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="16163"
			[results]
				chance="70"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,22,21,20"
			y="13,14,15,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="1"
			weapon="1"
			[source]
				x="30"
				y="20"
			[/source]
			[destination]
				x="31"
				y="20"
			[/destination]
		[/attack]
		[random]
			value="24805"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1791"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="28764"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="31535"
			[results]
				chance="40"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="8225"
			[results]
				chance="70"
				damage="6"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,26,27,28,29"
			y="21,20,20,20,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="29"
				y="20"
			[/source]
			[destination]
				x="30"
				y="19"
			[/destination]
		[/attack]
		[random]
			value="2947"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="JTWStephens has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,24,25,25"
			y="19,18,18,17"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Celkoranor has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="darmi has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="jacki has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="31,30,30,30,29"
			y="16,16,17,18,19"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="29"
				y="19"
			[/source]
			[destination]
				x="29"
				y="20"
			[/destination]
		[/attack]
		[random]
			value="8050"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="32409"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="15657"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="15651"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="31,31,31,31"
			y="17,18,19,20"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="31"
				y="20"
			[/source]
			[destination]
				x="30"
				y="20"
			[/destination]
		[/attack]
		[random]
			value="15843"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="4757"
			[results]
				chance="60"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="14185"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="9597"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="valikan_cz has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[attack]
			defender_weapon="1"
			weapon="0"
			[source]
				x="30"
				y="19"
			[/source]
			[destination]
				x="30"
				y="20"
			[/destination]
		[/attack]
		[random]
			value="13078"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="19196"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="26773"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="29755"
			[results]
				chance="70"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="25239"
			[results]
				chance="70"
				damage="7"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="jindo has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Gwledig has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="28,28,28,29,30,31,32,32,31"
			y="15,16,17,18,18,19,19,20,21"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Hasire has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="31"
				y="21"
			[/source]
			[destination]
				x="30"
				y="20"
			[/destination]
		[/attack]
		[random]
			value="4618"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="22950"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="17318"
			[results]
				chance="40"
				damage="5"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Bljad has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="22,22,22,22,22,22,21"
			y="9,8,7,6,5,4,4"
		[/move]
	[/command]
	[command]
		[recruit]
			value="4"
			x="24"
			y="5"
		[/recruit]
		[random]
			value="18182"
		[/random]
		[random]
			value="22141"
		[/random]
		[random]
			value="21285"
		[/random]
		[random]
			value="23857"
		[/random]
		[random]
			value="31600"
		[/random]
		[random]
			value="30267"
		[/random]
		[random]
			value="9525"
		[/random]
		[random]
			value="6759"
		[/random]
		[random]
			value="21471"
		[/random]
		[random]
			value="15873"
		[/random]
		[random]
			value="22251"
		[/random]
		[random]
			value="30055"
		[/random]
		[random]
			value="20662"
			[results]
				checksum="fEAwEAF+1Gub.aUZJ5kiOGDqZxM8i-LoLYEs-E3jSJv0zT>8cpf6b>5Im2-i0051mfOa-a-d4,d8b>dr3-aeWym.7BZSugG6.eC5RE539gmeoJZ4jM-lYWmgBNCho0u4"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Pluto has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="disappointment has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="0"
			x="23"
			y="5"
		[/recruit]
		[random]
			value="20011"
		[/random]
		[random]
			value="22721"
		[/random]
		[random]
			value="30523"
		[/random]
		[random]
			value="6729"
		[/random]
		[random]
			value="18975"
		[/random]
		[random]
			value="29260"
		[/random]
		[random]
			value="2732"
		[/random]
		[random]
			value="9989"
		[/random]
		[random]
			value="6404"
		[/random]
		[random]
			value="18325"
		[/random]
		[random]
			value="24865"
		[/random]
		[random]
			value="19437"
		[/random]
		[random]
			value="12202"
		[/random]
		[random]
			value="30914"
		[/random]
		[random]
			value="24190"
			[results]
				checksum="LhGI37qHcsJn9Niqer4mnRo6wD4zsHoKP1Hy+wP.,jg1d-5cL>71745hhbgk5n1,oc<nn6f23854.p3418om4H8bFWB0pjc+cZng<m8e6X68+vn>t55bKrqZdmOCaJmI"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="9,9"
			y="10,9"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="9"
				y="9"
			[/source]
			[destination]
				x="10"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="24678"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="28987"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="19091"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="13,12,12,12,11"
			y="8,8,9,10,11"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="11"
				y="11"
			[/source]
			[destination]
				x="10"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="27006"
			[results]
				chance="70"
				damage="11"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="12564"
			[results]
				chance="70"
				damage="11"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Smash has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="16,15,14,13,12,12,11"
			y="6,7,7,8,8,9,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="fakivaki has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="11"
				y="10"
			[/source]
			[destination]
				x="10"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="26693"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="8230"
			[results]
				chance="70"
				damage="11"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="10,10"
			y="11,10"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="10"
				y="10"
			[/source]
			[destination]
				x="10"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="29957"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="28905"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="28598"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="17838"
			[results]
				chance="50"
				damage="4"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="JainaSolo has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Boucman has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="daniel has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="12"
				y="18"
			[/source]
			[destination]
				x="11"
				y="19"
			[/destination]
		[/attack]
		[random]
			value="25474"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="31002"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="25521"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="4"
			x="20"
			y="20"
		[/recruit]
		[random]
			value="21816"
		[/random]
		[random]
			value="5797"
		[/random]
		[random]
			value="3024"
		[/random]
		[random]
			value="7079"
		[/random]
		[random]
			value="2831"
		[/random]
		[random]
			value="22849"
		[/random]
		[random]
			value="28123"
		[/random]
		[random]
			value="29995"
		[/random]
		[random]
			value="2004"
		[/random]
		[random]
			value="11840"
		[/random]
		[random]
			value="22325"
		[/random]
		[random]
			value="8534"
		[/random]
		[random]
			value="26339"
		[/random]
		[random]
			value="4510"
		[/random]
		[random]
			value="10685"
			[results]
				checksum="KcwfALHN1AKcptV75qVBLNNDjB+ho.t0,fnp91.7>Yl1cF7<01e5yd,9+0e3j4jcb6cifadb1-67Hf37b2ifil7.WgZ2.h<5-XxS+j>k2403-p8TA9v9PQDp80F<<>10"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="kubisak has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="29,30"
			y="20,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="30"
				y="20"
			[/source]
			[destination]
				x="31"
				y="21"
			[/destination]
		[/attack]
		[random]
			value="14420"
			[results]
				chance="70"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="16287"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="2715"
			[results]
				chance="70"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,25,26,27,28"
			y="17,18,18,19,19"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="28"
				y="19"
			[/source]
			[destination]
				x="29"
				y="19"
			[/destination]
		[/attack]
		[random]
			value="28729"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="356"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="24472"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Dordamage has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="bet has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Zukirin has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Panda_ has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="31,30"
			y="20,19"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="30"
				y="19"
			[/source]
			[destination]
				x="30"
				y="20"
			[/destination]
		[/attack]
		[random]
			value="28513"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="23573"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="24562"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="23312"
			[results]
				chance="40"
				damage="5"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="m666 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="valikan_cz has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Pedrolol has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="29,29"
			y="19,20"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="29"
				y="20"
			[/source]
			[destination]
				x="28"
				y="19"
			[/destination]
		[/attack]
		[random]
			value="7079"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="24400"
			[results]
				chance="60"
				damage="7"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Arcady has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Frida has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Killer595 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="31,30"
			y="21,20"
		[/move]
	[/command]
	[command]
		[move]
			x="24,25,25,26,26,27"
			y="5,6,7,7,8,9"
		[/move]
	[/command]
	[command]
		[move]
			x="23,24,24,24,25,25,26"
			y="5,5,6,7,8,9,9"
		[/move]
	[/command]
	[command]
		[recruit]
			value="2"
			x="24"
			y="5"
		[/recruit]
		[random]
			value="17149"
		[/random]
		[random]
			value="9647"
		[/random]
		[random]
			value="25772"
		[/random]
		[random]
			value="21033"
		[/random]
		[random]
			value="11078"
		[/random]
		[random]
			value="6238"
		[/random]
		[random]
			value="4153"
		[/random]
		[random]
			value="12786"
		[/random]
		[random]
			value="7384"
		[/random]
		[random]
			value="26660"
		[/random]
		[random]
			value="11706"
		[/random]
		[random]
			value="17460"
		[/random]
		[random]
			value="29183"
			[results]
				checksum="TuuzMJvu3JOmTCCoKGpBJPA6SCMFtLEzKIxOCmtqSOKJLCFwmIsr1QENmxPFHFw.RFKFnqypNLqM8mwoForIhF8xkkBsH9ih>N4ftxqADyQNdDsofqQwNFrCg8vPGzPi"
			[/results]
		[/random]
	[/command]
	[command]
		[recruit]
			value="3"
			x="23"
			y="5"
		[/recruit]
		[random]
			value="22910"
		[/random]
		[random]
			value="4506"
		[/random]
		[random]
			value="1057"
		[/random]
		[random]
			value="30123"
		[/random]
		[random]
			value="14494"
		[/random]
		[random]
			value="4165"
		[/random]
		[random]
			value="12865"
		[/random]
		[random]
			value="29227"
		[/random]
		[random]
			value="7871"
		[/random]
		[random]
			value="31287"
		[/random]
		[random]
			value="4513"
		[/random]
		[random]
			value="9629"
		[/random]
		[random]
			value="5101"
			[results]
				checksum="wIq0h4Aje6ZNhfnNl+7b,Ha4jCJxd>Z4D>emIBh6hCW2BmtJ8j1v.9xmODNURxriEsBIuurvENcQBQBPqyPrRxP5tBQME,Ezpfu49w6JQVkN94JBwVAIsdMAIZHHpExA"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Johanna has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="10,11,12,13,13,14"
			y="10,11,11,12,13,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Jaguar has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="11,12,13,14,15"
			y="11,11,12,12,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="kostya has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="11,11,12,13,14"
			y="10,11,11,12,12"
		[/move]
	[/command]
	[command]
		[move]
			x="9,9,10,11"
			y="9,10,10,11"
		[/move]
	[/command]
	[command]
		[move]
			x="11,10,9,9,9,9,10,10,11"
			y="19,18,18,17,16,15,14,13,13"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Dordamage has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Neves"
			message="zako?"
			side="2"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="zako"
			message="yes?"
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="elrionthedread has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Waaagh has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Debian5 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="BURN has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Neves has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Neves has disconnected."
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="zako takes control of side 2."
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="MCNM has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Neves takes control of side 2."
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Neves"
			message="sorry, i'm again disconnected"
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,11"
			y="18,19"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="20,20"
			y="20,19"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="20,20"
			y="19,18"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="20,19"
			y="18,18"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="horkheimer has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Psydefisch has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="28,29"
			y="19,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="29"
				y="20"
			[/source]
			[destination]
				x="30"
				y="19"
			[/destination]
		[/attack]
		[random]
			value="16681"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="24553"
			[results]
				chance="70"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="8450"
			[results]
				chance="70"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="21,22,23,24"
			y="21,20,20,19"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="3"
			x="23"
			y="20"
		[/recruit]
		[random]
			value="16925"
		[/random]
		[random]
			value="3599"
		[/random]
		[random]
			value="21935"
		[/random]
		[random]
			value="28312"
		[/random]
		[random]
			value="15851"
		[/random]
		[random]
			value="1404"
		[/random]
		[random]
			value="17183"
		[/random]
		[random]
			value="28258"
		[/random]
		[random]
			value="7299"
		[/random]
		[random]
			value="11535"
		[/random]
		[random]
			value="27278"
		[/random]
		[random]
			value="25819"
		[/random]
		[random]
			value="7431"
		[/random]
		[random]
			value="245"
		[/random]
		[random]
			value="27334"
			[results]
				checksum="eKEMoMtJ2Sm2IxNK-ruIvyJD8uFQquOORqLQAKsDuHBwnqvBFyQvVsL8qHTmQQNRqrWuTuTxDUyNDPxfDLuyOcqNHBnCR5lymlS<1Ip648,gYgdg-Lb7,b2<2j86+4eh"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		undo="no"
		[speak]
			id="zako"
			message="it seems that network dislikes you :("
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="RedMould has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Glutton has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="cbursted has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Watkins has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Superlocky has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="30,30,30,30,31"
			y="19,18,17,16,16"
		[/move]
	[/command]
	[command]
		[move]
			x="30,31,31,31,32,32,33"
			y="20,20,19,18,17,16,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="valium has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="33,33"
			y="16,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Gramthelord has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Neves"
			message="yes, i think it's a problem with the wi-fi"
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="DarkZerafin has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="xekaltsotos has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Mathias has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="27,27,27,28,28,29"
			y="9,10,11,11,12,13"
		[/move]
	[/command]
	[command]
		[move]
			x="26,26,27,28,29,29,30"
			y="9,10,11,11,12,13,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Dordamage has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Andilanser has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Andilanser has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="24,25,25,26,26,27"
			y="5,6,7,7,8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="RedAdder has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="lanxu has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="23,24,24,25,25,26"
			y="5,5,6,7,8,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="PlayerPM has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Serren has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="jojovic has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="14,15,16,16"
			y="13,14,14,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Xcite has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="15,15,16"
			y="13,14,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Waaagh1 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="lanxu has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="14,14,15"
			y="12,13,14"
		[/move]
	[/command]
	[command]
		[move]
			x="11,12,13,13,14"
			y="11,11,12,13,13"
		[/move]
	[/command]
	[command]
		[move]
			x="11,11,11"
			y="13,12,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="mratrix has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="4"
			x="18"
			y="5"
		[/recruit]
		[random]
			value="12639"
		[/random]
		[random]
			value="1002"
		[/random]
		[random]
			value="4596"
		[/random]
		[random]
			value="9734"
		[/random]
		[random]
			value="428"
		[/random]
		[random]
			value="28635"
		[/random]
		[random]
			value="2012"
		[/random]
		[random]
			value="9823"
		[/random]
		[random]
			value="11443"
		[/random]
		[random]
			value="29649"
		[/random]
		[random]
			value="20756"
		[/random]
		[random]
			value="7842"
		[/random]
		[random]
			value="20068"
			[results]
				checksum="fEAwEAF+1Gub.aUZJ5kiOGDqZxM8i-LoLYEs-E3jSJv0zT>8cpf6b>5Im2-i0051mfOa-a-d4,d8b>dr3-aeWym.7BZSugG6.eC5RE539gmeoJZ4jM-lYWmgBNCho0u4"
			[/results]
		[/random]
	[/command]
	[command]
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="goodbye has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Erdorean has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,12,12,13"
			y="19,18,17,17"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="bezi12---pl--- has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Infernal has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="19,18,17,16"
			y="18,17,17,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="16"
				y="16"
			[/source]
			[destination]
				x="16"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="8821"
			[results]
				chance="60"
				damage="16"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="29534"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="19953"
			[results]
				chance="60"
				damage="16"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="20,19,18,17"
			y="15,16,16,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="29,30,30,31,32,32"
			y="20,19,18,18,17,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="32"
				y="16"
			[/source]
			[destination]
				x="31"
				y="16"
			[/destination]
		[/attack]
		[random]
			value="1324"
			[results]
				chance="70"
				damage="10"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="23,24,25,26,27"
			y="20,19,20,20,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,25,26,27,28,29"
			y="19,20,19,19,19,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Kukurydza has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="lanxu has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Yuki has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="x has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="30,31,32,33,33"
			y="13,14,14,15,16"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="1"
			weapon="0"
			[source]
				x="33"
				y="16"
			[/source]
			[destination]
				x="32"
				y="16"
			[/destination]
		[/attack]
		[random]
			value="11807"
			[results]
				chance="70"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="23940"
			[results]
				chance="70"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="13698"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="28881"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="28201"
			[results]
				chance="70"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Devrailis has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Thorof has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="33,32"
			y="15,15"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="32"
				y="15"
			[/source]
			[destination]
				x="32"
				y="16"
			[/destination]
		[/attack]
		[random]
			value="18257"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="12973"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="9327"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="29,29,30,30,31"
			y="13,14,14,15,16"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="1"
			weapon="1"
			[source]
				x="31"
				y="16"
			[/source]
			[destination]
				x="32"
				y="16"
			[/destination]
		[/attack]
		[random]
			value="19908"
			[results]
				chance="60"
				damage="6"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="27,27,27,28,28,29"
			y="9,10,11,11,12,13"
		[/move]
	[/command]
	[command]
		[move]
			x="26,26,26,27,28,28"
			y="8,9,10,11,11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="MrDoom has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Cryzero has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Andray has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="16,15,14,14,14,13"
			y="14,14,13,12,11,11"
		[/move]
	[/command]
	[command]
		[move]
			x="15,14,14,13,12,12"
			y="14,13,12,12,11,10"
		[/move]
	[/command]
	[command]
		[move]
			x="14,14,13"
			y="13,12,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Crushed_lotus has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="11,12,13,14"
			y="11,11,11,11"
		[/move]
	[/command]
	[command]
		[move]
			x="18,17,16,15,14,13"
			y="5,6,6,7,7,8"
		[/move]
	[/command]
	[command]
		[recruit]
			value="4"
			x="18"
			y="5"
		[/recruit]
		[random]
			value="13123"
		[/random]
		[random]
			value="13401"
		[/random]
		[random]
			value="32741"
		[/random]
		[random]
			value="14794"
		[/random]
		[random]
			value="23476"
		[/random]
		[random]
			value="22425"
		[/random]
		[random]
			value="3503"
		[/random]
		[random]
			value="16912"
		[/random]
		[random]
			value="25905"
		[/random]
		[random]
			value="11884"
		[/random]
		[random]
			value="8338"
		[/random]
		[random]
			value="28557"
		[/random]
		[random]
			value="9611"
			[results]
				checksum="fEAwEAF+1Gub.aUZJ5kiOGDqZxM8i-LoLYEs-E3jSJv0zT>8cpf6b>5Im2-i0051mfOa-a-d4,d8b>dr3-aeWym.7BZSugG6.eC5RE539gmeoJZ4jM-lYWmgBNCho0u4"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Pedrolol1 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="aramaki has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="2"
			x="19"
			y="5"
		[/recruit]
		[random]
			value="29129"
		[/random]
		[random]
			value="24266"
		[/random]
		[random]
			value="17457"
		[/random]
		[random]
			value="16686"
		[/random]
		[random]
			value="27470"
		[/random]
		[random]
			value="20372"
		[/random]
		[random]
			value="26881"
		[/random]
		[random]
			value="16238"
		[/random]
		[random]
			value="13241"
		[/random]
		[random]
			value="4366"
		[/random]
		[random]
			value="10144"
		[/random]
		[random]
			value="170"
		[/random]
		[random]
			value="26102"
			[results]
				checksum="TuuzMJvu3JOmTCCoKGpBJPA6SCMFtLEzKIxOCmtqSOKJLCFwmIsr1QENmxPFHFw.RFKFnqypNLqM8mwoForIhF8xkkBsH9ih>N4ftxqADyQNdDsofqQwNFrCg8vPGzPi"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="lanxu has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="pq1 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="noyuo has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,13,13,13,13"
			y="17,16,15,14,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="13"
				y="13"
			[/source]
			[destination]
				x="13"
				y="12"
			[/destination]
		[/attack]
		[random]
			value="13281"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="19329"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="4004"
			[results]
				chance="60"
				damage="6"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Arge has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="16,16,16"
			y="16,15,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="17,17,18,18"
			y="16,15,14,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Xcite has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="27,28,29,30"
			y="20,19,20,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="29,28,27,26,25,24"
			y="20,19,20,19,19,19"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="IronJaw has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="4"
			x="23"
			y="20"
		[/recruit]
		[random]
			value="23244"
		[/random]
		[random]
			value="11124"
		[/random]
		[random]
			value="21327"
		[/random]
		[random]
			value="4026"
		[/random]
		[random]
			value="31286"
		[/random]
		[random]
			value="26743"
		[/random]
		[random]
			value="11719"
		[/random]
		[random]
			value="8720"
		[/random]
		[random]
			value="23354"
		[/random]
		[random]
			value="1435"
		[/random]
		[random]
			value="32008"
		[/random]
		[random]
			value="2692"
		[/random]
		[random]
			value="16504"
		[/random]
		[random]
			value="5717"
		[/random]
		[random]
			value="13509"
			[results]
				checksum="rhRteuCn>Im>OtyS+7ckzAuBMm0+Z8dI9a<pk8651Wl8Z5w.cldpBX>77bllckl2Y+5>aaii6<81Akljb2ifil7.WgZ2.h<5-XxS+j>k2403-o4TA9v1-xH1iTk+kX8Y"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="urgel88 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="king-powaa has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="13,12,12,12,12,13"
			y="8,8,9,10,11,12"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="1"
			weapon="1"
			[source]
				x="13"
				y="12"
			[/source]
			[destination]
				x="13"
				y="13"
			[/destination]
		[/attack]
		[random]
			value="24237"
			[results]
				chance="60"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="28751"
			[results]
				chance="60"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="26066"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="2289"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="20884"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="12163"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="BattleOn has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="12,12,12"
			y="10,11,12"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="1"
			weapon="0"
			[source]
				x="12"
				y="12"
			[/source]
			[destination]
				x="13"
				y="13"
			[/destination]
		[/attack]
		[random]
			value="15536"
			[results]
				chance="70"
				damage="12"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="13134"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="4170"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="15056"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="13514"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="adam664 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Nathantator has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="13,14,14"
			y="11,11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="kaze has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[attack]
			defender_weapon="1"
			weapon="0"
			[source]
				x="14"
				y="12"
			[/source]
			[destination]
				x="13"
				y="13"
			[/destination]
		[/attack]
		[random]
			value="7302"
			[results]
				chance="70"
				damage="12"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="31591"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="29451"
			[results]
				chance="70"
				damage="12"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Waaagh1 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Elanor has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="14,14,14,14,14,13,13,12,12,11"
			y="11,12,13,14,15,16,17,17,18,19"
		[/move]
	[/command]
	[command]
		[move]
			x="18,17,16,15,14,13"
			y="5,6,6,7,7,8"
		[/move]
	[/command]
	[command]
		[move]
			x="19,18,17,16,15,14"
			y="5,5,6,6,7,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Vulcor has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Gideon has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="yzr has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="33,32,32,32,32,31"
			y="16,16,17,18,19,20"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="31"
				y="20"
			[/source]
			[destination]
				x="30"
				y="20"
			[/destination]
		[/attack]
		[random]
			value="599"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="20805"
			[results]
				chance="70"
				damage="14"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="giovanni has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="31,31,31,31,30"
			y="16,17,18,19,19"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="30"
				y="19"
			[/source]
			[destination]
				x="30"
				y="20"
			[/destination]
		[/attack]
		[random]
			value="27467"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="25564"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="12154"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="32,32,32,32,31"
			y="15,16,17,18,19"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="yeshol has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="29,29,30,30,30,30"
			y="13,14,14,15,16,17"
		[/move]
	[/command]
	[command]
		[move]
			x="28,28,29,30,30,30"
			y="12,13,14,14,15,16"
		[/move]
	[/command]
	[command]
		[recruit]
			value="0"
			x="24"
			y="5"
		[/recruit]
		[random]
			value="17"
		[/random]
		[random]
			value="17748"
		[/random]
		[random]
			value="2327"
		[/random]
		[random]
			value="17115"
		[/random]
		[random]
			value="1884"
		[/random]
		[random]
			value="8608"
		[/random]
		[random]
			value="9198"
		[/random]
		[random]
			value="20581"
		[/random]
		[random]
			value="31947"
		[/random]
		[random]
			value="15981"
		[/random]
		[random]
			value="20603"
		[/random]
		[random]
			value="21286"
		[/random]
		[random]
			value="10133"
		[/random]
		[random]
			value="16421"
		[/random]
		[random]
			value="29517"
			[results]
				checksum="LhGI28qHcsJn9Niqer4mpRo6wD4zsHnKP1Hy+wP.,jg1d-5cL>71745hhbgk5n1,oc<nn6f23854.p5418om4H8bFWB0pjc+cZng<m8e6X68+vn>t55bKrqZdmOCaJmI"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="wiifan has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Waaagh2 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="30"
				y="20"
			[/source]
			[destination]
				x="31"
				y="20"
			[/destination]
		[/attack]
		[random]
			value="18140"
			[results]
				chance="60"
				damage="9"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="23638"
			[results]
				chance="60"
				damage="9"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="23,24,25,26,27,28,29"
			y="20,20,20,19,19,18,18"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="29"
				y="18"
			[/source]
			[destination]
				x="30"
				y="17"
			[/destination]
		[/attack]
		[random]
			value="16547"
			[results]
				chance="60"
				damage="11"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="2148"
			[results]
				chance="60"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="29934"
			[results]
				chance="60"
				damage="11"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="24443"
			[results]
				chance="60"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="21047"
			[results]
				chance="60"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="noyuo has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,25,26,27,28,29"
			y="19,19,18,18,17,17"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="29"
				y="17"
			[/source]
			[destination]
				x="30"
				y="17"
			[/destination]
		[/attack]
		[random]
			value="14006"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="3339"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="19412"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="14256"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1403"
			[results]
				chance="60"
				damage="5"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Dean has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="giocatore has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="16,15,14,13,12"
			y="14,14,14,14,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="12"
				y="13"
			[/source]
			[destination]
				x="12"
				y="12"
			[/destination]
		[/attack]
		[random]
			value="21377"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="23610"
			[results]
				chance="50"
				damage="14"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Waaagh2 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,18,17,16"
			y="13,14,15,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="13,14,14,14,13,12"
			y="12,12,13,14,15,14"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="12"
				y="14"
			[/source]
			[destination]
				x="12"
				y="13"
			[/destination]
		[/attack]
		[random]
			value="18782"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="17421"
			[results]
				chance="60"
				damage="9"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="28406"
			[results]
				chance="60"
				damage="9"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="kostya has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="12"
				y="12"
			[/source]
			[destination]
				x="12"
				y="13"
			[/destination]
		[/attack]
		[random]
			value="29352"
			[results]
				chance="70"
				damage="12"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="TheAweDude has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="11,12,13,14,15,16,17,18,19,20"
			y="19,18,18,18,18,17,17,16,16,15"
		[/move]
	[/command]
	[command]
		[move]
			x="14,15,15"
			y="12,13,14"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="15"
				y="14"
			[/source]
			[destination]
				x="16"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="32069"
			[results]
				chance="70"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="17881"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="13,12,12,12,12,13"
			y="8,8,9,10,11,12"
		[/move]
	[/command]
	[command]
		[move]
			x="14,13,12,12,12,13"
			y="7,8,8,9,10,11"
		[/move]
	[/command]
	[command]
		[move]
			x="24,25,25,26,26,27"
			y="5,6,7,7,8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="morphling has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="0"
			x="24"
			y="5"
		[/recruit]
		[random]
			value="21483"
		[/random]
		[random]
			value="10272"
		[/random]
		[random]
			value="21745"
		[/random]
		[random]
			value="5285"
		[/random]
		[random]
			value="31684"
		[/random]
		[random]
			value="10657"
		[/random]
		[random]
			value="13453"
		[/random]
		[random]
			value="23472"
		[/random]
		[random]
			value="15936"
		[/random]
		[random]
			value="16280"
		[/random]
		[random]
			value="28069"
		[/random]
		[random]
			value="1459"
		[/random]
		[random]
			value="28056"
		[/random]
		[random]
			value="8623"
		[/random]
		[random]
			value="3658"
			[results]
				checksum="LhGI28qHcsJn9Niqer4ntRo6wD4zsHoKP1Hy+wP.,jg1d-5cL>71745hhbgk5n1,oc<nn6f23854.o1418om4H8bFWB0pjc+cZng<m8e6X68+vn>t55bKrqZdmOCaJmI"
			[/results]
		[/random]
	[/command]
	[command]
		[recruit]
			value="4"
			x="23"
			y="5"
		[/recruit]
		[random]
			value="27810"
		[/random]
		[random]
			value="562"
		[/random]
		[random]
			value="27514"
		[/random]
		[random]
			value="11939"
		[/random]
		[random]
			value="12630"
		[/random]
		[random]
			value="10530"
		[/random]
		[random]
			value="21696"
		[/random]
		[random]
			value="8404"
		[/random]
		[random]
			value="30722"
		[/random]
		[random]
			value="1958"
		[/random]
		[random]
			value="734"
		[/random]
		[random]
			value="5561"
		[/random]
		[random]
			value="1740"
			[results]
				checksum="fEAwEAF+1Gub.aUZJ5kiOGDqZxM8i-LoLYEs-E3jSJv0zT>8cpf6b>5Im2-i0051mfOa-a-d4,d8b>dr3-aeWym.7BZSugG6.eC5RE539gmeoJZ4jM-lYWmgBNCho0u4"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="30,29"
			y="19,19"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="29"
				y="19"
			[/source]
			[destination]
				x="29"
				y="18"
			[/destination]
		[/attack]
		[random]
			value="29493"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="16764"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="7760"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="30"
				y="16"
			[/source]
			[destination]
				x="29"
				y="17"
			[/destination]
		[/attack]
		[random]
			value="8182"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="8097"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="29746"
			[results]
				chance="60"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="9653"
			[results]
				chance="60"
				damage="9"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="18619"
			[results]
				chance="60"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="19145"
			[results]
				chance="60"
				damage="9"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="31,32,32,32,31,30,29,28,27"
			y="19,19,20,21,22,22,22,21,22"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="30,31,31,31,30"
			y="20,20,19,18,17"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="30"
				y="17"
			[/source]
			[destination]
				x="30"
				y="16"
			[/destination]
		[/attack]
		[random]
			value="28289"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="8713"
			[results]
				chance="70"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="18972"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="20103"
			[results]
				chance="70"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="29469"
			[results]
				chance="70"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="29,28,27,27,27,27,26"
			y="18,17,18,19,20,21,21"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="26"
				y="21"
			[/source]
			[destination]
				x="27"
				y="22"
			[/destination]
		[/attack]
		[random]
			value="448"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="7165"
			[results]
				chance="70"
				damage="10"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[choose]
			value="0"
		[/choose]
	[/command]
	[command]
		sent="yes"
		[move]
			x="29,28,27,26,25,25"
			y="17,17,18,18,18,17"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Gramthelord has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="16"
				y="14"
			[/source]
			[destination]
				x="15"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="639"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="18076"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="12539"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="ghost has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="12,13,14,15,16"
			y="14,15,15,16,15"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="16"
				y="15"
			[/source]
			[destination]
				x="16"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="1395"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="24433"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="32684"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Tard has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="13,13,14,14,15"
			y="12,13,13,14,15"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="15"
				y="15"
			[/source]
			[destination]
				x="16"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="23070"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="22376"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="29846"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="12,12,11"
			y="12,11,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Ribbon has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="15"
				y="14"
			[/source]
			[destination]
				x="16"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="17423"
			[results]
				chance="70"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="24315"
			[results]
				chance="70"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="13,13,13,13,13,14"
			y="11,12,13,14,15,15"
		[/move]
	[/command]
	[command]
		[move]
			x="20,19,18,17,17,16,16,15"
			y="15,16,16,17,18,18,19,20"
		[/move]
	[/command]
	[command]
		[move]
			x="29,30"
			y="19,18"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="shadowofzo has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="30"
				y="18"
			[/source]
			[destination]
				x="30"
				y="17"
			[/destination]
		[/attack]
		[random]
			value="12980"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="13251"
			[results]
				chance="70"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="28258"
			[results]
				chance="70"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="lisa has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="27,26,25"
			y="22,21,21"
		[/move]
	[/command]
	[command]
		[move]
			x="30,31"
			y="16,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="scruppy has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="27,27,27,28,28,29"
			y="9,10,11,11,12,13"
		[/move]
	[/command]
	[command]
		[move]
			x="24,25,25,26,26,27"
			y="5,6,7,7,8,9"
		[/move]
	[/command]
	[command]
		[move]
			x="27,28"
			y="9,9"
		[/move]
	[/command]
	[command]
		[move]
			x="23,24,24,25,25,26"
			y="5,5,6,7,8,8"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Kuru has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,25,25,25"
			y="17,18,19,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="25"
				y="20"
			[/source]
			[destination]
				x="25"
				y="21"
			[/destination]
		[/attack]
		[random]
			value="10250"
			[results]
				chance="60"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="11096"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="3630"
			[results]
				chance="60"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="29656"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="15885"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="13688"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="30,29"
			y="17,18"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="29"
				y="18"
			[/source]
			[destination]
				x="30"
				y="18"
			[/destination]
		[/attack]
		[random]
			value="589"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="15757"
			[results]
				chance="70"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="27013"
			[results]
				chance="60"
				damage="14"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="14002"
			[results]
				chance="70"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Gramthelord has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="16"
				y="14"
			[/source]
			[destination]
				x="15"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="29031"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1209"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="5993"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="28,28,28,28,28,29,30"
			y="9,10,11,12,13,14,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Karastus has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="29,29,30,30,30,29"
			y="13,14,14,15,16,17"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="29"
				y="17"
			[/source]
			[destination]
				x="29"
				y="18"
			[/destination]
		[/attack]
		[random]
			value="11035"
			[results]
				chance="70"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="9627"
			[results]
				chance="70"
				damage="8"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="26,26,26,27,28,28"
			y="8,9,10,11,11,12"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="16"
				y="15"
			[/source]
			[destination]
				x="16"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="31044"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="25952"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="13558"
			[results]
				chance="60"
				damage="5"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="15,16"
			y="14,14"
		[/move]
	[/command]
	[command]
		[move]
			x="15,16,17,18,19,20"
			y="15,15,16,16,17,17"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="mike2 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="14,15,16,17,18,19"
			y="15,16,16,17,16,17"
		[/move]
	[/command]
	[command]
		[move]
			x="11,12,13,13,14,14,15"
			y="11,11,12,13,13,14,15"
		[/move]
	[/command]
	[command]
		[move]
			x="30,29,28,27,26"
			y="18,19,19,20,20"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="26"
				y="20"
			[/source]
			[destination]
				x="25"
				y="20"
			[/destination]
		[/attack]
		[random]
			value="29503"
			[results]
				chance="60"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="15578"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="32560"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="lisa2 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="31,31,31,31,31,30"
			y="16,17,18,19,20,20"
		[/move]
	[/command]
	[command]
		[move]
			x="25,26,27,27,27,26,25,25"
			y="21,21,21,20,19,18,18,17"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="1"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="eltron69 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,24"
			y="20,19"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="3"
			x="24"
			y="19"
		[/recruit]
		[random]
			value="11849"
		[/random]
		[random]
			value="29276"
		[/random]
		[random]
			value="19600"
		[/random]
		[random]
			value="17373"
		[/random]
		[random]
			value="8359"
		[/random]
		[random]
			value="1256"
		[/random]
		[random]
			value="24635"
		[/random]
		[random]
			value="3625"
		[/random]
		[random]
			value="31771"
		[/random]
		[random]
			value="25796"
		[/random]
		[random]
			value="1593"
		[/random]
		[random]
			value="30395"
		[/random]
		[random]
			value="12549"
		[/random]
		[random]
			value="32613"
		[/random]
		[random]
			value="31354"
			[results]
				checksum="eKEMoMtJ2Sm2IxNK-ruIvyJD8uFQquOORqLQAKsDuHBwnqvBFyQvVsL8qHTmQQNRqrWuTuTxDUyGDPxfDLuyOcqNHBnCR5lyBlS<1Ip648,gYmdg-Lb7,b2<2j8614eh"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="mike2 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="1"
			x="28"
			y="19"
		[/recruit]
		[random]
			value="32012"
		[/random]
		[random]
			value="9401"
		[/random]
		[random]
			value="23744"
		[/random]
		[random]
			value="5044"
		[/random]
		[random]
			value="19759"
		[/random]
		[random]
			value="21353"
		[/random]
		[random]
			value="32687"
		[/random]
		[random]
			value="31021"
		[/random]
		[random]
			value="8240"
		[/random]
		[random]
			value="1374"
		[/random]
		[random]
			value="18718"
		[/random]
		[random]
			value="24117"
		[/random]
		[random]
			value="3935"
		[/random]
		[random]
			value="13892"
		[/random]
		[random]
			value="12125"
			[results]
				checksum="15,Wfc>cu2lH0olW9-5N-m<e6f60hfabkcij<4>i3h3e2.t0a1f<j870h0k565.Y0>ide2Ki80k.d8da021n<.26Z+40CN5c8b.-X,48K.7v3k3XdJFikGNQwGMoVOFH"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="JainaSolo has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="ME4 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,24,25"
			y="19,20,21"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="25"
				y="21"
			[/source]
			[destination]
				x="26"
				y="20"
			[/destination]
		[/attack]
		[random]
			value="30292"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="6528"
			[results]
				chance="40"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="29337"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="7775"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="24715"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="2"
			value="270000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="20,20,20,20,21"
			y="17,18,19,20,21"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="kolo has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="21"
				y="21"
			[/source]
			[destination]
				x="22"
				y="20"
			[/destination]
		[/attack]
		[random]
			value="31776"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="31081"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="20117"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="v0mi has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="30,29,28,27,26,25"
			y="20,20,19,20,19,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Bertran_de_Wise has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="25"
				y="20"
			[/source]
			[destination]
				x="25"
				y="21"
			[/destination]
		[/attack]
		[random]
			value="12089"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="11108"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="26984"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="11155"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="5742"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="16835"
			[results]
				chance="40"
				damage="5"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		undo="no"
		[speak]
			id="zako"
			message="gg"
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Neves"
			message="gg"
			side="2"
		[/speak]
	[/command]
[/replay]
[snapshot]
[/snapshot]
[replay_start]
	current_tod="0"
#textdomain wesnoth-multiplayer
	description=_ "These caves were once the lair of Chak'kso Ney'yks, a legendary Elder Basilisk. The petrified forms of his victims remain as monuments to his savage power."
	experience_modifier="70"
	hash="McPgEzp.LJt7h.t1Qr.c0wdN6DSMrFSDz4LpPy.MjaHg-SJ4NO6RN7,AJkIOwBZE.K6Gt>F,tbOGluI+4Fgcg7SDu,wQihAGrihF1c3lurN0vQXAvq<LoFHYPrX2RHE1"
	id="multiplayer_Basilisk"
	map_data="border_size=1
usage=map

_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Mm^Xm       , Mm^Xm       , Mm^Xm       , Gs^Fp       , Mm^Xm       , Gs^Fp       , Hh          , Gs^Fms      , Ww          , Ww          , Ww          , Gs^Fp       , Gs^Fms      , Hh          , Mm^Xm       , Gs^Fp       , Mm^Xm       , Mm^Xm       , Mm          , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Gs^Fp       , Mm          , Gg^Fet      , Mm          , Gs^Fp       , Mm^Xm       , Gs^Fms      , Gg^Ve       , Gg          , Hh          , Mm          , Ww          , Gs^Fp       , Hh          , Gg          , Mm          , Gg^Fet      , Mm^Xm       , Mm          , Mm          , Hh          , Gs^Fp       , Ggf         , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Hh          , Ggf         , Gg          , Hh          , Gg^Ve       , Hh          , Gs^Fms      , Mm          , Mm          , Ggf         , Gg          , Gg          , Ch          , 1 Kh        , Ch          , Gg          , Hh          , Gg          , Gg          , Gs^Fp       , Gg          , Gg          , Gg          , Gg          , Gs^Fms      , Wwf         , Wwf         , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Xu          , Wwf         , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Kh          , Ch          , Gg          , Wwf         , Gg          , Ch          , Kh          , Gs^Fp       , Mm          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Mm          , Wwf         , Xu          , Xu          , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Xu          , Xu          , Wwf         , Wwf         , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Re          , Gg          , Re          , Gg          , Gg          , Gg          , Gg          , Wwf         , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Hh          , Gs^Fp       , Gg^Ve       , Gg          , Ggf         , Mm          , Wwf         , Xu          , Xu          , Xu          , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , Xu          , Xu          , Xu          , Xu          , Wwf         , Gg          , Gg          , Gs^Fp       , Hh          , Gs^Fp       , Gg          , Gg          , Re          , Re          , Xu          , Re          , Re^Uf       , Gg          , Re          , Wwf         , Gg          , Gs^Fms      , Gg          , Re          , Re          , Re          , Xu          , Gg          , Gg          , Hh          , Gg          , Gg          , Gs^Fp       , Wwf         , Wwf         , Xu          , Uh          , Xu          , Xu          , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , Xu          , Xu          , Wwf         , Wwf         , Mm          , Gg          , Gg          , Re^Uf       , Mm          , Gg          , Re          , Re          , Ww          , Xu          , Uh          , Uu^Vud      , Xu          , Re          , Wwf         , Wwf         , Re          , Gg          , Re          , Re          , Wwf         , Xu          , Xu          , Re^Uf       , Re          , Gg          , Gg          , Hh          , Ggf         , Hh          , Wwf         , Xu          , Wwf         , Uu          , Uu^Uf       , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , Xu          , Wwf         , Gs^Fp       , Hh          , Hh          , Gg          , Gg          , Hh          , Gs^Fms      , Gg          , Re          , Ww          , Wo          , Ww          , Wwf         , Wwf         , Uh          , Uu^Uf       , Wwf         , Ww          , Ss^Vhs      , Re          , Xu          , Wwf         , Ur          , Ur          , Re          , Re          , Gs^Fms      , Hh          , Gg^Uf       , Gg          , Gg          , Re          , Re^Uf       , Wwf         , Wwf         , Uu          , Xu          , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , Wwf         , Wwf         , Ggf         , Ggf         , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Re          , Ww          , Ww          , Ww          , Xu          , Uh          , Xu          , Ur          , Ww          , Ww          , Ww          , Xu          , Ww          , Uh          , Uu^Vu       , Re          , Gg          , Gg          , Gg          , Gg^Ve       , Gg          , Gg          , Gg          , Gg          , Re          , Gs^Fp       , Wwf         , Xu          , Xu          , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , Gs^Fms      , Gs^Fp       , Re^Uf       , Re          , Gg          , Gg          , Gg          , Gg          , Gg          , Ss^Vhs      , Gg          , Re          , Wwf         , Uh          , Xu          , Ur          , Xu          , Wwf         , Ww          , Wo          , Uu          , Uh          , Ww          , Xu          , Xu          , Re          , Re          , Gg          , Gg          , Gg          , Gs^Fms      , Hh          , Hh          , Gg          , Gg          , Re          , Re          , Wwf         , Xu          , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , Mm          , Hh          , Re          , Re          , Gg          , Gg          , Hh          , Gs^Fp       , Ss          , Gg          , Hh          , Re          , Wwf         , Xu          , Xu          , Ur          , Wwf         , Wwf         , Ww          , Uu^Uf       , Ww          , Ww          , Wwf         , Uu^Uf       , Xu          , Uh          , Wwf         , Re          , Hh          , Hh          , Mm          , Gs^Fp       , Hh          , Gs^Fp       , Gg          , Re          , Re          , Wwf         , Wwf         , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , Wwf         , Re^Uf       , Re          , Gg          , Gg          , Gs^Fp       , Re^Uf       , Gs^Fms      , Mm          , Gs^Fp       , Hh          , Re          , Re          , Uh          , Xu          , Uu^Uf       , Ww          , Ww          , Uu          , Uu^Uf       , Ww          , Wwf         , Xu          , Ur          , Xu          , Xu          , Wwf         , Re          , Re          , Gs^Fp       , Gg          , Ss          , Gg          , Gg          , Gg          , Gg          , Gg          , Re^Uf       , Mm          , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , Xu          , Wwf         , Re          , Gg          , Gg          , Gg          , Gg          , Hh          , Gg          , Hh          , Gg          , Gg          , Gg          , Re          , Uu^Vu       , Xu          , Ww          , Uh          , Ww          , Wo          , Ww          , Wwf         , Xu          , Ur          , Xu          , Uh          , Ww          , Re          , Re          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Ggf         , Hh          , Hh          , Gs^Fp       , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , Xu          , Wwf         , Wwf         , Hh          , Hh          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Re          , Re          , Ur          , Uh          , Xu          , Xu          , Ss^Vhs      , Ww          , Wwf         , Ur          , Uh          , Uh          , Wwf         , Ww          , Wo          , Ww          , Re          , Re          , Gg          , Gg          , Gs^Fms      , Gg          , Gg          , Gg          , Gg          , Gs^Fp       , Wwf         , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , Xu          , Xu          , Wwf         , Gs^Fp       , Re          , Gg          , Ggf         , Gg          , Gg          , Gg          , Gg          , Gs^Fp       , Xu          , Ur          , Wwf         , Wwf         , Re          , Re          , Re          , Ww          , Wwf         , Uu^Uf       , Xu          , Wwf         , Uh          , Ww          , Ww          , Ww          , Re          , Ss^Vhs      , Gg          , Hh          , Mm          , Hh          , Re^Uf       , Gg          , Gg          , Wwf         , Xu          , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , Uu^Uf       , Uu          , Wwf         , Wwf         , Wwf         , Re          , Hh          , Mm          , Gs^Fp       , Gg          , Gg          , Uh          , Xu          , Xu          , Re          , Re          , Gg          , Gg          , Gg          , Wwf         , Re          , Re          , Re^Uf       , Uu^Vud      , Xu          , Xu          , Re          , Re          , Gg          , Gg          , Gg          , Gs^Fms      , Ggf         , Gs^Fp       , Gg          , Gg          , Wwf         , Wwf         , Xu          , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , Xu          , Wwf         , Uh          , Xu          , Xu          , Wwf         , Re          , Re^Uf       , Ggf         , Gg^Uf       , Gs^Fp       , Gg          , Gg          , Re          , Gg          , Re          , Gg          , Gs^Fp       , Gg          , Wwf         , Gg          , Gg          , Gg          , Re          , Re          , Re          , Re          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Wwf         , Wwf         , Xu          , Xu          , Xu          , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , Xu          , Xu          , Xu          , Xu          , Wwf         , Re          , Gs^Fms      , Gg          , Gg^Ve       , Ggf         , Gg          , Gg          , Gg          , Ggf         , Gg          , Kh          , Gg          , Gg          , Wwf         , Gg          , Gg          , Kh          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Wwf         , Xu          , Xu          , Xu          , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Xu          , Xu          , Wwf         , Wwf         , Re          , Mm          , Hh          , Gg          , Gg          , Gg          , Gg^Ve       , Gg          , Gs^Fms      , Gg          , Ch          , Ch          , Wwf         , Ch          , Ch          , Gg          , Gg          , Gg          , Gg          , Gg^Fet      , Gg          , Gg^Ve       , Gg          , Gg          , Gs^Fp       , Gg          , Wwf         , Xu          , Xu          , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Xu          , Wwf         , Re          , Re          , Gs^Fp       , Re          , Gg          , Hh          , Hh          , Gs^Fms      , Gg          , Gg          , Hh          , Mm          , 2 Kh        , Gs^Fp       , Gg          , Gg          , Gg^Ve       , Gs^Fp       , Gg          , Hh          , Hh          , Gs^Fp       , Hh          , Gs^Fms      , Gg          , Wwf         , Wwf         , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Wwf         , Re          , Re          , Re          , Gs^Fp       , Mm          , Mm          , Mm          , Mm          , Gs^Fms      , Gg^Fet      , Hh          , Ww          , Hh          , Hh          , Gs^Fms      , Hh          , Mm          , Hh          , Mm^Xm       , Mm          , Mm          , Hh          , Gs^Fp       , Mm          , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Mm          , Hh          , Hh          , Mm^Xm       , Mm^Xm       , Mm^Xm       , Mm^Xm       , Mm^Xm       , Mm          , Mm^Xm       , Ww          , Ww          , Mm          , Mm^Xm       , Mm^Xm       , Mm^Xm       , Mm^Xm       , Mm          , Mm^Xm       , Mm          , Hh          , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Mm^Xm       , _off^_usr   , Mm          , _off^_usr   , Gs^Fp       , _off^_usr   , Mm^Xm       , _off^_usr   , Ww          , _off^_usr   , Gs^Fp       , _off^_usr   , Hh          , _off^_usr   , Gs^Fp       , _off^_usr   , Mm^Xm       , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
"
	mp_countdown="yes"
	mp_countdown_action_bonus="20"
	mp_countdown_init_time="270"
	mp_countdown_reservoir_time="270"
	mp_countdown_turn_bonus="200"
	mp_fog="yes"
	mp_shroud="no"
	mp_use_map_settings="yes"
	mp_village_gold="2"
	name=_ "2p - Caves of the Basilisk"
	next_underlying_unit_id="0"
#textdomain wesnoth
	objectives=_ "Victory:
@Defeat enemy leader(s)"
	observer="yes"
	random_seed="32449"
	random_start_time="no"
	scenario="Ladder game(registered player only!)"
	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="zako"
		flag_rgb="magenta"
		fog="yes"
		gender="male"
		gold="100"
		id="zako1"
		image="units/undead-necromancers/dark-sorcerer.png"
		income="0"
		leader="Dark Sorcerer,Revenant,Deathblade,Bone Shooter,Necrophage"
		mp_countdown="yes"
		mp_countdown_action_bonus="20"
		mp_countdown_init_time="270"
		mp_countdown_reservoir_time="270"
		mp_countdown_turn_bonus="200"
		name="zako"
		random_leader="Dark Sorcerer,Revenant,Deathblade,Bone Shooter"
		recruit="Skeleton,Skeleton Archer,Walking Corpse,Ghost,Vampire Bat,Dark Adept,Ghoul"
		save_id="zako1"
		share_maps="no"
		share_view="yes"
		shroud="no"
		side="1"
		team_name="north"
		terrain_liked="Ss, Hh, Ha, Ww"
		type="Deathblade"
		user_team_name="wesnoth-multiplayerteamname^North"
		village_gold="2"
		[ai]
			recruitment_pattern="fighter,fighter,archer,fighter,scout,archer"
			villages_per_scout="8"
			[team_formula]
				rulebase="fai 'recruitment.fai'
		# ===== Some general functions used later ==== #

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

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

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

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

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

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

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

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

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

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

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

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

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

#returns average defense of the unit #

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

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

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

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


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


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

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

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

# ==2== based on village possession #

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

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

# multipled by 1000 to increase precision #

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

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

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

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

#==1==  basic evaluation #

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

faiend
"
			[/team_formula]
		[/ai]
		[ai]
			villages_per_scout="8"
		[/ai]
	[/side]
	[side]
		allow_changes="yes"
		allow_player="yes"
		canrecruit="yes"
		colour="2"
		controller="network"
		current_player="Neves"
		flag_rgb="magenta"
		fog="yes"
		gender="male"
		gold="100"
		id="Neves2"
		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="20"
		mp_countdown_init_time="270"
		mp_countdown_reservoir_time="270"
		mp_countdown_turn_bonus="200"
		name="Neves"
		random_leader="Lieutenant,Swordsman,Pikeman,Javelineer,Longbowman,Red Mage"
		recruit="Cavalryman,Horseman,Spearman,Fencer,Heavy Infantryman,Bowman,Mage,Merman Fighter"
		save_id="Neves2"
		share_maps="no"
		share_view="yes"
		shroud="no"
		side="2"
		team_name="south"
		terrain_liked="Gg, Ww, Wo"
		type="Pikeman"
		user_team_name="wesnoth-multiplayerteamname^South"
		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="no"
		canrecruit="no"
		colour="5"
		controller="ai"
		flag_rgb="magenta"
		fog="yes"
		gender="male"
		gold="100"
		hidden="yes"
		id="ai3"
		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="20"
		mp_countdown_init_time="270"
		mp_countdown_reservoir_time="270"
		mp_countdown_turn_bonus="200"
		name=_ "Computer player"
		no_leader="yes"
		random_leader="Lieutenant,Swordsman,Pikeman,Javelineer,Longbowman,Red Mage"
		recruit="Cavalryman,Horseman,Spearman,Fencer,Heavy Infantryman,Bowman,Mage,Merman Fighter"
		save_id="ai3"
		share_maps="no"
		share_view="yes"
		shroud="no"
		side="3"
		team_name="statues"
		terrain_liked="Gg, Ww, Wo"
		type="Lieutenant"
		user_team_name="statues"
		village_gold="2"
		[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]
		[unit]
#textdomain wesnoth-multiplayer
			description=_ "The winds of the dark sky blew so cold,
The moon was high, the night was old,
Brave was the drake that dared forsake
His home to steal the Basilisk's gold.

On that dark night, the skies so churned,
He disregarded what he had learned,
Foolish but brave, to the Basilisk's cave,
He flew, and the fire within him burned.

Alas, that fire burns no more,
For the Basilisk, with one mighty roar,
Chilled him to the bone, and he turned to stone,
And so he stays forevermore.

The winds of the sky blow so cold,
The years pass by, the days are old,
Here stands that drake, who dared forsake
His home to steal the Basilisk's gold.
(inscribed by Flametrooper)"
			random_traits="no"
			type="Sky Drake"
			unrenamable="yes"
			x="27"
			y="14"
			[status]
				stoned="on"
			[/status]
			[modifications]
				[trait]
					id="remove_hp"
					[effect]
						apply_to="hitpoints"
						increase_total="-100%"
					[/effect]
					[effect]
						apply_to="movement"
						set="0"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			description=_ "Xikkrisx of Syrsszk was a powerful Saurian warrior, sent to this region by the Elders of the Rysssrylosszkk Clan (translation: ''The Hunts-Foes-In-Boiling-Rivers Clan''). The Elders were preparing to make war on a human outpost, and were in great need of the powerful magics of Oxsrrsk, a Saurian Mystic who had last been seen heading in the direction of Ruaskkolin Lake. Xikkrisx found the petrified body of Oxsrrsk, along with a carefully bound scroll that had apparently been dropped into a small crevice in the cave floor. He opened the scroll and read a brief passage from the middle of the text: ''After he was bound and cast from the Upper World, Chak'kso's enraged spirit sought release, and was able to exert a corrupting influence on certain regions of the Upper World, channeled through ''pathways of stone'' that extend from the surface into the depths of the Under Reaches. This rage altered the eggs of great lizards, shaping their bodies and spirits into implements of Chak'kso's hatred.'' Confused, Xikkrisx fixed his attention on the task at hand. Thinking that perhaps the Elders could find some way to restore Oxsrrsk, he began the long and strenuous task of hauling the statue back to the domain of the Rysssrylosszkk Clan. Exhausted, and not having traveled far from the lake, Xikkrisx set the statue down inside of a small cave, and lay down to rest. He was awoken by a bone-chilling roar."
			facing="sw"
			name=_ "Xikkrisx"
			random_traits="no"
			type="Saurian Flanker"
			unrenamable="yes"
			x="40"
			y="8"
			[status]
				stoned="on"
			[/status]
			[modifications]
				[trait]
					id="remove_hp"
					[effect]
						apply_to="hitpoints"
						increase_total="-100%"
					[/effect]
					[effect]
						apply_to="movement"
						set="0"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			description=_ "Oxsrrsk was a powerful Saurian Oracle, who had, in a raid against the rival Xraxss Clan, acquired (from the vaults of the now-dead Oracle Hesx-Rzzak) a most fascinating scroll. The scroll was entitled ''Ney'yks of the Granite Gaze,'' and told of a creature known as the ''Chak'kso Ney'yks,'' a name which, in an ancient saurian tongue, meant ''Eldest Child of Chak'kso.'' Chak'kso was believed to have been a powerful demigod of the Under Reaches, described as a ''great demon of the earth'' in the Elvish Histories. According to these histories, Chak'kso had once sought to transform all life on the planet to stone; so great was his hatred for creatures of flesh. He was ultimately defeated and bound by powerful magics, but in the centuries following his banishment (to a realm far below the surface of the world) a new breed of creature began appearing in the Histories, a breed with the ability to turn any being of flesh into stone. There was a period when these Basilisks (as they came to be known) wreaked havoc on the world of the living, turning thousands to stone. One by one, and at great cost, the Basilisks were defeated. All, it would seem, but one; the Basilisk known as ''The Ney'yks,'' or ''The Eldest Child,'' in the modern tongue. Supremely convinced of his ability to locate and bind this powerful creature into his service, Oxsrrsk set out on his journey..."
			facing="sw"
			name=_ "Oxsrrsk"
			random_traits="no"
			type="Saurian Oracle"
			unrenamable="yes"
			x="39"
			y="8"
			[status]
				stoned="on"
			[/status]
			[modifications]
				[trait]
					id="remove_hp"
					[effect]
						apply_to="hitpoints"
						increase_total="-100%"
					[/effect]
					[effect]
						apply_to="movement"
						set="0"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			description=_ "Slim of Stature, dexterous Hands
- - Seven Stones and Eleven
Left his Foes so slim a Chance
- - Seven Stones and Eleven
Marksman known as Dragonbane
'mongst the Statues here was slain
- - Seven Stones - and the Elven
(inscribed by Gauteamus)"
			random_traits="no"
			type="Elvish Marksman"
			unrenamable="yes"
			x="2"
			y="11"
			[status]
				stoned="on"
			[/status]
			[modifications]
				[trait]
					id="remove_hp"
					[effect]
						apply_to="hitpoints"
						increase_total="-100%"
					[/effect]
					[effect]
						apply_to="movement"
						set="0"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			description=_ "Blum Duk was renowned among his goblin clan for having tamed one of the Dire Wolves of the mountains, and he had the courage to match. His leadership and skills alone were what kept the area's goblins alive despite human and elvish menaces. Rumor had it that his wolf had slain fifty men and a hundred Elves.
Thus, when he heard of the awful monster that was inhabiting the area, it was only natural that he ride out alone to face it. All the other goblins expected him to slay the creature easily and drag back its carcass to feast on.
He was in for quite a shock. As soon as he saw the Basilisk, Blum Duk cowered in fright. He tried to wheel his wolf around to run away, but it wouldn't move. As the creature stalked towards him, he screamed his last words: Good Gog, dog, are yer legs made of stone?!?
(inscribed by Elvish Pillager)"
			name=_ "Blum Duk"
			random_traits="no"
			type="Direwolf Rider"
			unrenamable="yes"
			x="10"
			y="17"
			[status]
				stoned="on"
			[/status]
			[modifications]
				[trait]
					id="remove_hp"
					[effect]
						apply_to="hitpoints"
						increase_total="-100%"
					[/effect]
					[effect]
						apply_to="movement"
						set="0"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			description=_ "Rah Ihn Mar, Champion of the Burning Hills, made his way to the Ruaskkolin Lake region in pursuit of the Elvish Hero Terowydlithrol, known among Elves as ''The Dragonbane.'' It was said that Terowydlithrol had killed a Dragon of Fire that threatened an Elvish village, and initiated a ''counterattack'' in which some 37 Drakes, camping in a nearby ravine and believed to be in allegiance with the Dragon, were slaughtered. Knowing that these Drakes were innocent, Rah Ihn Mar came to Ruaskkolin Lake to hunt down and slay Terowydlithrol, who had been seen entering the region but a day ago. Burning for vengeance, Rah Ihn Mar began the hunt....."
			name=_ "Rah Ihn Mar"
			random_traits="no"
			type="Armageddon Drake"
			unrenamable="yes"
			x="11"
			y="14"
			[status]
				stoned="on"
			[/status]
			[modifications]
				[trait]
					id="remove_hp"
					[effect]
						apply_to="hitpoints"
						increase_total="-100%"
					[/effect]
					[effect]
						apply_to="movement"
						set="0"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			description=_ "He had lived there for ages upon ages, in the depths of the water, preying upon the various fish and frogs and merfolk that entered his domain. It was his lake, no other's, and though it was not large, he was its master. Then, the Basilisk came, and looked into the Serpent's eyes. And the Serpent had not died, but it was no longer alive. Thus the new lord of the lake had arrived.
(inscribed by Turin)"
			facing="sw"
			random_traits="no"
			type="Sea Serpent"
			unrenamable="yes"
			x="22"
			y="12"
			[status]
				stoned="on"
			[/status]
			[modifications]
				[trait]
					id="remove_hp"
					[effect]
						apply_to="hitpoints"
						increase_total="-100%"
					[/effect]
					[effect]
						apply_to="movement"
						set="0"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			description=_ "A brave hero of Wesnoth's Golden Age, this great rider and commander of men came to this evil place while on a raid against the orcs. Caught unaware by the foul creatures, many of his fellows were killed, but he fought valiantly, slaying many a foe. But alas! The foul Basilisk turned him to stone even as he slew the last orc. Now all that is left is a stark reminder of his once great bearing and strength.
(inscribed by Fynmiir)"
			facing="sw"
			random_traits="no"
			type="Grand Knight"
			unrenamable="yes"
			x="25"
			y="14"
			[status]
				stoned="on"
			[/status]
			[modifications]
				[trait]
					id="remove_hp"
					[effect]
						apply_to="hitpoints"
						increase_total="-100%"
					[/effect]
					[effect]
						apply_to="movement"
						set="0"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			description=_ "Bramwythl the Wose was always considered a slow, taciturn fellow, even by other Woses. More than any other Wose, he enjoyed simply standing alone in the sun, arms upraised, admiring the beauty of the empty sky. Once, even, he confided in a fellow that his greatest wish was to be able to bask forever in the sun's glory.
However, not long after, the local wose community heard of the approach of a horrible monster, powerful enough to easily destroy the few woses that lived in the area. They quickly moved off (quickly for Woses, anyway), but Bramwythl was left behind - in their haste, no one had remembered to find him and tell him of the danger.
He was taken quite unawares by the Basilisk, and turned to stone before he even recognized the beast. His petrified form still stands there today, warmed by the sun's rays, under an open sky. His greatest wish has been granted.
(inscribed by Elvish Pillager)"
			name=_ "Bramwythl"
			random_traits="no"
			type="Elder Wose"
			unrenamable="yes"
			x="32"
			y="6"
			[status]
				stoned="on"
			[/status]
			[modifications]
				[trait]
					id="remove_hp"
					[effect]
						apply_to="hitpoints"
						increase_total="-100%"
					[/effect]
					[effect]
						apply_to="movement"
						set="0"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			description=_ "General Talael Ryndoc came to this place to fight a duel with the Grand Marshal Aethec Corryn, but the two men never found one another. "
			facing="sw"
			name=_ "Talael Ryndoc"
			random_traits="no"
			type="Iron Mauler"
			unrenamable="yes"
			x="34"
			y="11"
			[status]
				stoned="on"
			[/status]
			[modifications]
				[trait]
					id="remove_hp"
					[effect]
						apply_to="hitpoints"
						increase_total="-100%"
					[/effect]
					[effect]
						apply_to="movement"
						set="0"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			description=_ "The last words spoken by Grand Marshal Aethec Corryn: ''Talael Ryndoc! I am through searching for you! I shall make my way back to Haldric's Hall, and inform the court that you were too much of a coward to attend our duel! Your disgrace shall be more agonizing than the death I'd have given you!''

Perhaps he should not have shouted quite so loudly.... "
			facing="sw"
			name=_ "Aethec Corryn"
			random_traits="no"
			type="Grand Marshal"
			unrenamable="yes"
			x="15"
			y="11"
			[status]
				stoned="on"
			[/status]
			[modifications]
				[trait]
					id="remove_hp"
					[effect]
						apply_to="hitpoints"
						increase_total="-100%"
					[/effect]
					[effect]
						apply_to="movement"
						set="0"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			description=_ "This brave warrior, known as Rilhon among the Naga, heard tell of a fabulous treasure that had been lost in these watery caves- a spear whose head was said to have been fashioned from the tooth of Chak'kso Ney'yks, an Elder Basilisk slain long ago by the Elvish hero, Eloralduil. According to the legend, the weapon rested somewhere on the bottom of this very lake (Ruaskkolin Lake, named for a well-known Sea Serpent who made it his home). Having prepared himself for battle with the Serpent, Rilhon met with two rather large surprises. The first was the petrified form of Ruaskkolin the Serpent. The second was the very-much-alive Chak'kso Ney'yks, who was, oddly enough, in possession of all of his teeth.
(inscribed by Paterson)"
			name=_ "Rilhon"
			random_traits="no"
			type="Naga Myrmidon"
			unrenamable="yes"
			x="20"
			y="12"
			[status]
				stoned="on"
			[/status]
			[modifications]
				[trait]
					id="remove_hp"
					[effect]
						apply_to="hitpoints"
						increase_total="-100%"
					[/effect]
					[effect]
						apply_to="movement"
						set="0"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			description=_ "Through waves and rocky channels
blue and white
she pulled and pushed the tides
and taught the fishes how to speak to planets
silver green
with magic
running from her spirit into skins of kelp and shells of snails
a twisting of her tail and hands
she sent her songs to run on pin-tipped legs about the sands
and now
and now the strangest pause
for years and years
she hasn't moved her eyes

(inscribed by MJQ)"
			facing="sw"
			random_traits="no"
			type="Mermaid Siren"
			unrenamable="yes"
			x="17"
			y="11"
			[status]
				stoned="on"
			[/status]
			[modifications]
				[trait]
					id="remove_hp"
					[effect]
						apply_to="hitpoints"
						increase_total="-100%"
					[/effect]
					[effect]
						apply_to="movement"
						set="0"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
	[/side]
[/replay_start]
[statistics]
	mid_scenario="yes"
	[scenario]
		scenario="2P - バジリスクの洞窟"
		[team]
			[recruits]
				Bowman="1"
				Cavalryman="1"
				Heavy Infantryman="3"
				Horseman="3"
				Mage="4"
				Merman Fighter="1"
			[/recruits]
			[recalls]
			[/recalls]
			[advances]
			[/advances]
			[deaths]
				Bowman="1"
				Heavy Infantryman="2"
				Horseman="3"
				Mage="4"
				Merman Fighter="1"
				Pikeman="1"
			[/deaths]
			[killed]
				Dark Adept="2"
				Ghoul="3"
				Skeleton="1"
				Skeleton Archer="1"
				Walking Corpse="1"
			[/killed]
			[attacks]
				[sequence]
					s0="1"
					_num="40"
				[/sequence]
				[sequence]
					s01="1"
					_num="50"
				[/sequence]
				[sequence]
					s00="2"
					s000="1"
					s01="2"
					s011="3"
					s1="1"
					s101="1"
					s11="3"
					s110="2"
					s111="1"
					_num="60"
				[/sequence]
				[sequence]
					s011="1"
					s1="1"
					s101="1"
					s110="1"
					s111="2"
					_num="70"
				[/sequence]
			[/attacks]
			[defends]
				[sequence]
					s="19"
					_num="0"
				[/sequence]
				[sequence]
					s0="2"
					s10="1"
					_num="40"
				[/sequence]
				[sequence]
					s0="1"
					s101="1"
					_num="50"
				[/sequence]
				[sequence]
					s="1"
					s0="3"
					s001="1"
					s011="1"
					s1="4"
					s100="1"
					s111="1"
					_num="60"
				[/sequence]
				[sequence]
					s="1"
					s011="1"
					s101="1"
					s111="2"
					_num="70"
				[/sequence]
			[/defends]
			recruit_cost="251"
			recall_cost="0"
			damage_inflicted="396"
			damage_taken="463"
			expected_damage_inflicted="371601"
			expected_damage_taken="466654"
			turn_damage_inflicted="15"
			turn_damage_taken="15"
			turn_expected_damage_inflicted="17520"
			turn_expected_damage_taken="15576"
			save_id="Neves2"
		[/team]
		[team]
			[recruits]
			[/recruits]
			[recalls]
			[/recalls]
			[advances]
			[/advances]
			[deaths]
			[/deaths]
			[killed]
			[/killed]
			[attacks]
			[/attacks]
			[defends]
			[/defends]
			recruit_cost="0"
			recall_cost="0"
			damage_inflicted="0"
			damage_taken="0"
			expected_damage_inflicted="0"
			expected_damage_taken="0"
			turn_damage_inflicted="0"
			turn_damage_taken="0"
			turn_expected_damage_inflicted="0"
			turn_expected_damage_taken="0"
			save_id="ai3"
		[/team]
		[team]
			[recruits]
				Dark Adept="6"
				Ghoul="4"
				Skeleton="2"
				Skeleton Archer="5"
				Vampire Bat="2"
				Walking Corpse="1"
			[/recruits]
			[recalls]
			[/recalls]
			[advances]
				Blood Bat="1"
			[/advances]
			[deaths]
				Dark Adept="2"
				Ghoul="3"
				Skeleton="1"
				Skeleton Archer="1"
				Walking Corpse="1"
			[/deaths]
			[killed]
				Bowman="1"
				Heavy Infantryman="2"
				Horseman="3"
				Mage="4"
				Merman Fighter="1"
				Pikeman="1"
			[/killed]
			[attacks]
				[sequence]
					s000="1"
					s00010="1"
					s010="1"
					s101="2"
					s11="1"
					_num="40"
				[/sequence]
				[sequence]
					s00="1"
					s001="1"
					_num="50"
				[/sequence]
				[sequence]
					s0="1"
					s000="1"
					s001="3"
					s010="1"
					s011="2"
					s1="2"
					s100="2"
					s101="1"
					s11="2"
					s111="3"
					_num="60"
				[/sequence]
				[sequence]
					s00="2"
					s01="3"
					s011="1"
					s1="1"
					s10="3"
					s11="5"
					_num="70"
				[/sequence]
			[/attacks]
			[defends]
				[sequence]
					s="13"
					_num="0"
				[/sequence]
				[sequence]
					s01="1"
					s10="1"
					_num="40"
				[/sequence]
				[sequence]
					s010="1"
					s011="1"
					s1="1"
					s11="1"
					s111="1"
					_num="60"
				[/sequence]
				[sequence]
					s1="1"
					s11="2"
					s111="1"
					_num="70"
				[/sequence]
			[/defends]
			recruit_cost="294"
			recall_cost="0"
			damage_inflicted="463"
			damage_taken="396"
			expected_damage_inflicted="466654"
			expected_damage_taken="371601"
			turn_damage_inflicted="13"
			turn_damage_taken="5"
			turn_expected_damage_inflicted="13976"
			turn_expected_damage_taken="8520"
			save_id="zako1"
		[/team]
	[/scenario]
[/statistics]
