label="ladder_Caphriel_vs_dr_snuggles"
version="1.6"
completion="running"
campaign_type="multiplayer"
difficulty="NORMAL"
random_seed="7733"
random_calls="0"
next_underlying_unit_id="87"
end_text_duration="0"
[variables]
[/variables]
[replay]
	[command]
		[start]
		[/start]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="4"
			x="22"
			y="6"
		[/recruit]
		[random]
			value="27901"
		[/random]
		[random]
			value="1809"
		[/random]
		[random]
			value="145"
		[/random]
		[random]
			value="25547"
		[/random]
		[random]
			value="5665"
		[/random]
		[random]
			value="18815"
		[/random]
		[random]
			value="29937"
		[/random]
		[random]
			value="29673"
		[/random]
		[random]
			value="15689"
		[/random]
		[random]
			value="28604"
		[/random]
		[random]
			value="18524"
		[/random]
		[random]
			value="23432"
		[/random]
		[random]
			value="17420"
		[/random]
		[random]
			value="30930"
		[/random]
		[random]
			value="21053"
			[results]
				checksum="6hs5opl9pneud6314Hg106a+elObfd5dh>d-kgk5j40fd5c,laoh2>q4W68<jj1,,Bh1+4l10mji0WUg681h64jGjKk7ELbfXlO69>IPFNIDBGnoCSO3srDyLKztBBJx"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="3"
			x="23"
			y="6"
		[/recruit]
		[random]
			value="7119"
		[/random]
		[random]
			value="18100"
		[/random]
		[random]
			value="5049"
		[/random]
		[random]
			value="4349"
		[/random]
		[random]
			value="17386"
		[/random]
		[random]
			value="25574"
		[/random]
		[random]
			value="28377"
		[/random]
		[random]
			value="3519"
		[/random]
		[random]
			value="12413"
		[/random]
		[random]
			value="19940"
		[/random]
		[random]
			value="6400"
		[/random]
		[random]
			value="28964"
		[/random]
		[random]
			value="4605"
		[/random]
		[random]
			value="29335"
		[/random]
		[random]
			value="2692"
			[results]
				checksum="H-Q.4kSV1kP6gOQR,wHJxusL-.Ekr06z8QM,E>N>OoNiAM-x,w+es6q9HO5BeFhCwtP2J9TQGVxuIw8SMUFUUA1FGHuc9g.x6zCvNjoC,6pf72FoLfpj9>yBpy8oZqof"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="6"
			x="20"
			y="5"
		[/recruit]
		[random]
			value="5844"
		[/random]
		[random]
			value="31408"
		[/random]
		[random]
			value="22527"
		[/random]
		[random]
			value="13656"
		[/random]
		[random]
			value="19883"
		[/random]
		[random]
			value="780"
		[/random]
		[random]
			value="31119"
		[/random]
		[random]
			value="23813"
		[/random]
		[random]
			value="31960"
		[/random]
		[random]
			value="8491"
		[/random]
		[random]
			value="16760"
		[/random]
		[random]
			value="11956"
		[/random]
		[random]
			value="23243"
		[/random]
		[random]
			value="8342"
		[/random]
		[random]
			value="16564"
			[results]
				checksum="J59kONwuL-Q+>062sP>0636mC5373eQ6,a5n2j.dTe2hl89<fZ.a.g-4+XcWi.Xef>.1Xyja86>c+>fg4o.2cih1iXal6r,8m4,Z.v3Dnk4Yd84dfCd5sga,Y<,06m7r"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="1"
			x="21"
			y="5"
		[/recruit]
		[random]
			value="13422"
		[/random]
		[random]
			value="4760"
		[/random]
		[random]
			value="32395"
		[/random]
		[random]
			value="13774"
		[/random]
		[random]
			value="13149"
		[/random]
		[random]
			value="21146"
		[/random]
		[random]
			value="26455"
		[/random]
		[random]
			value="25391"
		[/random]
		[random]
			value="19753"
		[/random]
		[random]
			value="5028"
		[/random]
		[random]
			value="7211"
		[/random]
		[random]
			value="29475"
		[/random]
		[random]
			value="20292"
		[/random]
		[random]
			value="16308"
		[/random]
		[random]
			value="10265"
			[results]
				checksum="uanXXm6,wl3GigaA+g95nn6hVh52<,alcaZ.01ah->ke.j8yho864c09je5dob.ld3k,h+bA1+Z,..>9<ImYcB->dd8+XYVckKYca0dYfE>btqe-anyQoXDDBuuCDOtE"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Gallahad has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,21,20,19,18,17"
			y="5,5,5,6,6,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="noobbascher has logged into the lobby"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="dr_snuggles"
			message="that was fast...."
			side="2"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="2"
			x="4"
			y="23"
		[/recruit]
		[random]
			value="1281260299"
		[/random]
		[random]
			value="1323316824"
		[/random]
		[random]
			value="1645212636"
		[/random]
		[random]
			value="89334480"
		[/random]
		[random]
			value="353536107"
		[/random]
		[random]
			value="1941582747"
		[/random]
		[random]
			value="1167212664"
		[/random]
		[random]
			value="80128503"
		[/random]
		[random]
			value="247503252"
		[/random]
		[random]
			value="111332125"
		[/random]
		[random]
			value="700768338"
		[/random]
		[random]
			value="1013136618"
		[/random]
		[random]
			value="389301663"
		[/random]
		[random]
			value="1757861279"
		[/random]
		[random]
			value="1441984374"
			[results]
				checksum="9CIQwCrz6RyeTTICy,HrVEsv8xKMwFuxzJDqOwQmKzmtMTEzPv,zPSmuOMoJAyLuJqKyRzLtHrjyLNtqqmLt5eGFJBAwBICTrpKGHCIsunwtguIWcfGAO<cOO98<20k3"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="MoaB has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Caphriel"
			message="I only play this map and freelands, so I know the recruits for some of the races for some of the start positions"
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="JainaSolo"
			message="ah... this map :) lol"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Hagbart has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Caphriel"
			message="ack"
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Caphriel"
			message="I forgot to set the timer"
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="RuSs has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="BURN has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="5"
			x="8"
			y="24"
		[/recruit]
		[random]
			value="612181390"
		[/random]
		[random]
			value="338468953"
		[/random]
		[random]
			value="2110995815"
		[/random]
		[random]
			value="929330618"
		[/random]
		[random]
			value="611132095"
		[/random]
		[random]
			value="2030320711"
		[/random]
		[random]
			value="85038947"
		[/random]
		[random]
			value="1172956974"
		[/random]
		[random]
			value="2135466205"
		[/random]
		[random]
			value="2033798771"
		[/random]
		[random]
			value="558734898"
		[/random]
		[random]
			value="1858926002"
		[/random]
		[random]
			value="1377219058"
		[/random]
		[random]
			value="1341960440"
		[/random]
		[random]
			value="1455854286"
			[results]
				checksum="tjfpy96<OvHApsEKQ0oOBBSqxDYSGUuIaHzsLFtQzOWOCBvyFBUsQPVHTIwPFmPFBqCnEs<sBULDPTGRPzPuVKDJsNyMJx,RFNPGrGqf<xPrTryODoP.K+zDJqnmswJN"
			[/results]
		[/random]
	[/command]
	[command]
		[recruit]
			value="0"
			x="4"
			y="24"
		[/recruit]
		[random]
			value="1060217693"
		[/random]
		[random]
			value="1406947092"
		[/random]
		[random]
			value="617338127"
		[/random]
		[random]
			value="1108401832"
		[/random]
		[random]
			value="1636436346"
		[/random]
		[random]
			value="762600093"
		[/random]
		[random]
			value="837357755"
		[/random]
		[random]
			value="1011449494"
		[/random]
		[random]
			value="2098579653"
		[/random]
		[random]
			value="556809643"
		[/random]
		[random]
			value="1713419922"
		[/random]
		[random]
			value="1840406431"
		[/random]
		[random]
			value="1503918076"
		[/random]
		[random]
			value="468578142"
		[/random]
		[random]
			value="570299045"
			[results]
				checksum="DB3s-,zQn1M2yKQrtl,yvEJs-TqLAH7qSCNCNSvmIJ>KNGxwmIQwSVVvQLyBGFwuCzBR9PMVRCroPzMEKTmSKvvPnFtw-InBRSqBwbD3xFMMEJCCHO+YDPPnPywBn8EE"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Gnutux has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="7,8,9,10,11,12"
			y="25,24,24,24,25,24"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Harpia has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Caphriel"
			message="do you mind playing untimed, or should we start over?"
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="DrunkenHaldric has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Cigla has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="20,19,18,17,16,15,14,13"
			y="5,6,6,6,6,6,6,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="21,20,19,18,17,16,15,14"
			y="5,4,4,3,4,3,4,3"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,21,21,21,21,20"
			y="6,7,8,9,10,10"
		[/move]
	[/command]
	[command]
		undo="no"
		[speak]
			id="dr_snuggles"
			message="i u dont play unlimited"
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="23,22,21,21,21,20,20,20"
			y="6,6,7,8,9,9,10,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="17,16,15,14,13,12"
			y="7,7,8,8,9,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Apollinaris1 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="dr_snuggles"
			message="if"
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Ilkkaile has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Caphriel"
			message="ok"
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="4"
			x="11"
			y="10"
		[/recruit]
		[random]
			value="23588"
		[/random]
		[random]
			value="32048"
		[/random]
		[random]
			value="32499"
		[/random]
		[random]
			value="17374"
		[/random]
		[random]
			value="27572"
		[/random]
		[random]
			value="20707"
		[/random]
		[random]
			value="2550"
		[/random]
		[random]
			value="26826"
		[/random]
		[random]
			value="8784"
		[/random]
		[random]
			value="22312"
		[/random]
		[random]
			value="10773"
		[/random]
		[random]
			value="23525"
		[/random]
		[random]
			value="2526"
		[/random]
		[random]
			value="11300"
		[/random]
		[random]
			value="7540"
			[results]
				checksum="jfC5opl9pneud6314Hg106a+elObfd5dh>d-kgk5j40fd5c,laoh2>q4W68<jj1,,Bh1+4l10mji-0Ug681h64jGjKk7ELYl9YI95gAxGxnvPuSVVEH>yBMtLAwyHUqR"
			[/results]
		[/random]
	[/command]
	[command]
		undo="no"
		[speak]
			id="dr_snuggles"
			message="ok"
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="5"
			x="12"
			y="11"
		[/recruit]
		[random]
			value="12406"
		[/random]
		[random]
			value="21133"
		[/random]
		[random]
			value="27842"
		[/random]
		[random]
			value="548"
		[/random]
		[random]
			value="9646"
		[/random]
		[random]
			value="8433"
		[/random]
		[random]
			value="2739"
		[/random]
		[random]
			value="21308"
		[/random]
		[random]
			value="24293"
		[/random]
		[random]
			value="26632"
		[/random]
		[random]
			value="29816"
		[/random]
		[random]
			value="4878"
		[/random]
		[random]
			value="31046"
		[/random]
		[random]
			value="6052"
		[/random]
		[random]
			value="17578"
			[results]
				checksum="SU39RsRPnopbtoBBs5yPBdjCxIoyMyJsCAbPtOQpxQRNpnMsQGGGqEpPQwrEETo0BNqQDyBuEICFSQFuTGrqGVJbRBzNpHETGFOwJPvMPJFf8IBNyQOKRJUZDRgOWmID"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="4"
			x="12"
			y="10"
		[/recruit]
		[random]
			value="3501"
		[/random]
		[random]
			value="25426"
		[/random]
		[random]
			value="155"
		[/random]
		[random]
			value="13828"
		[/random]
		[random]
			value="30252"
		[/random]
		[random]
			value="15355"
		[/random]
		[random]
			value="8552"
		[/random]
		[random]
			value="12158"
		[/random]
		[random]
			value="24922"
		[/random]
		[random]
			value="12770"
		[/random]
		[random]
			value="24229"
		[/random]
		[random]
			value="19260"
		[/random]
		[random]
			value="774"
		[/random]
		[random]
			value="8295"
		[/random]
		[random]
			value="442"
			[results]
				checksum="6hs5opl9mneud6314Hg106a+elObfd5dh>d-kgk5j40fd5c,laoh2>q4W68<jj1,,Bh1+4l10mji0YUg681h64jGjKk7ELbfXlO69>IPFNIDBGnBCSO3srDyLKztBBHx"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="4,4,5,5,6"
			y="24,23,23,22,21"
		[/move]
	[/command]
	[command]
		[move]
			x="4,5,5,6,6,6,6"
			y="23,23,22,21,20,19,18"
		[/move]
	[/command]
	[command]
		[move]
			x="6,6"
			y="18,17"
		[/move]
	[/command]
	[command]
		[move]
			x="6,5"
			y="17,17"
		[/move]
	[/command]
	[command]
		[move]
			x="8,8,8,9,10,11"
			y="24,23,22,22,21,21"
		[/move]
	[/command]
	[command]
		[move]
			x="12,13,14,15"
			y="24,24,23,23"
		[/move]
	[/command]
	[command]
		[recruit]
			value="6"
			x="15"
			y="21"
		[/recruit]
		[random]
			value="999221980"
		[/random]
		[random]
			value="601698320"
		[/random]
		[random]
			value="243170517"
		[/random]
		[random]
			value="305498978"
		[/random]
		[random]
			value="2035406916"
		[/random]
		[random]
			value="1817024149"
		[/random]
		[random]
			value="1507411903"
		[/random]
		[random]
			value="1207270062"
		[/random]
		[random]
			value="1162435178"
		[/random]
		[random]
			value="1389299887"
		[/random]
		[random]
			value="373506978"
		[/random]
		[random]
			value="437079065"
		[/random]
		[random]
			value="1593772715"
			[results]
				checksum="DTLTPwRQczAcRKLLbq0Mv5QyqrQOOBLOyBMIwFivztGUowQpTBRsw,0zs3P8rB49xHwm.opR7jouswcn.Adz9fQtQo8c1O8LyzFARPPnDHfaE>8vfLObeidgl03fnU6<"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Piash has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Krach-U has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="save_the_queen has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Tokugawa has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="3"
			x="16"
			y="22"
		[/recruit]
		[random]
			value="1505577596"
		[/random]
		[random]
			value="442843371"
		[/random]
		[random]
			value="1837699542"
		[/random]
		[random]
			value="1106391240"
		[/random]
		[random]
			value="56671307"
		[/random]
		[random]
			value="1139401128"
		[/random]
		[random]
			value="803077997"
		[/random]
		[random]
			value="397174184"
		[/random]
		[random]
			value="927335612"
		[/random]
		[random]
			value="1440804605"
		[/random]
		[random]
			value="577392663"
		[/random]
		[random]
			value="1907369895"
		[/random]
		[random]
			value="1677426496"
		[/random]
		[random]
			value="341800456"
		[/random]
		[random]
			value="121508267"
			[results]
				checksum="rQV6GBwD,UJ+7fLAQJ+xOoaC2U6DfS5lmb>+9w26zYBFaluj9yjnQ1omih>hik67n,e0IoZ07o9kcp0Ad568,m9n<X,+m,08797o60sxBFgnXEzrk-i.-tciji+H>s3M"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="dawi has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="0"
			x="15"
			y="22"
		[/recruit]
		[random]
			value="1196885203"
		[/random]
		[random]
			value="570285372"
		[/random]
		[random]
			value="566730643"
		[/random]
		[random]
			value="951942456"
		[/random]
		[random]
			value="543687842"
		[/random]
		[random]
			value="218642509"
		[/random]
		[random]
			value="380128746"
		[/random]
		[random]
			value="59984197"
		[/random]
		[random]
			value="984568536"
		[/random]
		[random]
			value="1281884417"
		[/random]
		[random]
			value="1075449815"
		[/random]
		[random]
			value="1862667553"
		[/random]
		[random]
			value="1984440952"
		[/random]
		[random]
			value="2078042354"
		[/random]
		[random]
			value="1131292517"
			[results]
				checksum="DB6s-,zQn1M2yKQrtl,yvEJs-TqLAH7qSCNCNSvmIJ>KNGxwmIQwSVVvQLyBGFwuCzBR9PMVRCroPzMEKTmSKvvPnFtw-InBRSqBwbD3xFMMEJCCHO+YDPPnPywBn8FA"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Lobezno has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="I17 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="joueur has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="14,13,12,11,10,9,8"
			y="3,4,4,5,5,6,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,12,11,10,10,9,8"
			y="6,6,7,7,8,9,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="20,20,20,21,21,21,22"
			y="11,12,13,14,15,16,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="thonsew21 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="quisas-- has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="20,20,20,19,19,18"
			y="10,11,12,13,14,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,11,10"
			y="10,11,12,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,10,10,9,9"
			y="10,10,11,12,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,12"
			y="11,12,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,13,14,15,16"
			y="9,10,10,11,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Gebbor has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="15,16,16,17"
			y="21,20,19,19"
		[/move]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[label]
			colour="107,140,255,0"
			team_name="north"
			text="wose"
			visible_in_fog="yes"
			x="17"
			y="19"
		[/label]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="werdnotrom has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="dawi has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="15,16,17"
			y="22,21,21"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Orionn has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Rawn has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="11,11,12,12,11,10,9"
			y="21,20,19,18,18,17,18"
		[/move]
	[/command]
	[command]
		[move]
			x="6,6,6,6,5,5,4"
			y="21,20,19,18,18,17,16"
		[/move]
	[/command]
	[command]
		[move]
			x="16,17,18,19,20,20"
			y="22,22,21,22,22,23"
		[/move]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Krieger has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Rawn has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="8,9,9,9,10,11,12,13"
			y="5,6,7,8,8,9,8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="16,15,14,13,12"
			y="10,11,10,10,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="2"
			x="12"
			y="11"
		[/recruit]
		[random]
			value="32343"
		[/random]
		[random]
			value="5431"
		[/random]
		[random]
			value="30509"
		[/random]
		[random]
			value="9660"
		[/random]
		[random]
			value="1063"
		[/random]
		[random]
			value="13393"
		[/random]
		[random]
			value="25729"
		[/random]
		[random]
			value="26908"
		[/random]
		[random]
			value="22071"
		[/random]
		[random]
			value="11984"
		[/random]
		[random]
			value="21300"
		[/random]
		[random]
			value="29097"
		[/random]
		[random]
			value="28888"
		[/random]
		[random]
			value="11089"
		[/random]
		[random]
			value="15558"
			[results]
				checksum="<3l85mndU3eF>a,..P305kg7W0d6cpzj<c3>k7>a,+alX1ah,2Wi<0o.-bnee7bo56d2incd,4Z6occi44H-f-5057b>02aa.o6Z+40CN5c8b.<X,48D.7v393e4xt<3"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Untraceable_girl has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,21,20"
			y="16,17,17"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Detski has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="8,8,8,8,8"
			y="8,9,10,11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="8,8"
			y="12,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Reski has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Mommy has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Nairol has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Orionn has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Araja has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,12,11"
			y="13,14,15,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="10,9,8,7,7,7"
			y="11,12,12,13,14,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="8,8,8"
			y="13,14,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,9,9,9"
			y="13,14,15,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,19,20,21,22"
			y="14,15,15,16,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="20,20,19,19,18"
			y="17,16,16,15,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12"
			y="9,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="20,20,20,20,20,19"
			y="23,24,25,26,27,28"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="resetter has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="harry has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Neruda has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="druel has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="BlipBlob has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="pitek007 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="gf has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="llhAnny has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="WarX 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="pl has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="SpoOkyMagician has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="gracz has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="DerfelCardan has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Caesar has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="KalasPL has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Sigm4 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="LordEisen has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="1"
			x="15"
			y="21"
		[/recruit]
		[random]
			value="956529264"
		[/random]
		[random]
			value="324758606"
		[/random]
		[random]
			value="1461944015"
		[/random]
		[random]
			value="1532654778"
		[/random]
		[random]
			value="262508081"
		[/random]
		[random]
			value="1041906429"
		[/random]
		[random]
			value="739694565"
		[/random]
		[random]
			value="263721472"
		[/random]
		[random]
			value="2108016143"
		[/random]
		[random]
			value="242107195"
		[/random]
		[random]
			value="1761598947"
		[/random]
		[random]
			value="1983944687"
		[/random]
		[random]
			value="179767440"
		[/random]
		[random]
			value="1989356398"
		[/random]
		[random]
			value="940081043"
			[results]
				checksum="ACIByNSVYyLXPemyRXKFwqFrLmVQqEv0TwtBGgNMvJHtOMFtHrtKmNzMnuxEPDq6BPSLFIOJqR+ProSyETFwFyA9vumVnpCouMKPBb5tJGPbmz3o>.fjcflW4pf7m5p7"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Nairol has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Caesar has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="save_the_queen has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="17,16,15,15,14,13"
			y="21,20,20,19,18,19"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="firas has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="llhAnny has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Impera has logged into the lobby"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="dr_snuggles"
			message="hang on a second"
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Caphriel"
			message="hanging"
			side="1"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="dr_snuggles"
			message="back"
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Hagbart"
			message="/me also hanging"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Caphriel"
			message="ok"
			side="1"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="dr_snuggles"
			message="hehe"
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Caphriel"
			message="hi Hagbart"
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Hagbart"
			message="hello guys!"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="sergio has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="twenty7 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="sunbeam has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="5,6,6,7"
			y="17,17,18,19"
		[/move]
	[/command]
	[command]
		[move]
			x="4,5"
			y="16,17"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Someirhle has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Hagbart"
			message="and welcome to the ladder, Caphriel "
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Caphriel"
			message="thank you :)"
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="sep has logged into the lobby"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="dr_snuggles"
			message="btw thats the first time i play this map..."
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Caphriel"
			message="really?  Huh"
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Aiace has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="jane has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="isutruk has logged into the lobby"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="dr_snuggles"
			message="yeah"
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="redcloud has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="7,7,7,6"
			y="15,16,17,17"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="6"
				y="17"
			[/source]
			[destination]
				x="5"
				y="17"
			[/destination]
		[/attack]
		[random]
			value="4355"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="3239"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="17770"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="23248"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,8,7,6,5"
			y="16,16,16,15,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="5"
				y="16"
			[/source]
			[destination]
				x="5"
				y="17"
			[/destination]
		[/attack]
		[random]
			value="16978"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="31343"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="18113"
			[results]
				chance="40"
				damage="12"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="17919"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Hagbart"
			message="I enjoy watching games here, cause they always play out very agressively"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="8,7,6"
			y="15,16,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="6"
				y="16"
			[/source]
			[destination]
				x="5"
				y="17"
			[/destination]
		[/attack]
		[random]
			value="15180"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="14038"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="23785"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="9750"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="253"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Caphriel"
			message="blargh"
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11,11,10"
			y="16,17,18,18"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="10"
				y="18"
			[/source]
			[destination]
				x="9"
				y="18"
			[/destination]
		[/attack]
		[random]
			value="20067"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="22395"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="5483"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="3327"
			[results]
				chance="50"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,13,14,15,16"
			y="11,12,13,13,14,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12"
			y="10,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="4"
			x="12"
			y="11"
		[/recruit]
		[random]
			value="20953"
		[/random]
		[random]
			value="27475"
		[/random]
		[random]
			value="29540"
		[/random]
		[random]
			value="9253"
		[/random]
		[random]
			value="9144"
		[/random]
		[random]
			value="26988"
		[/random]
		[random]
			value="7477"
		[/random]
		[random]
			value="15517"
		[/random]
		[random]
			value="4550"
		[/random]
		[random]
			value="3355"
		[/random]
		[random]
			value="11232"
		[/random]
		[random]
			value="22965"
		[/random]
		[random]
			value="15484"
		[/random]
		[random]
			value="28482"
		[/random]
		[random]
			value="9679"
			[results]
				checksum="6hs5opl9mneud6314Hg106a+elObfd5dh>d-kgk5j40fd5c,laoh2>q4W68<jj1,,Bh1+4l10mji--Ug681h64jGjKk7ELbfXlO69>IPFNIDBGnoCSO3srDyLKztBCMx"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Faello_obs has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="4"
			x="12"
			y="10"
		[/recruit]
		[random]
			value="6962"
		[/random]
		[random]
			value="7920"
		[/random]
		[random]
			value="4145"
		[/random]
		[random]
			value="29425"
		[/random]
		[random]
			value="25435"
		[/random]
		[random]
			value="21384"
		[/random]
		[random]
			value="23662"
		[/random]
		[random]
			value="7270"
		[/random]
		[random]
			value="22451"
		[/random]
		[random]
			value="21151"
		[/random]
		[random]
			value="16405"
		[/random]
		[random]
			value="28400"
		[/random]
		[random]
			value="1754"
		[/random]
		[random]
			value="29469"
		[/random]
		[random]
			value="28156"
			[results]
				checksum="6hs5opl9mneud6314Hg106a+elObfd5dh>d-kgk5j40fd5c,laoh2>q4W68<jj1,,Bh1+4l10mji--Ug681h64jGjKk7ELbfXlO69>IPFNIDBGnoCSO3srDyLKztBCMx"
			[/results]
		[/random]
	[/command]
	[command]
		undo="no"
		[speak]
			id="dr_snuggles"
			message=" i did not metion that house in the south... ;)"
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,13,14,15,16,16,15,15"
			y="9,10,10,11,11,12,13,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,12,12,12"
			y="9,10,11,12,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="hoeraufzulesen has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="arthur has logged into the lobby"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="dr_snuggles"
			message="advantage for u"
			side="2"
		[/speak]
	[/command]
	[command]
		[move]
			x="19,18"
			y="28,28"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Glutton has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Caphriel"
			message="I never hit anything on my first attack =("
			side="1"
		[/speak]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="9"
				y="18"
			[/source]
			[destination]
				x="10"
				y="18"
			[/destination]
		[/attack]
		[random]
			value="1626706671"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1008371896"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1966246303"
			[results]
				chance="50"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Matyi has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="HighSun has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="sami has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="5"
				y="17"
			[/source]
			[destination]
				x="6"
				y="16"
			[/destination]
		[/attack]
		[random]
			value="1043781337"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="396518063"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1627687710"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="622151554"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="7,8,8,7"
			y="19,18,17,17"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="7"
				y="17"
			[/source]
			[destination]
				x="6"
				y="16"
			[/destination]
		[/attack]
		[random]
			value="371882617"
			[results]
				chance="60"
				damage="7"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Armahdettu has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="13,12,11,10,9,8,7,6"
			y="19,19,20,20,21,21,22,21"
		[/move]
	[/command]
	[command]
		[move]
			x="15,15,15,14,13"
			y="21,20,19,18,19"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="joueur has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="4"
			x="15"
			y="21"
		[/recruit]
		[random]
			value="720180919"
		[/random]
		[random]
			value="862871141"
		[/random]
		[random]
			value="318198596"
		[/random]
		[random]
			value="729521942"
		[/random]
		[random]
			value="1091138471"
		[/random]
		[random]
			value="1401420364"
		[/random]
		[random]
			value="71417452"
		[/random]
		[random]
			value="2017240738"
		[/random]
		[random]
			value="1440748377"
		[/random]
		[random]
			value="1779852314"
		[/random]
		[random]
			value="1678122335"
		[/random]
		[random]
			value="1299348294"
		[/random]
		[random]
			value="385570915"
		[/random]
		[random]
			value="1332205406"
		[/random]
		[random]
			value="711755020"
			[results]
				checksum="-n9sN+-Dy+EeNQrPbGMNQXtz0Ipzwss1tysRRKOwxuoVBywHrwxEqutHtKzE>BNMxHQOHFw.RFKFnqypNKqM8mwoFomIhFlq1.CL-<<ddBfkHDONNHvMSO1I9LGCHpAC"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="BlackHero has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Band has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="kard_ has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="dr has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="6,7"
			y="17,18"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="7"
				y="18"
			[/source]
			[destination]
				x="7"
				y="17"
			[/destination]
		[/attack]
		[random]
			value="22521"
			[results]
				chance="60"
				damage="11"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="30524"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="2810"
			[results]
				chance="60"
				damage="11"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="12760"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="25635"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="5,6,7"
			y="16,15,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="7"
				y="16"
			[/source]
			[destination]
				x="7"
				y="17"
			[/destination]
		[/attack]
		[random]
			value="24358"
			[results]
				chance="60"
				damage="12"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Fruitedge has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="10"
				y="18"
			[/source]
			[destination]
				x="9"
				y="18"
			[/destination]
		[/attack]
		[random]
			value="2457"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="12400"
			[results]
				chance="50"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="23040"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="30306"
			[results]
				chance="50"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,12,12,12,11"
			y="11,12,13,14,15,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,12,12,12"
			y="13,12,11,10,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="3"
			x="12"
			y="11"
		[/recruit]
		[random]
			value="27072"
		[/random]
		[random]
			value="2345"
		[/random]
		[random]
			value="12437"
		[/random]
		[random]
			value="4742"
		[/random]
		[random]
			value="26753"
		[/random]
		[random]
			value="9691"
		[/random]
		[random]
			value="22497"
		[/random]
		[random]
			value="19393"
		[/random]
		[random]
			value="14775"
		[/random]
		[random]
			value="7361"
		[/random]
		[random]
			value="4047"
		[/random]
		[random]
			value="14674"
		[/random]
		[random]
			value="28469"
		[/random]
		[random]
			value="18166"
		[/random]
		[random]
			value="24933"
			[results]
				checksum="H-Q.4kSU1kP6gOQR,wHJxusL-.Ekr06z8QM,E>N>OoNiAM-x,w+es6q9HO5BeFhCwtP2J9TQGVxuSw8SMUFUUA1FGHuc9g0x6zCvNjoC,6pf75HoLfpj9>yBpy8oZwof"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Tzunami has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Kheno has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Fruitedge has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Kheno has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="BMORETHUG has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Darius has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="argoran has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Xyl has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Minion_of_Leshrac has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="DannyBoy has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="stepmj has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="HighSunP has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Reski has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="mrTerran has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="16,17,18,19,20"
			y="14,14,14,14,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,11,10,10,9,9"
			y="10,10,10,11,12,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="15,14,13,12"
			y="14,14,15,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="6,6,7,7"
			y="21,20,20,19"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="7"
				y="19"
			[/source]
			[destination]
				x="7"
				y="18"
			[/destination]
		[/attack]
		[random]
			value="1082399086"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="330981034"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1940423961"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1362866168"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="falcon has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="9"
				y="18"
			[/source]
			[destination]
				x="10"
				y="18"
			[/destination]
		[/attack]
		[random]
			value="1048749394"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="944776575"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="2765488"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="xiaronghui has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Minerwin has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="sergio has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="18,18,19,19,19,20,20"
			y="28,27,27,26,25,24,23"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Kalas_PL has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Akrakorn has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="15,14,13,13,12,11"
			y="21,21,21,20,19,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="shaade has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="bildo has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="0"
			x="15"
			y="21"
		[/recruit]
		[random]
			value="742339543"
		[/random]
		[random]
			value="1768193778"
		[/random]
		[random]
			value="1154119660"
		[/random]
		[random]
			value="1216825916"
		[/random]
		[random]
			value="706399831"
		[/random]
		[random]
			value="1172359001"
		[/random]
		[random]
			value="675268582"
		[/random]
		[random]
			value="1935466926"
		[/random]
		[random]
			value="1457824173"
		[/random]
		[random]
			value="1009946988"
		[/random]
		[random]
			value="468281428"
		[/random]
		[random]
			value="2025877788"
		[/random]
		[random]
			value="574759731"
		[/random]
		[random]
			value="605354711"
		[/random]
		[random]
			value="1566591938"
			[results]
				checksum="DB3s-,zQn1M2yLHrtl,yvEJs-TqLAH7qSCNCNSvmIJ>KNGxwmIQwSVVvQLyBGFwuCzBR9PMVRCroPzMEKTmSKvvPnFtw+PnBRSqBwbD3xFMMEJCCHO+YDPPnPywBn8FA"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Ssika has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Delvar has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Lamarc has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Orashna has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Arhnayel has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="SonnenCreme has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="pandora has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Zuich has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="misfortune has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Vued has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="snezalpus has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Theos has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="zoid has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="zoid has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="makavel has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Rycky has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Rahja has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Delekoth has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,12,13,14,15,16,17"
			y="16,16,16,15,15,14,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,18"
			y="14,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="7,7,8,9,9,10"
			y="18,17,16,16,15,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,9,9,9"
			y="13,14,15,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="7,7,8,8,9"
			y="16,15,14,13,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,11,11,10,9"
			y="11,12,13,13,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="10,11,11,11"
			y="18,18,17,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="0"
			x="12"
			y="11"
		[/recruit]
		[random]
			value="8419"
		[/random]
		[random]
			value="23052"
		[/random]
		[random]
			value="20913"
		[/random]
		[random]
			value="20431"
		[/random]
		[random]
			value="31485"
		[/random]
		[random]
			value="19148"
		[/random]
		[random]
			value="24966"
		[/random]
		[random]
			value="23640"
		[/random]
		[random]
			value="31379"
		[/random]
		[random]
			value="20668"
		[/random]
		[random]
			value="25830"
		[/random]
		[random]
			value="10468"
		[/random]
		[random]
			value="20003"
		[/random]
		[random]
			value="29355"
			[results]
				checksum="TtCMTozq7Vo-vHfNG<LtrmzARfmmFqV+ryEAuy4CQEqETFPCHGCyrKADxItsJVFvuOxEx3PuvGswNKRdEuCIrvtwzKGzixTLICN<rDI4RC8pJORdj<Pya5jb,a-,394R"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="darkblood has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="elfejoyeux has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="11,12,12,11,10,9"
			y="20,19,18,18,17,17"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="9"
				y="17"
			[/source]
			[destination]
				x="9"
				y="16"
			[/destination]
		[/attack]
		[random]
			value="476881504"
			[results]
				chance="70"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1989283440"
			[results]
				chance="70"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1097488195"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Euthanasie has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="5,6,7,8"
			y="17,16,16,15"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="8"
				y="15"
			[/source]
			[destination]
				x="9"
				y="16"
			[/destination]
		[/attack]
		[random]
			value="391990887"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1120111887"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1472286235"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1780882397"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="7,7,7,8"
			y="19,18,17,16"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="8"
				y="16"
			[/source]
			[destination]
				x="9"
				y="16"
			[/destination]
		[/attack]
		[random]
			value="1673392595"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1371484008"
			[results]
				chance="40"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1684867511"
			[results]
				chance="40"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="2101923772"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Janik has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Akrakorn has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="17,18,19,20,21"
			y="19,18,18,17,17"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="21"
				y="17"
			[/source]
			[destination]
				x="22"
				y="16"
			[/destination]
		[/attack]
		[random]
			value="59134808"
			[results]
				chance="40"
				damage="13"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1546110833"
			[results]
				chance="60"
				damage="9"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1041695268"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="836135467"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Kubush has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[label]
			colour="107,140,255,0"
			team_name="north"
			visible_in_fog="yes"
			x="17"
			y="19"
		[/label]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[label]
			colour="107,140,255,0"
			team_name="north"
			text="wose"
			visible_in_fog="yes"
			x="21"
			y="17"
		[/label]
	[/command]
	[command]
		[move]
			x="13,14,15,16,17"
			y="19,18,19,18,19"
		[/move]
	[/command]
	[command]
		[move]
			x="15,16,17,18,19,20,21,22"
			y="21,20,21,20,20,19,19,18"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Arhnayel has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="20,20,21,22,22,22"
			y="23,22,22,21,20,19"
		[/move]
	[/command]
	[command]
		[recruit]
			value="1"
			x="15"
			y="21"
		[/recruit]
		[random]
			value="1489776086"
		[/random]
		[random]
			value="1154837029"
		[/random]
		[random]
			value="388744817"
		[/random]
		[random]
			value="988885145"
		[/random]
		[random]
			value="816687882"
		[/random]
		[random]
			value="1505244797"
		[/random]
		[random]
			value="1291941519"
		[/random]
		[random]
			value="453955016"
		[/random]
		[random]
			value="1760039768"
		[/random]
		[random]
			value="1548626998"
		[/random]
		[random]
			value="272153746"
		[/random]
		[random]
			value="2095324559"
		[/random]
		[random]
			value="1683019607"
		[/random]
		[random]
			value="2003420212"
		[/random]
		[random]
			value="1087401771"
			[results]
				checksum="ACIByNSVYtLXPemyRXKFwqFrLmVQqEv0TwtBGgNMvJHtOMFtHrtKmNzMnuxEPDq6BPSLFIOJqR+ProSyETFwFyA9EumVnpCouMKPBb5tJGPbmz3o>.fjcflW4p97m5p7"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Dimose has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="noname has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="9,10,11,12,12"
			y="18,17,18,17,16"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="12"
				y="16"
			[/source]
			[destination]
				x="12"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="1093750779"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1763266734"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1947188631"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Sliss has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Haron has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="idiota1 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Chri has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Tentakle has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Myst has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="mos has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="YANIV has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Faragon has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="moss has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="ubuntu_sucks has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,13,14,15,16,17,18"
			y="15,15,14,15,15,15,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="20,19,18,17"
			y="14,14,13,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,22,21,21,20,19"
			y="16,15,15,14,13,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,9,10"
			y="13,12,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="10,10,11,11,10,10"
			y="14,13,13,12,11,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,9,9,9,9"
			y="14,13,12,11,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11,11,12"
			y="16,15,14,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,11"
			y="11,12,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="0"
			x="12"
			y="11"
		[/recruit]
		[random]
			value="17361"
		[/random]
		[random]
			value="19434"
		[/random]
		[random]
			value="24484"
		[/random]
		[random]
			value="8406"
		[/random]
		[random]
			value="9935"
		[/random]
		[random]
			value="15395"
		[/random]
		[random]
			value="15003"
		[/random]
		[random]
			value="10061"
		[/random]
		[random]
			value="32411"
		[/random]
		[random]
			value="24439"
		[/random]
		[random]
			value="3004"
		[/random]
		[random]
			value="20686"
		[/random]
		[random]
			value="16552"
		[/random]
		[random]
			value="7638"
			[results]
				checksum="TtCMTozq7Vo-vHfNG<LtrmzARfmmFqV+ryEAuy4CQEqETFPCHGCyrKADxItsJVFvuOxEx3PuvGswNKRdEuCIrvtwzKGzixTLICN<rDI4RC8pJORdj<Pya5jb,a-,394R"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="eric has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="4"
			x="12"
			y="10"
		[/recruit]
		[random]
			value="8164"
		[/random]
		[random]
			value="23058"
		[/random]
		[random]
			value="30711"
		[/random]
		[random]
			value="20907"
		[/random]
		[random]
			value="8274"
		[/random]
		[random]
			value="32583"
		[/random]
		[random]
			value="10008"
		[/random]
		[random]
			value="12614"
		[/random]
		[random]
			value="24270"
		[/random]
		[random]
			value="16177"
		[/random]
		[random]
			value="15237"
		[/random]
		[random]
			value="9409"
		[/random]
		[random]
			value="27225"
		[/random]
		[random]
			value="473"
		[/random]
		[random]
			value="32239"
			[results]
				checksum="6hs5opl9mneud6314Hg106a+elObfd5dh>d-kgk5j40fd5c,laoh2>q4W68<jj1,,Bh1+4l10mji--Ug681h64jGjKk7ELbfXlO69>IPFNIDBGnoCSO3srDyLKztBCMx"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Chri has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Udzero has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Haron has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Sliss1 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"
		[move]
			x="9,10,10,10,11,11"
			y="16,15,14,13,13,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,11,10,9,8"
			y="9,10,10,11,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="artista has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="ProGamer has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="9,9,9,9,10"
			y="17,16,15,14,13"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="1"
			weapon="1"
			[source]
				x="10"
				y="13"
			[/source]
			[destination]
				x="11"
				y="13"
			[/destination]
		[/attack]
		[random]
			value="1270086265"
			[results]
				chance="70"
				damage="9"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1692832596"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1143958985"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1681994350"
			[results]
				chance="70"
				damage="9"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Minerwa has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="ubuntu_sucks has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="8,9,10,10,11"
			y="15,15,14,13,13"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="11"
				y="13"
			[/source]
			[destination]
				x="11"
				y="12"
			[/destination]
		[/attack]
		[random]
			value="47808462"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1070724612"
			[results]
				chance="60"
				damage="5"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Filadeus has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="anthelmintic has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="ruzguz has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="8,8,8,8,9"
			y="16,15,14,13,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="JinChang has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="15,15,15,15,14"
			y="21,20,19,18,17"
		[/move]
	[/command]
	[command]
		[recruit]
			value="1"
			x="15"
			y="21"
		[/recruit]
		[random]
			value="1978886525"
		[/random]
		[random]
			value="1066584586"
		[/random]
		[random]
			value="1041135393"
		[/random]
		[random]
			value="665794395"
		[/random]
		[random]
			value="1616595895"
		[/random]
		[random]
			value="164105421"
		[/random]
		[random]
			value="750807999"
		[/random]
		[random]
			value="216129421"
		[/random]
		[random]
			value="1092331670"
		[/random]
		[random]
			value="2128163134"
		[/random]
		[random]
			value="1697652353"
		[/random]
		[random]
			value="975362829"
		[/random]
		[random]
			value="1180389452"
		[/random]
		[random]
			value="351588778"
		[/random]
		[random]
			value="1425078949"
			[results]
				checksum="ACIByNSVYoLXPemyRXKCwqFrLmVQqEv0TwtBGgNMvJHtOMFtHrtKmNzMnuxEPDq6BPSLFIOJqR+ProSyETFwFyA9BumVnpCouMKPBb5TJGPbmz3o>.fjcflW4pf7m5p7"
			[/results]
		[/random]
	[/command]
	[command]
		[recruit]
			value="1"
			x="15"
			y="22"
		[/recruit]
		[random]
			value="1724795029"
		[/random]
		[random]
			value="1895785197"
		[/random]
		[random]
			value="246935440"
		[/random]
		[random]
			value="1305534076"
		[/random]
		[random]
			value="1270793933"
		[/random]
		[random]
			value="1508762516"
		[/random]
		[random]
			value="284702636"
		[/random]
		[random]
			value="403637736"
		[/random]
		[random]
			value="38588079"
		[/random]
		[random]
			value="9782359"
		[/random]
		[random]
			value="1203350541"
		[/random]
		[random]
			value="1859038788"
		[/random]
		[random]
			value="1125329713"
		[/random]
		[random]
			value="528007262"
		[/random]
		[random]
			value="815623030"
			[results]
				checksum="ACIByNSVYyLXPemyRXKFwqFrLmVQqEv0TwtBGgNMvJHtOMFtHrtKmNzMnuxEPDq6BPSLFIOJqR+ProSyETFwFyA9vumVnpCouMKPBb5TJGPbmz3o>.fjcflW4p97m5p7"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Haron has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="jugador has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="BaRaKO has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Udzero has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Grisogonus has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Arpratag has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="34 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="walard has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="zeev has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="ooo has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="12,12,11,11"
			y="16,15,15,14"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="11"
				y="14"
			[/source]
			[destination]
				x="12"
				y="13"
			[/destination]
		[/attack]
		[random]
			value="1102322712"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1942616773"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1181153013"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Gallahad has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Lamarc has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="22,22,22"
			y="18,17,16"
		[/move]
	[/command]
	[command]
		[move]
			x="22,22,22"
			y="19,18,17"
		[/move]
	[/command]
	[command]
		[move]
			x="17,18,19,19"
			y="19,18,18,17"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Xodook has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="DocVooDoo has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="killer has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="_flowin_ has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Simba has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="anthelmintic has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="KillSimbaEZ has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,17,16,15,14,13,12"
			y="14,15,15,15,14,15,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="12"
				y="14"
			[/source]
			[destination]
				x="11"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="9740"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="14579"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="2931"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="4073"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="32703"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="21463"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="wb has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="12"
				y="13"
			[/source]
			[destination]
				x="11"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="31946"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1240"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="32471"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="25005"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="17,16,15,14,13,12,11"
			y="14,14,15,15,15,15,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="11"
				y="15"
			[/source]
			[destination]
				x="11"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="18704"
			[results]
				chance="40"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="31676"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="6305"
			[results]
				chance="40"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="255"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Barbo has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="barjai has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,11"
			y="10,11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="11"
				y="12"
			[/source]
			[destination]
				x="11"
				y="13"
			[/destination]
		[/attack]
		[random]
			value="30914"
			[results]
				chance="30"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="28230"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="25830"
			[results]
				chance="30"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="22464"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="kard_ has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,13,14,15,15"
			y="11,11,10,11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="19,19,18"
			y="13,14,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,18,19,19,20"
			y="13,12,12,11,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="17,18"
			y="13,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,9,9"
			y="10,11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="1"
			weapon="1"
			[source]
				x="9"
				y="12"
			[/source]
			[destination]
				x="9"
				y="13"
			[/destination]
		[/attack]
		[random]
			value="23592"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="4288"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="19565"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="31663"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="14196"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="4106"
			[results]
				chance="40"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="10490"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="10,9,8,7,7,8"
			y="11,11,11,12,13,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="8"
				y="13"
			[/source]
			[destination]
				x="9"
				y="13"
			[/destination]
		[/attack]
		[random]
			value="19395"
			[results]
				chance="30"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="2770"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="2508"
			[results]
				chance="30"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="30415"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="10,10"
			y="10,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="8,8,8"
			y="10,11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="8"
				y="12"
			[/source]
			[destination]
				x="9"
				y="13"
			[/destination]
		[/attack]
		[random]
			value="7969"
			[results]
				chance="30"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="30971"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="3803"
			[results]
				chance="30"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="13868"
			[results]
				chance="70"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="TreeBearded has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Chri has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Killer595 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="fiendish has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Haron has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="hg has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="15,15,15,14,13,12,11"
			y="21,20,19,18,19,18,18"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Sims3left4htoplay has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="High-Five has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="15,15,15,15,14,13"
			y="22,21,20,19,18,18"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="npe has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="sidzej has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="22,21,20,19,18"
			y="17,17,16,16,15"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="18"
				y="15"
			[/source]
			[destination]
				x="18"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="821287712"
			[results]
				chance="40"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="126717750"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Sims3left4htoplay has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="21,20,20,19"
			y="17,16,15,15"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="19"
				y="15"
			[/source]
			[destination]
				x="18"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="769945268"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1785603897"
			[results]
				chance="80"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="279476999"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1561502737"
			[results]
				chance="80"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="fiendish has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="jrika has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Binks has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="22,21,21,20,19"
			y="16,16,15,14,14"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="19"
				y="14"
			[/source]
			[destination]
				x="18"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="1700712366"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1827014839"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="2038434812"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1338932633"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="tbal has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Glutton has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="19,18,17,17"
			y="17,16,16,15"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="17"
				y="15"
			[/source]
			[destination]
				x="18"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="944131597"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1807180513"
			[results]
				chance="60"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="941694078"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1272679183"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="86475807"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="338347697"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Sliss1 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="ivanho has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="fiendish has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Beowolf has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="9"
				y="13"
			[/source]
			[destination]
				x="8"
				y="13"
			[/destination]
		[/attack]
		[random]
			value="856087587"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="274407184"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="305247885"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="100686294"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Domestos has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="xenom has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Tentakle has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Kheno has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="11"
				y="14"
			[/source]
			[destination]
				x="11"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="992144142"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="752448064"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1229297139"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="10,10"
			y="13,14"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="10"
				y="14"
			[/source]
			[destination]
				x="11"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="104681555"
			[results]
				chance="70"
				damage="9"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="191777576"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="181567235"
			[results]
				chance="70"
				damage="9"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="zakopunu has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="14,13,12,11,11"
			y="17,17,16,16,15"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="11"
				y="15"
			[/source]
			[destination]
				x="12"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="2132188088"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="873896989"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1704313590"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Haron has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="11"
				y="13"
			[/source]
			[destination]
				x="11"
				y="12"
			[/destination]
		[/attack]
		[random]
			value="860997536"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="288672973"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1848283572"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1400971597"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[recruit]
			value="0"
			x="15"
			y="21"
		[/recruit]
		[random]
			value="775789067"
		[/random]
		[random]
			value="1313628132"
		[/random]
		[random]
			value="2016123364"
		[/random]
		[random]
			value="1988396382"
		[/random]
		[random]
			value="1984961307"
		[/random]
		[random]
			value="86230604"
		[/random]
		[random]
			value="1873783350"
		[/random]
		[random]
			value="1976563842"
		[/random]
		[random]
			value="683957051"
		[/random]
		[random]
			value="1933677413"
		[/random]
		[random]
			value="1446250240"
		[/random]
		[random]
			value="1907866934"
		[/random]
		[random]
			value="1441226381"
		[/random]
		[random]
			value="1223730954"
		[/random]
		[random]
			value="795256559"
			[results]
				checksum="DB6s-,zQn1M2yLMrtl,yvEJs+TqLAH7qSCNCNSvmIJ>KNGxwmIQwSVVvQLyBGFwuCzBR9PMVRCroPzMEKTmSKvvPnFtw+MnBRSqBwbD3xFMMEJCCHO+YDPPnPywBn8FA"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="JainaSolo"
			message="so i watched it, and see the rng hasn't been on cap's side again :("
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Kubush has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Wiggles has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Courte has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="12"
				y="14"
			[/source]
			[destination]
				x="11"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="26290"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="11642"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="32379"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="6332"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1740"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="7838"
			[results]
				chance="40"
				damage="5"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Blood_Puddle has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="JainaSolo"
			message="at least it's 300% :)"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="JainaSolo"
			message="not*"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Vulcor has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="laure has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="8,8,9"
			y="13,14,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="9"
				y="15"
			[/source]
			[destination]
				x="10"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="25261"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="24789"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="2865"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Burak has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,12"
			y="12,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="12"
				y="12"
			[/source]
			[destination]
				x="11"
				y="13"
			[/destination]
		[/attack]
		[random]
			value="1444"
			[results]
				chance="30"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="4408"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="9127"
			[results]
				chance="30"
				damage="9"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="25509"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,10,11"
			y="12,11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="1"
			weapon="1"
			[source]
				x="11"
				y="12"
			[/source]
			[destination]
				x="11"
				y="13"
			[/destination]
		[/attack]
		[random]
			value="8054"
			[results]
				chance="60"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="19198"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="20559"
			[results]
				chance="60"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="2929"
			[results]
				chance="40"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="25378"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="25076"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="11544"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="12"
				y="13"
			[/source]
			[destination]
				x="11"
				y="13"
			[/destination]
		[/attack]
		[random]
			value="23056"
			[results]
				chance="30"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="28782"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="4470"
			[results]
				chance="30"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="6522"
			[results]
				chance="50"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Killer595"
			message="caph on the ladder, for reals?"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Caphriel"
			message="yes"
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="8,8,9,10,11,12"
			y="12,11,11,10,10,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="4"
			x="12"
			y="11"
		[/recruit]
		[random]
			value="8930"
		[/random]
		[random]
			value="28827"
		[/random]
		[random]
			value="654"
		[/random]
		[random]
			value="16653"
		[/random]
		[random]
			value="14204"
		[/random]
		[random]
			value="20893"
		[/random]
		[random]
			value="4447"
		[/random]
		[random]
			value="21598"
		[/random]
		[random]
			value="15998"
		[/random]
		[random]
			value="30963"
		[/random]
		[random]
			value="26761"
		[/random]
		[random]
			value="24727"
		[/random]
		[random]
			value="30955"
		[/random]
		[random]
			value="28579"
		[/random]
		[random]
			value="18639"
			[results]
				checksum="jfC5opl9pneud6314Hg106a+elObfd5dh>d-kgk5j40fd5c,laoh2>q4W68<jj1,,Bh1+4l10mji0.Ug681h64jGjKk7ELYl9YI95gAxGxnvPuSIVEH>yBMtLAwyHPDR"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="JainaSolo"
			message="oh killer lol"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="4"
			x="11"
			y="10"
		[/recruit]
		[random]
			value="16369"
		[/random]
		[random]
			value="18886"
		[/random]
		[random]
			value="25943"
		[/random]
		[random]
			value="4071"
		[/random]
		[random]
			value="24353"
		[/random]
		[random]
			value="28835"
		[/random]
		[random]
			value="15035"
		[/random]
		[random]
			value="11278"
		[/random]
		[random]
			value="18160"
		[/random]
		[random]
			value="20644"
		[/random]
		[random]
			value="28590"
		[/random]
		[random]
			value="15506"
		[/random]
		[random]
			value="31890"
		[/random]
		[random]
			value="6782"
		[/random]
		[random]
			value="28962"
			[results]
				checksum="jfC5opl9pneud6314Hg106a+elObfd5dh>d-kgk5j40fd5c,laoh2>q4W68<jj1,,Bh1+4l10mji-0Ug681h64jGjKk7ELYl9YI95gAxGxnvPuSVVEH>yBMtLAwyHUqR"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Friese has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Killer595"
			message="here to curse his rng :p"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Kheno has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="JainaSolo"
			message="i c"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="makavel has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="18"
				y="14"
			[/source]
			[destination]
				x="19"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="5620"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="11227"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="17407"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="15336"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Tristan has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="15,16,17,18,19"
			y="12,12,12,12,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="19"
				y="13"
			[/source]
			[destination]
				x="19"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="12901"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="6192"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="14594"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="16513"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="11910"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="1"
			weapon="2"
			[source]
				x="18"
				y="13"
			[/source]
			[destination]
				x="19"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="6917"
			[results]
				chance="60"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="587"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="31201"
			[results]
				chance="60"
				damage="7"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Vued has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="K has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="20,19,19,18,18,17"
			y="10,11,12,12,13,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="1"
			weapon="1"
			[source]
				x="17"
				y="14"
			[/source]
			[destination]
				x="17"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="2269"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="27764"
			[results]
				chance="30"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="7768"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="20074"
			[results]
				chance="30"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="31585"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="22973"
			[results]
				chance="30"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Vulcor has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="JainaSolo"
			message="killer r u on ladder?"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Killer595"
			message="i am"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="10,9,8,7,7,8"
			y="11,11,11,12,13,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="8"
				y="13"
			[/source]
			[destination]
				x="9"
				y="13"
			[/destination]
		[/attack]
		[random]
			value="21660"
			[results]
				chance="30"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="18685"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="8131"
			[results]
				chance="30"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="27126"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="17,16,15,14,14,13"
			y="15,15,15,14,13,13"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="13"
				y="13"
			[/source]
			[destination]
				x="12"
				y="12"
			[/destination]
		[/attack]
		[random]
			value="117877023"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1874481362"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1200525454"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1915370885"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="539635613"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="736859061"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Kream has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="11"
				y="13"
			[/source]
			[destination]
				x="12"
				y="12"
			[/destination]
		[/attack]
		[random]
			value="104330578"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="877714849"
			[results]
				chance="60"
				damage="5"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[choose]
			value="0"
		[/choose]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="cowboy has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="JainaSolo"
			message="damn curse!"
		[/speak]
	[/command]
	[command]
		[move]
			x="9,9,10"
			y="13,12,11"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="1"
			weapon="1"
			[source]
				x="10"
				y="11"
			[/source]
			[destination]
				x="11"
				y="12"
			[/destination]
		[/attack]
		[random]
			value="1327999639"
			[results]
				chance="40"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1132424162"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1560604634"
			[results]
				chance="40"
				damage="7"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="5murf has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="quest has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Killer595"
			message="ok, fine i'll start cursing blue >.>"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Gorthaur has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="JainaSolo"
			message="yay!"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Caphriel"
			message="alright, gg"
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="fiendish has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="18,17,16,15,14,13,12"
			y="15,16,15,15,15,16,15"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="12"
				y="15"
			[/source]
			[destination]
				x="12"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="394251322"
			[results]
				chance="40"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="600826824"
			[results]
				chance="40"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Tucory has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="19,19,20,21"
			y="15,16,16,17"
		[/move]
	[/command]
	[command]
		[move]
			x="15,15,15,16,17,18"
			y="21,20,19,18,18,17"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Jack_Sparrow has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Caphriel"
			message="That was a concession; I give up"
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="urlglh has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="10,10"
			y="14,15"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="10"
				y="15"
			[/source]
			[destination]
				x="9"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="1065000880"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="81858356"
			[results]
				chance="70"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="270001473"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Gallifax has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Sliss1 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="dr_snuggles"
			message="do u?"
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Hagbart"
			message="gg, guys"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Caphriel"
			message="that's what gg means"
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Lester has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Caphriel"
			message="""good game"""
			side="1"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="dr_snuggles"
			message="thxs Caphriel"
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Caphriel"
			message="thank you for the game"
			side="1"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="dr_snuggles"
			message="just playing makes u better..."
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Caphriel"
			message="you going to report it immediately?"
			side="1"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="dr_snuggles"
			message="think so"
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Caphriel"
			message="yeah, I can think of a couple mistakes I made"
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Beowolf has logged into the lobby"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="dr_snuggles"
			message=" shall i wait or what?"
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="98 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Caphriel"
			message="go ahead"
			side="1"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="dr_snuggles"
			message="hehe"
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="BillyBoy has logged into the lobby"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="dr_snuggles"
			message="lets play another time again"
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="quest has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="Caphriel"
			message="sure :)"
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="BusyP has logged into the lobby"
		[/speak]
	[/command]
[/replay]
[snapshot]
[/snapshot]
[replay_start]
	current_tod="0"
#textdomain wesnoth-multiplayer
	description=_ "Players must navigate the dispersive terrain of this small but topographically dense island."
	experience_modifier="70"
	hash="24u7p+9>B6j3mmdFFjtQetmyhsjDsvjdGoc9moJJdCnbgH-k0RT,O.<DG03847ComZqcODnz+m379P+k2ibc2A>myx3EZ.9k5hdhQci>pkFHts,>fJCn>sZ2tRevrdQy"
	id="multiplayer_Hornshark_Island"
	map_data="border_size=1
usage=map

Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          
Wo          , Wo          , Ww          , Ww          , Ww          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          
Wo          , Ww          , Hh          , Gs^Ft       , Ww          , Ww          , Ww          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Ww          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          
Wo          , Ww          , Gs^Ft       , Hh          , Ds          , Gs^Fms      , Gs^Fp       , Ww          , Wo          , Wo          , Wo          , Wo          , Ww          , Wo          , Ww          , Ww          , Ww          , Wo          , Ww          , Wo          , Ww          , Ww          , Ds          , Ww          , Ww          , Ww          , Ww          , Wo          , Wo          , Wo          
Wo          , Ww          , Gg          , Gg          , Ggf         , Gg          , Ww          , Ww          , Ww          , Wo          , Wo          , Wo          , Ww          , Ww          , Gg          , Ww          , Ww          , Ww          , Ww          , Ww          , Ww          , Ds          , Ce          , Ds          , Ds          , Ww          , Ww          , Wo          , Wo          , Wo          
Wo          , Ww          , Ww          , Gg          , Wwf         , Ds          , Wwf         , Ww          , Ww^Vm       , Wo          , Ww          , Ww          , Gg          , Gg          , Gs^Fms      , Gg          , Gs^Ft       , Gg          , Gg          , Ww          , Ce          , Ce          , 1 Ke        , Ce          , Ce          , Ds          , Ww          , Ww          , Wo          , Wo          
Wo          , Wo          , Ww          , Ww          , Gg          , Wwf         , Gg^Fet      , Gg          , Gg          , Ww          , Ww          , Gg          , Gs^Ft       , Gg^Vc       , Ggf         , Gg          , Gg          , Gg          , Gg          , Ww^Bw/      , Ww          , Ww          , Ce          , Ce          , Ww          , Ds          , Ww          , Ww          , Wo          , Wo          
Wo          , Wo          , Ww          , Gg          , Gs^Ft       , Gg          , Hh          , Gs^Fp       , Gg          , Ww          , Gg          , Gg          , Hh          , Ss          , Gg          , Gs^Fp       , Gg          , Gg          , Ww          , Ww          , Gg          , Ww^Bw/      , Ww          , Ww          , Ww          , Ww          , Wo          , Wo          , Wo          , Wo          
Wo          , Wo          , Ww          , Ww          , Gg          , Gg          , Gg          , Rd          , Gg^Vc       , Ww          , Wwf         , Mm          , Wwf         , Gg          , Gg          , Gg          , Gg          , Gg          , Ww          , Gg          , Gg          , Gg          , Gg          , Ww          , Ww          , Wo          , Ww          , Wo          , Wo          , Wo          
Wo          , Wo          , Wo          , Ww          , Ww          , Gg          , Hh          , Ggf         , Gs^Ft       , Gg          , Gg          , Wwf         , Ke          , Wwf         , Gg          , Gg          , Ww          , Ww          , Hh          , Gs^Fms      , Ggf         , Gg          , Gs^Ft       , Gg          , Gg          , Ww          , Ww          , Wo          , Wo          , Wo          
Wo          , Wo          , Wo          , Ww          , Ww          , Gg          , Gg          , Ss          , Hh          , Gs^Fms      , Ggf         , Ce          , Ce          , Wwf         , Wwf         , Ww          , Ww^Vm       , Ww          , Gg          , Gg          , Hh^Vc       , Hh          , Hh          , Gs^Ft       , Gg          , Ww          , Wo          , Wo          , Wo          , Wo          
Wo          , Wo          , Wo          , Wo          , Ww          , Gg          , Gs^Fp       , Mm          , Gg          , Ggf         , Ss^Vhs      , Ss          , Ce          , Hh          , Mm^Xm       , Wwf         , Wwf         , Gg          , Gs^Ft       , Gg          , Gg          , Gs^Fp       , Gg          , Gg^Fet      , Gg          , Ww          , Ww          , Wo          , Wo          , Wo          
Wo          , Wo          , Ww          , Ww          , Gg          , Gg          , Gg          , Wwf         , Gg          , Rd          , Mm^Xm       , Rd          , Rd          , Mm^Xm       , Mm          , Hh          , Wwf         , Wwf         , Gg          , Gg          , Gg          , Gg          , Ww          , Gg          , Ww          , Ww          , Wo          , Wo          , Wo          , Wo          
Wo          , Wo          , Ww          , Gg          , Gg          , Gg          , Wwf         , Wwf         , Wwf         , Gs^Fp       , Gg          , Gg^Ft       , Hh          , Rd          , Gg^Fet      , Wwf         , Mm^Xm       , Mm          , Gs^Fp       , Gg          , Gg          , Ww          , Gg          , Ww          , Ww          , Wo          , Wo          , Wo          , Wo          , Wo          
Wo          , Wo          , Wo          , Ww          , Ww          , Ww          , Gg          , Gg          , Gg          , Wwf         , Wwf         , Wwf         , Wwf         , Gg          , Wwf         , Wwf         , Gg          , Hh          , Ss^Vhs      , Rd          , Gs^Fms      , Gg          , Gg          , Gg          , Ww          , Ww          , Wo          , Wo          , Wo          , Wo          
Wo          , Wo          , Wo          , Ww          , Gg^Ft       , Gg          , Gg          , Hh          , Gs^Fms      , Gg          , Gg          , Gg          , Wwf         , Wwf         , Gg          , Wwf         , Wwf         , Gg          , Wwf         , Rd          , Hh          , Gg          , Wwf         , Ww          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          
Wo          , Wo          , Ww          , Ww          , Gg^Fet      , Hh          , Gg          , Gg          , Gg          , Mm          , Mm^Xm       , Hh          , Wwf         , Gg          , Rd          , Hh          , Mm^Xm       , Wwf         , Gg          , Gg          , Gg          , Gg          , Gg^Vc       , Ww          , Ww          , Ww          , Wo          , Wo          , Wo          , Wo          
Wo          , Wo          , Ww          , Gg          , Gg          , Gg^Vc       , Gg          , Gg          , Rd          , Gg          , Wwf         , Wwf         , Gg          , Gg          , Gg^Ft       , Rd          , Gg          , Wwf         , Hh          , Mm          , Gg          , Gs^Fp       , Hh          , Gg          , Gg          , Ww          , Ww          , Wo          , Wo          , Wo          
Wo          , Wo          , Wo          , Ww          , Ww          , Wwf         , Gg          , Rd          , Rd          , Ss^Vhs      , Hh          , Wwf         , Wwf         , Ggf         , Gg          , Gg          , Gg          , Wwf         , Wwf         , Gg          , Wwf         , Ggf         , Gs^Fms      , Gg          , Ww          , Ww          , Wo          , Wo          , Wo          , Wo          
Wo          , Wo          , Wo          , Ww          , Ww          , Ww          , Gg          , Gs^Fms      , Hh          , Gs^Ft       , Mm^Xm       , Mm^Xm       , Wwf         , Gs^Fp       , Mm          , Gg          , Hh          , Gs^Fms      , Hh          , Wwf         , Gg          , Wwf         , Wwf         , Wwf         , Gg          , Ww          , Wo          , Wo          , Wo          , Wo          
Wo          , Wo          , Wo          , Ww          , Gg          , Gg          , Gs^Ft       , Mm          , Hh          , Mm^Xm       , Wwf         , Wwf         , Ww          , Wwf         , Mm^Xm       , Gg          , Gg          , Mm^Xm       , Rd          , Gg          , Hh          , Gg          , Gs^Ft       , Gg          , Gg          , Ww          , Ww          , Wo          , Wo          , Wo          
Wo          , Wo          , Wo          , Ww          , Ww          , Gg          , Hh^Vc       , Hh          , Gg          , Wwf         , Ww          , Ww^Vm       , Wwf         , Wwf         , Hh          , Ce          , Ss          , Ss^Vhs      , Rd          , Gg          , Gg          , Hh          , Gg          , Gg          , Ww          , Ww          , Ww          , Wo          , Wo          , Wo          
Wo          , Wo          , Wo          , Wo          , Ww          , Gg          , Gg          , Gg          , Ww          , Ww          , Gg          , Gg          , Gg          , Wwf         , Gg          , Ce          , Ce          , Rd          , Mm^Xm       , Gs^Fp       , Gg          , Gg          , Ww          , Ww          , Wo          , Ww          , Wo          , Wo          , Wo          , Wo          
Wo          , Wo          , Ww          , Ww          , Ce          , Ww^Bw/      , Ww          , Ww          , Ww          , Gg^Ft       , Gg          , Gg          , Gs^Fms      , Wwf         , Wwf         , Ke          , Ggf         , Mm          , Mm          , Mm^Xm       , Gg^Vc       , Gg          , Ww          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          
Wo          , Wo          , Ww          , Ds          , Ce          , Ww          , Ww          , Ww          , Ce          , Ww^Bw/      , Gg          , Hh          , Gg^Vc       , Gg          , Gg          , Wwf         , Wwf         , Gg^Fet      , Gg          , Hh          , Wwf         , Gg          , Ww          , Ww          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          
Wo          , Ww          , Ww          , Ds          , Ce          , Ce          , Ce          , 2 Ke        , Ww          , Ww          , Ww          , Gg          , Ww          , Gg          , Ww          , Wwf         , Ww          , Wwf         , Wwf         , Gg          , Wwf         , Ds          , Gg^Ft       , Ww          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          
Wo          , Ww          , Ww          , Ds          , Ds          , Ce          , Ds          , Ww          , Ww          , Ww          , Ww          , Ww          , Ww          , Ww          , Ww          , Ww          , Wo          , Ww          , Ww          , Wwf         , Gg          , Hh          , Gg^Fet      , Ww          , Ww          , Ww          , Ww          , Wo          , Wo          , Wo          
Wo          , Wo          , Ww          , Ww          , Ww          , Ds          , Ww          , Ww          , Wo          , Ww          , Wo          , Ww          , Wo          , Wo          , Wo          , Wo          , Wo          , Ww          , Wwf         , Wwf         , Gg          , Gg          , Gg          , Ds          , Gs^Ft       , Gs^Fp       , Ww          , Ww          , Wo          , Wo          
Wo          , Wo          , Wo          , Ww          , Ww          , Ww          , Ww          , Ww          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Ww          , Ww^Vm       , Gg          , Ds          , Ds          , Ww          , Gg          , Gg          , Hh          , Ww          , Wo          , Wo          , Wo          
Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Ww          , Ww          , Ww          , Ww          , Wo          , Ww          , Ww          , Ww          , Ww          , Wo          , Wo          , Wo          
Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          
Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          , Wo          
"
	mp_countdown="no"
	mp_countdown_action_bonus="13"
	mp_countdown_init_time="270"
	mp_countdown_reservoir_time="330"
	mp_countdown_turn_bonus="60"
	mp_fog="yes"
	mp_shroud="no"
	mp_use_map_settings="yes"
	mp_village_gold="2"
	name=_ "2p - Hornshark Island"
	next_underlying_unit_id="0"
#textdomain wesnoth
	objectives=_ "Victory:
@Defeat enemy leader(s)"
	observer="yes"
	random_seed="7733"
	random_start_time="no"
	scenario="Ladder Caphriel vs drsnuggles"
	turns="-1"
	version="1.6.2"
	[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="Caphriel"
		flag_rgb="magenta"
		fog="yes"
		gender="male"
		gold="100"
		id="Caphriel1"
		image="units/orcs/warrior.png"
		income="0"
		leader="Orcish Warrior,Troll,Troll Rocklobber,Orcish Crossbowman,Orcish Slayer"
		mp_countdown="no"
		mp_countdown_action_bonus="13"
		mp_countdown_init_time="270"
		mp_countdown_reservoir_time="330"
		mp_countdown_turn_bonus="60"
		name="Caphriel"
		recruit="Orcish Grunt,Troll Whelp,Wolf Rider,Orcish Archer,Orcish Assassin,Naga Fighter,Goblin Spearman"
		save_id="Caphriel1"
		share_maps="no"
		share_view="yes"
		shroud="no"
		side="1"
		team_name="north"
		terrain_liked="Hh, Ha, Mm, Ss"
		type="Troll Rocklobber"
		user_team_name="wesnoth-multiplayerteamname^North"
		village_gold="2"
		[ai]
			recruitment_pattern="fighter,fighter,fighter,mixed fighter,archer,scout"
			villages_per_scout="8"
			[team_formula]
				rulebase="fai 'recruitment.fai'
		# ===== Some general functions used later ==== #

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

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

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

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

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

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

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

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

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

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

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

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

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

#returns average defense of the unit #

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

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

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

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


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


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

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

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

# ==2== based on village possession #

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

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

# multipled by 1000 to increase precision #

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

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

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

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

#==1==  basic evaluation #

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

faiend
"
			[/team_formula]
		[/ai]
		[ai]
			villages_per_scout="8"
		[/ai]
	[/side]
	[side]
		allow_changes="yes"
		allow_player="yes"
		canrecruit="yes"
		colour="2"
		controller="network"
		current_player="dr_snuggles"
		flag_rgb="magenta"
		fog="yes"
		gender="female"
		gold="100"
		id="dr_snuggles2"
		image="units/elves-wood/captain.png"
		income="0"
		leader="Elvish Captain,Elvish Hero,Elvish Ranger,Elvish Marksman,Elvish Druid,Elvish Sorceress,White Mage,Red Mage,Elder Wose"
		mp_countdown="no"
		mp_countdown_action_bonus="13"
		mp_countdown_init_time="270"
		mp_countdown_reservoir_time="330"
		mp_countdown_turn_bonus="60"
		name="dr_snuggles"
		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"
		save_id="dr_snuggles2"
		share_maps="no"
		share_view="yes"
		shroud="no"
		side="2"
		team_name="south"
		terrain_liked="Ff, Fa, Ss, Ww"
		type="Elvish Druid"
		user_team_name="wesnoth-multiplayerteamname^South"
		village_gold="2"
		[ai]
			recruitment_pattern="fighter,fighter,archer,archer,mixed fighter,healer,scout"
			villages_per_scout="8"
			[team_formula]
				rulebase="fai 'recruitment.fai'
		# ===== Some general functions used later ==== #

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

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

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

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

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

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

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

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

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

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

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

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

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

#returns average defense of the unit #

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

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

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

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


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


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

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

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

# ==2== based on village possession #

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

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

# multipled by 1000 to increase precision #

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

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

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

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

#==1==  basic evaluation #

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

faiend
"
			[/team_formula]
		[/ai]
		[ai]
			villages_per_scout="8"
		[/ai]
	[/side]
[/replay_start]
[statistics]
	mid_scenario="yes"
	[scenario]
		scenario="2S – Die Insel der Stachelhaie"
		[team]
			[recruits]
				Goblin Spearman="2"
				Naga Fighter="1"
				Orcish Archer="1"
				Orcish Assassin="2"
				Orcish Grunt="8"
				Troll Whelp="1"
				Wolf Rider="1"
			[/recruits]
			[recalls]
			[/recalls]
			[advances]
			[/advances]
			[deaths]
				Goblin Spearman="1"
				Orcish Assassin="1"
				Orcish Grunt="3"
				Wolf Rider="1"
			[/deaths]
			[killed]
				Elvish Archer="1"
				Elvish Scout="1"
				Merman Hunter="1"
			[/killed]
			[attacks]
				[sequence]
					s00="2"
					s01="3"
					s10="1"
					_num="30"
				[/sequence]
				[sequence]
					s00="4"
					s000="1"
					s0001="1"
					s01="1"
					s0110="1"
					s11="1"
					_num="40"
				[/sequence]
				[sequence]
					s00="1"
					s000="2"
					s1="1"
					s101="1"
					s11="3"
					s110="1"
					_num="60"
				[/sequence]
			[/attacks]
			[defends]
				[sequence]
					s="21"
					_num="0"
				[/sequence]
				[sequence]
					s0="1"
					_num="40"
				[/sequence]
				[sequence]
					s0="1"
					s00="1"
					s10="2"
					_num="60"
				[/sequence]
				[sequence]
					s01="1"
					_num="80"
				[/sequence]
			[/defends]
			recruit_cost="206"
			recall_cost="0"
			damage_inflicted="159"
			damage_taken="348"
			expected_damage_inflicted="170261"
			expected_damage_taken="373177"
			turn_damage_inflicted="53"
			turn_damage_taken="90"
			turn_expected_damage_inflicted="50989"
			turn_expected_damage_taken="90450"
			save_id="Caphriel1"
		[/team]
		[team]
			[recruits]
				Elvish Archer="4"
				Elvish Fighter="4"
				Elvish Scout="1"
				Elvish Shaman="1"
				Mage="1"
				Merman Hunter="1"
				Wose="1"
			[/recruits]
			[recalls]
			[/recalls]
			[advances]
				Elvish Ranger="1"
			[/advances]
			[deaths]
				Elvish Archer="1"
				Elvish Scout="1"
				Merman Hunter="1"
			[/deaths]
			[killed]
				Goblin Spearman="1"
				Orcish Assassin="1"
				Orcish Grunt="3"
				Wolf Rider="1"
			[/killed]
			[attacks]
				[sequence]
					s00="1"
					s000="1"
					s0010="2"
					s011="1"
					s0110="1"
					s0111="1"
					s10="2"
					s11="2"
					_num="40"
				[/sequence]
				[sequence]
					s000="1"
					s001="1"
					s101="1"
					_num="50"
				[/sequence]
				[sequence]
					s0000="1"
					s01="2"
					s0100="1"
					s1="1"
					s1000="1"
					s101="1"
					s1011="1"
					s1110="1"
					_num="60"
				[/sequence]
				[sequence]
					s010="1"
					s101="2"
					s110="1"
					_num="70"
				[/sequence]
			[/attacks]
			[defends]
				[sequence]
					s000="1"
					_num="30"
				[/sequence]
				[sequence]
					s00="1"
					s0010="1"
					s01="1"
					s0100="1"
					s11="1"
					_num="40"
				[/sequence]
				[sequence]
					s0="1"
					s01="2"
					s11="3"
					_num="50"
				[/sequence]
				[sequence]
					s="1"
					s0="1"
					s01="4"
					s10="1"
					s101="1"
					s11="3"
					_num="60"
				[/sequence]
				[sequence]
					s01="1"
					_num="70"
				[/sequence]
			[/defends]
			recruit_cost="212"
			recall_cost="0"
			damage_inflicted="348"
			damage_taken="159"
			expected_damage_inflicted="373177"
			expected_damage_taken="170261"
			turn_damage_inflicted="45"
			turn_damage_taken="0"
			turn_expected_damage_inflicted="40122"
			turn_expected_damage_taken="-12523"
			save_id="dr_snuggles2"
		[/team]
	[/scenario]
[/statistics]
