label="Hagbart - foxsatan"
version="1.6.2"
completion="running"
campaign_type="multiplayer"
difficulty="NORMAL"
random_seed="9240"
random_calls="0"
next_underlying_unit_id="80"
end_text_duration="0"
[variables]
[/variables]
[replay]
	[command]
		[start]
		[/start]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="5"
			x="20"
			y="4"
		[/recruit]
		[random]
			value="1690"
		[/random]
		[random]
			value="11223"
		[/random]
		[random]
			value="22344"
		[/random]
		[random]
			value="17128"
		[/random]
		[random]
			value="14300"
		[/random]
		[random]
			value="27771"
		[/random]
		[random]
			value="9055"
		[/random]
		[random]
			value="4829"
		[/random]
		[random]
			value="4245"
		[/random]
		[random]
			value="22730"
		[/random]
		[random]
			value="2625"
		[/random]
		[random]
			value="11527"
		[/random]
		[random]
			value="24290"
		[/random]
		[random]
			value="31677"
		[/random]
		[random]
			value="19221"
			[results]
				checksum="wmNOCQ,<jCB,xNaeN9c8kBjp>f.33i3,bi2g6odf4d42johapi+j5>4.,j0+4d89dk>9,2l6y.fc-I>-,WJ2j2m>8oQ0birbp4<4OkUyc1iTJvFiKQ-515ck2.Ih5Kjg"
			[/results]
		[/random]
	[/command]
	[command]
		undo="no"
		[speak]
			id="Hagbart"
			message="have fun!"
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="0"
			x="19"
			y="5"
		[/recruit]
		[random]
			value="15846"
		[/random]
		[random]
			value="24899"
		[/random]
		[random]
			value="18542"
		[/random]
		[random]
			value="20755"
		[/random]
		[random]
			value="9959"
		[/random]
		[random]
			value="6037"
		[/random]
		[random]
			value="27321"
		[/random]
		[random]
			value="20146"
		[/random]
		[random]
			value="25547"
		[/random]
		[random]
			value="5607"
		[/random]
		[random]
			value="19976"
		[/random]
		[random]
			value="4663"
		[/random]
		[random]
			value="14377"
		[/random]
		[random]
			value="1605"
		[/random]
		[random]
			value="21960"
			[results]
				checksum="xNa6Bryn.D--c-i+04IRoaOL-EyQnvClJF7qE383X-fb-Zy1ji46+2f+9l+5<foc<nn6f23854.o1418om4H8bFWB0pjc+cZng<m8e6X68+vn>t55bKrqZdmOCaJmIaF"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="foxsatan"
			message="u2"
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="3"
			x="20"
			y="3"
		[/recruit]
		[random]
			value="31378"
		[/random]
		[random]
			value="22885"
		[/random]
		[random]
			value="18710"
		[/random]
		[random]
			value="14712"
		[/random]
		[random]
			value="15902"
		[/random]
		[random]
			value="12861"
		[/random]
		[random]
			value="1370"
		[/random]
		[random]
			value="7298"
		[/random]
		[random]
			value="2238"
		[/random]
		[random]
			value="17762"
		[/random]
		[random]
			value="2079"
		[/random]
		[random]
			value="8155"
		[/random]
		[random]
			value="6910"
			[results]
				checksum="wIq0h4Aje6ZNhfnNl+7b,Ha4jCJxd>Z4D>emIBh6hCW2BmtJ8j1v.9xmODNURxriEsBIuurvENcQBQBPqyPrRxP5tBQME,Ezpfu49w6JQVkN94JBwVAIsdMAIZHHpExA"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="0"
			x="18"
			y="3"
		[/recruit]
		[random]
			value="1181"
		[/random]
		[random]
			value="26920"
		[/random]
		[random]
			value="28261"
		[/random]
		[random]
			value="12546"
		[/random]
		[random]
			value="29017"
		[/random]
		[random]
			value="23100"
		[/random]
		[random]
			value="6800"
		[/random]
		[random]
			value="16013"
		[/random]
		[random]
			value="25050"
		[/random]
		[random]
			value="20378"
		[/random]
		[random]
			value="12051"
		[/random]
		[random]
			value="18289"
		[/random]
		[random]
			value="1834"
		[/random]
		[random]
			value="26100"
		[/random]
		[random]
			value="1636"
			[results]
				checksum="LhGI28qHcsJn9Niqer4ntRo6wD4zsHoKP1Hy+wP.,jg1d-5cL>71745hhbgk5n1,oc<nn6f23854.o1418om4H8bFWB0pjc+cZng<m8e6X68+vn>t55bKrqZdmOCaJmI"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="1"
			x="18"
			y="4"
		[/recruit]
		[random]
			value="32366"
		[/random]
		[random]
			value="5145"
		[/random]
		[random]
			value="26116"
		[/random]
		[random]
			value="7144"
		[/random]
		[random]
			value="2557"
		[/random]
		[random]
			value="6251"
		[/random]
		[random]
			value="2892"
		[/random]
		[random]
			value="8088"
		[/random]
		[random]
			value="1434"
		[/random]
		[random]
			value="28118"
		[/random]
		[random]
			value="7559"
		[/random]
		[random]
			value="28601"
		[/random]
		[random]
			value="17926"
			[results]
				checksum="Dem>c1k,fFB3IPKDDy,IIVsrrz9qrFsKPmsAOVOPtQsRHOMGLquuPuNAtBx6AEqpsGOKxE8KFoBPRQNzSIM0NsInAEUrD<pd7wU07l,LsmkMRAyTOtHFLqpFUIIzsxsc"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="2"
			x="17"
			y="5"
		[/recruit]
		[random]
			value="14729"
		[/random]
		[random]
			value="2677"
		[/random]
		[random]
			value="30759"
		[/random]
		[random]
			value="16671"
		[/random]
		[random]
			value="21950"
		[/random]
		[random]
			value="6203"
		[/random]
		[random]
			value="8931"
		[/random]
		[random]
			value="21246"
		[/random]
		[random]
			value="16164"
		[/random]
		[random]
			value="32578"
		[/random]
		[random]
			value="874"
		[/random]
		[random]
			value="29400"
		[/random]
		[random]
			value="5261"
			[results]
				checksum="TuuzMJvu3JOmTCCoKGpBJPA6SCMFtLEzKIxOCmtqSOKJLCFwmIsr1QENmxPFHFw.RFKFnqypNLqM8mwoForIhF8xkkBsH9ih>N4ftxqADyQNdDsofqQwNFrCg8vPGzPi"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="19,19,19,19,19,19,18"
			y="4,5,6,7,8,9,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[recruit]
			value="7"
			x="19"
			y="20"
		[/recruit]
		[random]
			value="17096"
		[/random]
		[random]
			value="24152"
		[/random]
		[random]
			value="289"
		[/random]
		[random]
			value="7622"
		[/random]
		[random]
			value="18567"
		[/random]
		[random]
			value="22311"
		[/random]
		[random]
			value="3025"
		[/random]
		[random]
			value="25762"
		[/random]
		[random]
			value="27765"
		[/random]
		[random]
			value="31257"
		[/random]
		[random]
			value="3590"
		[/random]
		[random]
			value="22311"
		[/random]
		[random]
			value="31420"
		[/random]
		[random]
			value="10752"
		[/random]
		[random]
			value="18774"
			[results]
				checksum=",Ad3Y5f-Gtmsop5jHbEoRiSrOCpxE4IDyxOzzQOG.nCLyyGDmUtLNvFrwCUxRLwFwmIsr1QENmxPFHFw.RFKFnqypNLoM8mwoFomIhFlq1.CLB<<ddNv5EsLNHBNzhOI"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Brom has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="1"
			x="18"
			y="20"
		[/recruit]
		[random]
			value="6208"
		[/random]
		[random]
			value="2651"
		[/random]
		[random]
			value="31590"
		[/random]
		[random]
			value="26978"
		[/random]
		[random]
			value="22153"
		[/random]
		[random]
			value="14958"
		[/random]
		[random]
			value="23199"
		[/random]
		[random]
			value="27805"
		[/random]
		[random]
			value="7265"
		[/random]
		[random]
			value="25483"
		[/random]
		[random]
			value="13212"
		[/random]
		[random]
			value="6122"
		[/random]
		[random]
			value="24044"
		[/random]
		[random]
			value="8659"
		[/random]
		[random]
			value="2121"
			[results]
				checksum="15,Wfc>cu2lH0olW9-5N-m<e6f60hfabkcij<4>i3h3e2.t0a1f<j870h0k565.Y0>ide2Ki80k.d8da021n<.26Z+40CN5c8b.-X,48K.7v3k3XdJFikGNQwGMoVOFH"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="tishbe has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="4"
			x="21"
			y="20"
		[/recruit]
		[random]
			value="6696"
		[/random]
		[random]
			value="8575"
		[/random]
		[random]
			value="31674"
		[/random]
		[random]
			value="567"
		[/random]
		[random]
			value="15719"
		[/random]
		[random]
			value="13651"
		[/random]
		[random]
			value="20682"
		[/random]
		[random]
			value="13731"
		[/random]
		[random]
			value="24206"
		[/random]
		[random]
			value="9686"
		[/random]
		[random]
			value="28816"
		[/random]
		[random]
			value="15004"
		[/random]
		[random]
			value="31228"
		[/random]
		[random]
			value="20160"
		[/random]
		[random]
			value="5499"
			[results]
				checksum="rhRteuCn>Im>OtyS+7ckzAuBMm0+Z8dI9a<pk8651Wl8Z5w.cldpBX>77bllckl2Y+5>aaii6<81Akljb2ifil7.WgZ2.h<5-XxS+j>k2403-o4TA9v1-xH1iTk+kX8Y"
			[/results]
		[/random]
	[/command]
	[command]
		[recruit]
			value="7"
			x="20"
			y="21"
		[/recruit]
		[random]
			value="16315"
		[/random]
		[random]
			value="18553"
		[/random]
		[random]
			value="25421"
		[/random]
		[random]
			value="19220"
		[/random]
		[random]
			value="9384"
		[/random]
		[random]
			value="30757"
		[/random]
		[random]
			value="25654"
		[/random]
		[random]
			value="5851"
		[/random]
		[random]
			value="23314"
		[/random]
		[random]
			value="30695"
		[/random]
		[random]
			value="11046"
		[/random]
		[random]
			value="24996"
		[/random]
		[random]
			value="17706"
		[/random]
		[random]
			value="24196"
		[/random]
		[random]
			value="31717"
			[results]
				checksum=",Ad3Y5f-Gtmsmp5jHbEoRiVrOCpxE4IDyxOzzQOG.nCLyyGDmUtLNvFrwCUxRLwFwmIsr1QENmxPFHFw.RFKFnqypNLmM8mwoFomIhFlq1.CLB<<ddNv5EsLNHBNzkOI"
			[/results]
		[/random]
	[/command]
	[command]
		[recruit]
			value="7"
			x="20"
			y="20"
		[/recruit]
		[random]
			value="28008"
		[/random]
		[random]
			value="356"
		[/random]
		[random]
			value="13688"
		[/random]
		[random]
			value="5524"
		[/random]
		[random]
			value="23274"
		[/random]
		[random]
			value="2520"
		[/random]
		[random]
			value="12403"
		[/random]
		[random]
			value="20962"
		[/random]
		[random]
			value="24450"
		[/random]
		[random]
			value="3016"
		[/random]
		[random]
			value="18101"
		[/random]
		[random]
			value="22821"
		[/random]
		[random]
			value="4320"
		[/random]
		[random]
			value="12920"
		[/random]
		[random]
			value="29058"
			[results]
				checksum=",Ad3Y5f-Gtmsop5jHbEoRiSrOCpxE4IDyxOzzQOG.nCLyyGDmUtLNvFrwCUxRLwFwmIsr1QENmxPFHFw.RFKFnqypNLoM8mwoFomIhFlq1.CLB<<ddNv5EsLNHBNzhOI"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Falith has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="19,18,17,16"
			y="21,21,22,22"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,19,20,21,22"
			y="3,4,3,3,2"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="20,20,20,21,21,22"
			y="3,4,5,6,7,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="20,21,22,23,24,25,26,27,28"
			y="4,5,5,6,5,5,5,5,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="19,20,21,21,22,23,24"
			y="5,5,6,7,7,7,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="17,16,15,14,13,12"
			y="5,5,6,5,6,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,17,16,15,14,13,12"
			y="4,4,3,3,2,3,2"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="satHyre has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,19,19,19,19,19,18"
			y="9,9,8,7,6,5,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="hogar has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="18,17,16,15,14,13,12,11,10"
			y="20,20,20,21,21,21,20,20,19"
		[/move]
	[/command]
	[command]
		[move]
			x="16,17,18,19"
			y="22,22,21,21"
		[/move]
	[/command]
	[command]
		[move]
			x="19,19,19,19,19,20"
			y="20,19,18,17,16,15"
		[/move]
	[/command]
	[command]
		[move]
			x="21,22,23,24,25,25,26"
			y="20,19,19,18,18,17,16"
		[/move]
	[/command]
	[command]
		[move]
			x="26,26"
			y="16,15"
		[/move]
	[/command]
	[command]
		[move]
			x="26,27"
			y="15,15"
		[/move]
	[/command]
	[command]
		[move]
			x="27,27"
			y="15,16"
		[/move]
	[/command]
	[command]
		[move]
			x="20,21,22,23,24,25,26"
			y="20,20,19,19,19,19,19"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="SaltatorMortis has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="20,21,22,23,24,25"
			y="21,21,20,20,19,19"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="knight_ruben has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,23,24,25,26,27,27"
			y="2,3,3,4,4,5,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="28,28"
			y="5,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Masterx831 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="28,28,28"
			y="6,7,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Michael has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="idiota has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="28,28"
			y="8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="28,28"
			y="9,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="28,27"
			y="10,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="xhuiow has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="27,26,25,24"
			y="11,10,11,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="ZYJLL has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Carving has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="4"
			x="19"
			y="5"
		[/recruit]
		[random]
			value="4601"
		[/random]
		[random]
			value="6700"
		[/random]
		[random]
			value="4274"
		[/random]
		[random]
			value="26674"
		[/random]
		[random]
			value="14123"
		[/random]
		[random]
			value="30144"
		[/random]
		[random]
			value="29614"
		[/random]
		[random]
			value="22609"
		[/random]
		[random]
			value="11476"
		[/random]
		[random]
			value="3828"
		[/random]
		[random]
			value="21704"
		[/random]
		[random]
			value="23839"
		[/random]
		[random]
			value="6998"
			[results]
				checksum="fEAwEAF+1Gub.aUZJ5kiOGDqZxM8i-LoLYEs-E3jSJv0zT>8cpf6b>5Im2-i0051mfOa-a-d4,d8b>dr3-aeWym.7BZSugG6.eC5RE539gmeoJZ4jM-lYWmgBNCho0u4"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,23,24,25,26,27"
			y="7,8,8,9,9,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,25,26,27"
			y="7,8,7,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,12,12,11"
			y="5,6,7,8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,11,10,9,9,8"
			y="2,3,3,4,5,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Sandermatt has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Nordmann has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,19,20,21,21,22"
			y="4,5,5,6,7,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="20,19,18,17,16,15,14"
			y="15,16,16,17,17,18,17"
		[/move]
	[/command]
	[command]
		[move]
			x="10,11,11"
			y="19,19,18"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Requiem has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="11,12,13,14,15,16"
			y="18,17,17,16,17,16"
		[/move]
	[/command]
	[command]
		[recruit]
			value="5"
			x="19"
			y="20"
		[/recruit]
		[random]
			value="29329"
		[/random]
		[random]
			value="24654"
		[/random]
		[random]
			value="15920"
		[/random]
		[random]
			value="14636"
		[/random]
		[random]
			value="11392"
		[/random]
		[random]
			value="32541"
		[/random]
		[random]
			value="13611"
		[/random]
		[random]
			value="11843"
		[/random]
		[random]
			value="16994"
		[/random]
		[random]
			value="21566"
		[/random]
		[random]
			value="3766"
		[/random]
		[random]
			value="16156"
		[/random]
		[random]
			value="16047"
		[/random]
		[random]
			value="15637"
		[/random]
		[random]
			value="31793"
			[results]
				checksum="-n9zN+-Dy+EeNQrPbGMNQXtz0Ipzwss1tysRRKOwxuoVBywHrwxEqutHtKzE>BNMxHQOHFw.RFKFnqypNKBM8mwoFomIhFlq1.CL-<<ddBfkHDONNHvHQO1I9LGCHpAC"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="19,20"
			y="21,20"
		[/move]
	[/command]
	[command]
		[move]
			x="27,27,27,27,27,27,27,26"
			y="16,17,18,19,20,21,22,22"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="kard_ has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="26,27,28,29,30"
			y="19,19,19,20,19"
		[/move]
	[/command]
	[command]
		[move]
			x="25,25,26,26,27"
			y="19,18,17,16,16"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="lhAnny has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="8,8,9,9,10,10,11"
			y="5,6,7,8,8,9,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11"
			y="10,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="SaS has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11,11,11,11,11"
			y="9,10,11,12,13,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,25,25"
			y="10,11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,25"
			y="12,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="jaybug99 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="27,27,27,27"
			y="8,9,10,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="27,27,27"
			y="10,11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="27,27,27,27,27,28"
			y="6,7,8,9,10,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="19,20,21,21,22,23"
			y="5,5,6,7,7,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,21,20,19,19,18"
			y="7,7,6,6,5,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="2"
			x="19"
			y="5"
		[/recruit]
		[random]
			value="31218"
		[/random]
		[random]
			value="17291"
		[/random]
		[random]
			value="5669"
		[/random]
		[random]
			value="8919"
		[/random]
		[random]
			value="30509"
		[/random]
		[random]
			value="13079"
		[/random]
		[random]
			value="7175"
		[/random]
		[random]
			value="29915"
		[/random]
		[random]
			value="12901"
		[/random]
		[random]
			value="22762"
		[/random]
		[random]
			value="25184"
		[/random]
		[random]
			value="16288"
		[/random]
		[random]
			value="10471"
			[results]
				checksum="TuuzMJvu3JOmTCCoKGpBJPA6SCMFtLEzKIxOCmtqSOKJLCFwmIsr1QENmxPFHFw.RFKFnqypNLqM8mwoForIhF8xkkBsH9ih>N4ftxqADyQNdDsofqQwNFrCg8vPGzPi"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,26,27,28,29"
			y="13,12,13,12,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="29,29"
			y="12,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="29,29"
			y="13,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Daeroth has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Zod has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Hrab has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="16,15,14,13"
			y="16,17,16,16"
		[/move]
	[/command]
	[command]
		[move]
			x="13,12,12,11,11,10"
			y="16,16,17,18,19,19"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Sww26 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Chariyan has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="19,20"
			y="20,19"
		[/move]
	[/command]
	[command]
		[recruit]
			value="7"
			x="19"
			y="20"
		[/recruit]
		[random]
			value="16387"
		[/random]
		[random]
			value="8884"
		[/random]
		[random]
			value="19009"
		[/random]
		[random]
			value="8368"
		[/random]
		[random]
			value="16979"
		[/random]
		[random]
			value="2568"
		[/random]
		[random]
			value="6841"
		[/random]
		[random]
			value="10276"
		[/random]
		[random]
			value="7325"
		[/random]
		[random]
			value="6008"
		[/random]
		[random]
			value="21189"
		[/random]
		[random]
			value="16175"
		[/random]
		[random]
			value="31022"
		[/random]
		[random]
			value="32488"
		[/random]
		[random]
			value="32326"
			[results]
				checksum=",Ad3Y5f-Gtmsmp5jHbEoRiVrOCpxE4IDyxOzzQOG.nCLyyGDmUtLNvFrwCUxRLwFwmIsr1QENmxPFHFw.RFKFnqypNLmM8mwoFomIhFlq1.CLB<<ddNv5EsLNHBNzkOI"
			[/results]
		[/random]
	[/command]
	[command]
		[recruit]
			value="7"
			x="21"
			y="20"
		[/recruit]
		[random]
			value="21974"
		[/random]
		[random]
			value="13091"
		[/random]
		[random]
			value="19172"
		[/random]
		[random]
			value="4631"
		[/random]
		[random]
			value="30923"
		[/random]
		[random]
			value="6328"
		[/random]
		[random]
			value="25097"
		[/random]
		[random]
			value="23353"
		[/random]
		[random]
			value="16109"
		[/random]
		[random]
			value="31221"
		[/random]
		[random]
			value="23203"
		[/random]
		[random]
			value="30391"
		[/random]
		[random]
			value="19921"
		[/random]
		[random]
			value="21872"
		[/random]
		[random]
			value="11009"
			[results]
				checksum=",Ad3Y5f-Gtmnrp5jHbEoRiVrOCpxE4IDyxOzzQOG.nCLyyGDmUtLNvFrwCUxRLwFwmIsr1QENmxPFHFw.RFKFnqypNQrM8mwoFomIhFlq1.CLB<<ddNv5EsLNHBNzhOI"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="20,21,22,23"
			y="20,20,19,19"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="f has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="20,21,22,23,24"
			y="19,20,19,19,18"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="klein_atuin has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="27,26,25,24"
			y="16,16,17,17"
		[/move]
	[/command]
	[command]
		[move]
			x="30,29,28,27,26"
			y="19,20,19,19,19"
		[/move]
	[/command]
	[command]
		[move]
			x="26,27,27,28,29,30"
			y="22,22,21,20,20,19"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Equinox has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="23,24,24,25,26,26"
			y="8,8,9,10,10,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="29,28"
			y="12,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="28,27"
			y="12,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Nordmann has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="maho has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="27,27,27,27,27"
			y="12,13,14,15,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="27,26,25"
			y="11,10,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="28,27,26,25"
			y="10,11,11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="27,26"
			y="13,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="19,20,21,21,22,23"
			y="5,5,6,7,7,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,12,13,13,13,14"
			y="11,11,12,13,14,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="14,15,16"
			y="14,14,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11"
			y="14,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="3"
			x="19"
			y="5"
		[/recruit]
		[random]
			value="19695"
		[/random]
		[random]
			value="13108"
		[/random]
		[random]
			value="8773"
		[/random]
		[random]
			value="11812"
		[/random]
		[random]
			value="837"
		[/random]
		[random]
			value="19926"
		[/random]
		[random]
			value="13243"
		[/random]
		[random]
			value="1774"
		[/random]
		[random]
			value="15774"
		[/random]
		[random]
			value="3049"
		[/random]
		[random]
			value="102"
		[/random]
		[random]
			value="8578"
		[/random]
		[random]
			value="11369"
			[results]
				checksum="wIq0h4Aje6ZNhfnNl+7b,Ha4jCJxd>Z4D>emIBh6hCW2BmtJ8j1v.9xmODNURxriEsBIuurvENcQBQBPqyPrRxP5tBQME,Ezpfu49w6JQVkN94JBwVAIsdMAIZHHpExA"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="6"
			x="20"
			y="4"
		[/recruit]
		[random]
			value="13847"
		[/random]
		[random]
			value="8182"
		[/random]
		[random]
			value="25943"
		[/random]
		[random]
			value="17130"
		[/random]
		[random]
			value="15614"
		[/random]
		[random]
			value="648"
		[/random]
		[random]
			value="4610"
		[/random]
		[random]
			value="4350"
		[/random]
		[random]
			value="25281"
		[/random]
		[random]
			value="15495"
		[/random]
		[random]
			value="20593"
		[/random]
		[random]
			value="17835"
		[/random]
		[random]
			value="21767"
			[results]
				checksum="RqMsBKzD0FKjsFwUULNJZmGIxrMqRUrwAqFDQBsGIPzPLBOztLbGuuQUIGIP7KIRwurIsmHBB+FVoqJyy6J8xkkBsfg-8bR7eEHFHBVJRlsCL4wQFtHLK,fBFKhGav7k"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Webster52402 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,19,20,21,21,22"
			y="4,5,5,6,7,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="pavl0 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="19,19,19,19,19,20"
			y="20,19,18,17,16,15"
		[/move]
	[/command]
	[command]
		[move]
			x="23,22,21,20"
			y="19,19,20,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="BusyP has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="idiota has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="BillyBoy has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="nlorem has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="30,30"
			y="19,18"
		[/move]
	[/command]
	[command]
		[move]
			x="30,29,29,29"
			y="18,18,17,16"
		[/move]
	[/command]
	[command]
		[move]
			x="29,30,31,32,32,33"
			y="16,15,15,14,13,13"
		[/move]
	[/command]
	[command]
		[move]
			x="26,27,28,29,30"
			y="19,19,19,20,19"
		[/move]
	[/command]
	[command]
		[move]
			x="21,22,23,24,25,26"
			y="20,19,19,19,19,19"
		[/move]
	[/command]
	[command]
		[move]
			x="24,23,22,21,20,19,18"
			y="18,19,19,19,18,18,17"
		[/move]
	[/command]
	[command]
		[recruit]
			value="7"
			x="21"
			y="20"
		[/recruit]
		[random]
			value="10348"
		[/random]
		[random]
			value="25289"
		[/random]
		[random]
			value="13365"
		[/random]
		[random]
			value="8666"
		[/random]
		[random]
			value="18654"
		[/random]
		[random]
			value="745"
		[/random]
		[random]
			value="2738"
		[/random]
		[random]
			value="18439"
		[/random]
		[random]
			value="28329"
		[/random]
		[random]
			value="2255"
		[/random]
		[random]
			value="21100"
		[/random]
		[random]
			value="9942"
		[/random]
		[random]
			value="27013"
		[/random]
		[random]
			value="9890"
		[/random]
		[random]
			value="20732"
			[results]
				checksum=",Ad3Y5f-Gtmnsp5jHbEoRiVrOCpxE4IDyxOzzQOG.nCLyyGDmUtLNvFrwCUxRLwFwmIsr1QENmxPFHFw.RFKFnqypNQsM8mwoFomIhFlq1.CLW<<ddNv5EsLNHBNzkOI"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="24,24"
			y="17,18"
		[/move]
	[/command]
	[command]
		[move]
			x="20,19,18"
			y="20,20,19"
		[/move]
	[/command]
	[command]
		[move]
			x="14,13,13,12"
			y="17,17,16,15"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="12"
				y="15"
			[/source]
			[destination]
				x="11"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="2499"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="10,10,10,10,9,9,10"
			y="19,18,17,16,16,15,14"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="16,15,14,13,12,11,10"
			y="13,14,14,14,13,13,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="10"
				y="13"
			[/source]
			[destination]
				x="10"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="21369"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="13959"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="18856"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="3579"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="30503"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="9711"
			[results]
				chance="50"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11"
			y="15,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="11"
				y="14"
			[/source]
			[destination]
				x="10"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="10024"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="25751"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1035"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="9990"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="22061"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="12568"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="19,18,17,16,15,14"
			y="5,4,5,5,6,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="noob2 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="idiota has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="27,27,27,27,27,27"
			y="16,15,14,13,12,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="26,25,25,24,23,22"
			y="12,12,11,10,11,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,21,20,19,18"
			y="11,11,10,10,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,21,20,19,19,18"
			y="7,7,6,6,5,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="23,24,25,26,27,28"
			y="8,8,9,9,10,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="26,27,27"
			y="11,11,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,26,26"
			y="12,11,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="27,27,26"
			y="10,11,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="26,27"
			y="10,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="20,20,21,21,22"
			y="4,5,6,7,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="2"
			x="17"
			y="5"
		[/recruit]
		[random]
			value="21281"
		[/random]
		[random]
			value="16335"
		[/random]
		[random]
			value="10260"
		[/random]
		[random]
			value="15946"
		[/random]
		[random]
			value="16580"
		[/random]
		[random]
			value="4980"
		[/random]
		[random]
			value="20668"
		[/random]
		[random]
			value="28106"
		[/random]
		[random]
			value="31004"
		[/random]
		[random]
			value="19491"
		[/random]
		[random]
			value="24269"
		[/random]
		[random]
			value="897"
		[/random]
		[random]
			value="16254"
			[results]
				checksum="TuuzMJvu3JOmTCCoKGpBJPA6SCMFtLEzKIxOCmtqSOKJLCFwmIsr1QENmxPFHFw.RFKFnqypNLqM8mwoForIhF8xkkBsH9ih>N4ftxqADyQNdDsofqQwNFrCg8vPGzPi"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Mithyr has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Benn has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="MajicMomo has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="26,26,26,26,27"
			y="19,18,17,16,16"
		[/move]
	[/command]
	[command]
		[move]
			x="24,25,25,25,25"
			y="18,18,17,16,15"
		[/move]
	[/command]
	[command]
		[move]
			x="30,29,28,28,27,27,26"
			y="19,19,18,17,17,16,15"
		[/move]
	[/command]
	[command]
		[move]
			x="33,32,32,31,30,29,28,27,26,25"
			y="13,13,14,15,15,16,16,17,17,18"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="elfejoyeux has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="21,20,19,18,17,16"
			y="20,19,19,18,18,17"
		[/move]
	[/command]
	[command]
		[move]
			x="20,19,18,17,16,15"
			y="15,16,16,17,16,17"
		[/move]
	[/command]
	[command]
		[move]
			x="18,18,19"
			y="19,20,21"
		[/move]
	[/command]
	[command]
		[recruit]
			value="0"
			x="19"
			y="20"
		[/recruit]
		[random]
			value="8302"
		[/random]
		[random]
			value="2415"
		[/random]
		[random]
			value="25474"
		[/random]
		[random]
			value="15476"
		[/random]
		[random]
			value="18636"
		[/random]
		[random]
			value="14380"
		[/random]
		[random]
			value="24326"
		[/random]
		[random]
			value="13557"
		[/random]
		[random]
			value="5986"
		[/random]
		[random]
			value="14432"
		[/random]
		[random]
			value="24002"
		[/random]
		[random]
			value="28921"
		[/random]
		[random]
			value="6131"
		[/random]
		[random]
			value="277"
		[/random]
		[random]
			value="27561"
			[results]
				checksum="pMyPwoKvbBq0MCQtxRPyPu1PqOvyvtVtPtsuCMyPNLLqFJRxvqM3FDTGMqHwEVMDODuIOJsNErPcOusOKDwebPsxOruODoP.K+zDJqnqswJL0PpQ,RvAQ30CF>hl1cth"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="19,18,18,18"
			y="21,20,19,18"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Arhnayel has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="den_sk has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="10,9,8"
			y="14,15,14"
		[/move]
	[/command]
	[command]
		[move]
			x="8,8,8"
			y="14,13,12"
		[/move]
	[/command]
	[command]
		[move]
			x="8,9,10"
			y="12,12,12"
		[/move]
	[/command]
	[command]
		[move]
			x="12,11,10,10"
			y="15,16,15,14"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="10"
				y="14"
			[/source]
			[destination]
				x="11"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="752"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="-PoGoPuSch3L- has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="18,17,16,15,14"
			y="17,17,16,17,17"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="17,16,15,14,13,12"
			y="5,5,6,6,7,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="3"
			x="17"
			y="5"
		[/recruit]
		[random]
			value="32424"
		[/random]
		[random]
			value="5690"
		[/random]
		[random]
			value="32032"
		[/random]
		[random]
			value="19533"
		[/random]
		[random]
			value="27932"
		[/random]
		[random]
			value="20954"
		[/random]
		[random]
			value="14222"
		[/random]
		[random]
			value="20059"
		[/random]
		[random]
			value="26408"
		[/random]
		[random]
			value="9806"
		[/random]
		[random]
			value="10408"
		[/random]
		[random]
			value="3306"
		[/random]
		[random]
			value="24102"
			[results]
				checksum="wIq0h4Aje6ZNhfnNl+7b,Ha4jCJxd>Z4D>emIBh6hCW2BmtJ8j1v.9xmODNURxriEsBIuurvENcQBQBPqyPrRxP5tBQME,Ezpfu49w6JQVkN94JBwVAIsdMAIZHHpExA"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="10,9"
			y="13,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Poro has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Vashton has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="14,13,13,12,11,11"
			y="6,7,8,8,9,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,17,16,15,14,13,12,11"
			y="9,9,8,8,8,9,9,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="28,28,28,28,28,28"
			y="10,9,8,7,6,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="27,27,26,25,25,24"
			y="11,10,9,9,8,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="27,26,25,24,24,23"
			y="10,9,9,8,7,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Kasian has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Poro has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,25,25,25,24,24"
			y="11,10,9,8,7,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,21,20,19,18"
			y="7,7,6,6,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="26,26,25,24,24,23"
			y="11,10,10,9,8,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,17,16,15,14,13,13"
			y="4,5,5,6,6,7,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="9"
				y="13"
			[/source]
			[destination]
				x="10"
				y="12"
			[/destination]
		[/attack]
		[random]
			value="19152"
			[results]
				chance="60"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="29259"
			[results]
				chance="60"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="31444"
			[results]
				chance="60"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Junkie 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"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="11"
				y="14"
			[/source]
			[destination]
				x="10"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="25158"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="19663"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="6480"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="22138"
			[results]
				chance="40"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="27572"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="23089"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="14,14,13,13,12"
			y="17,16,16,15,14"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="12"
				y="14"
			[/source]
			[destination]
				x="11"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="21760"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="7522"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="14942"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Pionsix has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="10,10"
			y="14,13"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="10"
				y="13"
			[/source]
			[destination]
				x="11"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="1906"
			[results]
				chance="40"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="22995"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="8835"
			[results]
				chance="40"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="14116"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="24913"
			[results]
				chance="40"
				damage="6"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="IlKi has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Kammoli has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="tishbe777 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="10,11,11,11,11,11,11,11,10"
			y="12,13,14,15,16,17,18,19,19"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="reanimation1 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="15,14,14,13,12,12"
			y="17,16,15,15,14,13"
		[/move]
	[/command]
	[command]
		[move]
			x="16,15,14,13,12,11"
			y="17,17,16,16,15,15"
		[/move]
	[/command]
	[command]
		[move]
			x="19,18,17,17,16,15,14"
			y="20,19,19,18,17,17,16"
		[/move]
	[/command]
	[command]
		[move]
			x="25,24,23,22,21,20,19,18,17,16"
			y="18,18,19,19,19,18,18,17,18,17"
		[/move]
	[/command]
	[command]
		[move]
			x="26,26,26"
			y="15,14,13"
		[/move]
	[/command]
	[command]
		[move]
			x="26,26"
			y="13,12"
		[/move]
	[/command]
	[command]
		[move]
			x="26,25"
			y="12,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Master_Fake has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="25,26,26,26,26,27"
			y="15,14,13,12,11,11"
		[/move]
	[/command]
	[command]
		[move]
			x="27,27,26,26,25"
			y="16,15,14,13,13"
		[/move]
	[/command]
	[command]
		[move]
			x="18,19,19,20"
			y="18,19,20,20"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,12,12"
			y="9,9,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12"
			y="10,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="TT has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,9,9,9,9,9,9,10"
			y="13,12,11,10,9,8,7,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,13,14,15,16,17,18"
			y="8,7,6,6,5,5,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="17,16,15,14,13,12"
			y="5,5,6,5,6,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="0"
			x="17"
			y="5"
		[/recruit]
		[random]
			value="24527"
		[/random]
		[random]
			value="11994"
		[/random]
		[random]
			value="28246"
		[/random]
		[random]
			value="14714"
		[/random]
		[random]
			value="19701"
		[/random]
		[random]
			value="16066"
		[/random]
		[random]
			value="977"
		[/random]
		[random]
			value="18355"
		[/random]
		[random]
			value="23441"
		[/random]
		[random]
			value="30553"
		[/random]
		[random]
			value="31756"
		[/random]
		[random]
			value="2883"
		[/random]
		[random]
			value="21852"
		[/random]
		[random]
			value="24771"
		[/random]
		[random]
			value="20137"
			[results]
				checksum="LhGI37qHcsJn9Niqer4moRo6wD4zsHoKP1Hy+wP.,jg1d-5cL>71745hhbgk5n1,oc<nn6f23854.p4418om4H8bFWB0pjc+cZng<m8e6X68+vn>t55bKrqZdmOCaJmI"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="yanis has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,17,16,15,14"
			y="5,5,5,6,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11,11,11,11"
			y="10,9,8,7,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,11"
			y="7,8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,13,14,14,15"
			y="11,10,10,9,8,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="6"
			x="19"
			y="5"
		[/recruit]
		[random]
			value="14618"
		[/random]
		[random]
			value="20389"
		[/random]
		[random]
			value="11835"
		[/random]
		[random]
			value="23048"
		[/random]
		[random]
			value="13670"
		[/random]
		[random]
			value="9903"
		[/random]
		[random]
			value="10649"
		[/random]
		[random]
			value="14777"
		[/random]
		[random]
			value="10028"
		[/random]
		[random]
			value="3085"
		[/random]
		[random]
			value="428"
		[/random]
		[random]
			value="28730"
		[/random]
		[random]
			value="16828"
			[results]
				checksum="RqMsBKzD0FKjsFwUULNJZmGIxrMqRUrwAqFDQBsGIPzPLBOztLbGuuQUIGIP7KIRwurIsmHBB+FVoqJyy6J8xkkBsfg-8bR7eEHFHBVJRlsCL4wQFtHLK,fBFKhGav7k"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Dreamwalker has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Euthanasie has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Shadde has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,24"
			y="6,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="23,23"
			y="7,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="23,24,25"
			y="8,7,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="23,22,21"
			y="6,5,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Richter has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Zaku has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="10,11,11,12,13,13,14"
			y="19,19,18,17,17,16,15"
		[/move]
	[/command]
	[command]
		[move]
			x="14,14,14"
			y="15,16,17"
		[/move]
	[/command]
	[command]
		[move]
			x="10,10,10,10,10,10,10"
			y="13,14,15,16,17,18,19"
		[/move]
	[/command]
	[command]
		[recruit]
			value="3"
			x="21"
			y="20"
		[/recruit]
		[random]
			value="7421"
		[/random]
		[random]
			value="2301"
		[/random]
		[random]
			value="23987"
		[/random]
		[random]
			value="6567"
		[/random]
		[random]
			value="27384"
		[/random]
		[random]
			value="3372"
		[/random]
		[random]
			value="13067"
		[/random]
		[random]
			value="28460"
		[/random]
		[random]
			value="30716"
		[/random]
		[random]
			value="4769"
		[/random]
		[random]
			value="7522"
		[/random]
		[random]
			value="16193"
		[/random]
		[random]
			value="23722"
		[/random]
		[random]
			value="24336"
		[/random]
		[random]
			value="23789"
			[results]
				checksum="eKEMoMsJ2Sm2IxNK-ruIvyJD8uFQquOORqLQAKsDuHBwnqvBFyQvVsL8qHTmQQNRqrWuTuTxDUFLDPxfDLuyOcqNHBnCR5lyBlS<1Ip648,gYmdg-Lb7,b2<2j8d,4eh"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Trebor has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Mandred has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="16,15,14,14,14,13"
			y="17,17,16,15,14,14"
		[/move]
	[/command]
	[command]
		[move]
			x="14,13,12,11,11"
			y="16,16,15,15,14"
		[/move]
	[/command]
	[command]
		[move]
			x="12,11,10,9,8"
			y="13,13,12,12,11"
		[/move]
	[/command]
	[command]
		[move]
			x="11,11,11,11"
			y="15,14,13,12"
		[/move]
	[/command]
	[command]
		[move]
			x="20,19"
			y="20,20"
		[/move]
	[/command]
	[command]
		[move]
			x="25,26,26"
			y="12,11,10"
		[/move]
	[/command]
	[command]
		[move]
			x="25,25"
			y="13,12"
		[/move]
	[/command]
	[command]
		[move]
			x="26,27,28"
			y="10,10,10"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="argoran has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="15,16,17"
			y="8,8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="17,18,19,20,21"
			y="9,8,8,7,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="21,22"
			y="8,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="28,28,28,28,27,27"
			y="5,6,7,8,9,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="marhat has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="27"
				y="10"
			[/source]
			[destination]
				x="27"
				y="11"
			[/destination]
		[/attack]
		[random]
			value="5613"
			[results]
				chance="40"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="9097"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="12804"
			[results]
				chance="40"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="23751"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="5508"
			[results]
				chance="40"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="2260"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Gibbs has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Dcy_Axe_Raider has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="X has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,24,24,24,25"
			y="7,8,9,10,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="25"
				y="11"
			[/source]
			[destination]
				x="25"
				y="12"
			[/destination]
		[/attack]
		[random]
			value="7148"
			[results]
				chance="50"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="23204"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="3829"
			[results]
				chance="50"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="12870"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="30294"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="16806"
			[results]
				chance="40"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,26,27,27,28"
			y="7,7,8,9,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="skb1 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="1"
			weapon="1"
			[source]
				x="28"
				y="9"
			[/source]
			[destination]
				x="28"
				y="10"
			[/destination]
		[/attack]
		[random]
			value="10275"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="14562"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1255"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="27952"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="michael has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,24,24"
			y="5,6,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="21,21,22,23,24,25"
			y="6,7,7,7,7,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,23"
			y="8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="HAOS has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Avid_30 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Richter has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="19,20,21,21,22"
			y="5,5,6,7,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="10,9,8"
			y="6,6,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,12"
			y="6,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11,11,11"
			y="9,8,7,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="14,13"
			y="5,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,13"
			y="6,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="17,16,15,14,13,12"
			y="5,4,4,3,4,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="4"
			x="17"
			y="5"
		[/recruit]
		[random]
			value="19996"
		[/random]
		[random]
			value="18936"
		[/random]
		[random]
			value="22126"
		[/random]
		[random]
			value="4703"
		[/random]
		[random]
			value="22082"
		[/random]
		[random]
			value="4197"
		[/random]
		[random]
			value="18886"
		[/random]
		[random]
			value="15030"
		[/random]
		[random]
			value="21347"
		[/random]
		[random]
			value="16083"
		[/random]
		[random]
			value="13387"
		[/random]
		[random]
			value="25597"
		[/random]
		[random]
			value="15942"
			[results]
				checksum="fEAwEAF+1Gub.aUZJ5kiOGDqZxM8i-LoLYEs-E3jSJv0zT>8cpf6b>5Im2-i0051mfOa-a-d4,d8b>dr3-aeWym.7BZSugG6.eC5RE539gmeoJZ4jM-lYWmgBNCho0u4"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,19,20,21,21,22,23"
			y="4,5,5,6,7,7,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="npc1 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Isometri has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="13,14,14,14,15,16,17,18,19,20"
			y="14,14,15,16,17,17,18,18,18,18"
		[/move]
	[/command]
	[command]
		[move]
			x="21,22,23,24,24"
			y="20,19,19,18,17"
		[/move]
	[/command]
	[command]
		[move]
			x="25,26,26,26,26,27"
			y="12,12,13,14,15,16"
		[/move]
	[/command]
	[command]
		[move]
			x="14,15,16,17,18,19,20"
			y="17,17,16,17,16,16,15"
		[/move]
	[/command]
	[command]
		[move]
			x="11,11,12,13,14,15,16"
			y="14,15,15,16,16,17,17"
		[/move]
	[/command]
	[command]
		[move]
			x="11,11,11"
			y="12,13,14"
		[/move]
	[/command]
	[command]
		[move]
			x="8,8,8,8,9"
			y="11,12,13,14,15"
		[/move]
	[/command]
	[command]
		[move]
			x="12,13,14,14,15,16,17"
			y="14,15,15,16,17,17,18"
		[/move]
	[/command]
	[command]
		[move]
			x="19,20"
			y="20,20"
		[/move]
	[/command]
	[command]
		[recruit]
			value="5"
			x="21"
			y="20"
		[/recruit]
		[random]
			value="20194"
		[/random]
		[random]
			value="23656"
		[/random]
		[random]
			value="17506"
		[/random]
		[random]
			value="28163"
		[/random]
		[random]
			value="21220"
		[/random]
		[random]
			value="11175"
		[/random]
		[random]
			value="17692"
		[/random]
		[random]
			value="8114"
		[/random]
		[random]
			value="9349"
		[/random]
		[random]
			value="31739"
		[/random]
		[random]
			value="6327"
		[/random]
		[random]
			value="6744"
		[/random]
		[random]
			value="2664"
		[/random]
		[random]
			value="9743"
		[/random]
		[random]
			value="28549"
			[results]
				checksum="iCp,4nc1oNO<LLyKmJLIEhoF>vyBA6mszOAMDTywuzyODCrTtRLwFwmIsr1QENmxPFHFw.RFKFnqypNKBM8mwoFomIhFlq1.CL-<<ddBfkHDONNHvHQO1I9LGCHpACmL"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="27,27,27,27,27,26"
			y="11,12,13,14,15,15"
		[/move]
	[/command]
	[command]
		[move]
			x="28,28,28,28,28,28,28"
			y="10,11,12,13,14,15,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="11111 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="23,23"
			y="9,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Valkyria has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="23,24,25,25"
			y="10,10,11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,25,25,26,27,27"
			y="7,8,9,9,10,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,26,26,27,27,28"
			y="7,7,8,9,10,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="28,28,27,27"
			y="9,10,11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,25"
			y="12,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,26,26,26,26"
			y="11,11,12,13,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="26"
				y="14"
			[/source]
			[destination]
				x="26"
				y="15"
			[/destination]
		[/attack]
		[random]
			value="16188"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="24494"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="30359"
			[results]
				chance="60"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="7928"
			[results]
				chance="60"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="26345"
			[results]
				chance="60"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="12885"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,25"
			y="13,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,26,27,28"
			y="12,11,12,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="23,22,21,20,19,19,18"
			y="8,7,7,6,6,5,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="0"
			x="19"
			y="5"
		[/recruit]
		[random]
			value="30122"
		[/random]
		[random]
			value="4497"
		[/random]
		[random]
			value="4341"
		[/random]
		[random]
			value="19059"
		[/random]
		[random]
			value="9260"
		[/random]
		[random]
			value="15573"
		[/random]
		[random]
			value="6153"
		[/random]
		[random]
			value="4818"
		[/random]
		[random]
			value="18809"
		[/random]
		[random]
			value="3058"
		[/random]
		[random]
			value="16105"
		[/random]
		[random]
			value="28114"
		[/random]
		[random]
			value="9439"
		[/random]
		[random]
			value="8909"
		[/random]
		[random]
			value="13426"
			[results]
				checksum="xNb9Bryn.D--c-i+05CRoaOL-EyQnvClJF7qE383X-fb-Zy1ji46+2f+9l+5<foc<nn6f23854.p3418om4H8bFWB0pjc+cZng<m8e6X68+vn>t55bKrqZdmOCaJmIaF"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Raishi has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="27,26,25,25,24"
			y="10,9,9,8,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,23,24,25,26"
			y="7,8,8,9,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="8,8,8"
			y="5,6,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="8,8,9"
			y="7,8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,12,12,12,12"
			y="6,7,8,9,10,11"
		[/move]
	[/command]
	[command]
		undo="no"
		[label]
			colour="107,140,255,0"
			team_name="south"
			text="**g"
			visible_in_fog="yes"
			x="24"
			y="7"
		[/label]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Orange_Dude has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11,11,11,11,11"
			y="6,7,8,9,10,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,12,12,12,12"
			y="5,6,7,8,9,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,13,13,13,13"
			y="5,6,7,8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,12,12,12,11,11"
			y="4,5,6,7,8,9,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,9,9"
			y="9,10,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,9"
			y="11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="17,18,19,20,21,22"
			y="5,5,6,6,7,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		[move]
			x="10,11,12,13,14,15,16"
			y="19,20,20,21,21,22,22"
		[/move]
	[/command]
	[command]
		[move]
			x="9,9,9,9,9,10"
			y="15,16,17,18,19,19"
		[/move]
	[/command]
	[command]
		[move]
			x="11,11,12,13,13,14"
			y="14,15,15,16,17,17"
		[/move]
	[/command]
	[command]
		[move]
			x="26,25"
			y="15,16"
		[/move]
	[/command]
	[command]
		[move]
			x="24,25,26,26"
			y="17,17,16,15"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="26"
				y="15"
			[/source]
			[destination]
				x="26"
				y="14"
			[/destination]
		[/attack]
		[random]
			value="30756"
			[results]
				chance="60"
				damage="13"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="15537"
			[results]
				chance="70"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="24450"
			[results]
				chance="60"
				damage="13"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Oink has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="28,27,26,25"
			y="16,16,15,15"
		[/move]
	[/command]
	[command]
		[move]
			x="27,28,28,29,29,30"
			y="16,16,17,18,19,19"
		[/move]
	[/command]
	[command]
		[move]
			x="25,26,27"
			y="16,16,16"
		[/move]
	[/command]
	[command]
		[move]
			x="21,22,23,24,24"
			y="20,19,19,18,17"
		[/move]
	[/command]
	[command]
		[recruit]
			value="4"
			x="21"
			y="20"
		[/recruit]
		[random]
			value="18208"
		[/random]
		[random]
			value="32425"
		[/random]
		[random]
			value="8695"
		[/random]
		[random]
			value="22653"
		[/random]
		[random]
			value="6404"
		[/random]
		[random]
			value="6872"
		[/random]
		[random]
			value="15380"
		[/random]
		[random]
			value="20835"
		[/random]
		[random]
			value="7902"
		[/random]
		[random]
			value="25836"
		[/random]
		[random]
			value="17207"
		[/random]
		[random]
			value="8998"
		[/random]
		[random]
			value="11863"
		[/random]
		[random]
			value="31093"
		[/random]
		[random]
			value="18681"
			[results]
				checksum="rhRteuCn>Im>OtyS+7ckzAuBMm0+Z8dI9a<pk8651Wl8Z5w.cldpBX>77bllckl2Y+5>aaii6<81Akljb2ifil7.WgZ2.h<5-XxS+j>k2403-o4TA9v1-xH1iTk+kX8Y"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Shachi has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="shan1 has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="shan has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="16,15,14,13"
			y="17,18,17,18"
		[/move]
	[/command]
	[command]
		[move]
			x="13,12"
			y="18,18"
		[/move]
	[/command]
	[command]
		[move]
			x="25,24"
			y="15,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Horatiu has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="17,17,17,16"
			y="18,19,20,20"
		[/move]
	[/command]
	[command]
		[move]
			x="20,21,22,23,24"
			y="20,20,19,19,18"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="28,28"
			y="11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="28,27"
			y="12,13"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Raishi has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11,11,11,11"
			y="11,12,13,14,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11,11,11,11,10"
			y="10,11,12,13,14,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="mathieu has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,12,11,11,10"
			y="11,12,13,14,15,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,9,9,9"
			y="12,13,14,15"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,9"
			y="15,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Zambli has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="AnniXa has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="GNUMARCO has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,12,12,12"
			y="10,11,12,13,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,13,12,12,12"
			y="9,10,10,11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="19,20,21,21,22,23,24"
			y="5,5,6,7,7,8,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="27,26"
			y="13,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="26,25,25,24"
			y="12,12,11,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="27,26,25,24,23"
			y="12,11,11,10,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="27,26,25,24,23,22"
			y="11,10,10,10,11,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="26,25,24,23,22"
			y="9,10,10,11,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,21,20,19,19,19"
			y="7,8,8,9,10,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="28,27,26,25,24,23"
			y="10,10,10,10,9,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,23,23"
			y="10,11,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="23,22"
			y="12,12"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="3"
			x="19"
			y="5"
		[/recruit]
		[random]
			value="26248"
		[/random]
		[random]
			value="19045"
		[/random]
		[random]
			value="25076"
		[/random]
		[random]
			value="3012"
		[/random]
		[random]
			value="20232"
		[/random]
		[random]
			value="19602"
		[/random]
		[random]
			value="8612"
		[/random]
		[random]
			value="3662"
		[/random]
		[random]
			value="17891"
		[/random]
		[random]
			value="8918"
		[/random]
		[random]
			value="19350"
		[/random]
		[random]
			value="29310"
		[/random]
		[random]
			value="14968"
			[results]
				checksum="wIq0h4Aje6ZNhfnNl+7b,Ha4jCJxd>Z4D>emIBh6hCW2BmtJ8j1v.9xmODNURxriEsBIuurvENcQBQBPqyPrRxP5tBQME,Ezpfu49w6JQVkN94JBwVAIsdMAIZHHpExA"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="NecroNerd has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Ekwud has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="n-o-s-a has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="14,13"
			y="17,17"
		[/move]
	[/command]
	[command]
		[move]
			x="10,11,11,12,13,14"
			y="19,19,18,17,17,17"
		[/move]
	[/command]
	[command]
		[move]
			x="13,12,11,11,10"
			y="17,17,18,19,19"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="eastprince has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="16,15,14,13,12"
			y="20,21,21,21,21"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Kammoli has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="spiller has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="20,20"
			y="18,17"
		[/move]
	[/command]
	[command]
		[move]
			x="24,24,23,22,21,20"
			y="17,18,19,19,19,18"
		[/move]
	[/command]
	[command]
		[move]
			x="21,20,19,18,17,16"
			y="20,19,20,19,20,19"
		[/move]
	[/command]
	[command]
		[move]
			x="27,28,29,29,30"
			y="16,15,15,14,13"
		[/move]
	[/command]
	[command]
		[move]
			x="26,27"
			y="15,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Erlend has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="24,24,24"
			y="14,15,16"
		[/move]
	[/command]
	[command]
		[move]
			x="30,30,29,29,29,29"
			y="19,18,18,17,16,15"
		[/move]
	[/command]
	[command]
		[move]
			x="24,23,22,21,20"
			y="18,19,19,20,20"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="IlKi has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Lord_MM has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="20,19,18,18,17"
			y="15,16,16,17,18"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="ahwayakchih has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Dani has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Shen has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Awalach has logged into the lobby"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="Hagbart"
			message="brb, coffee"
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Ralwar has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Mark has logged into the lobby"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="Hagbart"
			message="interesting match so far..."
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Alarion has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="10,10,10,10,9,9"
			y="14,15,16,17,18,19"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="1"
			weapon="0"
			[source]
				x="9"
				y="19"
			[/source]
			[destination]
				x="10"
				y="19"
			[/destination]
		[/attack]
		[random]
			value="13498"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="4137"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="5453"
			[results]
				chance="70"
				damage="12"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="-Laura- has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="23,24,24,25,25"
			y="11,10,9,9,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="9,9,9,9,10,10,11"
			y="16,15,14,13,12,11,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Requiem has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Filadeus has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11,11,11,12"
			y="15,14,13,12,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,12"
			y="12,11,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,11"
			y="14,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="10,10"
			y="15,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="19,18,17,16,15,14"
			y="5,4,5,5,6,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="19,19,18"
			y="11,10,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="23,23"
			y="10,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,22"
			y="10,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,23,23,23"
			y="12,12,11,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="KILLERWOLF has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,22"
			y="11,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,26"
			y="8,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,25,25,26,27"
			y="7,8,9,9,10"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="6"
			x="19"
			y="5"
		[/recruit]
		[random]
			value="28338"
		[/random]
		[random]
			value="25860"
		[/random]
		[random]
			value="3452"
		[/random]
		[random]
			value="22717"
		[/random]
		[random]
			value="13359"
		[/random]
		[random]
			value="2216"
		[/random]
		[random]
			value="15225"
		[/random]
		[random]
			value="9284"
		[/random]
		[random]
			value="28765"
		[/random]
		[random]
			value="6676"
		[/random]
		[random]
			value="20118"
		[/random]
		[random]
			value="18701"
		[/random]
		[random]
			value="19171"
			[results]
				checksum="RqMsBKzD0FKjsFwUULNJZmGIxrMqRUrwAqFDQBsGIPzPLBOztLbGuuQUIGIP7KIRwurIsmHBB+FVoqJyy6J8xkkBsfg-8bR7eEHFHBVJRlsCL4wQFtHLK,fBFKhGav7k"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		undo="no"
		[speak]
			id="Hagbart"
			message="thats a thing I'd like to be able as well: breaking off a failed attack... well played"
			side="2"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="Hagbart"
			message="able to do*"
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="me has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="10,11"
			y="19,19"
		[/move]
	[/command]
	[command]
		[move]
			x="16,15,14,13,12,11,10"
			y="22,22,21,21,20,20,19"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="10"
				y="19"
			[/source]
			[destination]
				x="9"
				y="19"
			[/destination]
		[/attack]
		[random]
			value="19273"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="32481"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="13830"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="foxsatan"
			message="my englishi is pool~"
			side="1"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="Hagbart"
			message="no problem"
			side="2"
		[/speak]
	[/command]
	[command]
		undo="no"
		[label]
			colour="107,140,255,0"
			team_name="south"
			visible_in_fog="yes"
			x="24"
			y="7"
		[/label]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="SaltatorMortis has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="knight_ruben has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="14,13,12,11,10,9"
			y="17,17,17,18,17,18"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="9"
				y="18"
			[/source]
			[destination]
				x="9"
				y="19"
			[/destination]
		[/attack]
		[random]
			value="11829"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="11618"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="4026"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="foxsatan"
			message="you turn?"
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Jeany has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="11,10"
			y="19,18"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="10"
				y="18"
			[/source]
			[destination]
				x="9"
				y="19"
			[/destination]
		[/attack]
		[random]
			value="9036"
			[results]
				chance="60"
				damage="5"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="17,16"
			y="18,17"
		[/move]
	[/command]
	[command]
		[move]
			x="16,15,14"
			y="17,18,17"
		[/move]
	[/command]
	[command]
		[move]
			x="12,13,14,15,16,17,17"
			y="21,21,21,21,20,20,19"
		[/move]
	[/command]
	[command]
		[move]
			x="20,20"
			y="17,16"
		[/move]
	[/command]
	[command]
		[move]
			x="20,20"
			y="16,15"
		[/move]
	[/command]
	[command]
		[move]
			x="20,20"
			y="15,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="eastprince has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="16,17,17,17,18,19,19,19,20"
			y="19,19,18,17,16,16,15,14,13"
		[/move]
	[/command]
	[command]
		[move]
			x="20,21"
			y="14,14"
		[/move]
	[/command]
	[command]
		[move]
			x="20,19,19,19,20,20"
			y="18,18,17,16,15,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="xekaltsotos has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Viritueel has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[recruit]
			value="5"
			x="19"
			y="20"
		[/recruit]
		[random]
			value="3001"
		[/random]
		[random]
			value="22169"
		[/random]
		[random]
			value="10389"
		[/random]
		[random]
			value="6778"
		[/random]
		[random]
			value="20009"
		[/random]
		[random]
			value="5171"
		[/random]
		[random]
			value="26432"
		[/random]
		[random]
			value="25931"
		[/random]
		[random]
			value="4485"
		[/random]
		[random]
			value="13818"
		[/random]
		[random]
			value="14495"
		[/random]
		[random]
			value="24149"
		[/random]
		[random]
			value="11059"
		[/random]
		[random]
			value="30152"
		[/random]
		[random]
			value="242"
			[results]
				checksum="-n8rN+-Dy+EeNPrPbGMNQXtz0Ipzwss1tysRRKOwxuoVBywHrwxEqutHtKzE>BNMxHQOHFw.RFKFnqypNLtM8mwoFomIhFlq1.CLW<<ddBfkHDONNHvHQO1I9LGCHpAC"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="12,12,13,14,15"
			y="18,17,17,16,16"
		[/move]
	[/command]
	[command]
		[move]
			x="30,30,30,31"
			y="13,12,11,11"
		[/move]
	[/command]
	[command]
		[move]
			x="27,28,28,29,30"
			y="16,15,14,14,13"
		[/move]
	[/command]
	[command]
		[move]
			x="24,25,26,27"
			y="16,16,15,16"
		[/move]
	[/command]
	[command]
		[move]
			x="29,28"
			y="15,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Antonio has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="20,21,22,23,24,25"
			y="20,20,19,19,18,18"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		undo="no"
		[speak]
			id="Hagbart"
			message="just thinking"
			side="2"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="Hagbart"
			message="I'm likely to use up all my time every turn..."
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="ZeroafiqXD has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="26,26"
			y="8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="14,15,16,17,18"
			y="6,6,5,6,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,21,20,19,18"
			y="9,9,8,8,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,22"
			y="10,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="23,22,21"
			y="10,9,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="23,23,24"
			y="9,8,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="26,25"
			y="9,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,24,24"
			y="8,7,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="27,26,25,24"
			y="10,9,9,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,25"
			y="9,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,25"
			y="8,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,24"
			y="8,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="2"
			x="20"
			y="4"
		[/recruit]
		[random]
			value="32670"
		[/random]
		[random]
			value="32149"
		[/random]
		[random]
			value="26110"
		[/random]
		[random]
			value="7173"
		[/random]
		[random]
			value="10652"
		[/random]
		[random]
			value="14718"
		[/random]
		[random]
			value="18648"
		[/random]
		[random]
			value="25339"
		[/random]
		[random]
			value="27759"
		[/random]
		[random]
			value="30510"
		[/random]
		[random]
			value="5515"
		[/random]
		[random]
			value="8915"
		[/random]
		[random]
			value="5458"
			[results]
				checksum="TuuzMJvu3JOmTCCoKGpBJPA6SCMFtLEzKIxOCmtqSOKJLCFwmIsr1QENmxPFHFw.RFKFnqypNLqM8mwoForIhF8xkkBsH9ih>N4ftxqADyQNdDsofqQwNFrCg8vPGzPi"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="19,20,21,22"
			y="5,4,5,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11,12,13,14,15"
			y="11,10,9,9,8,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,11,11,11,11,11"
			y="14,13,12,11,10,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Physix has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,12,13"
			y="10,9,8,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="10,10,10,10,10,10"
			y="14,13,12,11,10,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Lem_ has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,12"
			y="11,10,9"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,19,19,19"
			y="4,5,6,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Azion has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="10,11,11,11,11"
			y="19,19,18,17,16"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="wesnothfomane has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="11,11,11"
			y="16,15,14"
		[/move]
	[/command]
	[command]
		[move]
			x="17,17,16,15,14,14,13"
			y="19,18,17,17,16,15,15"
		[/move]
	[/command]
	[command]
		[move]
			x="19,19,19,19,19,19"
			y="20,19,18,17,16,15"
		[/move]
	[/command]
	[command]
		[move]
			x="25,24,23,22,21,20"
			y="18,18,19,19,20,20"
		[/move]
	[/command]
	[command]
		[move]
			x="31,31,30,30"
			y="11,10,9,8"
		[/move]
	[/command]
	[command]
		[move]
			x="30,31"
			y="8,8"
		[/move]
	[/command]
	[command]
		[move]
			x="30,29,28,28,27"
			y="13,13,12,11,11"
		[/move]
	[/command]
	[command]
		[move]
			x="28,28,28,28,28"
			y="14,13,12,11,10"
		[/move]
	[/command]
	[command]
		[move]
			x="27,27,27,27,27,26"
			y="16,15,14,13,12,11"
		[/move]
	[/command]
	[command]
		[move]
			x="15,14,14,13"
			y="16,15,14,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Merc has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="bloodthirst has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="9,9,9,8,8,8"
			y="18,17,16,15,14,13"
		[/move]
	[/command]
	[command]
		[move]
			x="10,10,10,10,10"
			y="18,17,16,15,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="save_the_queen has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="14,13,12,11,10,9,8,7"
			y="17,17,16,16,15,15,14,14"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="roger has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Rise has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="21,21,22"
			y="14,13,12"
		[/move]
	[/command]
	[command]
		[move]
			x="20,20,20,21"
			y="14,13,12,12"
		[/move]
	[/command]
	[command]
		[move]
			x="20,21,21,22"
			y="13,13,12,11"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="hatten has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="19,19,19,18"
			y="7,6,5,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,24,24"
			y="7,6,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,23,23,23"
			y="6,6,5,4"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,24,24"
			y="9,8,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,26,27,28"
			y="7,6,6,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="21,22,23,23,24,25"
			y="9,8,8,7,6,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="BlinkEYE has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,25"
			y="6,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="20,21,22,23"
			y="4,5,5,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,12,12,12,12"
			y="9,8,7,6,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,10,10,9,9,8"
			y="9,8,7,7,6,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="kard_ has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="10,11,11,11,11"
			y="9,9,8,7,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="13,13,13,13"
			y="8,7,6,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[recruit]
			value="0"
			x="17"
			y="5"
		[/recruit]
		[random]
			value="26661"
		[/random]
		[random]
			value="28570"
		[/random]
		[random]
			value="19308"
		[/random]
		[random]
			value="15951"
		[/random]
		[random]
			value="31692"
		[/random]
		[random]
			value="17747"
		[/random]
		[random]
			value="21879"
		[/random]
		[random]
			value="18127"
		[/random]
		[random]
			value="5547"
		[/random]
		[random]
			value="26590"
		[/random]
		[random]
			value="32416"
		[/random]
		[random]
			value="30006"
		[/random]
		[random]
			value="30736"
		[/random]
		[random]
			value="13854"
		[/random]
		[random]
			value="30928"
			[results]
				checksum="LhGI28qHcsJn9Niqer4ntRo6wD4zsHoKP1Hy+wP.,jg1d-5cL>71745hhbgk5n1,oc<nn6f23854.o1418om4H8bFWB0pjc+cZng<m8e6X68+vn>t55bKrqZdmOCaJmI"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Dani has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Jeany has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="ck has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="dd has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,22,22,21,21"
			y="9,8,7,7,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,19,19,19,19,18"
			y="9,9,8,7,6,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,18,17"
			y="7,6,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="17,18,19"
			y="6,5,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,18"
			y="6,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Dartagnan has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="7,7"
			y="14,13"
		[/move]
	[/command]
	[command]
		[move]
			x="7,8"
			y="13,12"
		[/move]
	[/command]
	[command]
		[move]
			x="8,9"
			y="12,12"
		[/move]
	[/command]
	[command]
		[move]
			x="9,9"
			y="12,11"
		[/move]
	[/command]
	[command]
		[move]
			x="11,11,11,11,11,11"
			y="14,13,12,11,10,9"
		[/move]
	[/command]
	[command]
		[move]
			x="13,12,12,12,12,13"
			y="14,13,12,11,10,10"
		[/move]
	[/command]
	[command]
		[move]
			x="8,8,8,8"
			y="13,12,11,10"
		[/move]
	[/command]
	[command]
		[move]
			x="13,12,11,11,11,11"
			y="15,14,14,13,12,11"
		[/move]
	[/command]
	[command]
		[move]
			x="9,9"
			y="11,10"
		[/move]
	[/command]
	[command]
		[move]
			x="10,11,11,11,11,11"
			y="14,14,13,12,11,10"
		[/move]
	[/command]
	[command]
		[move]
			x="27,27,27,27,27,28"
			y="11,10,9,8,7,6"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="28"
				y="6"
			[/source]
			[destination]
				x="28"
				y="5"
			[/destination]
		[/attack]
		[random]
			value="24201"
			[results]
				chance="40"
				damage="16"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="1629"
			[results]
				chance="70"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="13345"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="1345"
			[results]
				chance="70"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Nero has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="22,23,24,25,26,27,27,28,29,29"
			y="11,11,10,10,9,9,8,7,7,6"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="29"
				y="6"
			[/source]
			[destination]
				x="28"
				y="5"
			[/destination]
		[/attack]
		[random]
			value="260"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="7565"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="30110"
			[results]
				chance="40"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="2884"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Andy has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="31,31,30,30,29"
			y="8,7,6,5,5"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="29"
				y="5"
			[/source]
			[destination]
				x="28"
				y="5"
			[/destination]
		[/attack]
		[random]
			value="3794"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="26018"
			[results]
				chance="50"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="9741"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="2233"
			[results]
				chance="50"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="24671"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="26,27,27,27,27,27,27"
			y="11,11,10,9,8,7,6"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="27"
				y="6"
			[/source]
			[destination]
				x="28"
				y="5"
			[/destination]
		[/attack]
		[random]
			value="12421"
			[results]
				chance="40"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="2084"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="3492"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="24932"
			[results]
				chance="60"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="14270"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="21,22,23,24,24,25,25"
			y="12,11,11,10,9,9,8"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="25"
				y="8"
			[/source]
			[destination]
				x="24"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="2934"
			[results]
				chance="70"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="23"
			[results]
				chance="70"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="8639"
			[results]
				chance="70"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="28,27,26,25,24"
			y="10,10,9,9,8"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="24"
				y="8"
			[/source]
			[destination]
				x="24"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="4206"
			[results]
				chance="40"
				damage="7"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="22,22,23"
			y="12,11,11"
		[/move]
	[/command]
	[command]
		[move]
			x="23,24,24,24,24"
			y="11,10,9,8,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Scipio has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="cilotennis has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="19,20,20,21,21,22"
			y="15,14,13,13,12,11"
		[/move]
	[/command]
	[command]
		[recruit]
			value="3"
			x="19"
			y="20"
		[/recruit]
		[random]
			value="9837"
		[/random]
		[random]
			value="2314"
		[/random]
		[random]
			value="12104"
		[/random]
		[random]
			value="31550"
		[/random]
		[random]
			value="8318"
		[/random]
		[random]
			value="1481"
		[/random]
		[random]
			value="17779"
		[/random]
		[random]
			value="11202"
		[/random]
		[random]
			value="27939"
		[/random]
		[random]
			value="24454"
		[/random]
		[random]
			value="27258"
		[/random]
		[random]
			value="21041"
		[/random]
		[random]
			value="13443"
		[/random]
		[random]
			value="26520"
		[/random]
		[random]
			value="3304"
			[results]
				checksum="eKEMoMsJ2Sm2IxNK-ruIvyJD8uFQquOORqLQAKsDuHBwnqvBFyQvVsL8qHTmQQNRqrWuTuTxDUFKDPxfDLuyOcqNHBnCR5lymlS<1Ip648,gYgdg-Lb7,b2<2j8d.4eh"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="fyzd has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="20,21,22,23,24,25"
			y="20,20,19,19,18,18"
		[/move]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="23,23,23,23"
			y="4,5,6,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="23"
				y="7"
			[/source]
			[destination]
				x="24"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="17083"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="31077"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="dd has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="28"
				y="5"
			[/source]
			[destination]
				x="29"
				y="6"
			[/destination]
		[/attack]
		[random]
			value="25735"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="28944"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="5443"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="eastprince has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,19,20,21,22,23"
			y="5,6,6,7,7,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="23"
				y="8"
			[/source]
			[destination]
				x="24"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="13563"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="29919"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="20324"
			[results]
				chance="60"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,24"
			y="5,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="24"
				y="6"
			[/source]
			[destination]
				x="24"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="16281"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="13940"
			[results]
				chance="70"
				damage="8"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,19,20,21"
			y="7,7,7,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,25,25"
			y="5,6,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="23,24,25"
			y="6,5,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,23"
			y="5,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="21,21,22"
			y="6,7,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="19,20,21,22"
			y="5,4,5,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="17,18,19,20,21"
			y="5,4,5,5,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,13,14,15,16,17"
			y="5,6,5,6,5,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="15,14,14,15,16,17,18,19"
			y="8,7,6,6,5,5,5,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="200cc has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="11,12,13,14,15,16"
			y="6,5,6,5,5,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="8,9,10,11,11,12"
			y="5,5,4,4,3,2"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="18,19,20,21,22,23,24"
			y="4,4,3,4,3,3,3"
		[/move]
	[/command]
	[command]
		sent="yes"
		[countdown_update]
			team="1"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		sent="yes"
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Almaelia has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Bolg has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="11,11,11,11,11,11,12"
			y="11,10,9,8,7,6,5"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="12"
				y="5"
			[/source]
			[destination]
				x="13"
				y="5"
			[/destination]
		[/attack]
		[random]
			value="4003"
			[results]
				chance="70"
				damage="9"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="20447"
			[results]
				chance="70"
				damage="9"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="13,13,13,13,14,15"
			y="10,9,8,7,6,6"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="15"
				y="6"
			[/source]
			[destination]
				x="16"
				y="5"
			[/destination]
		[/attack]
		[random]
			value="21708"
			[results]
				chance="60"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="29776"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="882"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Armahdettu has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="DeadW has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="11,11,11,12,12,13"
			y="9,8,7,6,5,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Ging has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="8,9,10,11,11,12"
			y="10,10,9,9,8,7"
		[/move]
	[/command]
	[command]
		[move]
			x="11,11,11,11,11,11"
			y="10,9,8,7,6,5"
		[/move]
	[/command]
	[command]
		[move]
			x="9,9,9,9,9,8"
			y="10,9,8,7,6,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Richter has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="24,25"
			y="8,9"
		[/move]
	[/command]
	[command]
		[move]
			x="28,27,26,25,24"
			y="6,7,7,8,8"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="24"
				y="8"
			[/source]
			[destination]
				x="23"
				y="8"
			[/destination]
		[/attack]
		[random]
			value="11606"
			[results]
				chance="60"
				damage="16"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="11574"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="19198"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="27810"
			[results]
				chance="70"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="22,23,23,23"
			y="11,11,10,9"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="1"
			weapon="1"
			[source]
				x="23"
				y="9"
			[/source]
			[destination]
				x="23"
				y="8"
			[/destination]
		[/attack]
		[random]
			value="27079"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="2450"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="8072"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="12835"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="16400"
			[results]
				chance="70"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="2142"
			[results]
				chance="50"
				damage="5"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="24,25,26"
			y="7,8,8"
		[/move]
	[/command]
	[command]
		[move]
			x="25,25,24"
			y="9,8,7"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="24"
				y="7"
			[/source]
			[destination]
				x="23"
				y="8"
			[/destination]
		[/attack]
		[random]
			value="20700"
			[results]
				chance="60"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="26419"
			[results]
				chance="40"
				damage="2"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="12048"
			[results]
				chance="60"
				damage="4"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="25,26"
			y="8,7"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="26"
				y="7"
			[/source]
			[destination]
				x="25"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="19344"
			[results]
				chance="70"
				damage="9"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="31987"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="13795"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="27,26"
			y="6,6"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="26"
				y="6"
			[/source]
			[destination]
				x="25"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="2198"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="25880"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="30810"
			[results]
				chance="40"
				damage="10"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="bv has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="29,28"
			y="6,6"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="28"
				y="6"
			[/source]
			[destination]
				x="28"
				y="5"
			[/destination]
		[/attack]
		[random]
			value="23275"
			[results]
				chance="40"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="17075"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="3229"
			[results]
				chance="40"
				damage="10"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="29,28"
			y="5,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Zombie-Nimble has logged into the lobby"
		[/speak]
	[/command]
	[command]
		[move]
			x="26,25,25"
			y="8,8,7"
		[/move]
	[/command]
	[command]
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="25"
				y="7"
			[/source]
			[destination]
				x="24"
				y="6"
			[/destination]
		[/attack]
		[random]
			value="4562"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="22305"
			[results]
				chance="50"
				damage="25"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		[move]
			x="19,19,19,19,19,19"
			y="20,19,18,17,16,15"
		[/move]
	[/command]
	[command]
		[move]
			x="25,24,23,22,21,20"
			y="18,18,19,19,20,20"
		[/move]
	[/command]
	[command]
		[recruit]
			value="7"
			x="19"
			y="20"
		[/recruit]
		[random]
			value="26017"
		[/random]
		[random]
			value="30836"
		[/random]
		[random]
			value="29191"
		[/random]
		[random]
			value="30685"
		[/random]
		[random]
			value="13465"
		[/random]
		[random]
			value="25052"
		[/random]
		[random]
			value="1311"
		[/random]
		[random]
			value="23010"
		[/random]
		[random]
			value="8422"
		[/random]
		[random]
			value="14624"
		[/random]
		[random]
			value="12557"
		[/random]
		[random]
			value="11816"
		[/random]
		[random]
			value="21536"
		[/random]
		[random]
			value="26254"
		[/random]
		[random]
			value="19896"
			[results]
				checksum=",Ad3Y5f-Gtmsmp5jHbEoRiVrOCpxE4IDyxOzzQOG.nCLyyGDmUtLNvFrwCUxRLwFwmIsr1QENmxPFHFw.RFKFnqypNLmM8mwoFomIhFlq1.CLB<<ddNv5EsLNHBNzkOI"
			[/results]
		[/random]
	[/command]
	[command]
		[recruit]
			value="7"
			x="21"
			y="20"
		[/recruit]
		[random]
			value="30264"
		[/random]
		[random]
			value="7193"
		[/random]
		[random]
			value="29370"
		[/random]
		[random]
			value="28474"
		[/random]
		[random]
			value="11522"
		[/random]
		[random]
			value="31873"
		[/random]
		[random]
			value="19316"
		[/random]
		[random]
			value="24186"
		[/random]
		[random]
			value="15673"
		[/random]
		[random]
			value="21301"
		[/random]
		[random]
			value="19850"
		[/random]
		[random]
			value="28897"
		[/random]
		[random]
			value="14917"
		[/random]
		[random]
			value="17553"
		[/random]
		[random]
			value="12343"
			[results]
				checksum=",Ad3Y5f-Gtmspp5jHbEoRiSrOCpxE4IDyxOzzQOG.nCLyyGDmUtLNvFrwCUxRLwFwmIsr1QENmxPFHFw.RFKFnqypNLpM8mwoFomIhFlq1.CLW<<ddNv5EsLNHBNzkOI"
			[/results]
		[/random]
	[/command]
	[command]
		[countdown_update]
			team="2"
			value="330000"
		[/countdown_update]
	[/command]
	[command]
		[end_turn]
		[/end_turn]
	[/command]
	[command]
		sent="yes"
		[move]
			x="21,21,22"
			y="7,8,8"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="22"
				y="8"
			[/source]
			[destination]
				x="23"
				y="9"
			[/destination]
		[/attack]
		[random]
			value="30797"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="6928"
			[results]
				chance="60"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="19079"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="25365"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="1"
			weapon="0"
			[source]
				x="23"
				y="7"
			[/source]
			[destination]
				x="24"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="9477"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="15084"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="5498"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="toasty has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="22,21,21,22,23"
			y="5,6,7,7,8"
		[/move]
	[/command]
	[command]
		undo="no"
		[speak]
			id="Hagbart"
			message="you are really unlucky..."
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="1"
			weapon="0"
			[source]
				x="23"
				y="8"
			[/source]
			[destination]
				x="24"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="31537"
			[results]
				chance="70"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="5430"
			[results]
				chance="60"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="14352"
			[results]
				chance="70"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="fyzd has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,24"
			y="6,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[move]
			x="21,22,23,24"
			y="6,5,6,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="1"
			weapon="0"
			[source]
				x="24"
				y="6"
			[/source]
			[destination]
				x="24"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="11121"
			[results]
				chance="70"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="24687"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="20907"
			[results]
				chance="70"
				damage="10"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="yes has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="12,13,14,15,15"
			y="2,3,3,4,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="15"
				y="5"
			[/source]
			[destination]
				x="15"
				y="6"
			[/destination]
		[/attack]
		[random]
			value="25855"
			[results]
				chance="60"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="4716"
			[results]
				chance="60"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="73"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="21226"
			[results]
				chance="60"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="19336"
			[results]
				chance="60"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="16,16"
			y="5,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="16"
				y="6"
			[/source]
			[destination]
				x="15"
				y="6"
			[/destination]
		[/attack]
		[random]
			value="5638"
			[results]
				chance="60"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="24510"
			[results]
				chance="50"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="6264"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="18891"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="10830"
			[results]
				chance="60"
				damage="7"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="17,16"
			y="6,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="16"
				y="5"
			[/source]
			[destination]
				x="15"
				y="6"
			[/destination]
		[/attack]
		[random]
			value="31"
			[results]
				chance="60"
				damage="4"
				dies="yes"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Conscience has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="michael has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Thunder has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="25,26"
			y="6,5"
		[/move]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="nirvana has logged into the lobby"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[move]
			x="24,25"
			y="5,6"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="0"
			[source]
				x="25"
				y="6"
			[/source]
			[destination]
				x="25"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="30785"
			[results]
				chance="70"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="29810"
			[results]
				chance="70"
				damage="10"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[move]
			x="19,20,21,22,23,24"
			y="5,5,6,6,7,7"
		[/move]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="-1"
			weapon="1"
			[source]
				x="24"
				y="7"
			[/source]
			[destination]
				x="25"
				y="7"
			[/destination]
		[/attack]
		[random]
			value="23746"
			[results]
				chance="60"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="32076"
			[results]
				chance="60"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="22809"
			[results]
				chance="60"
				damage="3"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		[attack]
			defender_weapon="0"
			weapon="0"
			[source]
				x="26"
				y="5"
			[/source]
			[destination]
				x="26"
				y="6"
			[/destination]
		[/attack]
		[random]
			value="11716"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="15672"
			[results]
				chance="50"
				damage="0"
				dies="no"
				hits="no"
			[/results]
		[/random]
		[random]
			value="28049"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="29106"
			[results]
				chance="50"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="12207"
			[results]
				chance="70"
				damage="6"
				dies="no"
				hits="yes"
			[/results]
		[/random]
		[random]
			value="18513"
			[results]
				chance="50"
				damage="4"
				dies="no"
				hits="yes"
			[/results]
		[/random]
	[/command]
	[command]
		sent="yes"
		undo="no"
		[speak]
			id="foxsatan"
			message=" you win"
			side="1"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="pepe has logged into the lobby"
		[/speak]
	[/command]
	[command]
		undo="no"
		[speak]
			id="Hagbart"
			message="thnx for the nice game"
			side="2"
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="foxsatan has left the game."
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Hagbart has been chosen as the new host."
		[/speak]
	[/command]
	[command]
		sent="yes"
		[speak]
			id="server"
			message="Hagbart takes control of side 1."
		[/speak]
	[/command]
[/replay]
[snapshot]
	campaign_type="multiplayer"
	completion="running"
	current_tod="3"
	description="The Freelands, also known to the people of the far east as The Land of No Kings, lie in between the Wilderlands and the Kingdom of Carorath, separating a land of absolute law from a land of absolute savagery. The people of the Freelands have been battling would-be conquerors of their land for hundreds of years, repelling great beasts from their western borders, and Carorathian Imperialists from their eastern borders."
	difficulty="NORMAL"
	end_text_duration="0"
	experience_modifier="70"
	hash="AZpjPHK9RkU0>,MQ5rgweyP<JzghTihOJuI7sg1ofROR9BWAOxx4eNCrLCAawpGy1PNS9jQpzls8f-x>JH6Z+AjIQoLdwN-L<ur6gO9uHgd>jKtxiiu590Q8hM4gox7."
	id="multiplayer_The_Freelands"
	label="2p - The Freelands"
	map_data="border_size=1
usage=map

_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Mm^Xm       , _off^_usr   , Hh          , _off^_usr   , Gg^Fet      , _off^_usr   , Gs^Fp       , _off^_usr   , Mm          , _off^_usr   , Ww          , _off^_usr   , Ww          , _off^_usr   , Ggf         , _off^_usr   , Hh          , _off^_usr   , Mm          , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Mm^Xm       , Mm          , Mm^Xm       , Hh          , Gg^Ve       , Gs^Fp       , Hh          , Gg^Uf       , Gs^Fms      , Hh          , Wwf         , Wwf         , Ww          , Ww          , Ss^Vhs      , Gg          , Gs^Fp       , Gs^Fp       , Mm          , Hh^Uf       , Ggf         , Ss          , Gs^Fp       , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Wwf         , Mm          , Hh          , Mm^Xm       , Mm          , Ggf         , Gg          , Gg          , Gg          , Ggf         , Rr          , Wwf         , Ch          , Wwf         , Ch          , Hh          , Gg          , Gg          , Gg          , Ss          , Gs^Fms      , Hh          , Gg          , Gg^Uf       , Gs^Fms      , Wwf         , Hh          , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Gs^Fp       , Hh          , Wwf         , Gs^Fms      , Gs^Fp       , Gg^Uf       , Gg          , Gg          , Gg          , Gg          , Mm          , Rr          , Wwf         , Wwf         , Kh          , 1 Kh        , Ch          , Gg          , Gg          , Gg          , Ss          , Gg          , Gg          , Gg          , Hh          , Gg          , Wwf         , Wwf         , Gg^Fet      , Hh          , Mm          , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Gg          , Gg          , Wwf         , Wwf         , Ss^Vhs      , Gg          , Gg          , Gg          , Gg^Vh       , Gs^Fp       , Wwf         , Wwf         , Gg          , Ch          , Rr          , Ch          , Rr          , Gg          , Gs^Fp       , Ss          , Mm          , Ss          , Ss          , Gg          , Ss^Vhs      , Gs^Fp       , Wwf         , Wwf         , Wwf         , Wwf         , Wwf         , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Wwf         , Wwf         , Hh          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Wwf         , Gg          , Gs^Fp       , Gg          , Gg          , Rr          , Rr          , Gg          , Ss          , Hh          , Gs^Fp       , Hh^Uf       , Gs^Fp       , Gg          , Wwf         , Wwf         , Gg          , Gg          , Ggf         , Wwf         , Mm^Xm       , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Wwf         , Gs^Fms      , Mm^Xm       , Gs^Fp       , Mm          , Ggf         , Wwf         , Wwf         , Wwf         , Wwf         , Gs^Fp       , Mm^Xm       , Mm^Xm       , Mm^Xm       , Hh          , Rr          , Gg          , Gg          , Gg          , Ggf         , Gg^Ve       , Hh          , Gg          , Wwf         , Wwf         , Wwf         , Gg          , Gg          , Hh          , Gs^Fms      , Mm^Xm       , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Wwf         , Mm          , Gg^Uf       , Mm^Xm       , Hh          , Wwf         , Gg          , Gg          , Gg          , Gg          , Mm          , Hh^Uf       , Hh^Uf       , Mm^Xm       , Hh          , Rr          , Gg          , Gg          , Gg          , Gg          , Gg          , Gg          , Wwf         , Wwf         , Gg          , Gg          , Gg          , Gg^Uf       , Mm^Xm       , Mm^Xm       , Mm          , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Wwf         , Gs^Fp       , Gg          , Ggf         , Wwf         , Wwf         , Gg          , Gg^Ve       , Gg          , Gg          , Hh          , Mm^Xm       , Gs^Fp       , Gs^Fp       , Hh^Vhh      , Rr          , Hh          , Hh          , Mm          , Gg^Fet      , Gg          , Gg          , Wwf         , Wwf         , Gg          , Gg          , Gg          , Hh          , Mm          , Mm^Xm       , Mm          , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Gs^Fms      , Wwf         , Wwf         , Wwf         , Hh          , Gg          , Gg          , Gg          , Gg          , Gg          , Gs^Fp       , Mm^Xm       , Mm^Xm       , Hh          , Gg          , Rr          , Rr          , Gs^Fp       , Hh          , Hh          , Wwf         , Wwf         , Wwf         , Chr         , Chr         , Hh          , Gg          , Ggf         , Hh          , Mm^Xm       , Mm^Xm       , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Hh          , Gg          , Wwf         , Mm          , Gs^Fp       , Gg          , Rr          , Gg          , Ggf         , Gg^Uf       , Mm^Xm       , Mm^Xm       , Mm          , Gs^Fp       , Gg          , Gg          , Wo          , Wo          , Wwf         , Wwf         , Mm^Xm       , Hh          , Gg          , Chw         , Wwf         , Gg^Fet      , Wwf         , Gg          , Gg          , Gs^Fp       , Gs^Fms      , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Wwf         , Wwf         , Wwf         , Hh          , Rr          , Rr          , Rr          , Gg          , Gg          , Gs^Fp       , Mm^Xm       , Mm^Xm       , Hh          , Gg          , Gg          , Ww          , Gg          , Gg          , Hh          , Rr          , Mm^Xm       , Mm          , Gg          , Rr          , Rr          , Wwf         , Rr          , Wwf         , Wwf         , Gg          , Wwf         , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Gg^Fet      , Gg          , Gg          , Wwf         , Wwf         , Wwf         , Wwf         , Rr          , Gg          , Mm          , Mm^Xm       , Rr          , Wwf         , Gg          , Wo          , Ww          , Gg          , Gg          , Mm          , Mm^Xm       , Mm^Xm       , Gs^Fms      , Gg          , Gg          , Rr          , Rr          , Gs^Fms      , Hh          , Wwf         , Wwf         , Hh          , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Mm^Xm       , Gs^Fp       , Hh          , Gg          , Gg          , Gs^Fp       , Chr         , Chw         , Wwf         , Hh          , Wwf         , Wwf         , Hh          , Wo          , Rr          , Gg          , Gg          , Gs^Fp       , Mm^Xm       , Mm^Xm       , Gs^Fp       , Gg^Uf       , Gg          , Gg          , Gg          , Gg          , Hh          , Mm          , Wwf         , Gg          , Gs^Fp       , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Mm          , Mm^Xm       , Mm          , Ggf         , Gg          , Hh          , Gg          , Chr         , Wwf         , Wwf         , Gg          , Hh          , Mm          , Gg^Fet      , Hh          , Rr          , Hh^Vhh      , Hh          , Gs^Fp       , Mm^Xm       , Hh          , Ggf         , Gg          , Gg          , Gg          , Gg          , Wwf         , Wwf         , Gg          , Wwf         , Wwf         , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Mm          , Mm^Xm       , Mm^Xm       , Hh          , Ggf         , Gg          , Gg          , Wwf         , Wwf         , Gg          , Gg          , Gs^Fp       , Gg          , Hh          , Gg          , Rr          , Hh          , Gs^Fp       , Hh^Uf       , Mm^Xm       , Mm          , Gg          , Gg          , Gg^Ve       , Gg          , Wwf         , Hh          , Gg          , Gg^Uf       , Gg^Fet      , Wwf         , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Mm^Xm       , Mm^Xm       , Hh          , Gg^Uf       , Gg          , Gg          , Wwf         , Wwf         , Gg          , Gg          , Gg^Ve       , Gg          , Gg          , Gg          , Gg          , Rr          , Hh          , Mm^Xm       , Mm^Xm       , Hh^Uf       , Gs^Fp       , Gg          , Wwf         , Gg          , Wwf         , Wwf         , Mm          , Mm^Xm       , Mm^Xm       , Mm          , Wwf         , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Mm^Xm       , Gs^Fms      , Ggf         , Gg          , Gg          , Wwf         , Wwf         , Wwf         , Gs^Fms      , Hh          , Gs^Fp       , Ggf         , Ss          , Gg          , Rr          , Rr          , Gg          , Mm^Xm       , Gs^Fp       , Mm^Xm       , Wwf         , Wwf         , Gg          , Wwf         , Gg          , Gg          , Gg          , Gs^Fp       , Hh          , Gs^Fms      , Wwf         , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Wwf         , Wwf         , Wwf         , Gg          , Wwf         , Wwf         , Ss^Vhs      , Gg          , Ss          , Hh^Uf       , Mm          , Hh          , Gs^Fp       , Gg          , Rr          , Rr          , Rr          , Gg          , Gg          , Gg          , Wwf         , Gg          , Gg^Vh       , Gg          , Gg          , Gg          , Ss^Vhs      , Gg          , Wwf         , Wwf         , Gg          , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Hh          , Wwf         , Gs^Fp       , Wwf         , Wwf         , Gs^Fp       , Hh          , Gg          , Gg          , Ss          , Ss          , Ss          , Gg          , Gg          , Ch          , Ch          , Kh          , Ch          , Wwf         , Wwf         , Mm          , Gs^Fms      , Gg          , Gg          , Gg          , Ggf         , Gs^Fp       , Wwf         , Wwf         , Gg          , Gs^Fp       , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Mm          , Hh          , Wwf         , Gs^Fms      , Gg          , Gg          , Gg          , Gs^Fp       , Gg          , Gg          , Gg          , Gg          , Gg          , Ch          , 2 Kh        , Ch          , Wwf         , Rr          , Rr          , Gg          , Gg          , Gg          , Gg          , Gs^Fp       , Gg^Uf       , Hh          , Gs^Fp       , Wwf         , Hh          , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Wwf         , Gs^Fp       , Gg^Uf       , Ggf         , Hh          , Mm          , Ss          , Gs^Fp       , Gg          , Ss^Vhs      , Hh          , Ww          , Wwf         , Wwf         , Wwf         , Hh          , Gg          , Ggf         , Gg          , Gg^Ve       , Ggf         , Mm^Xm       , Mm^Xm       , Mm^Xm       , Mm          , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , Ss          , Mm          , Hh          , Gs^Fp       , Hh^Uf       , Ggf         , Ggf         , Ww          , Ww          , Ww          , Wwf         , Mm          , Gs^Fp       , Gs^Fp       , Gg^Uf       , Gs^Fp       , Gg^Fet      , Hh          , Hh          , Mm^Xm       , Mm          , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
_off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   , _off^_usr   
"
	mp_countdown="yes"
	mp_countdown_action_bonus="13"
	mp_countdown_init_time="270"
	mp_countdown_reservoir_time="330"
	mp_countdown_turn_bonus="285"
	mp_fog="yes"
	mp_shroud="no"
	mp_use_map_settings="yes"
	mp_village_gold="2"
	name="2p - The Freelands"
	next_underlying_unit_id="80"
	objectives="Victory:
@Defeat enemy leader(s)"
	observer="yes"
	playing_team="0"
	random_calls="0"
	random_seed="9240"
	random_start_time="no"
	snapshot="yes"
	turn_at="16"
	turns="-1"
	unit_wml_ids="Bowman,Cavalryman,Dark Adept,Deathblade,Ghost,Ghoul,Heavy Infantryman,Horseman,Javelineer,Mage,Skeleton,Skeleton Archer,Spearman,Vampire Bat,Walking Corpse,era_events"
	version="1.6.2"
	[side]
		action_bonus_count="10"
		aggression="0.5"
		allow_player="yes"
		caution="0.25"
		colour="1"
		controller="human"
		countdown_time="328226"
		current_player="human1"
		disallow_observers="no"
		fog="yes"
		global_recruitment_pattern="fighter,fighter,archer,fighter,scout,archer"
		gold="13"
		hidden="no"
		id="foxsatan1"
		income="0"
		leader_value="3"
		name="foxsatan"
		no_leader="yes"
		number_of_possible_recruits_to_force_recruit="3.1"
		objectives="Victory:
@Defeat enemy leader(s)"
		objectives_changed="no"
		recruit="Dark Adept,Ghost,Ghoul,Skeleton,Skeleton Archer,Vampire Bat,Walking Corpse"
		recruitment_pattern="fighter,fighter,archer,fighter,scout,archer"
		save_id="foxsatan1"
		share_maps="no"
		share_view="yes"
		shroud="no"
		side="1"
		start_gold="100"
		team_name="north"
#textdomain wesnoth-multiplayer
		user_team_name=_ "teamname^North"
		village_gold="2"
		village_value="1"
		villages_per_scout="8"
		[ai]
			recruitment_pattern="fighter,fighter,archer,fighter,scout,archer"
			villages_per_scout="8"
			[team_formula]
				rulebase="fai 'recruitment.fai'
		# ===== Some general functions used later ==== #

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

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

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

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

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

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

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

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

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

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

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

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

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

#returns average defense of the unit #

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

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

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

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


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


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

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

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

# ==2== based on village possession #

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

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

# multipled by 1000 to increase precision #

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

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

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

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

#==1==  basic evaluation #

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

faiend
"
			[/team_formula]
		[/ai]
		[ai]
			villages_per_scout="8"
		[/ai]
		[village]
			x="12"
			y="2"
		[/village]
		[village]
			x="18"
			y="9"
		[/village]
		[village]
			x="22"
			y="2"
		[/village]
		[village]
			x="24"
			y="7"
		[/village]
		[unit]
			alignment="chaotic"
			allow_changes="yes"
			allow_player="yes"
			alpha="256"
			attacks_left="1"
			canrecruit="yes"
			colour="1"
			controller="network"
			cost="28"
			current_player="foxsatan"
			die_sound="skeleton-big-die.ogg"
			experience="0"
			facing="se"
			flag_rgb="magenta"
			flying="no"
			fog="yes"
			gender="male"
			gold="100"
			goto_x="-999"
			goto_y="-999"
			hitpoints="39"
			id="foxsatan1"
			image="units/undead-skeletal/deathblade.png"
			income="0"
#textdomain wesnoth-units
			language_name=_ "Deathblade"
			leader="Dark Sorcerer,Revenant,Deathblade,Bone Shooter,Necrophage"
			level="2"
			max_attacks="1"
			max_experience="105"
			max_hitpoints="39"
			max_moves="6"
			movement="6"
			movement_type="undeadfoot"
			moves="6"
			mp_countdown="yes"
			mp_countdown_action_bonus="13"
			mp_countdown_init_time="270"
			mp_countdown_reservoir_time="330"
			mp_countdown_turn_bonus="285"
			name="human1"
			race="undead"
			random_leader="Dark Sorcerer,Revenant,Deathblade,Bone Shooter"
			random_traits="no"
			recruit="Skeleton,Skeleton Archer,Walking Corpse,Ghost,Vampire Bat,Dark Adept,Ghoul"
			resting="yes"
			save_id="foxsatan1"
			share_maps="no"
			share_view="yes"
			shroud="no"
			side="1"
			team_name="north"
			terrain_liked="Ss, Hh, Ha, Ww"
			type="Deathblade"
			underlying_id="41"
			unrenamable="no"
			upkeep="full"
			usage="fighter"
			user_team_name="wesnoth-multiplayerteamname^North"
			village_gold="2"
			x="24"
			y="3"
			zoc="yes"
			[defense]
				castle="40"
				cave="60"
				deep_water="90"
				flat="60"
				forest="50"
				frozen="70"
				fungus="40"
				hills="50"
				impassable="60"
				mountains="40"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="70"
				unwalkable="80"
				village="40"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="3"
				flat="1"
				forest="2"
				frozen="2"
				fungus="2"
				hills="2"
				impassable="99"
				mountains="3"
				reef="2"
				sand="2"
				shallow_water="2"
				swamp_water="2"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="150"
				blade="60"
				cold="40"
				fire="120"
				impact="120"
				pierce="40"
			[/resistance]
			[abilities]
				[hides]
					affect_self="yes"
#textdomain wesnoth
					description=_ "Submerge:
This unit can hide in deep water, and remain undetected by its enemies.

Enemy units cannot see this unit while it is in deep water, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
					description_inactive=_ "Submerge:
This unit can hide in deep water, and remain undetected by its enemies.

Enemy units cannot see this unit while it is in deep water, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
					female_name=_ "female^submerge"
					female_name_inactive=_ "female^submerge"
					id="submerge"
					name=_ "submerge"
					name_inactive=_ "submerge"
					[filter_self]
						[filter_location]
							terrain="Wo"
						[/filter_location]
					[/filter_self]
				[/hides]
			[/abilities]
			[advancement]
				description=_ "Max HP bonus +3, Max XP +20%"
				id="amla_default"
				image="misc/icon-amla-tough.png"
				max_times="100"
				strict_amla="yes"
				[effect]
					apply_to="hitpoints"
					heal_full="yes"
					increase_total="3"
				[/effect]
				[effect]
					apply_to="max_experience"
					increase="20%"
				[/effect]
				[effect]
					apply_to="status"
					remove="poisoned"
				[/effect]
				[effect]
					apply_to="status"
					remove="slowed"
				[/effect]
			[/advancement]
			[variables]
			[/variables]
			[status]
				hidden="yes"
				not_living="yes"
			[/status]
			[attack]
				damage="8"
#textdomain wesnoth-units
				description=_ "axe"
				icon="attacks/axe-deathblade.png"
				name="axe"
				number="5"
				range="melee"
				type="blade"
			[/attack]
			[modifications]
				[trait]
					availability="musthave"
#textdomain wesnoth
					description=_ "Immune to drain, poison and plague"
					female_name=_ "female^undead"
					id="undead"
					male_name=_ "undead"
					name=_ "undead"
					[effect]
						add="not_living"
						apply_to="status"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Dark Sorcerer"
			alignment="chaotic"
			alpha="256"
			attacks_left="0"
			cost="16"
			die_sound="human-die-1.ogg,human-die-2.ogg,human-die-3.ogg"
			ellipse="misc/ellipse"
			experience="1"
			facing="ne"
			flag_rgb="magenta"
			flying="no"
			gender="male"
			goto_x="-999"
			goto_y="-999"
			hitpoints="21"
			id="Dark Adept-44"
			ignore_race_traits="yes"
			image="units/undead-necromancers/adept.png"
#textdomain wesnoth-units
			language_name=_ "Dark Adept"
			level="1"
			max_attacks="1"
			max_experience="27"
			max_hitpoints="27"
			max_moves="6"
			movement="5"
			movement_type="smallfoot"
			moves="0"
			name="Owuran"
			profile="portraits/humans/dark-adept.png"
			race="human"
			random_gender="no"
			random_traits="no"
			resting="yes"
			side="1"
			type="Dark Adept"
			underlying_id="44"
			unrenamable="no"
			upkeep="full"
			usage="archer"
			x="23"
			y="8"
			zoc="yes"
			[attack_anim]
				[filter_attack]
					range="ranged"
				[/filter_attack]
				[missile_frame]
					begin="-50"
					end="150"
					image="projectiles/darkmissile-n.png"
					image_diagonal="projectiles/darkmissile-ne.png"
				[/missile_frame]
				[frame]
					begin="-450"
					end="-420"
					image="units/undead-necromancers/adept.png"
				[/frame]
				[frame]
					begin="-420"
					end="-395"
					image="units/undead-necromancers/adept-magic-1.png"
				[/frame]
				[frame]
					begin="-395"
					end="-320"
					image="units/undead-necromancers/adept-magic-2.png"
				[/frame]
				[frame]
					begin="-320"
					end="-300"
					image="units/undead-necromancers/adept-magic-3.png"
				[/frame]
				[frame]
					begin="-300"
					end="-250"
					halo="halo/undead/dark-magic-1.png"
					halo_x="0"
					halo_y="-12"
					image="units/undead-necromancers/adept-magic-3.png"
				[/frame]
				[frame]
					begin="-250"
					end="-200"
					halo="halo/undead/dark-magic-2.png"
					halo_x="0"
					halo_y="-12"
					image="units/undead-necromancers/adept-magic-3.png"
				[/frame]
				[frame]
					begin="-200"
					end="-150"
					halo="halo/undead/dark-magic-3.png"
					halo_x="0"
					halo_y="-12"
					image="units/undead-necromancers/adept-magic-3.png"
				[/frame]
				[frame]
					begin="-150"
					end="-100"
					halo="halo/undead/dark-magic-4.png"
					halo_x="0"
					halo_y="-12"
					image="units/undead-necromancers/adept-magic-3.png"
				[/frame]
				[frame]
					begin="-100"
					end="-50"
					halo="halo/undead/dark-magic-5.png"
					halo_x="0"
					halo_y="-12"
					image="units/undead-necromancers/adept-magic-3.png"
				[/frame]
				[if]
					hits="no"
					[frame]
						begin="-50"
						end="0"
						halo="halo/undead/dark-magic-6.png"
						halo_x="0"
						halo_y="-12"
						image="units/undead-necromancers/adept-magic-3.png"
						sound="magic-dark-miss.ogg"
					[/frame]
				[/if]
				[else]
					hits="yes"
					[frame]
						begin="-50"
						end="0"
						halo="halo/undead/dark-magic-6.png"
						halo_x="0"
						halo_y="-12"
						image="units/undead-necromancers/adept-magic-3.png"
						sound="magic-dark.ogg"
					[/frame]
				[/else]
				[frame]
					begin="0"
					end="50"
					image="units/undead-necromancers/adept-magic-2.png"
				[/frame]
				[frame]
					begin="50"
					end="90"
					image="units/undead-necromancers/adept-magic-1.png"
				[/frame]
				[frame]
					begin="90"
					end="100"
					image="units/undead-necromancers/adept.png"
				[/frame]
			[/attack_anim]
			[death]
				[frame]
					begin="0"
					end="100"
					image="units/undead-necromancers/adept-die1.png"
				[/frame]
				[frame]
					begin="100"
					end="200"
					image="units/undead-necromancers/adept-die2.png"
				[/frame]
				[frame]
					begin="200"
					end="300"
					image="units/undead-necromancers/adept-die3.png"
				[/frame]
				[frame]
					begin="300"
					end="400"
					image="units/undead-necromancers/adept-die4.png"
				[/frame]
				[frame]
					begin="400"
					end="520"
					image="units/undead-necromancers/adept-die5.png"
				[/frame]
				[frame]
					begin="520"
					end="640"
					image="units/undead-necromancers/adept-die6.png"
				[/frame]
				[frame]
					begin="640"
					end="780"
					image="units/undead-necromancers/adept-die7.png"
				[/frame]
				[frame]
					begin="780"
					end="900"
					image="units/undead-necromancers/adept-die8.png"
				[/frame]
			[/death]
			[defend]
				start_time="-126"
				[frame]
					duration="1"
					image="units/undead-necromancers/adept-defend-1.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-necromancers/adept-defend-2.png"
				[/frame]
				[if]
					hits="hit"
					[frame]
						duration="150"
						image="units/undead-necromancers/adept-defend-2.png"
						sound="human-hit-1.ogg,human-hit-2.ogg,human-hit-3.ogg,human-hit-4.ogg,human-hit-5.ogg"
					[/frame]
				[/if]
				[else]
					hits="miss,kill"
					[frame]
						duration="150"
						image="units/undead-necromancers/adept-defend-2.png"
					[/frame]
				[/else]
				[frame]
					duration="1"
					image="units/undead-necromancers/adept-defend-1.png"
				[/frame]
			[/defend]
			[portrait]
				image="portraits/humans/transparent/dark-adept.png"
				mirror="false"
				side="left"
				size="400"
			[/portrait]
			[portrait]
				image="portraits/humans/transparent/dark-adept.png"
				mirror="true"
				side="right"
				size="400"
			[/portrait]
			[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]
			[trait]
				female_name=_ "female^intelligent"
				id="intelligent"
				male_name=_ "intelligent"
				[effect]
					apply_to="max_experience"
					increase="-20%"
				[/effect]
			[/trait]
			[trait]
				female_name=_ "female^resilient"
				id="resilient"
				male_name=_ "resilient"
				[effect]
					apply_to="hitpoints"
					increase_total="4"
				[/effect]
				[effect]
					apply_to="hitpoints"
					increase_total="1"
					times="per level"
				[/effect]
			[/trait]
			[defense]
				castle="40"
				cave="60"
				deep_water="80"
				flat="60"
				forest="50"
				frozen="80"
				fungus="50"
				hills="50"
				impassable="60"
				mountains="40"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="80"
				unwalkable="80"
				village="40"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="99"
				flat="1"
				forest="2"
				frozen="3"
				fungus="2"
				hills="2"
				impassable="99"
				mountains="3"
				reef="2"
				sand="2"
				shallow_water="3"
				swamp_water="3"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="80"
				blade="100"
				cold="100"
				fire="100"
				impact="100"
				pierce="100"
			[/resistance]
			[variables]
			[/variables]
			[status]
			[/status]
			[attack]
				damage="10"
#textdomain wesnoth-units
				description=_ "chill wave"
				icon="attacks/iceball.png"
				name="chill wave"
				number="2"
				range="ranged"
				type="cold"
				[specials]
					[chance_to_hit]
						cumulative="no"
#textdomain wesnoth
						description=_ "Magical:
This attack always has a 70% chance to hit regardless of the defensive ability of the unit being attacked."
						id="magical"
						name=_ "magical"
						value="70"
					[/chance_to_hit]
				[/specials]
			[/attack]
			[attack]
				damage="7"
#textdomain wesnoth-units
				description=_ "shadow wave"
				icon="attacks/dark-missile.png"
				name="shadow wave"
				number="2"
				range="ranged"
				type="arcane"
				[specials]
					[chance_to_hit]
						cumulative="no"
#textdomain wesnoth
						description=_ "Magical:
This attack always has a 70% chance to hit regardless of the defensive ability of the unit being attacked."
						id="magical"
						name=_ "magical"
						value="70"
					[/chance_to_hit]
				[/specials]
			[/attack]
			[modifications]
				[trait]
					female_name=_ "female^quick"
					id="quick"
					male_name=_ "quick"
					name=_ "quick"
					[effect]
						apply_to="movement"
						increase="1"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="-5%"
					[/effect]
				[/trait]
				[trait]
					female_name=_ "female^intelligent"
					id="intelligent"
					male_name=_ "intelligent"
					name=_ "intelligent"
					[effect]
						apply_to="max_experience"
						increase="-20%"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Dark Sorcerer"
			alignment="chaotic"
			alpha="256"
			attacks_left="0"
			cost="16"
			die_sound="human-female-die-1.ogg,human-female-die-2.ogg,human-female-die-3.ogg"
			ellipse="misc/ellipse"
			experience="3"
			facing="s"
			flag_rgb="magenta"
			flying="no"
			gender="female"
			goto_x="-999"
			goto_y="-999"
			hitpoints="2"
			id="Dark Adept-46"
			ignore_race_traits="yes"
			image="units/undead-necromancers/adept+female.png"
#textdomain wesnoth-units
			language_name=_ "female^Dark Adept"
			level="1"
			max_attacks="1"
			max_experience="27"
			max_hitpoints="27"
			max_moves="6"
			movement="5"
			movement_type="smallfoot"
			moves="0"
			name="Jirka"
			profile="portraits/humans/dark-adept+female.png"
			race="human"
			random_gender="no"
			random_traits="no"
			resting="yes"
			side="1"
			type="Dark Adept"
			underlying_id="46"
			unrenamable="no"
			upkeep="full"
			usage="archer"
			x="25"
			y="6"
			zoc="yes"
			[attack_anim]
				[filter_attack]
					range="ranged"
				[/filter_attack]
				[missile_frame]
					begin="-50"
					end="150"
					image="projectiles/darkmissile-n.png"
					image_diagonal="projectiles/darkmissile-ne.png"
				[/missile_frame]
				[frame]
					begin="-450"
					end="-420"
					image="units/undead-necromancers/adept+female.png"
				[/frame]
				[frame]
					begin="-420"
					end="-395"
					image="units/undead-necromancers/adept+female-magic-1.png"
				[/frame]
				[frame]
					begin="-395"
					end="-320"
					image="units/undead-necromancers/adept+female-magic-2.png"
				[/frame]
				[frame]
					begin="-320"
					end="-300"
					image="units/undead-necromancers/adept+female-magic-3.png"
				[/frame]
				[frame]
					begin="-300"
					end="-250"
					halo="halo/undead/dark-magic-1.png"
					halo_x="0"
					halo_y="-12"
					image="units/undead-necromancers/adept+female-magic-3.png"
				[/frame]
				[frame]
					begin="-250"
					end="-200"
					halo="halo/undead/dark-magic-2.png"
					halo_x="0"
					halo_y="-12"
					image="units/undead-necromancers/adept+female-magic-3.png"
				[/frame]
				[frame]
					begin="-200"
					end="-150"
					halo="halo/undead/dark-magic-3.png"
					halo_x="0"
					halo_y="-12"
					image="units/undead-necromancers/adept+female-magic-3.png"
				[/frame]
				[frame]
					begin="-150"
					end="-100"
					halo="halo/undead/dark-magic-4.png"
					halo_x="0"
					halo_y="-12"
					image="units/undead-necromancers/adept+female-magic-3.png"
				[/frame]
				[frame]
					begin="-100"
					end="-50"
					halo="halo/undead/dark-magic-5.png"
					halo_x="0"
					halo_y="-12"
					image="units/undead-necromancers/adept+female-magic-3.png"
				[/frame]
				[if]
					hits="no"
					[frame]
						begin="-50"
						end="0"
						halo="halo/undead/dark-magic-6.png"
						halo_x="0"
						halo_y="-12"
						image="units/undead-necromancers/adept+female-magic-3.png"
						sound="magic-dark-miss.ogg"
					[/frame]
				[/if]
				[else]
					hits="yes"
					[frame]
						begin="-50"
						end="0"
						halo="halo/undead/dark-magic-6.png"
						halo_x="0"
						halo_y="-12"
						image="units/undead-necromancers/adept+female-magic-3.png"
						sound="magic-dark.ogg"
					[/frame]
				[/else]
				[frame]
					begin="0"
					end="50"
					image="units/undead-necromancers/adept+female-magic-2.png"
				[/frame]
				[frame]
					begin="50"
					end="90"
					image="units/undead-necromancers/adept+female-magic-1.png"
				[/frame]
				[frame]
					begin="90"
					end="100"
					image="units/undead-necromancers/adept+female.png"
				[/frame]
			[/attack_anim]
			[death]
				[frame]
					begin="0"
					end="100"
					image="units/undead-necromancers/adept-die1.png"
				[/frame]
				[frame]
					begin="100"
					end="200"
					image="units/undead-necromancers/adept-die2.png"
				[/frame]
				[frame]
					begin="200"
					end="300"
					image="units/undead-necromancers/adept-die3.png"
				[/frame]
				[frame]
					begin="300"
					end="400"
					image="units/undead-necromancers/adept-die4.png"
				[/frame]
				[frame]
					begin="400"
					end="520"
					image="units/undead-necromancers/adept-die5.png"
				[/frame]
				[frame]
					begin="520"
					end="640"
					image="units/undead-necromancers/adept-die6.png"
				[/frame]
				[frame]
					begin="640"
					end="780"
					image="units/undead-necromancers/adept-die7.png"
				[/frame]
				[frame]
					begin="780"
					end="900"
					image="units/undead-necromancers/adept-die8.png"
				[/frame]
			[/death]
			[defend]
				start_time="-126"
				[frame]
					duration="1"
					image="units/undead-necromancers/adept+female-defend-1.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-necromancers/adept+female-defend-2.png"
				[/frame]
				[if]
					hits="hit"
					[frame]
						duration="150"
						image="units/undead-necromancers/adept+female-defend-2.png"
						sound="human-female-hit-1.ogg,human-female-hit-2.ogg,human-female-hit-3.ogg"
					[/frame]
				[/if]
				[else]
					hits="miss,kill"
					[frame]
						duration="150"
						image="units/undead-necromancers/adept+female-defend-2.png"
					[/frame]
				[/else]
				[frame]
					duration="1"
					image="units/undead-necromancers/adept+female-defend-1.png"
				[/frame]
			[/defend]
			[portrait]
				image="portraits/humans/transparent/dark-adept+female.png"
				mirror="true"
				side="left"
				size="400"
			[/portrait]
			[portrait]
				image="portraits/humans/transparent/dark-adept+female.png"
				mirror="false"
				side="right"
				size="400"
			[/portrait]
			[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]
			[trait]
				female_name=_ "female^intelligent"
				id="intelligent"
				male_name=_ "intelligent"
				[effect]
					apply_to="max_experience"
					increase="-20%"
				[/effect]
			[/trait]
			[trait]
				female_name=_ "female^resilient"
				id="resilient"
				male_name=_ "resilient"
				[effect]
					apply_to="hitpoints"
					increase_total="4"
				[/effect]
				[effect]
					apply_to="hitpoints"
					increase_total="1"
					times="per level"
				[/effect]
			[/trait]
			[defense]
				castle="40"
				cave="60"
				deep_water="80"
				flat="60"
				forest="50"
				frozen="80"
				fungus="50"
				hills="50"
				impassable="60"
				mountains="40"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="80"
				unwalkable="80"
				village="40"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="99"
				flat="1"
				forest="2"
				frozen="3"
				fungus="2"
				hills="2"
				impassable="99"
				mountains="3"
				reef="2"
				sand="2"
				shallow_water="3"
				swamp_water="3"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="80"
				blade="100"
				cold="100"
				fire="100"
				impact="100"
				pierce="100"
			[/resistance]
			[variables]
			[/variables]
			[status]
			[/status]
			[attack]
				damage="10"
#textdomain wesnoth-units
				description=_ "chill wave"
				icon="attacks/iceball.png"
				name="chill wave"
				number="2"
				range="ranged"
				type="cold"
				[specials]
					[chance_to_hit]
						cumulative="no"
#textdomain wesnoth
						description=_ "Magical:
This attack always has a 70% chance to hit regardless of the defensive ability of the unit being attacked."
						id="magical"
						name=_ "magical"
						value="70"
					[/chance_to_hit]
				[/specials]
			[/attack]
			[attack]
				damage="7"
#textdomain wesnoth-units
				description=_ "shadow wave"
				icon="attacks/dark-missile.png"
				name="shadow wave"
				number="2"
				range="ranged"
				type="arcane"
				[specials]
					[chance_to_hit]
						cumulative="no"
#textdomain wesnoth
						description=_ "Magical:
This attack always has a 70% chance to hit regardless of the defensive ability of the unit being attacked."
						id="magical"
						name=_ "magical"
						value="70"
					[/chance_to_hit]
				[/specials]
			[/attack]
			[modifications]
				[trait]
					female_name=_ "female^quick"
					id="quick"
					male_name=_ "quick"
					name=_ "female^quick"
					[effect]
						apply_to="movement"
						increase="1"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="-5%"
					[/effect]
				[/trait]
				[trait]
					female_name=_ "female^intelligent"
					id="intelligent"
					male_name=_ "intelligent"
					name=_ "female^intelligent"
					[effect]
						apply_to="max_experience"
						increase="-20%"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Wraith,Shadow"
			alignment="chaotic"
			alpha="256"
			attacks_left="0"
			cost="20"
			die_sound="wail-long.wav"
			ellipse="misc/ellipse"
			experience="3"
			facing="ne"
			flag_rgb="magenta"
			flies="true"
			flying="yes"
			gender="male"
			goto_x="-999"
			goto_y="-999"
			hitpoints="18"
			id="Ghost-47"
			image="units/undead/ghost-s-2.png"
#textdomain wesnoth-units
			language_name=_ "Ghost"
			level="1"
			max_attacks="1"
			max_experience="21"
			max_hitpoints="18"
			max_moves="7"
			movement="7"
			movement_type="undeadspirit"
			moves="0"
			race="undead"
			random_gender="no"
			random_traits="no"
			resting="yes"
			side="1"
			type="Ghost"
			underlying_id="47"
			unrenamable="no"
			upkeep="full"
			usage="scout"
			x="24"
			y="7"
			zoc="yes"
			[attack_anim]
				start_time="-200"
				[filter_attack]
					name="wail"
				[/filter_attack]
				[if]
					direction="n,ne,nw"
					[missile_frame]
						begin="-300"
						end="-230"
						image="projectiles/wailprojectile-n-1.png"
						image_diagonal="projectiles/wailprojectile-ne-1.png"
					[/missile_frame]
					[missile_frame]
						begin="-230"
						end="-160"
						image="projectiles/wailprojectile-n-2.png"
						image_diagonal="projectiles/wailprojectile-ne-2.png"
					[/missile_frame]
					[missile_frame]
						begin="-160"
						end="0"
						image="projectiles/wailprojectile-n-3.png"
						image_diagonal="projectiles/wailprojectile-ne-3.png"
					[/missile_frame]
					[missile_frame]
						begin="0"
						end="40"
						image="projectiles/wailprojectile-n-4.png"
						image_diagonal="projectiles/wailprojectile-ne-4.png"
					[/missile_frame]
					[missile_frame]
						begin="40"
						end="80"
						image="projectiles/wailprojectile-n-5.png"
						image_diagonal="projectiles/wailprojectile-ne-5.png"
					[/missile_frame]
					[missile_frame]
						begin="80"
						end="120"
						image="projectiles/wailprojectile-n-6.png"
						image_diagonal="projectiles/wailprojectile-ne-6.png"
					[/missile_frame]
				[/if]
				[else]
					direction="s,se,sw"
					[missile_frame]
						begin="-300"
						end="-230"
						image="projectiles/wailprojectile-s-1.png"
						image_diagonal="projectiles/wailprojectile-se-1.png"
					[/missile_frame]
					[missile_frame]
						begin="-230"
						end="-160"
						image="projectiles/wailprojectile-s-2.png"
						image_diagonal="projectiles/wailprojectile-se-2.png"
					[/missile_frame]
					[missile_frame]
						begin="-160"
						end="0"
						image="projectiles/wailprojectile-s-3.png"
						image_diagonal="projectiles/wailprojectile-se-3.png"
					[/missile_frame]
					[missile_frame]
						begin="0"
						end="40"
						image="projectiles/wailprojectile-s-4.png"
						image_diagonal="projectiles/wailprojectile-se-4.png"
					[/missile_frame]
					[missile_frame]
						begin="40"
						end="80"
						image="projectiles/wailprojectile-s-5.png"
						image_diagonal="projectiles/wailprojectile-se-5.png"
					[/missile_frame]
					[missile_frame]
						begin="80"
						end="120"
						image="projectiles/wailprojectile-s-6.png"
						image_diagonal="projectiles/wailprojectile-se-6.png"
					[/missile_frame]
				[/else]
				[if]
					direction="s,se,sw"
					[frame]
						duration="25"
						image="units/undead/ghost-s-2.png"
					[/frame]
					[frame]
						duration="75"
						image="units/undead/ghost-s-attack-1.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/ghost-s-attack-2.png"
						sound="wail-sml.wav"
					[/frame]
					[frame]
						duration="75"
						image="units/undead/ghost-s-attack-1.png"
					[/frame]
					[frame]
						duration="25"
						image="units/undead/ghost-s-2.png"
					[/frame]
				[/if]
				[else]
					direction="n,ne,nw"
					[frame]
						duration="25"
						image="units/undead/ghost-n-2.png"
					[/frame]
					[frame]
						duration="75"
						image="units/undead/ghost-n-attack-1.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/ghost-n-attack-2.png"
						sound="wail-sml.wav"
					[/frame]
					[frame]
						duration="75"
						image="units/undead/ghost-n-attack-1.png"
					[/frame]
					[frame]
						duration="25"
						image="units/undead/ghost-n-2.png"
					[/frame]
				[/else]
			[/attack_anim]
			[attack_anim]
				alpha="0.8~0.0:425,0.0~0.8:225"
				direction="s,se,sw"
				offset="0.0~1.0:425,0.0:225"
				start_time="-500"
				[filter_attack]
					name="touch"
				[/filter_attack]
				[frame]
					duration="25"
					image="units/undead/ghost-s-2.png"
				[/frame]
				[frame]
					duration="175"
					image="units/undead/ghost-s-attack-1.png"
				[/frame]
				[frame]
					duration="175"
					image="units/undead/ghost-s-attack-2.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead/ghost-s-attack-3.png"
					sound="wail-sml.wav"
				[/frame]
				[frame]
					duration="75"
					image="units/undead/ghost-s-attack-2.png"
				[/frame]
				[frame]
					duration="75"
					image="units/undead/ghost-s-attack-1.png"
				[/frame]
				[frame]
					duration="25"
					image="units/undead/ghost-s-2.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				alpha="0.8~0.0:425,0.0~0.8:225"
				direction="n,ne,nw"
				offset="0.0~1.0:425,0.0:225"
				start_time="-500"
				[filter_attack]
					name="touch"
				[/filter_attack]
				[frame]
					duration="25"
					image="units/undead/ghost-n-2.png"
				[/frame]
				[frame]
					duration="175"
					image="units/undead/ghost-n-attack-1.png"
				[/frame]
				[frame]
					duration="175"
					image="units/undead/ghost-n-attack-2.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead/ghost-n-attack-3.png"
					sound="wail-sml.wav"
				[/frame]
				[frame]
					duration="75"
					image="units/undead/ghost-n-attack-2.png"
				[/frame]
				[frame]
					duration="75"
					image="units/undead/ghost-n-attack-1.png"
				[/frame]
				[frame]
					duration="25"
					image="units/undead/ghost-n-2.png"
				[/frame]
			[/attack_anim]
			[defend]
				direction="s,se,sw"
				start_time="-126"
				[if]
					alpha="0.8~0.5:126,0.5~0.8:126"
					hits="hit,kill"
					offset="0.0~-0.05:126,-0.05~0.0:126"
					[frame]
						duration="1"
						image="units/undead/ghost-s-2.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/ghost-s-attack-1.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/ghost-s-attack-1.png"
						sound="wail-sml.wav"
					[/frame]
					[frame]
						duration="1"
						image="units/undead/ghost-s-2.png"
					[/frame]
				[/if]
				[else]
					alpha="0.8~0.25:126,0.25~0.8:126"
					hits="miss"
					offset="0.0~-0.1:126,-0.1~0.0:126"
					[frame]
						duration="1"
						image="units/undead/ghost-s-2.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/ghost-s-attack-1.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/ghost-s-attack-1.png"
					[/frame]
					[frame]
						duration="1"
						image="units/undead/ghost-s-2.png"
					[/frame]
				[/else]
			[/defend]
			[defend]
				direction="n,ne,nw"
				start_time="-126"
				[if]
					alpha="0.8~0.5:126,0.5~0.8:126"
					hits="hit,kill"
					offset="0.0~-0.05:126,-0.05~0.0:126"
					[frame]
						duration="1"
						image="units/undead/ghost-n-2.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/ghost-n-attack-1.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/ghost-n-attack-1.png"
						sound="wail-sml.wav"
					[/frame]
					[frame]
						duration="1"
						image="units/undead/ghost-n-2.png"
					[/frame]
				[/if]
				[else]
					alpha="0.8~0.25:126,0.25~0.8:126"
					hits="miss"
					offset="0.0~-0.1:126,-0.1~0.0:126"
					[frame]
						duration="1"
						image="units/undead/ghost-n-2.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/ghost-n-attack-1.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/ghost-n-attack-1.png"
					[/frame]
					[frame]
						duration="1"
						image="units/undead/ghost-n-2.png"
					[/frame]
				[/else]
			[/defend]
			[standing_anim]
				alpha="0.8~0.4:1400,0.4~0.6:600,0.6~0.4:600,0.4~0.8:1400"
				direction="s,se,sw"
				start_time="0"
				[frame]
					duration="250"
					image="units/undead/ghost-s-2.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-s-1.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-s-2.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-s-3.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-s-2.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-s-1.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-s-2.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-s-3.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-s-2.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-s-1.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-s-2.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-s-3.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-s-2.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-s-1.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-s-2.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-s-3.png"
				[/frame]
			[/standing_anim]
			[standing_anim]
				alpha="0.8~0.4:1400,0.4~0.6:600,0.6~0.4:600,0.4~0.8:1400"
				direction="n,ne,nw"
				start_time="0"
				[frame]
					duration="250"
					image="units/undead/ghost-n-2.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-n-1.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-n-2.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-n-3.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-n-2.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-n-1.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-n-2.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-n-3.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-n-2.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-n-1.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-n-2.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-n-3.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-n-2.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-n-1.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-n-2.png"
				[/frame]
				[frame]
					duration="250"
					image="units/undead/ghost-n-3.png"
				[/frame]
			[/standing_anim]
			[defense]
				castle="50"
				cave="50"
				deep_water="50"
				flat="50"
				forest="50"
				frozen="50"
				fungus="50"
				hills="50"
				impassable="50"
				mountains="50"
				reef="50"
				sand="50"
				shallow_water="50"
				swamp_water="50"
				unwalkable="50"
				village="50"
			[/defense]
			[movement_costs]
				castle="1"
				cave="1"
				deep_water="2"
				flat="1"
				forest="1"
				frozen="1"
				fungus="1"
				hills="1"
				impassable="99"
				mountains="1"
				reef="2"
				sand="1"
				shallow_water="2"
				swamp_water="1"
				unwalkable="1"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="110"
				blade="50"
				cold="30"
				fire="90"
				impact="50"
				pierce="50"
			[/resistance]
			[variables]
			[/variables]
			[status]
				not_living="yes"
			[/status]
			[attack]
				damage="4"
				description=_ "touch"
				icon="attacks/touch-undead.png"
				name="touch"
				number="3"
				range="melee"
				type="arcane"
				[specials]
					[drains]
#textdomain wesnoth
						description=_ "Drain:
This unit drains health from living units, healing itself for half the amount of damage it deals (rounded down)."
						id="drains"
						name=_ "drains"
					[/drains]
				[/specials]
			[/attack]
			[attack]
				damage="3"
#textdomain wesnoth-units
				description=_ "wail"
				name="wail"
				number="3"
				range="ranged"
				type="cold"
			[/attack]
			[modifications]
				[trait]
					availability="musthave"
#textdomain wesnoth
					description=_ "Immune to drain, poison and plague"
					female_name=_ "female^undead"
					id="undead"
					male_name=_ "undead"
					name=_ "undead"
					[effect]
						add="not_living"
						apply_to="status"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Revenant,Deathblade"
			alignment="chaotic"
			alpha="256"
			attacks_left="0"
			cost="15"
			die_sound="skeleton-die-1.ogg,skeleton-die-2.ogg"
			ellipse="misc/ellipse"
			experience="2"
			facing="nw"
			flag_rgb="magenta"
			flying="no"
			gender="male"
			goto_x="-999"
			goto_y="-999"
			hitpoints="28"
			id="Skeleton-59"
			image="units/undead-skeletal/skeleton.png"
#textdomain wesnoth-units
			language_name=_ "Skeleton"
			level="1"
			max_attacks="1"
			max_experience="25"
			max_hitpoints="34"
			max_moves="5"
			movement="5"
			movement_type="undeadfoot"
			moves="0"
			race="undead"
			random_gender="no"
			random_traits="no"
			resting="yes"
			side="1"
			type="Skeleton"
			underlying_id="59"
			unrenamable="no"
			upkeep="full"
			usage="fighter"
			x="16"
			y="6"
			zoc="yes"
			[attack_anim]
				offset="0.0~0.3,0.3~0.45,0.45~0.3,0.3~0.0"
				start_time="-250"
				[filter_attack]
					name="axe"
				[/filter_attack]
				[frame]
					duration="150"
					image="units/undead-skeletal/skeleton-attack-1.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						duration="100"
						image="units/undead-skeletal/skeleton-attack-2.png"
						sound="axe.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						duration="100"
						image="units/undead-skeletal/skeleton-attack-2.png"
						sound="miss-1.ogg,miss-2.ogg,miss-3.ogg"
					[/frame]
				[/else]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-attack-3.png"
				[/frame]
				[frame]
					duration="90"
					image="units/undead-skeletal/skeleton-attack-4.png"
				[/frame]
				[frame]
					duration="80"
					image="units/undead-skeletal/skeleton-attack-5.png"
				[/frame]
			[/attack_anim]
			[death]
				[frame]
					begin="0"
					end="100"
					image="units/undead-skeletal/skeleton-dying-1.png"
				[/frame]
				[frame]
					begin="100"
					end="200"
					image="units/undead-skeletal/skeleton-dying-2.png"
				[/frame]
				[frame]
					begin="200"
					end="300"
					image="units/undead-skeletal/skeleton-dying-3.png"
				[/frame]
				[frame]
					begin="300"
					end="400"
					image="units/undead-skeletal/skeleton-dying-4.png"
				[/frame]
				[frame]
					begin="400"
					end="500"
					image="units/undead-skeletal/skeleton-dying-5.png"
				[/frame]
				[frame]
					begin="500"
					end="600"
					image="units/undead-skeletal/skeleton-dying-6.png"
				[/frame]
				[frame]
					begin="600"
					end="700"
					image="units/undead-skeletal/skeleton-dying-7.png"
				[/frame]
			[/death]
			[defend]
				start_time="-126"
				[frame]
					duration="1"
					image="units/undead-skeletal/skeleton-defend-1.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-defend-2.png"
				[/frame]
				[if]
					hits="hit"
					[frame]
						duration="150"
						image="units/undead-skeletal/skeleton-defend-2.png"
						sound="skeleton-hit-1.ogg,skeleton-hit-2.ogg,skeleton-hit-3.ogg"
					[/frame]
				[/if]
				[else]
					hits="miss,kill"
					[frame]
						duration="150"
						image="units/undead-skeletal/skeleton-defend-2.png"
					[/frame]
				[/else]
				[frame]
					duration="1"
					image="units/undead-skeletal/skeleton-defend-1.png"
				[/frame]
			[/defend]
			[idle_anim]
				start_time="0"
				[filter]
					[not]
						[filter_wml]
							[status]
								poisoned="yes"
							[/status]
						[/filter_wml]
					[/not]
				[/filter]
				[filter]
					[filter_adjacent]
						count="0"
						is_enemy="yes"
					[/filter_adjacent]
				[/filter]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-1.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-2.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-3.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-2.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-3.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-2.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-3.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-2.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-3.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-2.png"
				[/frame]
			[/idle_anim]
			[recruit_anim]
				[frame]
					alpha="0~1:300"
					begin="-200"
					end="100"
					image="units/undead-skeletal/skeleton-dying-7.png"
				[/frame]
				[frame]
					begin="100"
					end="200"
					image="units/undead-skeletal/skeleton-dying-6.png"
				[/frame]
				[frame]
					begin="200"
					end="300"
					image="units/undead-skeletal/skeleton-dying-5.png"
				[/frame]
				[frame]
					begin="300"
					end="400"
					image="units/undead-skeletal/skeleton-dying-4.png"
				[/frame]
				[frame]
					begin="400"
					end="500"
					image="units/undead-skeletal/skeleton-dying-3.png"
				[/frame]
				[frame]
					begin="500"
					end="600"
					image="units/undead-skeletal/skeleton-dying-2.png"
				[/frame]
				[frame]
					begin="600"
					end="700"
					image="units/undead-skeletal/skeleton-dying-1.png"
				[/frame]
			[/recruit_anim]
			[defense]
				castle="40"
				cave="60"
				deep_water="90"
				flat="60"
				forest="50"
				frozen="70"
				fungus="40"
				hills="50"
				impassable="60"
				mountains="40"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="70"
				unwalkable="80"
				village="40"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="3"
				flat="1"
				forest="2"
				frozen="2"
				fungus="2"
				hills="2"
				impassable="99"
				mountains="3"
				reef="2"
				sand="2"
				shallow_water="2"
				swamp_water="2"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="150"
				blade="60"
				cold="40"
				fire="120"
				impact="120"
				pierce="40"
			[/resistance]
			[abilities]
				[hides]
					affect_self="yes"
#textdomain wesnoth
					description=_ "Submerge:
This unit can hide in deep water, and remain undetected by its enemies.

Enemy units cannot see this unit while it is in deep water, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
					description_inactive=_ "Submerge:
This unit can hide in deep water, and remain undetected by its enemies.

Enemy units cannot see this unit while it is in deep water, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
					female_name=_ "female^submerge"
					female_name_inactive=_ "female^submerge"
					id="submerge"
					name=_ "submerge"
					name_inactive=_ "submerge"
					[filter_self]
						[filter_location]
							terrain="Wo"
						[/filter_location]
					[/filter_self]
				[/hides]
			[/abilities]
			[variables]
			[/variables]
			[status]
				not_living="yes"
			[/status]
			[attack]
				damage="7"
#textdomain wesnoth-units
				description=_ "axe"
				icon="attacks/axe-undead.png"
				name="axe"
				number="3"
				range="melee"
				type="blade"
			[/attack]
			[modifications]
				[trait]
					availability="musthave"
#textdomain wesnoth
					description=_ "Immune to drain, poison and plague"
					female_name=_ "female^undead"
					id="undead"
					male_name=_ "undead"
					name=_ "undead"
					[effect]
						add="not_living"
						apply_to="status"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Necrophage"
			alignment="chaotic"
			alpha="256"
			attacks_left="0"
			cost="16"
			die_sound="ghoul-hit.wav"
			ellipse="misc/ellipse"
			experience="8"
			facing="sw"
			flag_rgb="magenta"
			flying="no"
			gender="male"
			goto_x="-999"
			goto_y="-999"
			hitpoints="33"
			id="Ghoul-62"
			image="units/undead/ghoul.png"
#textdomain wesnoth-units
			language_name=_ "Ghoul"
			level="1"
			max_attacks="1"
			max_experience="25"
			max_hitpoints="33"
			max_moves="5"
			movement="5"
			movement_type="gruefoot"
			moves="0"
			profile="portraits/undead/ghoul.png"
			race="undead"
			random_gender="no"
			random_traits="no"
			resting="yes"
			side="1"
			type="Ghoul"
			underlying_id="62"
			unrenamable="no"
			upkeep="full"
			usage="fighter"
			x="16"
			y="5"
			zoc="yes"
			[attack_anim]
				[filter_attack]
					name="claws"
				[/filter_attack]
				[frame]
					begin="-250"
					end="-200"
					image="units/undead/ghoul.png"
				[/frame]
				[frame]
					begin="-200"
					end="-125"
					image="units/undead/ghoul-attack-1.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-125"
						end="-50"
						image="units/undead/ghoul-attack-2.png"
						sound="claws.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-125"
						end="-50"
						image="units/undead/ghoul-attack-2.png"
						sound="miss-1.ogg,miss-2.ogg,miss-3.ogg"
					[/frame]
				[/else]
				[if]
					hits="hit"
					poisoned_sound_start_time="-100"
					[filter_second]
						[not]
							[filter_wml]
								[status]
									poisoned="yes"
								[/status]
							[/filter_wml]
						[/not]
					[/filter_second]
					[poisoned_sound_frame]
						duration="100"
						sound="poison.ogg"
					[/poisoned_sound_frame]
				[/if]
				[frame]
					begin="-50"
					end="50"
					image="units/undead/ghoul-attack-3.png"
				[/frame]
				[frame]
					begin="50"
					end="125"
					image="units/undead/ghoul-attack-4.png"
				[/frame]
				[frame]
					begin="125"
					end="200"
					image="units/undead/ghoul.png"
				[/frame]
			[/attack_anim]
			[defend]
				start_time="-126"
				[frame]
					duration="1"
					image="units/undead/ghoul-defend-1.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead/ghoul-defend-2.png"
				[/frame]
				[if]
					hits="hit"
					[frame]
						duration="150"
						image="units/undead/ghoul-defend-2.png"
						sound="ghoul-hit.wav"
					[/frame]
				[/if]
				[else]
					hits="miss,kill"
					[frame]
						duration="150"
						image="units/undead/ghoul-defend-2.png"
					[/frame]
				[/else]
				[frame]
					duration="1"
					image="units/undead/ghoul-defend-1.png"
				[/frame]
			[/defend]
			[trait]
				availability="musthave"
#textdomain wesnoth
				description=_ "Fights normally during unfavorable times of day/night"
				female_name=_ "female^fearless"
				id="fearless"
				male_name=_ "fearless"
			[/trait]
			[defense]
				castle="40"
				cave="60"
				deep_water="90"
				flat="60"
				forest="50"
				frozen="70"
				fungus="40"
				hills="50"
				impassable="60"
				mountains="40"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="70"
				unwalkable="80"
				village="40"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="99"
				flat="1"
				forest="2"
				frozen="2"
				fungus="2"
				hills="2"
				impassable="99"
				mountains="3"
				reef="2"
				sand="2"
				shallow_water="3"
				swamp_water="2"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="80"
				blade="90"
				cold="60"
				fire="90"
				impact="100"
				pierce="70"
			[/resistance]
			[variables]
			[/variables]
			[status]
				not_living="yes"
			[/status]
			[attack]
				damage="4"
#textdomain wesnoth-units
				description=_ "claws"
				icon="attacks/claws-undead.png"
				name="claws"
				number="3"
				range="melee"
				type="blade"
				[specials]
					[poison]
#textdomain wesnoth
						description=_ "Poison:
This attack poisons living targets. Poisoned units lose 8 HP every turn until they are cured or are reduced to 1 HP. Poison can not, of itself, kill a unit."
						id="poison"
						name=_ "poison"
					[/poison]
				[/specials]
			[/attack]
			[modifications]
				[trait]
					availability="musthave"
					description=_ "Immune to drain, poison and plague"
					female_name=_ "female^undead"
					id="undead"
					male_name=_ "undead"
					name=_ "undead"
					[effect]
						add="not_living"
						apply_to="status"
					[/effect]
				[/trait]
				[trait]
					availability="musthave"
					description=_ "Fights normally during unfavorable times of day/night"
					female_name=_ "female^fearless"
					id="fearless"
					male_name=_ "fearless"
					name=_ "fearless"
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Revenant,Deathblade"
			alignment="chaotic"
			alpha="256"
			attacks_left="0"
			cost="15"
			die_sound="skeleton-die-1.ogg,skeleton-die-2.ogg"
			ellipse="misc/ellipse"
			experience="1"
			facing="s"
			flag_rgb="magenta"
			flying="no"
			gender="male"
			goto_x="-999"
			goto_y="-999"
			hitpoints="28"
			id="Skeleton-64"
			image="units/undead-skeletal/skeleton.png"
#textdomain wesnoth-units
			language_name=_ "Skeleton"
			level="1"
			max_attacks="1"
			max_experience="25"
			max_hitpoints="34"
			max_moves="5"
			movement="5"
			movement_type="undeadfoot"
			moves="0"
			race="undead"
			random_gender="no"
			random_traits="no"
			resting="yes"
			side="1"
			type="Skeleton"
			underlying_id="64"
			unrenamable="no"
			upkeep="full"
			usage="fighter"
			x="15"
			y="5"
			zoc="yes"
			[attack_anim]
				offset="0.0~0.3,0.3~0.45,0.45~0.3,0.3~0.0"
				start_time="-250"
				[filter_attack]
					name="axe"
				[/filter_attack]
				[frame]
					duration="150"
					image="units/undead-skeletal/skeleton-attack-1.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						duration="100"
						image="units/undead-skeletal/skeleton-attack-2.png"
						sound="axe.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						duration="100"
						image="units/undead-skeletal/skeleton-attack-2.png"
						sound="miss-1.ogg,miss-2.ogg,miss-3.ogg"
					[/frame]
				[/else]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-attack-3.png"
				[/frame]
				[frame]
					duration="90"
					image="units/undead-skeletal/skeleton-attack-4.png"
				[/frame]
				[frame]
					duration="80"
					image="units/undead-skeletal/skeleton-attack-5.png"
				[/frame]
			[/attack_anim]
			[death]
				[frame]
					begin="0"
					end="100"
					image="units/undead-skeletal/skeleton-dying-1.png"
				[/frame]
				[frame]
					begin="100"
					end="200"
					image="units/undead-skeletal/skeleton-dying-2.png"
				[/frame]
				[frame]
					begin="200"
					end="300"
					image="units/undead-skeletal/skeleton-dying-3.png"
				[/frame]
				[frame]
					begin="300"
					end="400"
					image="units/undead-skeletal/skeleton-dying-4.png"
				[/frame]
				[frame]
					begin="400"
					end="500"
					image="units/undead-skeletal/skeleton-dying-5.png"
				[/frame]
				[frame]
					begin="500"
					end="600"
					image="units/undead-skeletal/skeleton-dying-6.png"
				[/frame]
				[frame]
					begin="600"
					end="700"
					image="units/undead-skeletal/skeleton-dying-7.png"
				[/frame]
			[/death]
			[defend]
				start_time="-126"
				[frame]
					duration="1"
					image="units/undead-skeletal/skeleton-defend-1.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-defend-2.png"
				[/frame]
				[if]
					hits="hit"
					[frame]
						duration="150"
						image="units/undead-skeletal/skeleton-defend-2.png"
						sound="skeleton-hit-1.ogg,skeleton-hit-2.ogg,skeleton-hit-3.ogg"
					[/frame]
				[/if]
				[else]
					hits="miss,kill"
					[frame]
						duration="150"
						image="units/undead-skeletal/skeleton-defend-2.png"
					[/frame]
				[/else]
				[frame]
					duration="1"
					image="units/undead-skeletal/skeleton-defend-1.png"
				[/frame]
			[/defend]
			[idle_anim]
				start_time="0"
				[filter]
					[not]
						[filter_wml]
							[status]
								poisoned="yes"
							[/status]
						[/filter_wml]
					[/not]
				[/filter]
				[filter]
					[filter_adjacent]
						count="0"
						is_enemy="yes"
					[/filter_adjacent]
				[/filter]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-1.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-2.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-3.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-2.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-3.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-2.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-3.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-2.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-3.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-2.png"
				[/frame]
			[/idle_anim]
			[recruit_anim]
				[frame]
					alpha="0~1:300"
					begin="-200"
					end="100"
					image="units/undead-skeletal/skeleton-dying-7.png"
				[/frame]
				[frame]
					begin="100"
					end="200"
					image="units/undead-skeletal/skeleton-dying-6.png"
				[/frame]
				[frame]
					begin="200"
					end="300"
					image="units/undead-skeletal/skeleton-dying-5.png"
				[/frame]
				[frame]
					begin="300"
					end="400"
					image="units/undead-skeletal/skeleton-dying-4.png"
				[/frame]
				[frame]
					begin="400"
					end="500"
					image="units/undead-skeletal/skeleton-dying-3.png"
				[/frame]
				[frame]
					begin="500"
					end="600"
					image="units/undead-skeletal/skeleton-dying-2.png"
				[/frame]
				[frame]
					begin="600"
					end="700"
					image="units/undead-skeletal/skeleton-dying-1.png"
				[/frame]
			[/recruit_anim]
			[defense]
				castle="40"
				cave="60"
				deep_water="90"
				flat="60"
				forest="50"
				frozen="70"
				fungus="40"
				hills="50"
				impassable="60"
				mountains="40"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="70"
				unwalkable="80"
				village="40"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="3"
				flat="1"
				forest="2"
				frozen="2"
				fungus="2"
				hills="2"
				impassable="99"
				mountains="3"
				reef="2"
				sand="2"
				shallow_water="2"
				swamp_water="2"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="150"
				blade="60"
				cold="40"
				fire="120"
				impact="120"
				pierce="40"
			[/resistance]
			[abilities]
				[hides]
					affect_self="yes"
#textdomain wesnoth
					description=_ "Submerge:
This unit can hide in deep water, and remain undetected by its enemies.

Enemy units cannot see this unit while it is in deep water, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
					description_inactive=_ "Submerge:
This unit can hide in deep water, and remain undetected by its enemies.

Enemy units cannot see this unit while it is in deep water, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
					female_name=_ "female^submerge"
					female_name_inactive=_ "female^submerge"
					id="submerge"
					name=_ "submerge"
					name_inactive=_ "submerge"
					[filter_self]
						[filter_location]
							terrain="Wo"
						[/filter_location]
					[/filter_self]
				[/hides]
			[/abilities]
			[variables]
			[/variables]
			[status]
				not_living="yes"
			[/status]
			[attack]
				damage="7"
#textdomain wesnoth-units
				description=_ "axe"
				icon="attacks/axe-undead.png"
				name="axe"
				number="3"
				range="melee"
				type="blade"
			[/attack]
			[modifications]
				[trait]
					availability="musthave"
#textdomain wesnoth
					description=_ "Immune to drain, poison and plague"
					female_name=_ "female^undead"
					id="undead"
					male_name=_ "undead"
					name=_ "undead"
					[effect]
						add="not_living"
						apply_to="status"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Soulless"
			alignment="chaotic"
			alpha="256"
			attacks_left="1"
			cost="8"
			die_sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
			ellipse="misc/ellipse-nozoc"
			experience="0"
			facing="se"
			flag_rgb="magenta"
			flying="no"
			gender="male"
			goto_x="-999"
			goto_y="-999"
			hitpoints="18"
			id="Walking Corpse-66"
			image="units/undead/zombie.png"
#textdomain wesnoth-units
			language_name=_ "Walking Corpse"
			level="0"
			max_attacks="1"
			max_experience="17"
			max_hitpoints="18"
			max_moves="4"
			movement="4"
			movement_type="smallfoot"
			moves="4"
			race="undead"
			random_gender="no"
			random_traits="no"
			resting="yes"
			side="1"
			type="Walking Corpse"
			underlying_id="66"
			unrenamable="no"
			upkeep="full"
			usage="fighter"
			x="22"
			y="7"
			zoc="no"
			[attack_anim]
				direction="s"
				[filter_attack]
					name="touch"
				[/filter_attack]
				[frame]
					begin="-200"
					end="200"
					image="units/undead/zombie-attack-s.png"
					sound="zombie-attack.wav"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="n"
				[filter_attack]
					name="touch"
				[/filter_attack]
				[frame]
					begin="-200"
					end="200"
					image="units/undead/zombie-attack-n.png"
					sound="zombie-attack.wav"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="se,sw,ne,nw"
				[filter_attack]
					name="touch"
				[/filter_attack]
				[frame]
					begin="-200"
					end="200"
					image="units/undead/zombie-attack.png"
					sound="zombie-attack.wav"
				[/frame]
			[/attack_anim]
			[death]
				start_time="0"
				[frame]
					duration="150"
					image="units/undead/zombie-die-1.png"
				[/frame]
				[frame]
					duration="150"
					image="units/undead/zombie-die-2.png"
				[/frame]
				[frame]
					duration="150"
					image="units/undead/zombie-die-3.png"
				[/frame]
				[frame]
					duration="150"
					image="units/undead/zombie-die-4.png"
				[/frame]
				[frame]
					duration="150"
					image="units/undead/soulless-die-5.png"
				[/frame]
				[frame]
					duration="150"
					image="units/undead/soulless-die-6.png"
				[/frame]
				[frame]
					duration="150"
					image="units/undead/soulless-die-7.png"
				[/frame]
				[frame]
					duration="150"
					image="units/undead/soulless-die-8.png"
				[/frame]
				[frame]
					duration="150"
					image="units/undead/soulless-die-9.png"
				[/frame]
				[frame]
					duration="150"
					image="units/undead/soulless-die-10.png"
				[/frame]
			[/death]
			[defend]
				start_time="-126"
				[frame]
					duration="1"
					image="units/undead/zombie.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead/zombie-defend.png"
				[/frame]
				[if]
					hits="hit"
					[frame]
						duration="150"
						image="units/undead/zombie-defend.png"
						sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
					[/frame]
				[/if]
				[else]
					hits="miss,kill"
					[frame]
						duration="150"
						image="units/undead/zombie-defend.png"
					[/frame]
				[/else]
				[frame]
					duration="1"
					image="units/undead/zombie.png"
				[/frame]
			[/defend]
			[trait]
				availability="musthave"
#textdomain wesnoth
				description=_ "Fights normally during unfavorable times of day/night"
				female_name=_ "female^fearless"
				id="fearless"
				male_name=_ "fearless"
			[/trait]
			[variation]
				advances_to="Soulless"
				alignment="chaotic"
				cost="8"
#textdomain wesnoth-units
				description=_ "Walking Corpses are the bodies of the dead, re-animated by dark magic. Though not especially dangerous to a trained soldier, the sight of one's former comrades amongst their number is frightening to say the least." + 
					#textdomain wesnoth
_ "

Special Notes:" + 
					_ " Foes who lose their life to the plague will rise again in unlife, unless they are standing on a village."
				die_sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
				ellipse="misc/ellipse-nozoc"
				experience="24"
				flag_rgb="magenta"
				hitpoints="23"
				id="Walking Corpse"
				image="units/undead/zombie-drake.png"
				level="0"
				movement="4"
				movement_type="drakefoot"
#textdomain wesnoth-units
				name=_ "Walking Corpse"
				race="undead"
				usage="fighter"
				variation_name="drake"
				[defend]
					start_time="-126"
					[frame]
						duration="1"
						image="units/undead/zombie-drake.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/zombie-drake-defend.png"
					[/frame]
					[if]
						hits="hit"
						[frame]
							duration="150"
							image="units/undead/zombie-drake-defend.png"
							sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
						[/frame]
					[/if]
					[else]
						hits="miss,kill"
						[frame]
							duration="150"
							image="units/undead/zombie-drake-defend.png"
						[/frame]
					[/else]
					[frame]
						duration="1"
						image="units/undead/zombie-drake.png"
					[/frame]
				[/defend]
				[death]
					start_time="0"
					[frame]
						duration="150"
						image="units/undead/soulless-die-4.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-5.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-6.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-7.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-8.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-9.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-10.png"
					[/frame]
				[/death]
				[attack_anim]
					direction="s"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-drake-attack-s.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="n"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-drake-attack-n.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="se,sw,ne,nw"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-drake-attack.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[trait]
					availability="musthave"
#textdomain wesnoth
					description=_ "Fights normally during unfavorable times of day/night"
					female_name=_ "female^fearless"
					id="fearless"
					male_name=_ "fearless"
				[/trait]
				[resistance]
					arcane="140"
				[/resistance]
				[attack]
					damage="6"
#textdomain wesnoth-units
					description=_ "touch"
					icon="attacks/touch-zombie.png"
					name="touch"
					number="2"
					range="melee"
					type="impact"
					[specials]
						[plague]
#textdomain wesnoth
							description=_ "Plague:
When a unit is killed by a Plague attack, that unit is replaced with a Walking Corpse on the same side as the unit with the Plague attack. This doesn't work on Undead or units in villages."
							id="plague"
							name=_ "plague"
							type="Walking Corpse"
						[/plague]
					[/specials]
				[/attack]
				[movement_costs]
					deep_water="4"
				[/movement_costs]
			[/variation]
			[variation]
				advances_to="Soulless"
				alignment="chaotic"
				cost="8"
#textdomain wesnoth-units
				description=_ "Walking Corpses are the bodies of the dead, re-animated by dark magic. Though not especially dangerous to a trained soldier, the sight of one's former comrades amongst their number is frightening to say the least." + 
					#textdomain wesnoth
_ "

Special Notes:" + 
					_ " Foes who lose their life to the plague will rise again in unlife, unless they are standing on a village."
				die_sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
				ellipse="misc/ellipse-nozoc"
				experience="24"
				flag_rgb="magenta"
				hitpoints="21"
				id="Walking Corpse"
				image="units/undead/zombie-dwarf.png"
				level="0"
				movement="3"
				movement_type="dwarvishfoot"
#textdomain wesnoth-units
				name=_ "Walking Corpse"
				race="undead"
				usage="fighter"
				variation_name="dwarf"
				[defend]
					start_time="-126"
					[frame]
						duration="1"
						image="units/undead/zombie-dwarf.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/zombie-dwarf-defend.png"
					[/frame]
					[if]
						hits="hit"
						[frame]
							duration="150"
							image="units/undead/zombie-dwarf-defend.png"
							sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
						[/frame]
					[/if]
					[else]
						hits="miss,kill"
						[frame]
							duration="150"
							image="units/undead/zombie-dwarf-defend.png"
						[/frame]
					[/else]
					[frame]
						duration="1"
						image="units/undead/zombie-dwarf.png"
					[/frame]
				[/defend]
				[death]
					start_time="0"
					[frame]
						duration="150"
						image="units/undead/zombie-dwarf-die-1.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-dwarf-die-2.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-dwarf-die-3.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-dwarf-die-4.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-5.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-6.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-7.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-8.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-9.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-10.png"
					[/frame]
				[/death]
				[attack_anim]
					direction="s"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-dwarf-attack-s.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="n"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-dwarf-attack-n.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="se,sw,ne,nw"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-dwarf-attack.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[trait]
					availability="musthave"
#textdomain wesnoth
					description=_ "Fights normally during unfavorable times of day/night"
					female_name=_ "female^fearless"
					id="fearless"
					male_name=_ "fearless"
				[/trait]
				[resistance]
					arcane="140"
				[/resistance]
				[attack]
					damage="6"
#textdomain wesnoth-units
					description=_ "touch"
					icon="attacks/touch-zombie.png"
					name="touch"
					number="2"
					range="melee"
					type="impact"
					[specials]
						[plague]
#textdomain wesnoth
							description=_ "Plague:
When a unit is killed by a Plague attack, that unit is replaced with a Walking Corpse on the same side as the unit with the Plague attack. This doesn't work on Undead or units in villages."
							id="plague"
							name=_ "plague"
							type="Walking Corpse"
						[/plague]
					[/specials]
				[/attack]
				[movement_costs]
					deep_water="3"
				[/movement_costs]
			[/variation]
			[variation]
				advances_to="Soulless"
				alignment="chaotic"
				cost="8"
#textdomain wesnoth-units
				description=_ "Walking Corpses are the bodies of the dead, re-animated by dark magic. Though not especially dangerous to a trained soldier, the sight of one's former comrades amongst their number is frightening to say the least." + 
					#textdomain wesnoth
_ "

Special Notes:" + 
					_ " Foes who lose their life to the plague will rise again in unlife, unless they are standing on a village."
				die_sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
				ellipse="misc/ellipse-nozoc"
				experience="24"
				flag_rgb="magenta"
				hitpoints="21"
				id="Walking Corpse"
				image="units/undead/zombie-drake.png"
				level="0"
				movement="5"
				movement_type="fly"
#textdomain wesnoth-units
				name=_ "Walking Corpse"
				race="undead"
				usage="fighter"
				variation_name="gryphon"
				[defend]
					start_time="-126"
					[frame]
						duration="1"
						image="units/undead/zombie-drake.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/zombie-drake-defend.png"
					[/frame]
					[if]
						hits="hit"
						[frame]
							duration="150"
							image="units/undead/zombie-drake-defend.png"
							sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
						[/frame]
					[/if]
					[else]
						hits="miss,kill"
						[frame]
							duration="150"
							image="units/undead/zombie-drake-defend.png"
						[/frame]
					[/else]
					[frame]
						duration="1"
						image="units/undead/zombie-drake.png"
					[/frame]
				[/defend]
				[death]
					start_time="0"
					[frame]
						duration="150"
						image="units/undead/zombie-drake-die-1.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-drake-die-2.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-drake-die-3.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-drake-die-4.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-5.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-6.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-7.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-8.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-9.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-10.png"
					[/frame]
				[/death]
				[attack_anim]
					direction="s"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-drake-attack-s.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="n"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-drake-attack-n.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="se,sw,ne,nw"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-drake-attack.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[trait]
					availability="musthave"
#textdomain wesnoth
					description=_ "Fights normally during unfavorable times of day/night"
					female_name=_ "female^fearless"
					id="fearless"
					male_name=_ "fearless"
				[/trait]
				[resistance]
					arcane="140"
				[/resistance]
				[attack]
					damage="6"
#textdomain wesnoth-units
					description=_ "touch"
					icon="attacks/touch-zombie.png"
					name="touch"
					number="2"
					range="melee"
					type="impact"
					[specials]
						[plague]
#textdomain wesnoth
							description=_ "Plague:
When a unit is killed by a Plague attack, that unit is replaced with a Walking Corpse on the same side as the unit with the Plague attack. This doesn't work on Undead or units in villages."
							id="plague"
							name=_ "plague"
							type="Walking Corpse"
						[/plague]
					[/specials]
				[/attack]
				[defense]
					mountains="40"
				[/defense]
			[/variation]
			[variation]
				advances_to="Soulless"
				alignment="chaotic"
				cost="8"
#textdomain wesnoth-units
				description=_ "Walking Corpses are the bodies of the dead, re-animated by dark magic. Though not especially dangerous to a trained soldier, the sight of one's former comrades amongst their number is frightening to say the least." + 
					#textdomain wesnoth
_ "

Special Notes:" + 
					_ " Foes who lose their life to the plague will rise again in unlife, unless they are standing on a village."
				die_sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
				ellipse="misc/ellipse-nozoc"
				experience="24"
				flag_rgb="magenta"
				hitpoints="21"
				id="Walking Corpse"
				image="units/undead/zombie-mounted.png"
				level="0"
				movement="5"
				movement_type="mounted"
#textdomain wesnoth-units
				name=_ "Walking Corpse"
				race="undead"
				usage="fighter"
				variation_name="mounted"
				[defend]
					start_time="-126"
					[frame]
						duration="1"
						image="units/undead/zombie-mounted.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/zombie-mounted-defend.png"
					[/frame]
					[if]
						hits="hit"
						[frame]
							duration="150"
							image="units/undead/zombie-mounted-defend.png"
							sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
						[/frame]
					[/if]
					[else]
						hits="miss,kill"
						[frame]
							duration="150"
							image="units/undead/zombie-mounted-defend.png"
						[/frame]
					[/else]
					[frame]
						duration="1"
						image="units/undead/zombie-mounted.png"
					[/frame]
				[/defend]
				[death]
					start_time="0"
					[frame]
						duration="150"
						image="units/undead/soulless-die-4.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-5.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-6.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-7.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-8.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-9.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-10.png"
					[/frame]
				[/death]
				[attack_anim]
					direction="s"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-mounted-attack-s.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="n"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-mounted-attack-n.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="se,sw,ne,nw"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-mounted-attack.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[trait]
					availability="musthave"
#textdomain wesnoth
					description=_ "Fights normally during unfavorable times of day/night"
					female_name=_ "female^fearless"
					id="fearless"
					male_name=_ "fearless"
				[/trait]
				[resistance]
					arcane="140"
				[/resistance]
				[attack]
					damage="6"
#textdomain wesnoth-units
					description=_ "touch"
					icon="attacks/touch-zombie.png"
					name="touch"
					number="2"
					range="melee"
					type="impact"
					[specials]
						[plague]
#textdomain wesnoth
							description=_ "Plague:
When a unit is killed by a Plague attack, that unit is replaced with a Walking Corpse on the same side as the unit with the Plague attack. This doesn't work on Undead or units in villages."
							id="plague"
							name=_ "plague"
							type="Walking Corpse"
						[/plague]
					[/specials]
				[/attack]
				[movement_costs]
					deep_water="4"
				[/movement_costs]
			[/variation]
			[variation]
				advances_to="Soulless"
				alignment="chaotic"
				cost="8"
#textdomain wesnoth-units
				description=_ "Walking Corpses are the bodies of the dead, re-animated by dark magic. Though not especially dangerous to a trained soldier, the sight of one's former comrades amongst their number is frightening to say the least." + 
					#textdomain wesnoth
_ "

Special Notes:" + 
					_ " Foes who lose their life to the plague will rise again in unlife, unless they are standing on a village."
				die_sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
				ellipse="misc/ellipse-nozoc"
				experience="24"
				flag_rgb="magenta"
				hitpoints="16"
				id="Walking Corpse"
				image="units/undead/zombie-saurian.png"
				level="0"
				movement="4"
				movement_type="lizard"
#textdomain wesnoth-units
				name=_ "Walking Corpse"
				race="undead"
				usage="fighter"
				variation_name="saurian"
				[defend]
					start_time="-126"
					[frame]
						duration="1"
						image="units/undead/zombie-saurian.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/zombie-saurian-defend.png"
					[/frame]
					[if]
						hits="hit"
						[frame]
							duration="150"
							image="units/undead/zombie-saurian-defend.png"
							sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
						[/frame]
					[/if]
					[else]
						hits="miss,kill"
						[frame]
							duration="150"
							image="units/undead/zombie-saurian-defend.png"
						[/frame]
					[/else]
					[frame]
						duration="1"
						image="units/undead/zombie-saurian.png"
					[/frame]
				[/defend]
				[death]
					start_time="0"
					[frame]
						duration="150"
						image="units/undead/zombie-saurian-die-1.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-saurian-die-2.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-saurian-die-3.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-saurian-die-4.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-5.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-6.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-7.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-8.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-9.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-10.png"
					[/frame]
				[/death]
				[attack_anim]
					direction="s"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-saurian-attack-s.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="n"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-saurian-attack-n.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="se,sw,ne,nw"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-saurian-attack.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[trait]
					availability="musthave"
#textdomain wesnoth
					description=_ "Fights normally during unfavorable times of day/night"
					female_name=_ "female^fearless"
					id="fearless"
					male_name=_ "fearless"
				[/trait]
				[resistance]
					arcane="140"
				[/resistance]
				[attack]
					damage="6"
#textdomain wesnoth-units
					description=_ "touch"
					icon="attacks/touch-zombie.png"
					name="touch"
					number="2"
					range="melee"
					type="impact"
					[specials]
						[plague]
#textdomain wesnoth
							description=_ "Plague:
When a unit is killed by a Plague attack, that unit is replaced with a Walking Corpse on the same side as the unit with the Plague attack. This doesn't work on Undead or units in villages."
							id="plague"
							name=_ "plague"
							type="Walking Corpse"
						[/plague]
					[/specials]
				[/attack]
				[movement_costs]
					deep_water="4"
				[/movement_costs]
			[/variation]
			[variation]
				advances_to="Soulless"
				alignment="chaotic"
				cost="8"
#textdomain wesnoth-units
				description=_ "Walking Corpses are the bodies of the dead, re-animated by dark magic. Though not especially dangerous to a trained soldier, the sight of one's former comrades amongst their number is frightening to say the least." + 
					#textdomain wesnoth
_ "

Special Notes:" + 
					_ " Foes who lose their life to the plague will rise again in unlife, unless they are standing on a village."
				die_sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
				ellipse="misc/ellipse-nozoc"
				experience="24"
				flag_rgb="magenta"
				hitpoints="18"
				id="Walking Corpse"
				image="units/undead/zombie-swimmer.png"
				level="0"
				movement="4"
				movement_type="swimmer"
#textdomain wesnoth-units
				name=_ "Walking Corpse"
				race="undead"
				usage="fighter"
				variation_name="swimmer"
				[defend]
					start_time="-126"
					[frame]
						duration="1"
						image="units/undead/zombie-swimmer.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/zombie-swimmer-defend.png"
					[/frame]
					[if]
						hits="hit"
						[frame]
							duration="150"
							image="units/undead/zombie-swimmer-defend.png"
							sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
						[/frame]
					[/if]
					[else]
						hits="miss,kill"
						[frame]
							duration="150"
							image="units/undead/zombie-swimmer-defend.png"
						[/frame]
					[/else]
					[frame]
						duration="1"
						image="units/undead/zombie-swimmer.png"
					[/frame]
				[/defend]
				[death]
					start_time="0"
					[frame]
						duration="150"
						image="units/undead/zombie-swimmer-die-1.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-swimmer-die-2.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-swimmer-die-3.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-swimmer-die-4.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-5.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-6.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-7.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-8.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-9.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-10.png"
					[/frame]
				[/death]
				[attack_anim]
					direction="s"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-swimmer-attack-s.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="n"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-swimmer-attack-n.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="se,sw,ne,nw"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-swimmer-attack.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[trait]
					availability="musthave"
#textdomain wesnoth
					description=_ "Fights normally during unfavorable times of day/night"
					female_name=_ "female^fearless"
					id="fearless"
					male_name=_ "fearless"
				[/trait]
				[resistance]
					arcane="140"
				[/resistance]
				[attack]
					damage="6"
#textdomain wesnoth-units
					description=_ "touch"
					icon="attacks/touch-zombie.png"
					name="touch"
					number="2"
					range="melee"
					type="impact"
					[specials]
						[plague]
#textdomain wesnoth
							description=_ "Plague:
When a unit is killed by a Plague attack, that unit is replaced with a Walking Corpse on the same side as the unit with the Plague attack. This doesn't work on Undead or units in villages."
							id="plague"
							name=_ "plague"
							type="Walking Corpse"
						[/plague]
					[/specials]
				[/attack]
				[movement_costs]
					forest="4"
					hills="4"
				[/movement_costs]
			[/variation]
			[variation]
				advances_to="Soulless"
				alignment="chaotic"
				cost="8"
#textdomain wesnoth-units
				description=_ "Walking Corpses are the bodies of the dead, re-animated by dark magic. Though not especially dangerous to a trained soldier, the sight of one's former comrades amongst their number is frightening to say the least." + 
					#textdomain wesnoth
_ "

Special Notes:" + 
					_ " Foes who lose their life to the plague will rise again in unlife, unless they are standing on a village."
				die_sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
				ellipse="misc/ellipse-nozoc"
				experience="24"
				flag_rgb="magenta"
				hitpoints="21"
				id="Walking Corpse"
				image="units/undead/zombie-troll.png"
				level="0"
				movement="4"
				movement_type="largefoot"
#textdomain wesnoth-units
				name=_ "Walking Corpse"
				race="undead"
				usage="fighter"
				variation_name="troll"
				[defend]
					start_time="-126"
					[frame]
						duration="1"
						image="units/undead/zombie-troll.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/zombie-troll-defend.png"
					[/frame]
					[if]
						hits="hit"
						[frame]
							duration="150"
							image="units/undead/zombie-troll-defend.png"
							sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
						[/frame]
					[/if]
					[else]
						hits="miss,kill"
						[frame]
							duration="150"
							image="units/undead/zombie-troll-defend.png"
						[/frame]
					[/else]
					[frame]
						duration="1"
						image="units/undead/zombie-troll.png"
					[/frame]
				[/defend]
				[death]
					start_time="0"
					[frame]
						duration="150"
						image="units/undead/zombie-troll-die-1.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-troll-die-2.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-troll-die-3.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-troll-die-4.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-5.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-6.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-7.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-8.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-9.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-10.png"
					[/frame]
				[/death]
				[attack_anim]
					direction="s"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-troll-attack-s.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="n"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-troll-attack-n.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="se,sw,ne,nw"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-troll-attack.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[trait]
					availability="musthave"
#textdomain wesnoth
					description=_ "Fights normally during unfavorable times of day/night"
					female_name=_ "female^fearless"
					id="fearless"
					male_name=_ "fearless"
				[/trait]
				[resistance]
					arcane="140"
				[/resistance]
				[attack]
					damage="6"
#textdomain wesnoth-units
					description=_ "touch"
					icon="attacks/touch-zombie.png"
					name="touch"
					number="2"
					range="melee"
					type="impact"
					[specials]
						[plague]
#textdomain wesnoth
							description=_ "Plague:
When a unit is killed by a Plague attack, that unit is replaced with a Walking Corpse on the same side as the unit with the Plague attack. This doesn't work on Undead or units in villages."
							id="plague"
							name=_ "plague"
							type="Walking Corpse"
						[/plague]
					[/specials]
				[/attack]
				[movement_costs]
					deep_water="4"
				[/movement_costs]
			[/variation]
			[variation]
				advances_to="Soulless"
				alignment="chaotic"
				cost="8"
#textdomain wesnoth-units
				description=_ "Walking Corpses are the bodies of the dead, re-animated by dark magic. Though not especially dangerous to a trained soldier, the sight of one's former comrades amongst their number is frightening to say the least." + 
					#textdomain wesnoth
_ "

Special Notes:" + 
					_ " Foes who lose their life to the plague will rise again in unlife, unless they are standing on a village."
				die_sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
				ellipse="misc/ellipse-nozoc"
				experience="24"
				flag_rgb="magenta"
				hitpoints="26"
				id="Walking Corpse"
				image="units/undead/zombie-wose.png"
				level="0"
				movement="3"
				movement_type="treefolk"
#textdomain wesnoth-units
				name=_ "Walking Corpse"
				race="undead"
				usage="fighter"
				variation_name="wose"
				[defend]
					start_time="-126"
					[frame]
						duration="1"
						image="units/undead/zombie-wose.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/zombie-wose-defend.png"
					[/frame]
					[if]
						hits="hit"
						[frame]
							duration="150"
							image="units/undead/zombie-wose-defend.png"
							sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
						[/frame]
					[/if]
					[else]
						hits="miss,kill"
						[frame]
							duration="150"
							image="units/undead/zombie-wose-defend.png"
						[/frame]
					[/else]
					[frame]
						duration="1"
						image="units/undead/zombie-wose.png"
					[/frame]
				[/defend]
				[death]
					start_time="0"
					[frame]
						duration="150"
						image="units/undead/zombie-wose-die-1.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-wose-die-2.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-wose-die-3.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-wose-die-4.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-5.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-6.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-7.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-8.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-9.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-10.png"
					[/frame]
				[/death]
				[attack_anim]
					direction="s"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-wose-attack-s.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="n"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-wose-attack-n.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="se,sw,ne,nw"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-wose-attack.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[trait]
					availability="musthave"
#textdomain wesnoth
					description=_ "Fights normally during unfavorable times of day/night"
					female_name=_ "female^fearless"
					id="fearless"
					male_name=_ "fearless"
				[/trait]
				[resistance]
					arcane="140"
				[/resistance]
				[attack]
					damage="6"
#textdomain wesnoth-units
					description=_ "touch"
					icon="attacks/touch-zombie.png"
					name="touch"
					number="2"
					range="melee"
					type="impact"
					[specials]
						[plague]
#textdomain wesnoth
							description=_ "Plague:
When a unit is killed by a Plague attack, that unit is replaced with a Walking Corpse on the same side as the unit with the Plague attack. This doesn't work on Undead or units in villages."
							id="plague"
							name=_ "plague"
							type="Walking Corpse"
						[/plague]
					[/specials]
				[/attack]
				[movement_costs]
					deep_water="3"
				[/movement_costs]
			[/variation]
			[variation]
				advances_to="Soulless"
				alignment="chaotic"
				cost="8"
#textdomain wesnoth-units
				description=_ "Walking Corpses are the bodies of the dead, re-animated by dark magic. Though not especially dangerous to a trained soldier, the sight of one's former comrades amongst their number is frightening to say the least." + 
					#textdomain wesnoth
_ "

Special Notes:" + 
					_ " Foes who lose their life to the plague will rise again in unlife, unless they are standing on a village."
				die_sound="bat-flapping.wav"
				ellipse="misc/ellipse-nozoc"
				experience="24"
				flag_rgb="magenta"
				hitpoints="15"
				id="Walking Corpse"
				image="units/undead/zombie-bat-se-3.png"
				inherit="no"
				level="0"
				movement="5"
				movement_type="fly"
#textdomain wesnoth-units
				name=_ "Walking Corpse"
				race="undead"
				usage="fighter"
				variation_name="bat"
				[trait]
					availability="musthave"
#textdomain wesnoth
					description=_ "Fights normally during unfavorable times of day/night"
					female_name=_ "female^fearless"
					id="fearless"
					male_name=_ "fearless"
				[/trait]
				[resistance]
					arcane="140"
				[/resistance]
				[attack]
					damage="6"
#textdomain wesnoth-units
					description=_ "touch"
					icon="attacks/touch-zombie.png"
					name="touch"
					number="2"
					range="melee"
					type="impact"
					[specials]
						[plague]
#textdomain wesnoth
							description=_ "Plague:
When a unit is killed by a Plague attack, that unit is replaced with a Walking Corpse on the same side as the unit with the Plague attack. This doesn't work on Undead or units in villages."
							id="plague"
							name=_ "plague"
							type="Walking Corpse"
						[/plague]
					[/specials]
				[/attack]
				[movement_costs]
					cave="1"
					fungus="1"
				[/movement_costs]
				[defense]
					cave="50"
					fungus="50"
				[/defense]
				[resistance]
					cold="70"
				[/resistance]
				[defend]
					direction="s,sw,se"
					start_time="-126"
					[if]
						hits="miss"
						offset="0.0~-0.15,-0.15~0.0"
					[/if]
					[frame]
						duration="1"
						image="units/undead/zombie-bat-se-3.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/zombie-bat-se-4.png"
					[/frame]
					[if]
						hits="hit"
						[frame]
							duration="150"
							image="units/undead/zombie-bat-se-4.png"
							sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
						[/frame]
					[/if]
					[else]
						hits="miss,kill"
						[frame]
							duration="150"
							image="units/undead/zombie-bat-se-4.png"
						[/frame]
					[/else]
					[frame]
						duration="1"
						image="units/undead/zombie-bat-se-3.png"
					[/frame]
				[/defend]
				[defend]
					direction="n,nw,ne"
					start_time="-126"
					[if]
						hits="miss"
						offset="0.0~-0.15,-0.15~0.0"
					[/if]
					[frame]
						duration="1"
						image="units/undead/zombie-bat-ne-3.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/zombie-bat-ne-4.png"
					[/frame]
					[if]
						hits="hit"
						[frame]
							duration="150"
							image="units/undead/zombie-bat-ne-4.png"
							sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
						[/frame]
					[/if]
					[else]
						hits="miss,kill"
						[frame]
							duration="150"
							image="units/undead/zombie-bat-ne-4.png"
						[/frame]
					[/else]
					[frame]
						duration="1"
						image="units/undead/zombie-bat-ne-3.png"
					[/frame]
				[/defend]
				[standing_anim]
					direction="s,se,sw"
					start_time="0"
					[frame]
						duration="50"
						image="units/undead/zombie-bat-se-3.png"
					[/frame]
					[frame]
						duration="60"
						image="units/undead/zombie-bat-se-2.png"
					[/frame]
					[frame]
						duration="80"
						image="units/undead/zombie-bat-se-1.png"
					[/frame]
					[frame]
						duration="60"
						image="units/undead/zombie-bat-se-2.png"
					[/frame]
					[frame]
						duration="50"
						image="units/undead/zombie-bat-se-3.png"
					[/frame]
					[frame]
						duration="60"
						image="units/undead/zombie-bat-se-4.png"
					[/frame]
					[frame]
						duration="80"
						image="units/undead/zombie-bat-se-5.png"
					[/frame]
					[frame]
						duration="60"
						image="units/undead/zombie-bat-se-4.png"
					[/frame]
				[/standing_anim]
				[standing_anim]
					direction="n,ne,nw"
					start_time="0"
					[frame]
						duration="50"
						image="units/undead/zombie-bat-ne-3.png"
					[/frame]
					[frame]
						duration="60"
						image="units/undead/zombie-bat-ne-2.png"
					[/frame]
					[frame]
						duration="80"
						image="units/undead/zombie-bat-ne-1.png"
					[/frame]
					[frame]
						duration="60"
						image="units/undead/zombie-bat-ne-2.png"
					[/frame]
					[frame]
						duration="50"
						image="units/undead/zombie-bat-ne-3.png"
					[/frame]
					[frame]
						duration="60"
						image="units/undead/zombie-bat-ne-4.png"
					[/frame]
					[frame]
						duration="80"
						image="units/undead/zombie-bat-ne-5.png"
					[/frame]
					[frame]
						duration="60"
						image="units/undead/zombie-bat-ne-4.png"
					[/frame]
				[/standing_anim]
				[attack_anim]
					direction="s,se,sw"
					offset="0.0~0.9:200,0.9~0.0:160"
					start_time="-200"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						duration="30"
						image="units/undead/zombie-bat-se-3.png"
					[/frame]
					[frame]
						duration="30"
						image="units/undead/zombie-bat-se-2.png"
					[/frame]
					[frame]
						duration="30"
						image="units/undead/zombie-bat-se-1.png"
						sound="bat-flapping.wav"
					[/frame]
					[frame]
						duration="30"
						image="units/undead/zombie-bat-se-2.png"
					[/frame]
					[frame]
						duration="30"
						image="units/undead/zombie-bat-se-3.png"
					[/frame]
					[frame]
						duration="70"
						image="units/undead/zombie-bat-se-4.png"
						sound="zombie-attack.wav"
					[/frame]
					[frame]
						duration="50"
						image="units/undead/zombie-bat-se-3.png"
					[/frame]
					[frame]
						duration="50"
						image="units/undead/zombie-bat-se-2.png"
					[/frame]
					[frame]
						duration="40"
						image="units/undead/zombie-bat-se-3.png"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="n,ne,nw"
					offset="0.0~0.9:200,0.9~0.0:160"
					start_time="-200"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						duration="30"
						image="units/undead/zombie-bat-ne-3.png"
					[/frame]
					[frame]
						duration="30"
						image="units/undead/zombie-bat-ne-2.png"
					[/frame]
					[frame]
						duration="30"
						image="units/undead/zombie-bat-ne-1.png"
						sound="bat-flapping.wav"
					[/frame]
					[frame]
						duration="30"
						image="units/undead/zombie-bat-ne-2.png"
					[/frame]
					[frame]
						duration="30"
						image="units/undead/zombie-bat-ne-3.png"
					[/frame]
					[frame]
						duration="70"
						image="units/undead/zombie-bat-ne-4.png"
						sound="zombie-attack.wav"
					[/frame]
					[frame]
						duration="50"
						image="units/undead/zombie-bat-ne-3.png"
					[/frame]
					[frame]
						duration="50"
						image="units/undead/zombie-bat-ne-2.png"
					[/frame]
					[frame]
						duration="40"
						image="units/undead/zombie-bat-ne-3.png"
					[/frame]
				[/attack_anim]
				[death]
					start_time="0"
					[frame]
						duration="150"
						image="units/undead/zombie-bat-die-1.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-bat-die-2.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-bat-die-3.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-bat-die-4.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-5.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-6.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-7.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-8.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-9.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-10.png"
					[/frame]
				[/death]
			[/variation]
			[defense]
				castle="40"
				cave="60"
				deep_water="80"
				flat="60"
				forest="50"
				frozen="80"
				fungus="50"
				hills="50"
				impassable="60"
				mountains="40"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="80"
				unwalkable="80"
				village="40"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="4"
				flat="1"
				forest="2"
				frozen="3"
				fungus="2"
				hills="2"
				impassable="99"
				mountains="3"
				reef="2"
				sand="2"
				shallow_water="3"
				swamp_water="3"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="140"
				blade="100"
				cold="100"
				fire="100"
				impact="100"
				pierce="100"
			[/resistance]
			[variables]
			[/variables]
			[status]
				hidden="yes"
				not_living="yes"
			[/status]
			[attack]
				damage="6"
#textdomain wesnoth-units
				description=_ "touch"
				icon="attacks/touch-zombie.png"
				name="touch"
				number="2"
				range="melee"
				type="impact"
				[specials]
					[plague]
#textdomain wesnoth
						description=_ "Plague:
When a unit is killed by a Plague attack, that unit is replaced with a Walking Corpse on the same side as the unit with the Plague attack. This doesn't work on Undead or units in villages."
						id="plague"
						name=_ "plague"
						type="Walking Corpse"
					[/plague]
				[/specials]
			[/attack]
			[modifications]
				[trait]
					availability="musthave"
					description=_ "Immune to drain, poison and plague"
					female_name=_ "female^undead"
					id="undead"
					male_name=_ "undead"
					name=_ "undead"
					[effect]
						add="not_living"
						apply_to="status"
					[/effect]
				[/trait]
				[trait]
					availability="musthave"
					description=_ "Fights normally during unfavorable times of day/night"
					female_name=_ "female^fearless"
					id="fearless"
					male_name=_ "fearless"
					name=_ "fearless"
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Dark Sorcerer"
			alignment="chaotic"
			alpha="256"
			attacks_left="0"
			cost="16"
			die_sound="human-die-1.ogg,human-die-2.ogg,human-die-3.ogg"
			ellipse="misc/ellipse"
			experience="2"
			facing="se"
			flag_rgb="magenta"
			flying="no"
			gender="male"
			goto_x="-999"
			goto_y="-999"
			hitpoints="31"
			id="Dark Adept-71"
			ignore_race_traits="yes"
			image="units/undead-necromancers/adept.png"
#textdomain wesnoth-units
			language_name=_ "Dark Adept"
			level="1"
			max_attacks="1"
			max_experience="34"
			max_hitpoints="31"
			max_moves="6"
			movement="5"
			movement_type="smallfoot"
			moves="0"
			name="Rhec"
			profile="portraits/humans/dark-adept.png"
			race="human"
			random_gender="no"
			random_traits="no"
			resting="yes"
			side="1"
			type="Dark Adept"
			underlying_id="71"
			unrenamable="no"
			upkeep="full"
			usage="archer"
			x="23"
			y="7"
			zoc="yes"
			[attack_anim]
				[filter_attack]
					range="ranged"
				[/filter_attack]
				[missile_frame]
					begin="-50"
					end="150"
					image="projectiles/darkmissile-n.png"
					image_diagonal="projectiles/darkmissile-ne.png"
				[/missile_frame]
				[frame]
					begin="-450"
					end="-420"
					image="units/undead-necromancers/adept.png"
				[/frame]
				[frame]
					begin="-420"
					end="-395"
					image="units/undead-necromancers/adept-magic-1.png"
				[/frame]
				[frame]
					begin="-395"
					end="-320"
					image="units/undead-necromancers/adept-magic-2.png"
				[/frame]
				[frame]
					begin="-320"
					end="-300"
					image="units/undead-necromancers/adept-magic-3.png"
				[/frame]
				[frame]
					begin="-300"
					end="-250"
					halo="halo/undead/dark-magic-1.png"
					halo_x="0"
					halo_y="-12"
					image="units/undead-necromancers/adept-magic-3.png"
				[/frame]
				[frame]
					begin="-250"
					end="-200"
					halo="halo/undead/dark-magic-2.png"
					halo_x="0"
					halo_y="-12"
					image="units/undead-necromancers/adept-magic-3.png"
				[/frame]
				[frame]
					begin="-200"
					end="-150"
					halo="halo/undead/dark-magic-3.png"
					halo_x="0"
					halo_y="-12"
					image="units/undead-necromancers/adept-magic-3.png"
				[/frame]
				[frame]
					begin="-150"
					end="-100"
					halo="halo/undead/dark-magic-4.png"
					halo_x="0"
					halo_y="-12"
					image="units/undead-necromancers/adept-magic-3.png"
				[/frame]
				[frame]
					begin="-100"
					end="-50"
					halo="halo/undead/dark-magic-5.png"
					halo_x="0"
					halo_y="-12"
					image="units/undead-necromancers/adept-magic-3.png"
				[/frame]
				[if]
					hits="no"
					[frame]
						begin="-50"
						end="0"
						halo="halo/undead/dark-magic-6.png"
						halo_x="0"
						halo_y="-12"
						image="units/undead-necromancers/adept-magic-3.png"
						sound="magic-dark-miss.ogg"
					[/frame]
				[/if]
				[else]
					hits="yes"
					[frame]
						begin="-50"
						end="0"
						halo="halo/undead/dark-magic-6.png"
						halo_x="0"
						halo_y="-12"
						image="units/undead-necromancers/adept-magic-3.png"
						sound="magic-dark.ogg"
					[/frame]
				[/else]
				[frame]
					begin="0"
					end="50"
					image="units/undead-necromancers/adept-magic-2.png"
				[/frame]
				[frame]
					begin="50"
					end="90"
					image="units/undead-necromancers/adept-magic-1.png"
				[/frame]
				[frame]
					begin="90"
					end="100"
					image="units/undead-necromancers/adept.png"
				[/frame]
			[/attack_anim]
			[death]
				[frame]
					begin="0"
					end="100"
					image="units/undead-necromancers/adept-die1.png"
				[/frame]
				[frame]
					begin="100"
					end="200"
					image="units/undead-necromancers/adept-die2.png"
				[/frame]
				[frame]
					begin="200"
					end="300"
					image="units/undead-necromancers/adept-die3.png"
				[/frame]
				[frame]
					begin="300"
					end="400"
					image="units/undead-necromancers/adept-die4.png"
				[/frame]
				[frame]
					begin="400"
					end="520"
					image="units/undead-necromancers/adept-die5.png"
				[/frame]
				[frame]
					begin="520"
					end="640"
					image="units/undead-necromancers/adept-die6.png"
				[/frame]
				[frame]
					begin="640"
					end="780"
					image="units/undead-necromancers/adept-die7.png"
				[/frame]
				[frame]
					begin="780"
					end="900"
					image="units/undead-necromancers/adept-die8.png"
				[/frame]
			[/death]
			[defend]
				start_time="-126"
				[frame]
					duration="1"
					image="units/undead-necromancers/adept-defend-1.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-necromancers/adept-defend-2.png"
				[/frame]
				[if]
					hits="hit"
					[frame]
						duration="150"
						image="units/undead-necromancers/adept-defend-2.png"
						sound="human-hit-1.ogg,human-hit-2.ogg,human-hit-3.ogg,human-hit-4.ogg,human-hit-5.ogg"
					[/frame]
				[/if]
				[else]
					hits="miss,kill"
					[frame]
						duration="150"
						image="units/undead-necromancers/adept-defend-2.png"
					[/frame]
				[/else]
				[frame]
					duration="1"
					image="units/undead-necromancers/adept-defend-1.png"
				[/frame]
			[/defend]
			[portrait]
				image="portraits/humans/transparent/dark-adept.png"
				mirror="false"
				side="left"
				size="400"
			[/portrait]
			[portrait]
				image="portraits/humans/transparent/dark-adept.png"
				mirror="true"
				side="right"
				size="400"
			[/portrait]
			[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]
			[trait]
				female_name=_ "female^intelligent"
				id="intelligent"
				male_name=_ "intelligent"
				[effect]
					apply_to="max_experience"
					increase="-20%"
				[/effect]
			[/trait]
			[trait]
				female_name=_ "female^resilient"
				id="resilient"
				male_name=_ "resilient"
				[effect]
					apply_to="hitpoints"
					increase_total="4"
				[/effect]
				[effect]
					apply_to="hitpoints"
					increase_total="1"
					times="per level"
				[/effect]
			[/trait]
			[defense]
				castle="40"
				cave="60"
				deep_water="80"
				flat="60"
				forest="50"
				frozen="80"
				fungus="50"
				hills="50"
				impassable="60"
				mountains="40"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="80"
				unwalkable="80"
				village="40"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="99"
				flat="1"
				forest="2"
				frozen="3"
				fungus="2"
				hills="2"
				impassable="99"
				mountains="3"
				reef="2"
				sand="2"
				shallow_water="3"
				swamp_water="3"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="80"
				blade="100"
				cold="100"
				fire="100"
				impact="100"
				pierce="100"
			[/resistance]
			[variables]
			[/variables]
			[status]
			[/status]
			[attack]
				damage="10"
#textdomain wesnoth-units
				description=_ "chill wave"
				icon="attacks/iceball.png"
				name="chill wave"
				number="2"
				range="ranged"
				type="cold"
				[specials]
					[chance_to_hit]
						cumulative="no"
#textdomain wesnoth
						description=_ "Magical:
This attack always has a 70% chance to hit regardless of the defensive ability of the unit being attacked."
						id="magical"
						name=_ "magical"
						value="70"
					[/chance_to_hit]
				[/specials]
			[/attack]
			[attack]
				damage="7"
#textdomain wesnoth-units
				description=_ "shadow wave"
				icon="attacks/dark-missile.png"
				name="shadow wave"
				number="2"
				range="ranged"
				type="arcane"
				[specials]
					[chance_to_hit]
						cumulative="no"
#textdomain wesnoth
						description=_ "Magical:
This attack always has a 70% chance to hit regardless of the defensive ability of the unit being attacked."
						id="magical"
						name=_ "magical"
						value="70"
					[/chance_to_hit]
				[/specials]
			[/attack]
			[modifications]
				[trait]
					female_name=_ "female^resilient"
					id="resilient"
					male_name=_ "resilient"
					name=_ "resilient"
					[effect]
						apply_to="hitpoints"
						increase_total="4"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="1"
						times="per level"
					[/effect]
				[/trait]
				[trait]
					female_name=_ "female^quick"
					id="quick"
					male_name=_ "quick"
					name=_ "quick"
					[effect]
						apply_to="movement"
						increase="1"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="-5%"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Revenant,Deathblade"
			alignment="chaotic"
			alpha="256"
			attacks_left="0"
			cost="15"
			die_sound="skeleton-die-1.ogg,skeleton-die-2.ogg"
			ellipse="misc/ellipse"
			experience="1"
			facing="se"
			flag_rgb="magenta"
			flying="no"
			gender="male"
			goto_x="-999"
			goto_y="-999"
			hitpoints="27"
			id="Skeleton-73"
			image="units/undead-skeletal/skeleton.png"
#textdomain wesnoth-units
			language_name=_ "Skeleton"
			level="1"
			max_attacks="1"
			max_experience="25"
			max_hitpoints="34"
			max_moves="5"
			movement="5"
			movement_type="undeadfoot"
			moves="0"
			race="undead"
			random_gender="no"
			random_traits="no"
			resting="yes"
			side="1"
			type="Skeleton"
			underlying_id="73"
			unrenamable="no"
			upkeep="full"
			usage="fighter"
			x="22"
			y="8"
			zoc="yes"
			[attack_anim]
				offset="0.0~0.3,0.3~0.45,0.45~0.3,0.3~0.0"
				start_time="-250"
				[filter_attack]
					name="axe"
				[/filter_attack]
				[frame]
					duration="150"
					image="units/undead-skeletal/skeleton-attack-1.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						duration="100"
						image="units/undead-skeletal/skeleton-attack-2.png"
						sound="axe.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						duration="100"
						image="units/undead-skeletal/skeleton-attack-2.png"
						sound="miss-1.ogg,miss-2.ogg,miss-3.ogg"
					[/frame]
				[/else]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-attack-3.png"
				[/frame]
				[frame]
					duration="90"
					image="units/undead-skeletal/skeleton-attack-4.png"
				[/frame]
				[frame]
					duration="80"
					image="units/undead-skeletal/skeleton-attack-5.png"
				[/frame]
			[/attack_anim]
			[death]
				[frame]
					begin="0"
					end="100"
					image="units/undead-skeletal/skeleton-dying-1.png"
				[/frame]
				[frame]
					begin="100"
					end="200"
					image="units/undead-skeletal/skeleton-dying-2.png"
				[/frame]
				[frame]
					begin="200"
					end="300"
					image="units/undead-skeletal/skeleton-dying-3.png"
				[/frame]
				[frame]
					begin="300"
					end="400"
					image="units/undead-skeletal/skeleton-dying-4.png"
				[/frame]
				[frame]
					begin="400"
					end="500"
					image="units/undead-skeletal/skeleton-dying-5.png"
				[/frame]
				[frame]
					begin="500"
					end="600"
					image="units/undead-skeletal/skeleton-dying-6.png"
				[/frame]
				[frame]
					begin="600"
					end="700"
					image="units/undead-skeletal/skeleton-dying-7.png"
				[/frame]
			[/death]
			[defend]
				start_time="-126"
				[frame]
					duration="1"
					image="units/undead-skeletal/skeleton-defend-1.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-defend-2.png"
				[/frame]
				[if]
					hits="hit"
					[frame]
						duration="150"
						image="units/undead-skeletal/skeleton-defend-2.png"
						sound="skeleton-hit-1.ogg,skeleton-hit-2.ogg,skeleton-hit-3.ogg"
					[/frame]
				[/if]
				[else]
					hits="miss,kill"
					[frame]
						duration="150"
						image="units/undead-skeletal/skeleton-defend-2.png"
					[/frame]
				[/else]
				[frame]
					duration="1"
					image="units/undead-skeletal/skeleton-defend-1.png"
				[/frame]
			[/defend]
			[idle_anim]
				start_time="0"
				[filter]
					[not]
						[filter_wml]
							[status]
								poisoned="yes"
							[/status]
						[/filter_wml]
					[/not]
				[/filter]
				[filter]
					[filter_adjacent]
						count="0"
						is_enemy="yes"
					[/filter_adjacent]
				[/filter]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-1.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-2.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-3.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-2.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-3.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-2.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-3.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-2.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-3.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-skeletal/skeleton-idle-2.png"
				[/frame]
			[/idle_anim]
			[recruit_anim]
				[frame]
					alpha="0~1:300"
					begin="-200"
					end="100"
					image="units/undead-skeletal/skeleton-dying-7.png"
				[/frame]
				[frame]
					begin="100"
					end="200"
					image="units/undead-skeletal/skeleton-dying-6.png"
				[/frame]
				[frame]
					begin="200"
					end="300"
					image="units/undead-skeletal/skeleton-dying-5.png"
				[/frame]
				[frame]
					begin="300"
					end="400"
					image="units/undead-skeletal/skeleton-dying-4.png"
				[/frame]
				[frame]
					begin="400"
					end="500"
					image="units/undead-skeletal/skeleton-dying-3.png"
				[/frame]
				[frame]
					begin="500"
					end="600"
					image="units/undead-skeletal/skeleton-dying-2.png"
				[/frame]
				[frame]
					begin="600"
					end="700"
					image="units/undead-skeletal/skeleton-dying-1.png"
				[/frame]
			[/recruit_anim]
			[defense]
				castle="40"
				cave="60"
				deep_water="90"
				flat="60"
				forest="50"
				frozen="70"
				fungus="40"
				hills="50"
				impassable="60"
				mountains="40"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="70"
				unwalkable="80"
				village="40"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="3"
				flat="1"
				forest="2"
				frozen="2"
				fungus="2"
				hills="2"
				impassable="99"
				mountains="3"
				reef="2"
				sand="2"
				shallow_water="2"
				swamp_water="2"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="150"
				blade="60"
				cold="40"
				fire="120"
				impact="120"
				pierce="40"
			[/resistance]
			[abilities]
				[hides]
					affect_self="yes"
#textdomain wesnoth
					description=_ "Submerge:
This unit can hide in deep water, and remain undetected by its enemies.

Enemy units cannot see this unit while it is in deep water, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
					description_inactive=_ "Submerge:
This unit can hide in deep water, and remain undetected by its enemies.

Enemy units cannot see this unit while it is in deep water, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
					female_name=_ "female^submerge"
					female_name_inactive=_ "female^submerge"
					id="submerge"
					name=_ "submerge"
					name_inactive=_ "submerge"
					[filter_self]
						[filter_location]
							terrain="Wo"
						[/filter_location]
					[/filter_self]
				[/hides]
			[/abilities]
			[variables]
			[/variables]
			[status]
				not_living="yes"
			[/status]
			[attack]
				damage="7"
#textdomain wesnoth-units
				description=_ "axe"
				icon="attacks/axe-undead.png"
				name="axe"
				number="3"
				range="melee"
				type="blade"
			[/attack]
			[modifications]
				[trait]
					availability="musthave"
#textdomain wesnoth
					description=_ "Immune to drain, poison and plague"
					female_name=_ "female^undead"
					id="undead"
					male_name=_ "undead"
					name=_ "undead"
					[effect]
						add="not_living"
						apply_to="status"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Soulless"
			alignment="chaotic"
			alpha="256"
			attacks_left="1"
			cost="8"
			die_sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
			ellipse="misc/ellipse-nozoc"
			experience="0"
			facing="se"
			flag_rgb="magenta"
			flying="no"
			gender="male"
			goto_x="-999"
			goto_y="-999"
			hitpoints="18"
			id="Walking Corpse-74"
			image="units/undead/zombie.png"
#textdomain wesnoth-units
			language_name=_ "Walking Corpse"
			level="0"
			max_attacks="1"
			max_experience="17"
			max_hitpoints="18"
			max_moves="4"
			movement="4"
			movement_type="smallfoot"
			moves="4"
			race="undead"
			random_gender="no"
			random_traits="no"
			resting="yes"
			side="1"
			type="Walking Corpse"
			underlying_id="74"
			unrenamable="no"
			upkeep="full"
			usage="fighter"
			x="23"
			y="6"
			zoc="no"
			[attack_anim]
				direction="s"
				[filter_attack]
					name="touch"
				[/filter_attack]
				[frame]
					begin="-200"
					end="200"
					image="units/undead/zombie-attack-s.png"
					sound="zombie-attack.wav"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="n"
				[filter_attack]
					name="touch"
				[/filter_attack]
				[frame]
					begin="-200"
					end="200"
					image="units/undead/zombie-attack-n.png"
					sound="zombie-attack.wav"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="se,sw,ne,nw"
				[filter_attack]
					name="touch"
				[/filter_attack]
				[frame]
					begin="-200"
					end="200"
					image="units/undead/zombie-attack.png"
					sound="zombie-attack.wav"
				[/frame]
			[/attack_anim]
			[death]
				start_time="0"
				[frame]
					duration="150"
					image="units/undead/zombie-die-1.png"
				[/frame]
				[frame]
					duration="150"
					image="units/undead/zombie-die-2.png"
				[/frame]
				[frame]
					duration="150"
					image="units/undead/zombie-die-3.png"
				[/frame]
				[frame]
					duration="150"
					image="units/undead/zombie-die-4.png"
				[/frame]
				[frame]
					duration="150"
					image="units/undead/soulless-die-5.png"
				[/frame]
				[frame]
					duration="150"
					image="units/undead/soulless-die-6.png"
				[/frame]
				[frame]
					duration="150"
					image="units/undead/soulless-die-7.png"
				[/frame]
				[frame]
					duration="150"
					image="units/undead/soulless-die-8.png"
				[/frame]
				[frame]
					duration="150"
					image="units/undead/soulless-die-9.png"
				[/frame]
				[frame]
					duration="150"
					image="units/undead/soulless-die-10.png"
				[/frame]
			[/death]
			[defend]
				start_time="-126"
				[frame]
					duration="1"
					image="units/undead/zombie.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead/zombie-defend.png"
				[/frame]
				[if]
					hits="hit"
					[frame]
						duration="150"
						image="units/undead/zombie-defend.png"
						sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
					[/frame]
				[/if]
				[else]
					hits="miss,kill"
					[frame]
						duration="150"
						image="units/undead/zombie-defend.png"
					[/frame]
				[/else]
				[frame]
					duration="1"
					image="units/undead/zombie.png"
				[/frame]
			[/defend]
			[trait]
				availability="musthave"
#textdomain wesnoth
				description=_ "Fights normally during unfavorable times of day/night"
				female_name=_ "female^fearless"
				id="fearless"
				male_name=_ "fearless"
			[/trait]
			[variation]
				advances_to="Soulless"
				alignment="chaotic"
				cost="8"
#textdomain wesnoth-units
				description=_ "Walking Corpses are the bodies of the dead, re-animated by dark magic. Though not especially dangerous to a trained soldier, the sight of one's former comrades amongst their number is frightening to say the least." + 
					#textdomain wesnoth
_ "

Special Notes:" + 
					_ " Foes who lose their life to the plague will rise again in unlife, unless they are standing on a village."
				die_sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
				ellipse="misc/ellipse-nozoc"
				experience="24"
				flag_rgb="magenta"
				hitpoints="23"
				id="Walking Corpse"
				image="units/undead/zombie-drake.png"
				level="0"
				movement="4"
				movement_type="drakefoot"
#textdomain wesnoth-units
				name=_ "Walking Corpse"
				race="undead"
				usage="fighter"
				variation_name="drake"
				[defend]
					start_time="-126"
					[frame]
						duration="1"
						image="units/undead/zombie-drake.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/zombie-drake-defend.png"
					[/frame]
					[if]
						hits="hit"
						[frame]
							duration="150"
							image="units/undead/zombie-drake-defend.png"
							sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
						[/frame]
					[/if]
					[else]
						hits="miss,kill"
						[frame]
							duration="150"
							image="units/undead/zombie-drake-defend.png"
						[/frame]
					[/else]
					[frame]
						duration="1"
						image="units/undead/zombie-drake.png"
					[/frame]
				[/defend]
				[death]
					start_time="0"
					[frame]
						duration="150"
						image="units/undead/soulless-die-4.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-5.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-6.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-7.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-8.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-9.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-10.png"
					[/frame]
				[/death]
				[attack_anim]
					direction="s"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-drake-attack-s.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="n"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-drake-attack-n.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="se,sw,ne,nw"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-drake-attack.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[trait]
					availability="musthave"
#textdomain wesnoth
					description=_ "Fights normally during unfavorable times of day/night"
					female_name=_ "female^fearless"
					id="fearless"
					male_name=_ "fearless"
				[/trait]
				[resistance]
					arcane="140"
				[/resistance]
				[attack]
					damage="6"
#textdomain wesnoth-units
					description=_ "touch"
					icon="attacks/touch-zombie.png"
					name="touch"
					number="2"
					range="melee"
					type="impact"
					[specials]
						[plague]
#textdomain wesnoth
							description=_ "Plague:
When a unit is killed by a Plague attack, that unit is replaced with a Walking Corpse on the same side as the unit with the Plague attack. This doesn't work on Undead or units in villages."
							id="plague"
							name=_ "plague"
							type="Walking Corpse"
						[/plague]
					[/specials]
				[/attack]
				[movement_costs]
					deep_water="4"
				[/movement_costs]
			[/variation]
			[variation]
				advances_to="Soulless"
				alignment="chaotic"
				cost="8"
#textdomain wesnoth-units
				description=_ "Walking Corpses are the bodies of the dead, re-animated by dark magic. Though not especially dangerous to a trained soldier, the sight of one's former comrades amongst their number is frightening to say the least." + 
					#textdomain wesnoth
_ "

Special Notes:" + 
					_ " Foes who lose their life to the plague will rise again in unlife, unless they are standing on a village."
				die_sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
				ellipse="misc/ellipse-nozoc"
				experience="24"
				flag_rgb="magenta"
				hitpoints="21"
				id="Walking Corpse"
				image="units/undead/zombie-dwarf.png"
				level="0"
				movement="3"
				movement_type="dwarvishfoot"
#textdomain wesnoth-units
				name=_ "Walking Corpse"
				race="undead"
				usage="fighter"
				variation_name="dwarf"
				[defend]
					start_time="-126"
					[frame]
						duration="1"
						image="units/undead/zombie-dwarf.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/zombie-dwarf-defend.png"
					[/frame]
					[if]
						hits="hit"
						[frame]
							duration="150"
							image="units/undead/zombie-dwarf-defend.png"
							sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
						[/frame]
					[/if]
					[else]
						hits="miss,kill"
						[frame]
							duration="150"
							image="units/undead/zombie-dwarf-defend.png"
						[/frame]
					[/else]
					[frame]
						duration="1"
						image="units/undead/zombie-dwarf.png"
					[/frame]
				[/defend]
				[death]
					start_time="0"
					[frame]
						duration="150"
						image="units/undead/zombie-dwarf-die-1.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-dwarf-die-2.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-dwarf-die-3.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-dwarf-die-4.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-5.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-6.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-7.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-8.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-9.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-10.png"
					[/frame]
				[/death]
				[attack_anim]
					direction="s"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-dwarf-attack-s.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="n"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-dwarf-attack-n.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="se,sw,ne,nw"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-dwarf-attack.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[trait]
					availability="musthave"
#textdomain wesnoth
					description=_ "Fights normally during unfavorable times of day/night"
					female_name=_ "female^fearless"
					id="fearless"
					male_name=_ "fearless"
				[/trait]
				[resistance]
					arcane="140"
				[/resistance]
				[attack]
					damage="6"
#textdomain wesnoth-units
					description=_ "touch"
					icon="attacks/touch-zombie.png"
					name="touch"
					number="2"
					range="melee"
					type="impact"
					[specials]
						[plague]
#textdomain wesnoth
							description=_ "Plague:
When a unit is killed by a Plague attack, that unit is replaced with a Walking Corpse on the same side as the unit with the Plague attack. This doesn't work on Undead or units in villages."
							id="plague"
							name=_ "plague"
							type="Walking Corpse"
						[/plague]
					[/specials]
				[/attack]
				[movement_costs]
					deep_water="3"
				[/movement_costs]
			[/variation]
			[variation]
				advances_to="Soulless"
				alignment="chaotic"
				cost="8"
#textdomain wesnoth-units
				description=_ "Walking Corpses are the bodies of the dead, re-animated by dark magic. Though not especially dangerous to a trained soldier, the sight of one's former comrades amongst their number is frightening to say the least." + 
					#textdomain wesnoth
_ "

Special Notes:" + 
					_ " Foes who lose their life to the plague will rise again in unlife, unless they are standing on a village."
				die_sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
				ellipse="misc/ellipse-nozoc"
				experience="24"
				flag_rgb="magenta"
				hitpoints="21"
				id="Walking Corpse"
				image="units/undead/zombie-drake.png"
				level="0"
				movement="5"
				movement_type="fly"
#textdomain wesnoth-units
				name=_ "Walking Corpse"
				race="undead"
				usage="fighter"
				variation_name="gryphon"
				[defend]
					start_time="-126"
					[frame]
						duration="1"
						image="units/undead/zombie-drake.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/zombie-drake-defend.png"
					[/frame]
					[if]
						hits="hit"
						[frame]
							duration="150"
							image="units/undead/zombie-drake-defend.png"
							sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
						[/frame]
					[/if]
					[else]
						hits="miss,kill"
						[frame]
							duration="150"
							image="units/undead/zombie-drake-defend.png"
						[/frame]
					[/else]
					[frame]
						duration="1"
						image="units/undead/zombie-drake.png"
					[/frame]
				[/defend]
				[death]
					start_time="0"
					[frame]
						duration="150"
						image="units/undead/zombie-drake-die-1.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-drake-die-2.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-drake-die-3.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-drake-die-4.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-5.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-6.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-7.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-8.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-9.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-10.png"
					[/frame]
				[/death]
				[attack_anim]
					direction="s"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-drake-attack-s.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="n"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-drake-attack-n.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="se,sw,ne,nw"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-drake-attack.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[trait]
					availability="musthave"
#textdomain wesnoth
					description=_ "Fights normally during unfavorable times of day/night"
					female_name=_ "female^fearless"
					id="fearless"
					male_name=_ "fearless"
				[/trait]
				[resistance]
					arcane="140"
				[/resistance]
				[attack]
					damage="6"
#textdomain wesnoth-units
					description=_ "touch"
					icon="attacks/touch-zombie.png"
					name="touch"
					number="2"
					range="melee"
					type="impact"
					[specials]
						[plague]
#textdomain wesnoth
							description=_ "Plague:
When a unit is killed by a Plague attack, that unit is replaced with a Walking Corpse on the same side as the unit with the Plague attack. This doesn't work on Undead or units in villages."
							id="plague"
							name=_ "plague"
							type="Walking Corpse"
						[/plague]
					[/specials]
				[/attack]
				[defense]
					mountains="40"
				[/defense]
			[/variation]
			[variation]
				advances_to="Soulless"
				alignment="chaotic"
				cost="8"
#textdomain wesnoth-units
				description=_ "Walking Corpses are the bodies of the dead, re-animated by dark magic. Though not especially dangerous to a trained soldier, the sight of one's former comrades amongst their number is frightening to say the least." + 
					#textdomain wesnoth
_ "

Special Notes:" + 
					_ " Foes who lose their life to the plague will rise again in unlife, unless they are standing on a village."
				die_sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
				ellipse="misc/ellipse-nozoc"
				experience="24"
				flag_rgb="magenta"
				hitpoints="21"
				id="Walking Corpse"
				image="units/undead/zombie-mounted.png"
				level="0"
				movement="5"
				movement_type="mounted"
#textdomain wesnoth-units
				name=_ "Walking Corpse"
				race="undead"
				usage="fighter"
				variation_name="mounted"
				[defend]
					start_time="-126"
					[frame]
						duration="1"
						image="units/undead/zombie-mounted.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/zombie-mounted-defend.png"
					[/frame]
					[if]
						hits="hit"
						[frame]
							duration="150"
							image="units/undead/zombie-mounted-defend.png"
							sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
						[/frame]
					[/if]
					[else]
						hits="miss,kill"
						[frame]
							duration="150"
							image="units/undead/zombie-mounted-defend.png"
						[/frame]
					[/else]
					[frame]
						duration="1"
						image="units/undead/zombie-mounted.png"
					[/frame]
				[/defend]
				[death]
					start_time="0"
					[frame]
						duration="150"
						image="units/undead/soulless-die-4.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-5.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-6.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-7.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-8.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-9.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-10.png"
					[/frame]
				[/death]
				[attack_anim]
					direction="s"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-mounted-attack-s.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="n"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-mounted-attack-n.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="se,sw,ne,nw"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-mounted-attack.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[trait]
					availability="musthave"
#textdomain wesnoth
					description=_ "Fights normally during unfavorable times of day/night"
					female_name=_ "female^fearless"
					id="fearless"
					male_name=_ "fearless"
				[/trait]
				[resistance]
					arcane="140"
				[/resistance]
				[attack]
					damage="6"
#textdomain wesnoth-units
					description=_ "touch"
					icon="attacks/touch-zombie.png"
					name="touch"
					number="2"
					range="melee"
					type="impact"
					[specials]
						[plague]
#textdomain wesnoth
							description=_ "Plague:
When a unit is killed by a Plague attack, that unit is replaced with a Walking Corpse on the same side as the unit with the Plague attack. This doesn't work on Undead or units in villages."
							id="plague"
							name=_ "plague"
							type="Walking Corpse"
						[/plague]
					[/specials]
				[/attack]
				[movement_costs]
					deep_water="4"
				[/movement_costs]
			[/variation]
			[variation]
				advances_to="Soulless"
				alignment="chaotic"
				cost="8"
#textdomain wesnoth-units
				description=_ "Walking Corpses are the bodies of the dead, re-animated by dark magic. Though not especially dangerous to a trained soldier, the sight of one's former comrades amongst their number is frightening to say the least." + 
					#textdomain wesnoth
_ "

Special Notes:" + 
					_ " Foes who lose their life to the plague will rise again in unlife, unless they are standing on a village."
				die_sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
				ellipse="misc/ellipse-nozoc"
				experience="24"
				flag_rgb="magenta"
				hitpoints="16"
				id="Walking Corpse"
				image="units/undead/zombie-saurian.png"
				level="0"
				movement="4"
				movement_type="lizard"
#textdomain wesnoth-units
				name=_ "Walking Corpse"
				race="undead"
				usage="fighter"
				variation_name="saurian"
				[defend]
					start_time="-126"
					[frame]
						duration="1"
						image="units/undead/zombie-saurian.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/zombie-saurian-defend.png"
					[/frame]
					[if]
						hits="hit"
						[frame]
							duration="150"
							image="units/undead/zombie-saurian-defend.png"
							sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
						[/frame]
					[/if]
					[else]
						hits="miss,kill"
						[frame]
							duration="150"
							image="units/undead/zombie-saurian-defend.png"
						[/frame]
					[/else]
					[frame]
						duration="1"
						image="units/undead/zombie-saurian.png"
					[/frame]
				[/defend]
				[death]
					start_time="0"
					[frame]
						duration="150"
						image="units/undead/zombie-saurian-die-1.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-saurian-die-2.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-saurian-die-3.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-saurian-die-4.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-5.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-6.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-7.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-8.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-9.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-10.png"
					[/frame]
				[/death]
				[attack_anim]
					direction="s"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-saurian-attack-s.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="n"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-saurian-attack-n.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="se,sw,ne,nw"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-saurian-attack.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[trait]
					availability="musthave"
#textdomain wesnoth
					description=_ "Fights normally during unfavorable times of day/night"
					female_name=_ "female^fearless"
					id="fearless"
					male_name=_ "fearless"
				[/trait]
				[resistance]
					arcane="140"
				[/resistance]
				[attack]
					damage="6"
#textdomain wesnoth-units
					description=_ "touch"
					icon="attacks/touch-zombie.png"
					name="touch"
					number="2"
					range="melee"
					type="impact"
					[specials]
						[plague]
#textdomain wesnoth
							description=_ "Plague:
When a unit is killed by a Plague attack, that unit is replaced with a Walking Corpse on the same side as the unit with the Plague attack. This doesn't work on Undead or units in villages."
							id="plague"
							name=_ "plague"
							type="Walking Corpse"
						[/plague]
					[/specials]
				[/attack]
				[movement_costs]
					deep_water="4"
				[/movement_costs]
			[/variation]
			[variation]
				advances_to="Soulless"
				alignment="chaotic"
				cost="8"
#textdomain wesnoth-units
				description=_ "Walking Corpses are the bodies of the dead, re-animated by dark magic. Though not especially dangerous to a trained soldier, the sight of one's former comrades amongst their number is frightening to say the least." + 
					#textdomain wesnoth
_ "

Special Notes:" + 
					_ " Foes who lose their life to the plague will rise again in unlife, unless they are standing on a village."
				die_sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
				ellipse="misc/ellipse-nozoc"
				experience="24"
				flag_rgb="magenta"
				hitpoints="18"
				id="Walking Corpse"
				image="units/undead/zombie-swimmer.png"
				level="0"
				movement="4"
				movement_type="swimmer"
#textdomain wesnoth-units
				name=_ "Walking Corpse"
				race="undead"
				usage="fighter"
				variation_name="swimmer"
				[defend]
					start_time="-126"
					[frame]
						duration="1"
						image="units/undead/zombie-swimmer.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/zombie-swimmer-defend.png"
					[/frame]
					[if]
						hits="hit"
						[frame]
							duration="150"
							image="units/undead/zombie-swimmer-defend.png"
							sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
						[/frame]
					[/if]
					[else]
						hits="miss,kill"
						[frame]
							duration="150"
							image="units/undead/zombie-swimmer-defend.png"
						[/frame]
					[/else]
					[frame]
						duration="1"
						image="units/undead/zombie-swimmer.png"
					[/frame]
				[/defend]
				[death]
					start_time="0"
					[frame]
						duration="150"
						image="units/undead/zombie-swimmer-die-1.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-swimmer-die-2.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-swimmer-die-3.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-swimmer-die-4.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-5.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-6.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-7.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-8.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-9.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-10.png"
					[/frame]
				[/death]
				[attack_anim]
					direction="s"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-swimmer-attack-s.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="n"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-swimmer-attack-n.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="se,sw,ne,nw"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-swimmer-attack.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[trait]
					availability="musthave"
#textdomain wesnoth
					description=_ "Fights normally during unfavorable times of day/night"
					female_name=_ "female^fearless"
					id="fearless"
					male_name=_ "fearless"
				[/trait]
				[resistance]
					arcane="140"
				[/resistance]
				[attack]
					damage="6"
#textdomain wesnoth-units
					description=_ "touch"
					icon="attacks/touch-zombie.png"
					name="touch"
					number="2"
					range="melee"
					type="impact"
					[specials]
						[plague]
#textdomain wesnoth
							description=_ "Plague:
When a unit is killed by a Plague attack, that unit is replaced with a Walking Corpse on the same side as the unit with the Plague attack. This doesn't work on Undead or units in villages."
							id="plague"
							name=_ "plague"
							type="Walking Corpse"
						[/plague]
					[/specials]
				[/attack]
				[movement_costs]
					forest="4"
					hills="4"
				[/movement_costs]
			[/variation]
			[variation]
				advances_to="Soulless"
				alignment="chaotic"
				cost="8"
#textdomain wesnoth-units
				description=_ "Walking Corpses are the bodies of the dead, re-animated by dark magic. Though not especially dangerous to a trained soldier, the sight of one's former comrades amongst their number is frightening to say the least." + 
					#textdomain wesnoth
_ "

Special Notes:" + 
					_ " Foes who lose their life to the plague will rise again in unlife, unless they are standing on a village."
				die_sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
				ellipse="misc/ellipse-nozoc"
				experience="24"
				flag_rgb="magenta"
				hitpoints="21"
				id="Walking Corpse"
				image="units/undead/zombie-troll.png"
				level="0"
				movement="4"
				movement_type="largefoot"
#textdomain wesnoth-units
				name=_ "Walking Corpse"
				race="undead"
				usage="fighter"
				variation_name="troll"
				[defend]
					start_time="-126"
					[frame]
						duration="1"
						image="units/undead/zombie-troll.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/zombie-troll-defend.png"
					[/frame]
					[if]
						hits="hit"
						[frame]
							duration="150"
							image="units/undead/zombie-troll-defend.png"
							sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
						[/frame]
					[/if]
					[else]
						hits="miss,kill"
						[frame]
							duration="150"
							image="units/undead/zombie-troll-defend.png"
						[/frame]
					[/else]
					[frame]
						duration="1"
						image="units/undead/zombie-troll.png"
					[/frame]
				[/defend]
				[death]
					start_time="0"
					[frame]
						duration="150"
						image="units/undead/zombie-troll-die-1.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-troll-die-2.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-troll-die-3.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-troll-die-4.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-5.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-6.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-7.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-8.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-9.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-10.png"
					[/frame]
				[/death]
				[attack_anim]
					direction="s"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-troll-attack-s.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="n"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-troll-attack-n.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="se,sw,ne,nw"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-troll-attack.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[trait]
					availability="musthave"
#textdomain wesnoth
					description=_ "Fights normally during unfavorable times of day/night"
					female_name=_ "female^fearless"
					id="fearless"
					male_name=_ "fearless"
				[/trait]
				[resistance]
					arcane="140"
				[/resistance]
				[attack]
					damage="6"
#textdomain wesnoth-units
					description=_ "touch"
					icon="attacks/touch-zombie.png"
					name="touch"
					number="2"
					range="melee"
					type="impact"
					[specials]
						[plague]
#textdomain wesnoth
							description=_ "Plague:
When a unit is killed by a Plague attack, that unit is replaced with a Walking Corpse on the same side as the unit with the Plague attack. This doesn't work on Undead or units in villages."
							id="plague"
							name=_ "plague"
							type="Walking Corpse"
						[/plague]
					[/specials]
				[/attack]
				[movement_costs]
					deep_water="4"
				[/movement_costs]
			[/variation]
			[variation]
				advances_to="Soulless"
				alignment="chaotic"
				cost="8"
#textdomain wesnoth-units
				description=_ "Walking Corpses are the bodies of the dead, re-animated by dark magic. Though not especially dangerous to a trained soldier, the sight of one's former comrades amongst their number is frightening to say the least." + 
					#textdomain wesnoth
_ "

Special Notes:" + 
					_ " Foes who lose their life to the plague will rise again in unlife, unless they are standing on a village."
				die_sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
				ellipse="misc/ellipse-nozoc"
				experience="24"
				flag_rgb="magenta"
				hitpoints="26"
				id="Walking Corpse"
				image="units/undead/zombie-wose.png"
				level="0"
				movement="3"
				movement_type="treefolk"
#textdomain wesnoth-units
				name=_ "Walking Corpse"
				race="undead"
				usage="fighter"
				variation_name="wose"
				[defend]
					start_time="-126"
					[frame]
						duration="1"
						image="units/undead/zombie-wose.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/zombie-wose-defend.png"
					[/frame]
					[if]
						hits="hit"
						[frame]
							duration="150"
							image="units/undead/zombie-wose-defend.png"
							sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
						[/frame]
					[/if]
					[else]
						hits="miss,kill"
						[frame]
							duration="150"
							image="units/undead/zombie-wose-defend.png"
						[/frame]
					[/else]
					[frame]
						duration="1"
						image="units/undead/zombie-wose.png"
					[/frame]
				[/defend]
				[death]
					start_time="0"
					[frame]
						duration="150"
						image="units/undead/zombie-wose-die-1.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-wose-die-2.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-wose-die-3.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-wose-die-4.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-5.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-6.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-7.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-8.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-9.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-10.png"
					[/frame]
				[/death]
				[attack_anim]
					direction="s"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-wose-attack-s.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="n"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-wose-attack-n.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="se,sw,ne,nw"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						begin="-200"
						end="200"
						image="units/undead/zombie-wose-attack.png"
						sound="zombie-attack.wav"
					[/frame]
				[/attack_anim]
				[trait]
					availability="musthave"
#textdomain wesnoth
					description=_ "Fights normally during unfavorable times of day/night"
					female_name=_ "female^fearless"
					id="fearless"
					male_name=_ "fearless"
				[/trait]
				[resistance]
					arcane="140"
				[/resistance]
				[attack]
					damage="6"
#textdomain wesnoth-units
					description=_ "touch"
					icon="attacks/touch-zombie.png"
					name="touch"
					number="2"
					range="melee"
					type="impact"
					[specials]
						[plague]
#textdomain wesnoth
							description=_ "Plague:
When a unit is killed by a Plague attack, that unit is replaced with a Walking Corpse on the same side as the unit with the Plague attack. This doesn't work on Undead or units in villages."
							id="plague"
							name=_ "plague"
							type="Walking Corpse"
						[/plague]
					[/specials]
				[/attack]
				[movement_costs]
					deep_water="3"
				[/movement_costs]
			[/variation]
			[variation]
				advances_to="Soulless"
				alignment="chaotic"
				cost="8"
#textdomain wesnoth-units
				description=_ "Walking Corpses are the bodies of the dead, re-animated by dark magic. Though not especially dangerous to a trained soldier, the sight of one's former comrades amongst their number is frightening to say the least." + 
					#textdomain wesnoth
_ "

Special Notes:" + 
					_ " Foes who lose their life to the plague will rise again in unlife, unless they are standing on a village."
				die_sound="bat-flapping.wav"
				ellipse="misc/ellipse-nozoc"
				experience="24"
				flag_rgb="magenta"
				hitpoints="15"
				id="Walking Corpse"
				image="units/undead/zombie-bat-se-3.png"
				inherit="no"
				level="0"
				movement="5"
				movement_type="fly"
#textdomain wesnoth-units
				name=_ "Walking Corpse"
				race="undead"
				usage="fighter"
				variation_name="bat"
				[trait]
					availability="musthave"
#textdomain wesnoth
					description=_ "Fights normally during unfavorable times of day/night"
					female_name=_ "female^fearless"
					id="fearless"
					male_name=_ "fearless"
				[/trait]
				[resistance]
					arcane="140"
				[/resistance]
				[attack]
					damage="6"
#textdomain wesnoth-units
					description=_ "touch"
					icon="attacks/touch-zombie.png"
					name="touch"
					number="2"
					range="melee"
					type="impact"
					[specials]
						[plague]
#textdomain wesnoth
							description=_ "Plague:
When a unit is killed by a Plague attack, that unit is replaced with a Walking Corpse on the same side as the unit with the Plague attack. This doesn't work on Undead or units in villages."
							id="plague"
							name=_ "plague"
							type="Walking Corpse"
						[/plague]
					[/specials]
				[/attack]
				[movement_costs]
					cave="1"
					fungus="1"
				[/movement_costs]
				[defense]
					cave="50"
					fungus="50"
				[/defense]
				[resistance]
					cold="70"
				[/resistance]
				[defend]
					direction="s,sw,se"
					start_time="-126"
					[if]
						hits="miss"
						offset="0.0~-0.15,-0.15~0.0"
					[/if]
					[frame]
						duration="1"
						image="units/undead/zombie-bat-se-3.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/zombie-bat-se-4.png"
					[/frame]
					[if]
						hits="hit"
						[frame]
							duration="150"
							image="units/undead/zombie-bat-se-4.png"
							sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
						[/frame]
					[/if]
					[else]
						hits="miss,kill"
						[frame]
							duration="150"
							image="units/undead/zombie-bat-se-4.png"
						[/frame]
					[/else]
					[frame]
						duration="1"
						image="units/undead/zombie-bat-se-3.png"
					[/frame]
				[/defend]
				[defend]
					direction="n,nw,ne"
					start_time="-126"
					[if]
						hits="miss"
						offset="0.0~-0.15,-0.15~0.0"
					[/if]
					[frame]
						duration="1"
						image="units/undead/zombie-bat-ne-3.png"
					[/frame]
					[frame]
						duration="100"
						image="units/undead/zombie-bat-ne-4.png"
					[/frame]
					[if]
						hits="hit"
						[frame]
							duration="150"
							image="units/undead/zombie-bat-ne-4.png"
							sound="zombie-hit-4.ogg,zombie-hit-5.ogg,zombie-hit-6.ogg"
						[/frame]
					[/if]
					[else]
						hits="miss,kill"
						[frame]
							duration="150"
							image="units/undead/zombie-bat-ne-4.png"
						[/frame]
					[/else]
					[frame]
						duration="1"
						image="units/undead/zombie-bat-ne-3.png"
					[/frame]
				[/defend]
				[standing_anim]
					direction="s,se,sw"
					start_time="0"
					[frame]
						duration="50"
						image="units/undead/zombie-bat-se-3.png"
					[/frame]
					[frame]
						duration="60"
						image="units/undead/zombie-bat-se-2.png"
					[/frame]
					[frame]
						duration="80"
						image="units/undead/zombie-bat-se-1.png"
					[/frame]
					[frame]
						duration="60"
						image="units/undead/zombie-bat-se-2.png"
					[/frame]
					[frame]
						duration="50"
						image="units/undead/zombie-bat-se-3.png"
					[/frame]
					[frame]
						duration="60"
						image="units/undead/zombie-bat-se-4.png"
					[/frame]
					[frame]
						duration="80"
						image="units/undead/zombie-bat-se-5.png"
					[/frame]
					[frame]
						duration="60"
						image="units/undead/zombie-bat-se-4.png"
					[/frame]
				[/standing_anim]
				[standing_anim]
					direction="n,ne,nw"
					start_time="0"
					[frame]
						duration="50"
						image="units/undead/zombie-bat-ne-3.png"
					[/frame]
					[frame]
						duration="60"
						image="units/undead/zombie-bat-ne-2.png"
					[/frame]
					[frame]
						duration="80"
						image="units/undead/zombie-bat-ne-1.png"
					[/frame]
					[frame]
						duration="60"
						image="units/undead/zombie-bat-ne-2.png"
					[/frame]
					[frame]
						duration="50"
						image="units/undead/zombie-bat-ne-3.png"
					[/frame]
					[frame]
						duration="60"
						image="units/undead/zombie-bat-ne-4.png"
					[/frame]
					[frame]
						duration="80"
						image="units/undead/zombie-bat-ne-5.png"
					[/frame]
					[frame]
						duration="60"
						image="units/undead/zombie-bat-ne-4.png"
					[/frame]
				[/standing_anim]
				[attack_anim]
					direction="s,se,sw"
					offset="0.0~0.9:200,0.9~0.0:160"
					start_time="-200"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						duration="30"
						image="units/undead/zombie-bat-se-3.png"
					[/frame]
					[frame]
						duration="30"
						image="units/undead/zombie-bat-se-2.png"
					[/frame]
					[frame]
						duration="30"
						image="units/undead/zombie-bat-se-1.png"
						sound="bat-flapping.wav"
					[/frame]
					[frame]
						duration="30"
						image="units/undead/zombie-bat-se-2.png"
					[/frame]
					[frame]
						duration="30"
						image="units/undead/zombie-bat-se-3.png"
					[/frame]
					[frame]
						duration="70"
						image="units/undead/zombie-bat-se-4.png"
						sound="zombie-attack.wav"
					[/frame]
					[frame]
						duration="50"
						image="units/undead/zombie-bat-se-3.png"
					[/frame]
					[frame]
						duration="50"
						image="units/undead/zombie-bat-se-2.png"
					[/frame]
					[frame]
						duration="40"
						image="units/undead/zombie-bat-se-3.png"
					[/frame]
				[/attack_anim]
				[attack_anim]
					direction="n,ne,nw"
					offset="0.0~0.9:200,0.9~0.0:160"
					start_time="-200"
					[filter_attack]
						name="touch"
					[/filter_attack]
					[frame]
						duration="30"
						image="units/undead/zombie-bat-ne-3.png"
					[/frame]
					[frame]
						duration="30"
						image="units/undead/zombie-bat-ne-2.png"
					[/frame]
					[frame]
						duration="30"
						image="units/undead/zombie-bat-ne-1.png"
						sound="bat-flapping.wav"
					[/frame]
					[frame]
						duration="30"
						image="units/undead/zombie-bat-ne-2.png"
					[/frame]
					[frame]
						duration="30"
						image="units/undead/zombie-bat-ne-3.png"
					[/frame]
					[frame]
						duration="70"
						image="units/undead/zombie-bat-ne-4.png"
						sound="zombie-attack.wav"
					[/frame]
					[frame]
						duration="50"
						image="units/undead/zombie-bat-ne-3.png"
					[/frame]
					[frame]
						duration="50"
						image="units/undead/zombie-bat-ne-2.png"
					[/frame]
					[frame]
						duration="40"
						image="units/undead/zombie-bat-ne-3.png"
					[/frame]
				[/attack_anim]
				[death]
					start_time="0"
					[frame]
						duration="150"
						image="units/undead/zombie-bat-die-1.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-bat-die-2.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-bat-die-3.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/zombie-bat-die-4.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-5.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-6.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-7.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-8.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-9.png"
					[/frame]
					[frame]
						duration="150"
						image="units/undead/soulless-die-10.png"
					[/frame]
				[/death]
			[/variation]
			[defense]
				castle="40"
				cave="60"
				deep_water="80"
				flat="60"
				forest="50"
				frozen="80"
				fungus="50"
				hills="50"
				impassable="60"
				mountains="40"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="80"
				unwalkable="80"
				village="40"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="4"
				flat="1"
				forest="2"
				frozen="3"
				fungus="2"
				hills="2"
				impassable="99"
				mountains="3"
				reef="2"
				sand="2"
				shallow_water="3"
				swamp_water="3"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="140"
				blade="100"
				cold="100"
				fire="100"
				impact="100"
				pierce="100"
			[/resistance]
			[variables]
			[/variables]
			[status]
				hidden="yes"
				not_living="yes"
			[/status]
			[attack]
				damage="6"
#textdomain wesnoth-units
				description=_ "touch"
				icon="attacks/touch-zombie.png"
				name="touch"
				number="2"
				range="melee"
				type="impact"
				[specials]
					[plague]
#textdomain wesnoth
						description=_ "Plague:
When a unit is killed by a Plague attack, that unit is replaced with a Walking Corpse on the same side as the unit with the Plague attack. This doesn't work on Undead or units in villages."
						id="plague"
						name=_ "plague"
						type="Walking Corpse"
					[/plague]
				[/specials]
			[/attack]
			[modifications]
				[trait]
					availability="musthave"
					description=_ "Immune to drain, poison and plague"
					female_name=_ "female^undead"
					id="undead"
					male_name=_ "undead"
					name=_ "undead"
					[effect]
						add="not_living"
						apply_to="status"
					[/effect]
				[/trait]
				[trait]
					availability="musthave"
					description=_ "Fights normally during unfavorable times of day/night"
					female_name=_ "female^fearless"
					id="fearless"
					male_name=_ "fearless"
					name=_ "fearless"
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Necrophage"
			alignment="chaotic"
			alpha="256"
			attacks_left="0"
			cost="16"
			die_sound="ghoul-hit.wav"
			ellipse="misc/ellipse"
			experience="1"
			facing="s"
			flag_rgb="magenta"
			flying="no"
			gender="male"
			goto_x="-999"
			goto_y="-999"
			hitpoints="15"
			id="Ghoul-76"
			image="units/undead/ghoul.png"
#textdomain wesnoth-units
			language_name=_ "Ghoul"
			level="1"
			max_attacks="1"
			max_experience="25"
			max_hitpoints="33"
			max_moves="5"
			movement="5"
			movement_type="gruefoot"
			moves="0"
			profile="portraits/undead/ghoul.png"
			race="undead"
			random_gender="no"
			random_traits="no"
			resting="yes"
			side="1"
			type="Ghoul"
			underlying_id="76"
			unrenamable="no"
			upkeep="full"
			usage="fighter"
			x="26"
			y="5"
			zoc="yes"
			[attack_anim]
				[filter_attack]
					name="claws"
				[/filter_attack]
				[frame]
					begin="-250"
					end="-200"
					image="units/undead/ghoul.png"
				[/frame]
				[frame]
					begin="-200"
					end="-125"
					image="units/undead/ghoul-attack-1.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-125"
						end="-50"
						image="units/undead/ghoul-attack-2.png"
						sound="claws.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-125"
						end="-50"
						image="units/undead/ghoul-attack-2.png"
						sound="miss-1.ogg,miss-2.ogg,miss-3.ogg"
					[/frame]
				[/else]
				[if]
					hits="hit"
					poisoned_sound_start_time="-100"
					[filter_second]
						[not]
							[filter_wml]
								[status]
									poisoned="yes"
								[/status]
							[/filter_wml]
						[/not]
					[/filter_second]
					[poisoned_sound_frame]
						duration="100"
						sound="poison.ogg"
					[/poisoned_sound_frame]
				[/if]
				[frame]
					begin="-50"
					end="50"
					image="units/undead/ghoul-attack-3.png"
				[/frame]
				[frame]
					begin="50"
					end="125"
					image="units/undead/ghoul-attack-4.png"
				[/frame]
				[frame]
					begin="125"
					end="200"
					image="units/undead/ghoul.png"
				[/frame]
			[/attack_anim]
			[defend]
				start_time="-126"
				[frame]
					duration="1"
					image="units/undead/ghoul-defend-1.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead/ghoul-defend-2.png"
				[/frame]
				[if]
					hits="hit"
					[frame]
						duration="150"
						image="units/undead/ghoul-defend-2.png"
						sound="ghoul-hit.wav"
					[/frame]
				[/if]
				[else]
					hits="miss,kill"
					[frame]
						duration="150"
						image="units/undead/ghoul-defend-2.png"
					[/frame]
				[/else]
				[frame]
					duration="1"
					image="units/undead/ghoul-defend-1.png"
				[/frame]
			[/defend]
			[trait]
				availability="musthave"
#textdomain wesnoth
				description=_ "Fights normally during unfavorable times of day/night"
				female_name=_ "female^fearless"
				id="fearless"
				male_name=_ "fearless"
			[/trait]
			[defense]
				castle="40"
				cave="60"
				deep_water="90"
				flat="60"
				forest="50"
				frozen="70"
				fungus="40"
				hills="50"
				impassable="60"
				mountains="40"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="70"
				unwalkable="80"
				village="40"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="99"
				flat="1"
				forest="2"
				frozen="2"
				fungus="2"
				hills="2"
				impassable="99"
				mountains="3"
				reef="2"
				sand="2"
				shallow_water="3"
				swamp_water="2"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="80"
				blade="90"
				cold="60"
				fire="90"
				impact="100"
				pierce="70"
			[/resistance]
			[variables]
			[/variables]
			[status]
				not_living="yes"
			[/status]
			[attack]
				damage="4"
#textdomain wesnoth-units
				description=_ "claws"
				icon="attacks/claws-undead.png"
				name="claws"
				number="3"
				range="melee"
				type="blade"
				[specials]
					[poison]
#textdomain wesnoth
						description=_ "Poison:
This attack poisons living targets. Poisoned units lose 8 HP every turn until they are cured or are reduced to 1 HP. Poison can not, of itself, kill a unit."
						id="poison"
						name=_ "poison"
					[/poison]
				[/specials]
			[/attack]
			[modifications]
				[trait]
					availability="musthave"
					description=_ "Immune to drain, poison and plague"
					female_name=_ "female^undead"
					id="undead"
					male_name=_ "undead"
					name=_ "undead"
					[effect]
						add="not_living"
						apply_to="status"
					[/effect]
				[/trait]
				[trait]
					availability="musthave"
					description=_ "Fights normally during unfavorable times of day/night"
					female_name=_ "female^fearless"
					id="fearless"
					male_name=_ "fearless"
					name=_ "fearless"
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Dark Sorcerer"
			alignment="chaotic"
			alpha="256"
			attacks_left="0"
			cost="16"
			die_sound="human-female-die-1.ogg,human-female-die-2.ogg,human-female-die-3.ogg"
			ellipse="misc/ellipse"
			experience="8"
			facing="s"
			flag_rgb="magenta"
			flying="no"
			gender="female"
			goto_x="-999"
			goto_y="-999"
			hitpoints="27"
			id="Dark Adept-77"
			ignore_race_traits="yes"
			image="units/undead-necromancers/adept+female.png"
#textdomain wesnoth-units
			language_name=_ "female^Dark Adept"
			level="1"
			max_attacks="1"
			max_experience="27"
			max_hitpoints="27"
			max_moves="6"
			movement="5"
			movement_type="smallfoot"
			moves="0"
			name="Clen"
			profile="portraits/humans/dark-adept+female.png"
			race="human"
			random_gender="no"
			random_traits="no"
			resting="yes"
			side="1"
			type="Dark Adept"
			underlying_id="77"
			unrenamable="no"
			upkeep="full"
			usage="archer"
			x="24"
			y="6"
			zoc="yes"
			[attack_anim]
				[filter_attack]
					range="ranged"
				[/filter_attack]
				[missile_frame]
					begin="-50"
					end="150"
					image="projectiles/darkmissile-n.png"
					image_diagonal="projectiles/darkmissile-ne.png"
				[/missile_frame]
				[frame]
					begin="-450"
					end="-420"
					image="units/undead-necromancers/adept+female.png"
				[/frame]
				[frame]
					begin="-420"
					end="-395"
					image="units/undead-necromancers/adept+female-magic-1.png"
				[/frame]
				[frame]
					begin="-395"
					end="-320"
					image="units/undead-necromancers/adept+female-magic-2.png"
				[/frame]
				[frame]
					begin="-320"
					end="-300"
					image="units/undead-necromancers/adept+female-magic-3.png"
				[/frame]
				[frame]
					begin="-300"
					end="-250"
					halo="halo/undead/dark-magic-1.png"
					halo_x="0"
					halo_y="-12"
					image="units/undead-necromancers/adept+female-magic-3.png"
				[/frame]
				[frame]
					begin="-250"
					end="-200"
					halo="halo/undead/dark-magic-2.png"
					halo_x="0"
					halo_y="-12"
					image="units/undead-necromancers/adept+female-magic-3.png"
				[/frame]
				[frame]
					begin="-200"
					end="-150"
					halo="halo/undead/dark-magic-3.png"
					halo_x="0"
					halo_y="-12"
					image="units/undead-necromancers/adept+female-magic-3.png"
				[/frame]
				[frame]
					begin="-150"
					end="-100"
					halo="halo/undead/dark-magic-4.png"
					halo_x="0"
					halo_y="-12"
					image="units/undead-necromancers/adept+female-magic-3.png"
				[/frame]
				[frame]
					begin="-100"
					end="-50"
					halo="halo/undead/dark-magic-5.png"
					halo_x="0"
					halo_y="-12"
					image="units/undead-necromancers/adept+female-magic-3.png"
				[/frame]
				[if]
					hits="no"
					[frame]
						begin="-50"
						end="0"
						halo="halo/undead/dark-magic-6.png"
						halo_x="0"
						halo_y="-12"
						image="units/undead-necromancers/adept+female-magic-3.png"
						sound="magic-dark-miss.ogg"
					[/frame]
				[/if]
				[else]
					hits="yes"
					[frame]
						begin="-50"
						end="0"
						halo="halo/undead/dark-magic-6.png"
						halo_x="0"
						halo_y="-12"
						image="units/undead-necromancers/adept+female-magic-3.png"
						sound="magic-dark.ogg"
					[/frame]
				[/else]
				[frame]
					begin="0"
					end="50"
					image="units/undead-necromancers/adept+female-magic-2.png"
				[/frame]
				[frame]
					begin="50"
					end="90"
					image="units/undead-necromancers/adept+female-magic-1.png"
				[/frame]
				[frame]
					begin="90"
					end="100"
					image="units/undead-necromancers/adept+female.png"
				[/frame]
			[/attack_anim]
			[death]
				[frame]
					begin="0"
					end="100"
					image="units/undead-necromancers/adept-die1.png"
				[/frame]
				[frame]
					begin="100"
					end="200"
					image="units/undead-necromancers/adept-die2.png"
				[/frame]
				[frame]
					begin="200"
					end="300"
					image="units/undead-necromancers/adept-die3.png"
				[/frame]
				[frame]
					begin="300"
					end="400"
					image="units/undead-necromancers/adept-die4.png"
				[/frame]
				[frame]
					begin="400"
					end="520"
					image="units/undead-necromancers/adept-die5.png"
				[/frame]
				[frame]
					begin="520"
					end="640"
					image="units/undead-necromancers/adept-die6.png"
				[/frame]
				[frame]
					begin="640"
					end="780"
					image="units/undead-necromancers/adept-die7.png"
				[/frame]
				[frame]
					begin="780"
					end="900"
					image="units/undead-necromancers/adept-die8.png"
				[/frame]
			[/death]
			[defend]
				start_time="-126"
				[frame]
					duration="1"
					image="units/undead-necromancers/adept+female-defend-1.png"
				[/frame]
				[frame]
					duration="100"
					image="units/undead-necromancers/adept+female-defend-2.png"
				[/frame]
				[if]
					hits="hit"
					[frame]
						duration="150"
						image="units/undead-necromancers/adept+female-defend-2.png"
						sound="human-female-hit-1.ogg,human-female-hit-2.ogg,human-female-hit-3.ogg"
					[/frame]
				[/if]
				[else]
					hits="miss,kill"
					[frame]
						duration="150"
						image="units/undead-necromancers/adept+female-defend-2.png"
					[/frame]
				[/else]
				[frame]
					duration="1"
					image="units/undead-necromancers/adept+female-defend-1.png"
				[/frame]
			[/defend]
			[portrait]
				image="portraits/humans/transparent/dark-adept+female.png"
				mirror="true"
				side="left"
				size="400"
			[/portrait]
			[portrait]
				image="portraits/humans/transparent/dark-adept+female.png"
				mirror="false"
				side="right"
				size="400"
			[/portrait]
			[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]
			[trait]
				female_name=_ "female^intelligent"
				id="intelligent"
				male_name=_ "intelligent"
				[effect]
					apply_to="max_experience"
					increase="-20%"
				[/effect]
			[/trait]
			[trait]
				female_name=_ "female^resilient"
				id="resilient"
				male_name=_ "resilient"
				[effect]
					apply_to="hitpoints"
					increase_total="4"
				[/effect]
				[effect]
					apply_to="hitpoints"
					increase_total="1"
					times="per level"
				[/effect]
			[/trait]
			[defense]
				castle="40"
				cave="60"
				deep_water="80"
				flat="60"
				forest="50"
				frozen="80"
				fungus="50"
				hills="50"
				impassable="60"
				mountains="40"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="80"
				unwalkable="80"
				village="40"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="99"
				flat="1"
				forest="2"
				frozen="3"
				fungus="2"
				hills="2"
				impassable="99"
				mountains="3"
				reef="2"
				sand="2"
				shallow_water="3"
				swamp_water="3"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="80"
				blade="100"
				cold="100"
				fire="100"
				impact="100"
				pierce="100"
			[/resistance]
			[variables]
			[/variables]
			[status]
			[/status]
			[attack]
				damage="10"
#textdomain wesnoth-units
				description=_ "chill wave"
				icon="attacks/iceball.png"
				name="chill wave"
				number="2"
				range="ranged"
				type="cold"
				[specials]
					[chance_to_hit]
						cumulative="no"
#textdomain wesnoth
						description=_ "Magical:
This attack always has a 70% chance to hit regardless of the defensive ability of the unit being attacked."
						id="magical"
						name=_ "magical"
						value="70"
					[/chance_to_hit]
				[/specials]
			[/attack]
			[attack]
				damage="7"
#textdomain wesnoth-units
				description=_ "shadow wave"
				icon="attacks/dark-missile.png"
				name="shadow wave"
				number="2"
				range="ranged"
				type="arcane"
				[specials]
					[chance_to_hit]
						cumulative="no"
#textdomain wesnoth
						description=_ "Magical:
This attack always has a 70% chance to hit regardless of the defensive ability of the unit being attacked."
						id="magical"
						name=_ "magical"
						value="70"
					[/chance_to_hit]
				[/specials]
			[/attack]
			[modifications]
				[trait]
					female_name=_ "female^quick"
					id="quick"
					male_name=_ "quick"
					name=_ "female^quick"
					[effect]
						apply_to="movement"
						increase="1"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="-5%"
					[/effect]
				[/trait]
				[trait]
					female_name=_ "female^intelligent"
					id="intelligent"
					male_name=_ "intelligent"
					name=_ "female^intelligent"
					[effect]
						apply_to="max_experience"
						increase="-20%"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
	[/side]
	[side]
		action_bonus_count="0"
		aggression="0.5"
		allow_player="yes"
		caution="0.25"
		colour="2"
		controller="human"
		countdown_time="330000"
		current_player="Hagbart"
		disallow_observers="no"
		fog="yes"
		global_recruitment_pattern="fighter,fighter,fighter,archer,mixed fighter,scout"
		gold="0"
		hidden="no"
		id="Hagbart2"
		income="0"
		leader_value="3"
		name="Hagbart"
		no_leader="yes"
		number_of_possible_recruits_to_force_recruit="3.1"
		objectives="Victory:
@Defeat enemy leader(s)"
		objectives_changed="no"
		recruit="Bowman,Cavalryman,Fencer,Heavy Infantryman,Horseman,Mage,Merman Fighter,Spearman"
		recruitment_pattern="fighter,fighter,fighter,archer,mixed fighter,scout"
		save_id="Hagbart2"
		share_maps="no"
		share_view="yes"
		shroud="no"
		side="2"
		start_gold="100"
		team_name="south"
#textdomain wesnoth-multiplayer
		user_team_name=_ "teamname^South"
		village_gold="2"
		village_value="1"
		villages_per_scout="8"
		[ai]
			recruitment_pattern="fighter,fighter,fighter,archer,mixed fighter,scout"
			villages_per_scout="8"
			[team_formula]
				rulebase="fai 'recruitment.fai'
		# ===== Some general functions used later ==== #

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

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

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

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

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

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

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

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

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

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

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

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

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

#returns average defense of the unit #

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

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

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

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


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


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

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

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

# ==2== based on village possession #

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

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

# multipled by 1000 to increase precision #

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

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

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

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

#==1==  basic evaluation #

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

faiend
"
			[/team_formula]
		[/ai]
		[ai]
			villages_per_scout="8"
		[/ai]
		[village]
			x="8"
			y="5"
		[/village]
		[village]
			x="10"
			y="19"
		[/village]
		[village]
			x="11"
			y="9"
		[/village]
		[village]
			x="12"
			y="5"
		[/village]
		[village]
			x="14"
			y="17"
		[/village]
		[village]
			x="16"
			y="22"
		[/village]
		[village]
			x="20"
			y="15"
		[/village]
		[village]
			x="26"
			y="19"
		[/village]
		[village]
			x="26"
			y="22"
		[/village]
		[village]
			x="27"
			y="16"
		[/village]
		[village]
			x="28"
			y="5"
		[/village]
		[village]
			x="30"
			y="19"
		[/village]
		[unit]
			alignment="lawful"
			allow_changes="yes"
			allow_player="yes"
			alpha="256"
			attacks_left="1"
			canrecruit="yes"
			colour="2"
			controller="human"
			cost="25"
			current_player="Hagbart"
			die_sound="human-die-1.ogg,human-die-2.ogg,human-die-3.ogg"
			experience="0"
			facing="sw"
			flag_rgb="magenta"
			flying="no"
			fog="yes"
			gender="male"
			gold="100"
			goto_x="-999"
			goto_y="-999"
			hitpoints="48"
			id="Hagbart2"
			image="units/human-loyalists/javelineer.png"
			income="0"
#textdomain wesnoth-units
			language_name=_ "Javelineer"
			leader="Lieutenant,Swordsman,Pikeman,Javelineer,Shock Trooper,Longbowman,White Mage,Red Mage"
			level="2"
			max_attacks="1"
			max_experience="105"
			max_hitpoints="48"
			max_moves="5"
			movement="5"
			movement_type="smallfoot"
			moves="0"
			mp_countdown="yes"
			mp_countdown_action_bonus="13"
			mp_countdown_init_time="270"
			mp_countdown_reservoir_time="330"
			mp_countdown_turn_bonus="285"
			name="Hagbart"
			profile="portraits/humans/javelineer.png"
			race="human"
			random_leader="Lieutenant,Swordsman,Pikeman,Javelineer,Longbowman,Red Mage"
			random_traits="no"
			recruit="Cavalryman,Horseman,Spearman,Fencer,Heavy Infantryman,Bowman,Mage,Merman Fighter"
			resting="no"
			save_id="Hagbart2"
			share_maps="no"
			share_view="yes"
			shroud="no"
			side="2"
			team_name="south"
			terrain_liked="Gg, Ww, Wo"
			type="Javelineer"
			underlying_id="42"
			unrenamable="no"
			upkeep="full"
			usage="fighter"
			user_team_name="wesnoth-multiplayerteamname^South"
			village_gold="2"
			x="20"
			y="20"
			zoc="yes"
			[defense]
				castle="40"
				cave="60"
				deep_water="80"
				flat="60"
				forest="50"
				frozen="80"
				fungus="50"
				hills="50"
				impassable="60"
				mountains="40"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="80"
				unwalkable="80"
				village="40"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="99"
				flat="1"
				forest="2"
				frozen="3"
				fungus="2"
				hills="2"
				impassable="99"
				mountains="3"
				reef="2"
				sand="2"
				shallow_water="3"
				swamp_water="3"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="80"
				blade="100"
				cold="100"
				fire="100"
				impact="100"
				pierce="60"
			[/resistance]
			[advancement]
#textdomain wesnoth
				description=_ "Max HP bonus +3, Max XP +20%"
				id="amla_default"
				image="misc/icon-amla-tough.png"
				max_times="100"
				strict_amla="yes"
				[effect]
					apply_to="hitpoints"
					heal_full="yes"
					increase_total="3"
				[/effect]
				[effect]
					apply_to="max_experience"
					increase="20%"
				[/effect]
				[effect]
					apply_to="status"
					remove="poisoned"
				[/effect]
				[effect]
					apply_to="status"
					remove="slowed"
				[/effect]
			[/advancement]
			[portrait]
				image="portraits/humans/transparent/javelineer.png"
				mirror="false"
				side="left"
				size="400"
			[/portrait]
			[portrait]
				image="portraits/humans/transparent/javelineer.png"
				mirror="true"
				side="right"
				size="400"
			[/portrait]
			[variables]
			[/variables]
			[status]
				hidden="yes"
			[/status]
			[attack]
				damage="8"
#textdomain wesnoth-units
				description=_ "spear"
				name="spear"
				number="3"
				range="melee"
				type="pierce"
				[specials]
					[firststrike]
#textdomain wesnoth
						description=_ "First Strike:
This unit always strikes first with this attack, even if they are defending."
						id="firststrike"
						name=_ "firststrike"
					[/firststrike]
				[/specials]
			[/attack]
			[attack]
				damage="11"
#textdomain wesnoth-units
				description=_ "javelin"
				icon="attacks/javelin-human.png"
				name="javelin"
				number="2"
				range="ranged"
				type="pierce"
			[/attack]
			[modifications]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Swordsman,Pikeman,Javelineer"
			alignment="lawful"
			alpha="256"
			attacks_left="1"
			cost="14"
			die_sound="human-die-1.ogg,human-die-2.ogg,human-die-3.ogg"
			ellipse="misc/ellipse"
			experience="12"
			facing="ne"
			flag_rgb="magenta"
			flying="no"
			gender="male"
			goto_x="-999"
			goto_y="-999"
			hitpoints="35"
			id="Spearman-49"
			image="units/human-loyalists/spearman.png"
			language_name=_ "Spearman"
			level="1"
			max_attacks="1"
			max_experience="29"
			max_hitpoints="35"
			max_moves="6"
			movement="5"
			movement_type="smallfoot"
			moves="0"
			name="Aethodruryn"
			profile="portraits/humans/spearman.png"
			race="human"
			random_gender="no"
			random_traits="no"
			resting="no"
			side="2"
			type="Spearman"
			underlying_id="49"
			unrenamable="no"
			upkeep="full"
			usage="fighter"
			x="13"
			y="5"
			zoc="yes"
			[attack_anim]
				[filter_attack]
					name="javelin"
				[/filter_attack]
				[missile_frame]
					begin="-150"
					end="0"
					image="projectiles/spear-n.png"
					image_diagonal="projectiles/spear-ne.png"
				[/missile_frame]
				[frame]
					begin="-250"
					end="-150"
					image="units/human-loyalists/spearman-death1.png"
					sound="throw-1.wav,throw-2.wav,throw-3.wav,throw-4.wav"
				[/frame]
				[frame]
					begin="-150"
					end="-100"
					image="units/human-loyalists/spearman-attack-ranged.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="-50"
						image="units/human-loyalists/spearman-attack-ranged.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="-50"
						image="units/human-loyalists/spearman-attack-ranged.png"
					[/frame]
				[/else]
				[frame]
					begin="-50"
					end="50"
					image="units/human-loyalists/spearman-attack-ranged2.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="s"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-150"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[frame]
					begin="-150"
					end="-50"
					image="units/human-loyalists/spearman-attack-s-1.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-50"
						end="100"
						image="units/human-loyalists/spearman-attack-s-2.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-50"
						end="100"
						image="units/human-loyalists/spearman-attack-s-2.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman-attack-s-1.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="n"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-n.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-n.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="ne,nw"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-ne.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-ne.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="se,sw"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman.png"
				[/frame]
			[/attack_anim]
			[death]
				[frame]
					begin="0"
					end="125"
					image="units/human-loyalists/spearman-death1.png"
				[/frame]
				[frame]
					begin="125"
					end="250"
					image="units/human-loyalists/spearman-death2.png"
				[/frame]
				[frame]
					begin="250"
					end="375"
					image="units/human-loyalists/spearman-death3.png"
				[/frame]
				[frame]
					begin="375"
					end="500"
					image="units/human-loyalists/spearman-death4.png"
				[/frame]
			[/death]
			[defend]
				[frame]
					begin="-100"
					end="-90"
					image="units/human-loyalists/spearman-defend-2.png"
				[/frame]
				[frame]
					begin="-90"
					end="90"
					image="units/human-loyalists/spearman-defend.png"
				[/frame]
				[frame]
					begin="90"
					end="100"
					image="units/human-loyalists/spearman-defend-2.png"
				[/frame]
			[/defend]
			[portrait]
				image="portraits/humans/transparent/spearman.png"
				mirror="false"
				side="left"
				size="400"
			[/portrait]
			[portrait]
				image="portraits/humans/transparent/spearman.png"
				mirror="true"
				side="right"
				size="400"
			[/portrait]
			[defense]
				castle="40"
				cave="60"
				deep_water="80"
				flat="60"
				forest="50"
				frozen="80"
				fungus="50"
				hills="50"
				impassable="60"
				mountains="40"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="80"
				unwalkable="80"
				village="40"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="99"
				flat="1"
				forest="2"
				frozen="3"
				fungus="2"
				hills="2"
				impassable="99"
				mountains="3"
				reef="2"
				sand="2"
				shallow_water="3"
				swamp_water="3"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="80"
				blade="100"
				cold="100"
				fire="100"
				impact="100"
				pierce="100"
			[/resistance]
			[variables]
			[/variables]
			[status]
				hidden="yes"
			[/status]
			[attack]
				damage="8"
				description=_ "spear"
				icon="attacks/spear.png"
				name="spear"
				number="3"
				range="melee"
				type="pierce"
				[specials]
					[firststrike]
#textdomain wesnoth
						description=_ "First Strike:
This unit always strikes first with this attack, even if they are defending."
						id="firststrike"
						name=_ "firststrike"
					[/firststrike]
				[/specials]
			[/attack]
			[attack]
				damage="6"
#textdomain wesnoth-units
				description=_ "javelin"
				icon="attacks/javelin-human.png"
				name="javelin"
				number="1"
				range="ranged"
				type="pierce"
			[/attack]
			[modifications]
				[trait]
#textdomain wesnoth
					female_name=_ "female^strong"
					id="strong"
					male_name=_ "strong"
					name=_ "strong"
					[effect]
						apply_to="attack"
						increase_damage="1"
						range="melee"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="1"
					[/effect]
				[/trait]
				[trait]
					female_name=_ "female^quick"
					id="quick"
					male_name=_ "quick"
					name=_ "quick"
					[effect]
						apply_to="movement"
						increase="1"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="-5%"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Dragoon"
			alignment="lawful"
			alpha="256"
			attacks_left="1"
			cost="17"
			die_sound="horse-die.ogg"
			ellipse="misc/ellipse"
			experience="3"
			facing="nw"
			flag_rgb="magenta"
			flying="no"
			gender="male"
			goto_x="-999"
			goto_y="-999"
			hitpoints="40"
			id="Cavalryman-50"
			image="units/human-loyalists/cavalryman.png"
#textdomain wesnoth-units
			language_name=_ "Cavalryman"
			level="1"
			max_attacks="1"
			max_experience="28"
			max_hitpoints="44"
			max_moves="8"
			movement="8"
			movement_type="mounted"
			moves="0"
			name="Rheorcyn"
			profile="portraits/humans/cavalryman.png"
			race="human"
			random_gender="no"
			random_traits="no"
			resting="no"
			side="2"
			type="Cavalryman"
			undead_variation="mounted"
			underlying_id="50"
			unrenamable="no"
			upkeep="full"
			usage="scout"
			x="8"
			y="5"
			zoc="yes"
			[attack_anim]
				[filter_attack]
					name="sword"
				[/filter_attack]
				[frame]
					begin="-225"
					end="-200"
					image="units/human-loyalists/cavalryman.png"
				[/frame]
				[frame]
					begin="-200"
					end="-150"
					image="units/human-loyalists/cavalryman-moving.png"
					sound="horse-canter.wav"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-150"
						end="150"
						image="units/human-loyalists/cavalryman-attack.png"
						sound="sword-1.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-150"
						end="150"
						image="units/human-loyalists/cavalryman-attack.png"
						sound="miss-1.ogg,miss-2.ogg,miss-3.ogg"
					[/frame]
				[/else]
				[frame]
					begin="150"
					end="200"
					image="units/human-loyalists/cavalryman-moving.png"
				[/frame]
				[frame]
					begin="200"
					end="225"
					image="units/human-loyalists/cavalryman.png"
				[/frame]
			[/attack_anim]
			[death]
				[frame]
					begin="0"
					end="200"
					image="units/human-loyalists/cavalryman-die-1.png"
				[/frame]
				[frame]
					begin="200"
					end="400"
					image="units/human-loyalists/cavalryman-die-2.png"
				[/frame]
			[/death]
			[defend]
				start_time="-126"
				[frame]
					duration="1"
					image="units/human-loyalists/cavalryman.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/cavalryman-defend.png"
				[/frame]
				[if]
					hits="hit"
					[frame]
						duration="150"
						image="units/human-loyalists/cavalryman-defend.png"
						sound="horse-hit-1.ogg,horse-hit-2.ogg,horse-hit-3.ogg"
					[/frame]
				[/if]
				[else]
					hits="miss,kill"
					[frame]
						duration="150"
						image="units/human-loyalists/cavalryman-defend.png"
					[/frame]
				[/else]
				[frame]
					duration="1"
					image="units/human-loyalists/cavalryman.png"
				[/frame]
			[/defend]
			[movement_anim]
				[frame]
					begin="0"
					end="150"
					image="units/human-loyalists/cavalryman-moving.png"
				[/frame]
			[/movement_anim]
			[defense]
				castle="60"
				cave="80"
				deep_water="80"
				flat="60"
				forest="70"
				frozen="70"
				fungus="80"
				hills="60"
				impassable="80"
				mountains="80"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="80"
				unwalkable="80"
				village="60"
			[/defense]
			[movement_costs]
				castle="1"
				cave="4"
				deep_water="99"
				flat="1"
				forest="3"
				frozen="2"
				fungus="4"
				hills="2"
				impassable="99"
				mountains="99"
				reef="3"
				sand="2"
				shallow_water="4"
				swamp_water="4"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="80"
				blade="70"
				cold="80"
				fire="100"
				impact="60"
				pierce="120"
			[/resistance]
			[variables]
			[/variables]
			[status]
				hidden="yes"
			[/status]
			[attack]
				damage="7"
				description=_ "sword"
				icon="attacks/sword-human.png"
				name="sword"
				number="3"
				range="melee"
				type="blade"
			[/attack]
			[modifications]
				[trait]
#textdomain wesnoth
					female_name=_ "female^resilient"
					id="resilient"
					male_name=_ "resilient"
					name=_ "resilient"
					[effect]
						apply_to="hitpoints"
						increase_total="4"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="1"
						times="per level"
					[/effect]
				[/trait]
				[trait]
					female_name=_ "female^strong"
					id="strong"
					male_name=_ "strong"
					name=_ "strong"
					[effect]
						apply_to="attack"
						increase_damage="1"
						range="melee"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="1"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Knight,Lancer"
			alignment="lawful"
			alpha="256"
			attacks_left="0"
			cost="23"
			die_sound="horse-die.ogg"
			ellipse="misc/ellipse"
			experience="6"
			facing="sw"
			flag_rgb="magenta"
			flying="no"
			gender="male"
			goto_x="-999"
			goto_y="-999"
			hitpoints="11"
			id="Horseman-51"
			image="units/human-loyalists/horseman.png"
#textdomain wesnoth-units
			language_name=_ "Horseman"
			level="1"
			max_attacks="1"
			max_experience="31"
			max_hitpoints="37"
			max_moves="9"
			movement="8"
			movement_type="mounted"
			moves="0"
			name="Gweollyn"
			profile="portraits/humans/horseman.png"
			race="human"
			random_gender="no"
			random_traits="no"
			resting="no"
			side="2"
			type="Horseman"
			undead_variation="mounted"
			underlying_id="51"
			unrenamable="no"
			upkeep="full"
			usage="fighter"
			x="25"
			y="7"
			zoc="yes"
			[attack_anim]
				hits="no"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-250"
					end="-225"
					image="units/human-loyalists/horseman.png"
					sound="horse-canter.wav"
				[/frame]
				[frame]
					begin="-225"
					end="-150"
					image="units/human-loyalists/horseman-moving.png"
				[/frame]
				[frame]
					begin="-150"
					end="100"
					image="units/human-loyalists/horseman-attack.png"
					sound="miss-1.ogg,miss-2.ogg,miss-3.ogg"
				[/frame]
				[frame]
					begin="100"
					end="175"
					image="units/human-loyalists/horseman-moving.png"
				[/frame]
				[frame]
					begin="175"
					end="200"
					image="units/human-loyalists/horseman.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				hits="yes"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-250"
					end="-200"
					image="units/human-loyalists/horseman.png"
					sound="horse-canter.wav"
				[/frame]
				[frame]
					begin="-200"
					end="-150"
					image="units/human-loyalists/horseman-moving.png"
				[/frame]
				[frame]
					begin="-150"
					end="100"
					image="units/human-loyalists/horseman-attack.png"
					sound="spear.ogg"
				[/frame]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/horseman-moving.png"
				[/frame]
				[frame]
					begin="150"
					end="200"
					image="units/human-loyalists/horseman.png"
				[/frame]
			[/attack_anim]
			[defend]
				start_time="-126"
				[frame]
					duration="1"
					image="units/human-loyalists/horseman.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/horseman-defend.png"
				[/frame]
				[if]
					hits="hit"
					[frame]
						duration="150"
						image="units/human-loyalists/horseman-defend.png"
						sound="horse-hit-1.ogg,horse-hit-2.ogg,horse-hit-3.ogg"
					[/frame]
				[/if]
				[else]
					hits="miss,kill"
					[frame]
						duration="150"
						image="units/human-loyalists/horseman-defend.png"
					[/frame]
				[/else]
				[frame]
					duration="1"
					image="units/human-loyalists/horseman.png"
				[/frame]
			[/defend]
			[movement_anim]
				[frame]
					begin="0"
					end="150"
					image="units/human-loyalists/horseman-moving.png"
				[/frame]
			[/movement_anim]
			[defense]
				castle="60"
				cave="80"
				deep_water="80"
				flat="60"
				forest="70"
				frozen="70"
				fungus="80"
				hills="60"
				impassable="80"
				mountains="80"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="80"
				unwalkable="80"
				village="60"
			[/defense]
			[movement_costs]
				castle="1"
				cave="4"
				deep_water="99"
				flat="1"
				forest="3"
				frozen="2"
				fungus="4"
				hills="2"
				impassable="99"
				mountains="99"
				reef="3"
				sand="2"
				shallow_water="4"
				swamp_water="4"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="80"
				blade="80"
				cold="100"
				fire="100"
				impact="70"
				pierce="120"
			[/resistance]
			[variables]
			[/variables]
			[status]
			[/status]
			[attack]
				damage="10"
				description=_ "spear"
				name="spear"
				number="2"
				range="melee"
				type="pierce"
				[specials]
					[damage]
						active_on="offense"
						apply_to="both"
#textdomain wesnoth
						description=_ "Charge:
When used offensively, this attack deals double damage to the target. It also causes this unit to take double damage from the target's counterattack."
						id="charge"
						multiply="2"
						name=_ "charge"
					[/damage]
				[/specials]
			[/attack]
			[modifications]
				[trait]
					female_name=_ "female^strong"
					id="strong"
					male_name=_ "strong"
					name=_ "strong"
					[effect]
						apply_to="attack"
						increase_damage="1"
						range="melee"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="1"
					[/effect]
				[/trait]
				[trait]
					female_name=_ "female^quick"
					id="quick"
					male_name=_ "quick"
					name=_ "quick"
					[effect]
						apply_to="movement"
						increase="1"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="-5%"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Swordsman,Pikeman,Javelineer"
			alignment="lawful"
			alpha="256"
			attacks_left="1"
			cost="14"
			die_sound="human-die-1.ogg,human-die-2.ogg,human-die-3.ogg"
			ellipse="misc/ellipse"
			experience="3"
			facing="sw"
			flag_rgb="magenta"
			flying="no"
			gender="male"
			goto_x="-999"
			goto_y="-999"
			hitpoints="33"
			id="Spearman-52"
			image="units/human-loyalists/spearman.png"
#textdomain wesnoth-units
			language_name=_ "Spearman"
			level="1"
			max_attacks="1"
			max_experience="24"
			max_hitpoints="37"
			max_moves="5"
			movement="5"
			movement_type="smallfoot"
			moves="0"
			name="Yran"
			profile="portraits/humans/spearman.png"
			race="human"
			random_gender="no"
			random_traits="no"
			resting="no"
			side="2"
			type="Spearman"
			underlying_id="52"
			unrenamable="no"
			upkeep="full"
			usage="fighter"
			x="28"
			y="5"
			zoc="yes"
			[attack_anim]
				[filter_attack]
					name="javelin"
				[/filter_attack]
				[missile_frame]
					begin="-150"
					end="0"
					image="projectiles/spear-n.png"
					image_diagonal="projectiles/spear-ne.png"
				[/missile_frame]
				[frame]
					begin="-250"
					end="-150"
					image="units/human-loyalists/spearman-death1.png"
					sound="throw-1.wav,throw-2.wav,throw-3.wav,throw-4.wav"
				[/frame]
				[frame]
					begin="-150"
					end="-100"
					image="units/human-loyalists/spearman-attack-ranged.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="-50"
						image="units/human-loyalists/spearman-attack-ranged.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="-50"
						image="units/human-loyalists/spearman-attack-ranged.png"
					[/frame]
				[/else]
				[frame]
					begin="-50"
					end="50"
					image="units/human-loyalists/spearman-attack-ranged2.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="s"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-150"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[frame]
					begin="-150"
					end="-50"
					image="units/human-loyalists/spearman-attack-s-1.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-50"
						end="100"
						image="units/human-loyalists/spearman-attack-s-2.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-50"
						end="100"
						image="units/human-loyalists/spearman-attack-s-2.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman-attack-s-1.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="n"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-n.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-n.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="ne,nw"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-ne.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-ne.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="se,sw"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman.png"
				[/frame]
			[/attack_anim]
			[death]
				[frame]
					begin="0"
					end="125"
					image="units/human-loyalists/spearman-death1.png"
				[/frame]
				[frame]
					begin="125"
					end="250"
					image="units/human-loyalists/spearman-death2.png"
				[/frame]
				[frame]
					begin="250"
					end="375"
					image="units/human-loyalists/spearman-death3.png"
				[/frame]
				[frame]
					begin="375"
					end="500"
					image="units/human-loyalists/spearman-death4.png"
				[/frame]
			[/death]
			[defend]
				[frame]
					begin="-100"
					end="-90"
					image="units/human-loyalists/spearman-defend-2.png"
				[/frame]
				[frame]
					begin="-90"
					end="90"
					image="units/human-loyalists/spearman-defend.png"
				[/frame]
				[frame]
					begin="90"
					end="100"
					image="units/human-loyalists/spearman-defend-2.png"
				[/frame]
			[/defend]
			[portrait]
				image="portraits/humans/transparent/spearman.png"
				mirror="false"
				side="left"
				size="400"
			[/portrait]
			[portrait]
				image="portraits/humans/transparent/spearman.png"
				mirror="true"
				side="right"
				size="400"
			[/portrait]
			[defense]
				castle="40"
				cave="60"
				deep_water="80"
				flat="60"
				forest="50"
				frozen="80"
				fungus="50"
				hills="50"
				impassable="60"
				mountains="40"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="80"
				unwalkable="80"
				village="40"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="99"
				flat="1"
				forest="2"
				frozen="3"
				fungus="2"
				hills="2"
				impassable="99"
				mountains="3"
				reef="2"
				sand="2"
				shallow_water="3"
				swamp_water="3"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="80"
				blade="100"
				cold="100"
				fire="100"
				impact="100"
				pierce="100"
			[/resistance]
			[variables]
			[/variables]
			[status]
				hidden="yes"
			[/status]
			[attack]
				damage="8"
				description=_ "spear"
				icon="attacks/spear.png"
				name="spear"
				number="3"
				range="melee"
				type="pierce"
				[specials]
					[firststrike]
#textdomain wesnoth
						description=_ "First Strike:
This unit always strikes first with this attack, even if they are defending."
						id="firststrike"
						name=_ "firststrike"
					[/firststrike]
				[/specials]
			[/attack]
			[attack]
				damage="6"
#textdomain wesnoth-units
				description=_ "javelin"
				icon="attacks/javelin-human.png"
				name="javelin"
				number="1"
				range="ranged"
				type="pierce"
			[/attack]
			[modifications]
				[trait]
#textdomain wesnoth
					female_name=_ "female^strong"
					id="strong"
					male_name=_ "strong"
					name=_ "strong"
					[effect]
						apply_to="attack"
						increase_damage="1"
						range="melee"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="1"
					[/effect]
				[/trait]
				[trait]
					female_name=_ "female^intelligent"
					id="intelligent"
					male_name=_ "intelligent"
					name=_ "intelligent"
					[effect]
						apply_to="max_experience"
						increase="-20%"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Swordsman,Pikeman,Javelineer"
			alignment="lawful"
			alpha="256"
			attacks_left="0"
			cost="14"
			die_sound="human-die-1.ogg,human-die-2.ogg,human-die-3.ogg"
			ellipse="misc/ellipse"
			experience="7"
			facing="n"
			flag_rgb="magenta"
			flying="no"
			gender="male"
			goto_x="-999"
			goto_y="-999"
			hitpoints="25"
			id="Spearman-53"
			image="units/human-loyalists/spearman.png"
#textdomain wesnoth-units
			language_name=_ "Spearman"
			level="1"
			max_attacks="1"
			max_experience="29"
			max_hitpoints="35"
			max_moves="6"
			movement="5"
			movement_type="smallfoot"
			moves="0"
			name="Rhan"
			profile="portraits/humans/spearman.png"
			race="human"
			random_gender="no"
			random_traits="no"
			resting="no"
			side="2"
			type="Spearman"
			underlying_id="53"
			unrenamable="no"
			upkeep="full"
			usage="fighter"
			x="26"
			y="6"
			zoc="yes"
			[attack_anim]
				[filter_attack]
					name="javelin"
				[/filter_attack]
				[missile_frame]
					begin="-150"
					end="0"
					image="projectiles/spear-n.png"
					image_diagonal="projectiles/spear-ne.png"
				[/missile_frame]
				[frame]
					begin="-250"
					end="-150"
					image="units/human-loyalists/spearman-death1.png"
					sound="throw-1.wav,throw-2.wav,throw-3.wav,throw-4.wav"
				[/frame]
				[frame]
					begin="-150"
					end="-100"
					image="units/human-loyalists/spearman-attack-ranged.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="-50"
						image="units/human-loyalists/spearman-attack-ranged.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="-50"
						image="units/human-loyalists/spearman-attack-ranged.png"
					[/frame]
				[/else]
				[frame]
					begin="-50"
					end="50"
					image="units/human-loyalists/spearman-attack-ranged2.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="s"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-150"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[frame]
					begin="-150"
					end="-50"
					image="units/human-loyalists/spearman-attack-s-1.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-50"
						end="100"
						image="units/human-loyalists/spearman-attack-s-2.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-50"
						end="100"
						image="units/human-loyalists/spearman-attack-s-2.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman-attack-s-1.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="n"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-n.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-n.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="ne,nw"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-ne.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-ne.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="se,sw"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman.png"
				[/frame]
			[/attack_anim]
			[death]
				[frame]
					begin="0"
					end="125"
					image="units/human-loyalists/spearman-death1.png"
				[/frame]
				[frame]
					begin="125"
					end="250"
					image="units/human-loyalists/spearman-death2.png"
				[/frame]
				[frame]
					begin="250"
					end="375"
					image="units/human-loyalists/spearman-death3.png"
				[/frame]
				[frame]
					begin="375"
					end="500"
					image="units/human-loyalists/spearman-death4.png"
				[/frame]
			[/death]
			[defend]
				[frame]
					begin="-100"
					end="-90"
					image="units/human-loyalists/spearman-defend-2.png"
				[/frame]
				[frame]
					begin="-90"
					end="90"
					image="units/human-loyalists/spearman-defend.png"
				[/frame]
				[frame]
					begin="90"
					end="100"
					image="units/human-loyalists/spearman-defend-2.png"
				[/frame]
			[/defend]
			[portrait]
				image="portraits/humans/transparent/spearman.png"
				mirror="false"
				side="left"
				size="400"
			[/portrait]
			[portrait]
				image="portraits/humans/transparent/spearman.png"
				mirror="true"
				side="right"
				size="400"
			[/portrait]
			[defense]
				castle="40"
				cave="60"
				deep_water="80"
				flat="60"
				forest="50"
				frozen="80"
				fungus="50"
				hills="50"
				impassable="60"
				mountains="40"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="80"
				unwalkable="80"
				village="40"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="99"
				flat="1"
				forest="2"
				frozen="3"
				fungus="2"
				hills="2"
				impassable="99"
				mountains="3"
				reef="2"
				sand="2"
				shallow_water="3"
				swamp_water="3"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="80"
				blade="100"
				cold="100"
				fire="100"
				impact="100"
				pierce="100"
			[/resistance]
			[variables]
			[/variables]
			[status]
				poisoned="yes"
			[/status]
			[attack]
				damage="8"
				description=_ "spear"
				icon="attacks/spear.png"
				name="spear"
				number="3"
				range="melee"
				type="pierce"
				[specials]
					[firststrike]
#textdomain wesnoth
						description=_ "First Strike:
This unit always strikes first with this attack, even if they are defending."
						id="firststrike"
						name=_ "firststrike"
					[/firststrike]
				[/specials]
			[/attack]
			[attack]
				damage="6"
#textdomain wesnoth-units
				description=_ "javelin"
				icon="attacks/javelin-human.png"
				name="javelin"
				number="1"
				range="ranged"
				type="pierce"
			[/attack]
			[modifications]
				[trait]
#textdomain wesnoth
					female_name=_ "female^strong"
					id="strong"
					male_name=_ "strong"
					name=_ "strong"
					[effect]
						apply_to="attack"
						increase_damage="1"
						range="melee"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="1"
					[/effect]
				[/trait]
				[trait]
					female_name=_ "female^quick"
					id="quick"
					male_name=_ "quick"
					name=_ "quick"
					[effect]
						apply_to="movement"
						increase="1"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="-5%"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="White Mage,Red Mage"
			alignment="lawful"
			alpha="256"
			attacks_left="0"
			cost="20"
			die_sound="human-female-die-1.ogg,human-female-die-2.ogg,human-female-die-3.ogg"
			ellipse="misc/ellipse"
			experience="5"
			facing="ne"
			flag_rgb="magenta"
			flying="no"
			gender="female"
			goto_x="-999"
			goto_y="-999"
			hitpoints="28"
			id="Mage-55"
			image="units/human-magi/mage+female.png"
#textdomain wesnoth-units
			language_name=_ "female^Mage"
			level="1"
			max_attacks="1"
			max_experience="42"
			max_hitpoints="28"
			max_moves="6"
			movement="5"
			movement_type="smallfoot"
			moves="0"
			name="Gwycla"
			profile="portraits/humans/mage+female.png"
			race="human"
			random_gender="no"
			random_traits="no"
			resting="no"
			side="2"
			type="Mage"
			underlying_id="55"
			unrenamable="no"
			upkeep="full"
			usage="mixed fighter"
			x="12"
			y="5"
			zoc="yes"
			[attack_anim]
				magic_missile_flare_start_time="-750"
				magic_missile_start_time="-750"
				magic_missile_trail_1_start_time="-350"
				magic_missile_trail_2_start_time="-350"
				magic_missile_trail_3_start_time="-350"
				offset="0"
				[filter_attack]
					name="missile"
				[/filter_attack]
				[magic_missile_frame]
					duration="400"
					halo="halo/mage-halo1.png,halo/mage-halo2.png,halo/mage-halo3.png,halo/mage-halo4.png,halo/mage-halo5.png"
					halo_x="11~0"
					halo_y="-20~-54"
					offset="0.001~-0.083,-0.083~-0.25,-0.25~-0.5"
				[/magic_missile_frame]
				[magic_missile_frame]
					duration="350"
					halo="halo/mage-halo1.png,halo/mage-halo2.png,halo/mage-halo3.png,halo/mage-halo4.png,halo/mage-halo5.png,misc/blank-hex.png:1"
					halo_y="-54~-45,-45~-27,-27~0"
					offset="-0.5~-0.25,-0.25~0.25,0.25~1.0"
				[/magic_missile_frame]
				[magic_missile_trail_1_frame]
					duration="350"
					halo="misc/blank-hex.png:40,halo/mage-preparation-halo1.png,halo/mage-preparation-halo2.png,halo/mage-preparation-halo3.png,halo/mage-preparation-halo4.png,halo/mage-preparation-halo5.png,halo/mage-preparation-halo6.png,halo/mage-preparation-halo7.png,misc/blank-hex.png:1"
					halo_y="-54:40,-54~-45,-45~-27,-27~0"
					offset="0.001:40,-0.5~-0.25,-0.25~0.25,0.25~1.0"
				[/magic_missile_trail_1_frame]
				[magic_missile_trail_2_frame]
					duration="350"
					halo="misc/blank-hex.png:80,halo/mage-preparation-halo1.png,halo/mage-preparation-halo2.png,halo/mage-preparation-halo3.png,halo/mage-preparation-halo4.png,halo/mage-preparation-halo5.png,halo/mage-preparation-halo6.png,halo/mage-preparation-halo7.png,misc/blank-hex.png:1"
					halo_y="-54:80,-54~-45,-45~-27,-27~0"
					offset="0.001:80,-0.5~-0.25,-0.25~0.25,0.25~1.0"
				[/magic_missile_trail_2_frame]
				[magic_missile_trail_3_frame]
					duration="350"
					halo="misc/blank-hex.png:120,halo/mage-preparation-halo1.png,halo/mage-preparation-halo2.png,halo/mage-preparation-halo3.png,halo/mage-preparation-halo4.png,halo/mage-preparation-halo5.png,halo/mage-preparation-halo6.png,halo/mage-preparation-halo7.png,misc/blank-hex.png:1"
					halo_y="-54:120,-54~-45,-45~-27,-27~0"
					offset="0.001:120,-0.5~-0.25,-0.25~0.25,0.25~1.0"
				[/magic_missile_trail_3_frame]
				[magic_missile_flare_frame]
					duration="600"
					halo="halo/mage-preparation-halo1.png,halo/mage-preparation-halo2.png,halo/mage-preparation-halo3.png,halo/mage-preparation-halo4.png,halo/mage-preparation-halo5.png,halo/mage-preparation-halo6.png,halo/mage-preparation-halo7.png,misc/blank-hex.png:1"
					halo_x="11"
					halo_y="-20"
					offset="0"
				[/magic_missile_flare_frame]
				[frame]
					begin="-800"
					end="-700"
					image="units/human-magi/mage+female-attack-magic1.png"
				[/frame]
				[frame]
					begin="-700"
					end="-350"
					image="units/human-magi/mage+female-attack-magic2.png"
				[/frame]
				[if]
					hits="no"
					[frame]
						begin="-350"
						end="-100"
						image="units/human-magi/mage+female-attack-magic2.png"
						sound="magic-missile-1-miss.ogg,magic-missile-2-miss.ogg,magic-missile-3-miss.ogg"
					[/frame]
				[/if]
				[else]
					hits="yes"
					[frame]
						begin="-350"
						end="-100"
						image="units/human-magi/mage+female-attack-magic2.png"
						sound="magic-missile-1.ogg,magic-missile-2.ogg,magic-missile-3.ogg"
					[/frame]
				[/else]
				[frame]
					begin="-100"
					end="100"
					image="units/human-magi/mage+female-attack-magic1.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				[filter_attack]
					name="staff"
				[/filter_attack]
				[frame]
					begin="-250"
					end="-200"
					image="units/human-magi/mage+female.png"
				[/frame]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-magi/mage+female-attack-staff1.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-magi/mage+female-attack-staff2.png"
						sound="staff.wav"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-magi/mage+female-attack-staff2.png"
						sound="miss-1.ogg,miss-2.ogg,miss-3.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-magi/mage+female-attack-magic1.png"
				[/frame]
				[frame]
					begin="150"
					end="200"
					image="units/human-magi/mage+female.png"
				[/frame]
			[/attack_anim]
			[defend]
				start_time="-126"
				[frame]
					duration="1"
					image="units/human-magi/mage+female.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-magi/mage+female-defend.png"
				[/frame]
				[if]
					hits="hit"
					[frame]
						duration="150"
						image="units/human-magi/mage+female-defend.png"
						sound="human-female-hit-1.ogg,human-female-hit-2.ogg,human-female-hit-3.ogg"
					[/frame]
				[/if]
				[else]
					hits="miss,kill"
					[frame]
						duration="150"
						image="units/human-magi/mage+female-defend.png"
					[/frame]
				[/else]
				[frame]
					duration="1"
					image="units/human-magi/mage+female.png"
				[/frame]
			[/defend]
			[portrait]
				image="portraits/humans/transparent/mage+female.png"
				mirror="false"
				side="left"
				size="400"
			[/portrait]
			[portrait]
				image="portraits/humans/transparent/mage+female.png"
				mirror="true"
				side="right"
				size="400"
			[/portrait]
			[defense]
				castle="40"
				cave="60"
				deep_water="80"
				flat="60"
				forest="50"
				frozen="80"
				fungus="50"
				hills="50"
				impassable="60"
				mountains="40"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="80"
				unwalkable="80"
				village="40"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="99"
				flat="1"
				forest="2"
				frozen="3"
				fungus="2"
				hills="2"
				impassable="99"
				mountains="3"
				reef="2"
				sand="2"
				shallow_water="3"
				swamp_water="3"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="80"
				blade="100"
				cold="100"
				fire="100"
				impact="100"
				pierce="100"
			[/resistance]
			[variables]
			[/variables]
			[status]
			[/status]
			[attack]
				damage="5"
				description=_ "staff"
				icon="attacks/staff-magic.png"
				name="staff"
				number="1"
				range="melee"
				type="impact"
			[/attack]
			[attack]
				damage="7"
				description=_ "missile"
				icon="attacks/magic-missile.png"
				name="missile"
				number="3"
				range="ranged"
				type="fire"
				[specials]
					[chance_to_hit]
						cumulative="no"
#textdomain wesnoth
						description=_ "Magical:
This attack always has a 70% chance to hit regardless of the defensive ability of the unit being attacked."
						id="magical"
						name=_ "magical"
						value="70"
					[/chance_to_hit]
				[/specials]
			[/attack]
			[modifications]
				[trait]
					female_name=_ "female^quick"
					id="quick"
					male_name=_ "quick"
					name=_ "female^quick"
					[effect]
						apply_to="movement"
						increase="1"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="-5%"
					[/effect]
				[/trait]
				[trait]
					female_name=_ "female^resilient"
					id="resilient"
					male_name=_ "resilient"
					name=_ "female^resilient"
					[effect]
						apply_to="hitpoints"
						increase_total="4"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="1"
						times="per level"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Swordsman,Pikeman,Javelineer"
			alignment="lawful"
			alpha="256"
			attacks_left="1"
			cost="14"
			die_sound="human-die-1.ogg,human-die-2.ogg,human-die-3.ogg"
			ellipse="misc/ellipse"
			experience="1"
			facing="ne"
			flag_rgb="magenta"
			flying="no"
			gender="male"
			goto_x="-999"
			goto_y="-999"
			hitpoints="37"
			id="Spearman-57"
			image="units/human-loyalists/spearman.png"
#textdomain wesnoth-units
			language_name=_ "Spearman"
			level="1"
			max_attacks="1"
			max_experience="24"
			max_hitpoints="37"
			max_moves="5"
			movement="5"
			movement_type="smallfoot"
			moves="0"
			name="Blyn"
			profile="portraits/humans/spearman.png"
			race="human"
			random_gender="no"
			random_traits="no"
			resting="no"
			side="2"
			type="Spearman"
			underlying_id="57"
			unrenamable="no"
			upkeep="full"
			usage="fighter"
			x="12"
			y="7"
			zoc="yes"
			[attack_anim]
				[filter_attack]
					name="javelin"
				[/filter_attack]
				[missile_frame]
					begin="-150"
					end="0"
					image="projectiles/spear-n.png"
					image_diagonal="projectiles/spear-ne.png"
				[/missile_frame]
				[frame]
					begin="-250"
					end="-150"
					image="units/human-loyalists/spearman-death1.png"
					sound="throw-1.wav,throw-2.wav,throw-3.wav,throw-4.wav"
				[/frame]
				[frame]
					begin="-150"
					end="-100"
					image="units/human-loyalists/spearman-attack-ranged.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="-50"
						image="units/human-loyalists/spearman-attack-ranged.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="-50"
						image="units/human-loyalists/spearman-attack-ranged.png"
					[/frame]
				[/else]
				[frame]
					begin="-50"
					end="50"
					image="units/human-loyalists/spearman-attack-ranged2.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="s"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-150"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[frame]
					begin="-150"
					end="-50"
					image="units/human-loyalists/spearman-attack-s-1.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-50"
						end="100"
						image="units/human-loyalists/spearman-attack-s-2.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-50"
						end="100"
						image="units/human-loyalists/spearman-attack-s-2.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman-attack-s-1.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="n"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-n.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-n.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="ne,nw"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-ne.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-ne.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="se,sw"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman.png"
				[/frame]
			[/attack_anim]
			[death]
				[frame]
					begin="0"
					end="125"
					image="units/human-loyalists/spearman-death1.png"
				[/frame]
				[frame]
					begin="125"
					end="250"
					image="units/human-loyalists/spearman-death2.png"
				[/frame]
				[frame]
					begin="250"
					end="375"
					image="units/human-loyalists/spearman-death3.png"
				[/frame]
				[frame]
					begin="375"
					end="500"
					image="units/human-loyalists/spearman-death4.png"
				[/frame]
			[/death]
			[defend]
				[frame]
					begin="-100"
					end="-90"
					image="units/human-loyalists/spearman-defend-2.png"
				[/frame]
				[frame]
					begin="-90"
					end="90"
					image="units/human-loyalists/spearman-defend.png"
				[/frame]
				[frame]
					begin="90"
					end="100"
					image="units/human-loyalists/spearman-defend-2.png"
				[/frame]
			[/defend]
			[portrait]
				image="portraits/humans/transparent/spearman.png"
				mirror="false"
				side="left"
				size="400"
			[/portrait]
			[portrait]
				image="portraits/humans/transparent/spearman.png"
				mirror="true"
				side="right"
				size="400"
			[/portrait]
			[defense]
				castle="40"
				cave="60"
				deep_water="80"
				flat="60"
				forest="50"
				frozen="80"
				fungus="50"
				hills="50"
				impassable="60"
				mountains="40"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="80"
				unwalkable="80"
				village="40"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="99"
				flat="1"
				forest="2"
				frozen="3"
				fungus="2"
				hills="2"
				impassable="99"
				mountains="3"
				reef="2"
				sand="2"
				shallow_water="3"
				swamp_water="3"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="80"
				blade="100"
				cold="100"
				fire="100"
				impact="100"
				pierce="100"
			[/resistance]
			[variables]
			[/variables]
			[status]
				hidden="yes"
			[/status]
			[attack]
				damage="8"
				description=_ "spear"
				icon="attacks/spear.png"
				name="spear"
				number="3"
				range="melee"
				type="pierce"
				[specials]
					[firststrike]
#textdomain wesnoth
						description=_ "First Strike:
This unit always strikes first with this attack, even if they are defending."
						id="firststrike"
						name=_ "firststrike"
					[/firststrike]
				[/specials]
			[/attack]
			[attack]
				damage="6"
#textdomain wesnoth-units
				description=_ "javelin"
				icon="attacks/javelin-human.png"
				name="javelin"
				number="1"
				range="ranged"
				type="pierce"
			[/attack]
			[modifications]
				[trait]
#textdomain wesnoth
					female_name=_ "female^strong"
					id="strong"
					male_name=_ "strong"
					name=_ "strong"
					[effect]
						apply_to="attack"
						increase_damage="1"
						range="melee"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="1"
					[/effect]
				[/trait]
				[trait]
					female_name=_ "female^intelligent"
					id="intelligent"
					male_name=_ "intelligent"
					name=_ "intelligent"
					[effect]
						apply_to="max_experience"
						increase="-20%"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Swordsman,Pikeman,Javelineer"
			alignment="lawful"
			alpha="256"
			attacks_left="1"
			cost="14"
			die_sound="human-die-1.ogg,human-die-2.ogg,human-die-3.ogg"
			ellipse="misc/ellipse"
			experience="9"
			facing="n"
			flag_rgb="magenta"
			flying="no"
			gender="male"
			goto_x="-999"
			goto_y="-999"
			hitpoints="37"
			id="Spearman-61"
			image="units/human-loyalists/spearman.png"
#textdomain wesnoth-units
			language_name=_ "Spearman"
			level="1"
			max_attacks="1"
			max_experience="24"
			max_hitpoints="41"
			max_moves="5"
			movement="5"
			movement_type="smallfoot"
			moves="0"
			name="Lemyrcyn"
			profile="portraits/humans/spearman.png"
			race="human"
			random_gender="no"
			random_traits="no"
			resting="no"
			side="2"
			type="Spearman"
			underlying_id="61"
			unrenamable="no"
			upkeep="full"
			usage="fighter"
			x="11"
			y="5"
			zoc="yes"
			[attack_anim]
				[filter_attack]
					name="javelin"
				[/filter_attack]
				[missile_frame]
					begin="-150"
					end="0"
					image="projectiles/spear-n.png"
					image_diagonal="projectiles/spear-ne.png"
				[/missile_frame]
				[frame]
					begin="-250"
					end="-150"
					image="units/human-loyalists/spearman-death1.png"
					sound="throw-1.wav,throw-2.wav,throw-3.wav,throw-4.wav"
				[/frame]
				[frame]
					begin="-150"
					end="-100"
					image="units/human-loyalists/spearman-attack-ranged.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="-50"
						image="units/human-loyalists/spearman-attack-ranged.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="-50"
						image="units/human-loyalists/spearman-attack-ranged.png"
					[/frame]
				[/else]
				[frame]
					begin="-50"
					end="50"
					image="units/human-loyalists/spearman-attack-ranged2.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="s"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-150"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[frame]
					begin="-150"
					end="-50"
					image="units/human-loyalists/spearman-attack-s-1.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-50"
						end="100"
						image="units/human-loyalists/spearman-attack-s-2.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-50"
						end="100"
						image="units/human-loyalists/spearman-attack-s-2.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman-attack-s-1.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="n"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-n.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-n.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="ne,nw"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-ne.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-ne.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="se,sw"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman.png"
				[/frame]
			[/attack_anim]
			[death]
				[frame]
					begin="0"
					end="125"
					image="units/human-loyalists/spearman-death1.png"
				[/frame]
				[frame]
					begin="125"
					end="250"
					image="units/human-loyalists/spearman-death2.png"
				[/frame]
				[frame]
					begin="250"
					end="375"
					image="units/human-loyalists/spearman-death3.png"
				[/frame]
				[frame]
					begin="375"
					end="500"
					image="units/human-loyalists/spearman-death4.png"
				[/frame]
			[/death]
			[defend]
				[frame]
					begin="-100"
					end="-90"
					image="units/human-loyalists/spearman-defend-2.png"
				[/frame]
				[frame]
					begin="-90"
					end="90"
					image="units/human-loyalists/spearman-defend.png"
				[/frame]
				[frame]
					begin="90"
					end="100"
					image="units/human-loyalists/spearman-defend-2.png"
				[/frame]
			[/defend]
			[portrait]
				image="portraits/humans/transparent/spearman.png"
				mirror="false"
				side="left"
				size="400"
			[/portrait]
			[portrait]
				image="portraits/humans/transparent/spearman.png"
				mirror="true"
				side="right"
				size="400"
			[/portrait]
			[defense]
				castle="40"
				cave="60"
				deep_water="80"
				flat="60"
				forest="50"
				frozen="80"
				fungus="50"
				hills="50"
				impassable="60"
				mountains="40"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="80"
				unwalkable="80"
				village="40"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="99"
				flat="1"
				forest="2"
				frozen="3"
				fungus="2"
				hills="2"
				impassable="99"
				mountains="3"
				reef="2"
				sand="2"
				shallow_water="3"
				swamp_water="3"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="80"
				blade="100"
				cold="100"
				fire="100"
				impact="100"
				pierce="100"
			[/resistance]
			[variables]
			[/variables]
			[status]
				hidden="yes"
			[/status]
			[attack]
				damage="7"
				description=_ "spear"
				icon="attacks/spear.png"
				name="spear"
				number="3"
				range="melee"
				type="pierce"
				[specials]
					[firststrike]
#textdomain wesnoth
						description=_ "First Strike:
This unit always strikes first with this attack, even if they are defending."
						id="firststrike"
						name=_ "firststrike"
					[/firststrike]
				[/specials]
			[/attack]
			[attack]
				damage="6"
#textdomain wesnoth-units
				description=_ "javelin"
				icon="attacks/javelin-human.png"
				name="javelin"
				number="1"
				range="ranged"
				type="pierce"
			[/attack]
			[modifications]
				[trait]
#textdomain wesnoth
					female_name=_ "female^intelligent"
					id="intelligent"
					male_name=_ "intelligent"
					name=_ "intelligent"
					[effect]
						apply_to="max_experience"
						increase="-20%"
					[/effect]
				[/trait]
				[trait]
					female_name=_ "female^resilient"
					id="resilient"
					male_name=_ "resilient"
					name=_ "resilient"
					[effect]
						apply_to="hitpoints"
						increase_total="4"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="1"
						times="per level"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Shock Trooper"
			alignment="lawful"
			alpha="256"
			attacks_left="0"
			cost="19"
			die_sound="human-die-1.ogg,human-die-2.ogg,human-die-3.ogg"
			ellipse="misc/ellipse"
			experience="10"
			facing="nw"
			flag_rgb="magenta"
			flying="no"
			gender="male"
			goto_x="-999"
			goto_y="-999"
			hitpoints="30"
			id="Heavy Infantryman-67"
			image="units/human-loyalists/heavyinfantry.png"
#textdomain wesnoth-units
			language_name=_ "Heavy Infantryman"
			level="1"
			max_attacks="1"
			max_experience="22"
			max_hitpoints="36"
			max_moves="5"
			movement="4"
			movement_type="armoredfoot"
			moves="0"
			name="Yrunnyc"
			profile="portraits/humans/heavy-infantry.png"
			race="human"
			random_gender="no"
			random_traits="no"
			resting="no"
			side="2"
			type="Heavy Infantryman"
			underlying_id="67"
			unrenamable="no"
			upkeep="full"
			usage="fighter"
			x="24"
			y="8"
			zoc="yes"
			[attack_anim]
				[filter_attack]
					name="mace"
				[/filter_attack]
				[frame]
					begin="-230"
					end="-100"
					image="units/human-loyalists/heavyinfantry-attack-1.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/heavyinfantry-attack-2.png"
						sound="mace.wav"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/heavyinfantry-attack-2.png"
						sound="miss-1.ogg,miss-2.ogg,miss-3.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="200"
					image="units/human-loyalists/heavyinfantry.png"
				[/frame]
			[/attack_anim]
			[defend]
				start_time="-126"
				[frame]
					duration="1"
					image="units/human-loyalists/heavyinfantry-defend-1.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavyinfantry-defend-2.png"
				[/frame]
				[if]
					hits="hit"
					[frame]
						duration="150"
						image="units/human-loyalists/heavyinfantry-defend-2.png"
						sound="human-hit-1.ogg,human-hit-2.ogg,human-hit-3.ogg,human-hit-4.ogg,human-hit-5.ogg"
					[/frame]
				[/if]
				[else]
					hits="miss,kill"
					[frame]
						duration="150"
						image="units/human-loyalists/heavyinfantry-defend-2.png"
					[/frame]
				[/else]
				[frame]
					duration="1"
					image="units/human-loyalists/heavyinfantry-defend-1.png"
				[/frame]
			[/defend]
			[idle_anim]
				start_time="0"
				[filter]
					[not]
						[filter_wml]
							[status]
								poisoned="yes"
							[/status]
						[/filter_wml]
					[/not]
				[/filter]
				[filter]
					[filter_adjacent]
						count="0"
						is_enemy="yes"
					[/filter_adjacent]
				[/filter]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-1.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-2.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-3.png"
				[/frame]
				[frame]
					duration="300"
					image="units/human-loyalists/heavy-infantry-idle-4.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-5.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-6.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-7.png"
				[/frame]
				[frame]
					duration="1000"
					image="units/human-loyalists/heavy-infantry-idle-8.png"
				[/frame]
				[frame]
					duration="1000"
					image="units/human-loyalists/heavy-infantry-idle-9.png"
				[/frame]
				[frame]
					duration="1000"
					image="units/human-loyalists/heavy-infantry-idle-8.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-7.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-6.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-5.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-4.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-3.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-2.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-1.png"
				[/frame]
			[/idle_anim]
			[portrait]
				image="portraits/humans/transparent/heavy-infantry.png"
				mirror="false"
				side="left"
				size="400"
			[/portrait]
			[portrait]
				image="portraits/humans/transparent/heavy-infantry.png"
				mirror="true"
				side="right"
				size="400"
			[/portrait]
			[trait]
#textdomain wesnoth
				description=_ "Fights normally during unfavorable times of day/night"
				female_name=_ "female^fearless"
				id="fearless"
				male_name=_ "fearless"
			[/trait]
			[defense]
				castle="50"
				cave="60"
				deep_water="80"
				flat="70"
				forest="60"
				frozen="80"
				fungus="60"
				hills="60"
				impassable="60"
				mountains="80"
				reef="80"
				sand="80"
				shallow_water="90"
				swamp_water="90"
				unwalkable="80"
				village="60"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="99"
				flat="1"
				forest="2"
				frozen="4"
				fungus="2"
				hills="3"
				impassable="99"
				mountains="99"
				reef="3"
				sand="2"
				shallow_water="4"
				swamp_water="4"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="80"
				blade="50"
				cold="110"
				fire="110"
				impact="90"
				pierce="60"
			[/resistance]
			[variables]
			[/variables]
			[status]
			[/status]
			[attack]
				damage="11"
#textdomain wesnoth-units
				description=_ "mace"
				name="mace"
				number="2"
				range="melee"
				type="impact"
			[/attack]
			[modifications]
				[trait]
#textdomain wesnoth
					female_name=_ "female^quick"
					id="quick"
					male_name=_ "quick"
					name=_ "quick"
					[effect]
						apply_to="movement"
						increase="1"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="-5%"
					[/effect]
				[/trait]
				[trait]
					female_name=_ "female^intelligent"
					id="intelligent"
					male_name=_ "intelligent"
					name=_ "intelligent"
					[effect]
						apply_to="max_experience"
						increase="-20%"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="White Mage,Red Mage"
			alignment="lawful"
			alpha="256"
			attacks_left="0"
			cost="20"
			die_sound="human-die-1.ogg,human-die-2.ogg,human-die-3.ogg"
			ellipse="misc/ellipse"
			experience="1"
			facing="nw"
			flag_rgb="magenta"
			flying="no"
			gender="male"
			goto_x="-999"
			goto_y="-999"
			hitpoints="28"
			id="Mage-70"
			image="units/human-magi/mage.png"
#textdomain wesnoth-units
			language_name=_ "Mage"
			level="1"
			max_attacks="1"
			max_experience="42"
			max_hitpoints="28"
			max_moves="6"
			movement="5"
			movement_type="smallfoot"
			moves="0"
			name="Yraen"
			profile="portraits/humans/mage.png"
			race="human"
			random_gender="no"
			random_traits="no"
			resting="no"
			side="2"
			type="Mage"
			underlying_id="70"
			unrenamable="no"
			upkeep="full"
			usage="mixed fighter"
			x="26"
			y="7"
			zoc="yes"
			[attack_anim]
				magic_missile_flare_start_time="-750"
				magic_missile_start_time="-750"
				magic_missile_trail_1_start_time="-350"
				magic_missile_trail_2_start_time="-350"
				magic_missile_trail_3_start_time="-350"
				offset="0"
				[filter_attack]
					name="missile"
				[/filter_attack]
				[magic_missile_frame]
					duration="400"
					halo="halo/mage-halo1.png,halo/mage-halo2.png,halo/mage-halo3.png,halo/mage-halo4.png,halo/mage-halo5.png"
					halo_x="11~0"
					halo_y="-20~-54"
					offset="0.001~-0.083,-0.083~-0.25,-0.25~-0.5"
				[/magic_missile_frame]
				[magic_missile_frame]
					duration="350"
					halo="halo/mage-halo1.png,halo/mage-halo2.png,halo/mage-halo3.png,halo/mage-halo4.png,halo/mage-halo5.png,misc/blank-hex.png:1"
					halo_y="-54~-45,-45~-27,-27~0"
					offset="-0.5~-0.25,-0.25~0.25,0.25~1.0"
				[/magic_missile_frame]
				[magic_missile_trail_1_frame]
					duration="350"
					halo="misc/blank-hex.png:40,halo/mage-preparation-halo1.png,halo/mage-preparation-halo2.png,halo/mage-preparation-halo3.png,halo/mage-preparation-halo4.png,halo/mage-preparation-halo5.png,halo/mage-preparation-halo6.png,halo/mage-preparation-halo7.png,misc/blank-hex.png:1"
					halo_y="-54:40,-54~-45,-45~-27,-27~0"
					offset="0.001:40,-0.5~-0.25,-0.25~0.25,0.25~1.0"
				[/magic_missile_trail_1_frame]
				[magic_missile_trail_2_frame]
					duration="350"
					halo="misc/blank-hex.png:80,halo/mage-preparation-halo1.png,halo/mage-preparation-halo2.png,halo/mage-preparation-halo3.png,halo/mage-preparation-halo4.png,halo/mage-preparation-halo5.png,halo/mage-preparation-halo6.png,halo/mage-preparation-halo7.png,misc/blank-hex.png:1"
					halo_y="-54:80,-54~-45,-45~-27,-27~0"
					offset="0.001:80,-0.5~-0.25,-0.25~0.25,0.25~1.0"
				[/magic_missile_trail_2_frame]
				[magic_missile_trail_3_frame]
					duration="350"
					halo="misc/blank-hex.png:120,halo/mage-preparation-halo1.png,halo/mage-preparation-halo2.png,halo/mage-preparation-halo3.png,halo/mage-preparation-halo4.png,halo/mage-preparation-halo5.png,halo/mage-preparation-halo6.png,halo/mage-preparation-halo7.png,misc/blank-hex.png:1"
					halo_y="-54:120,-54~-45,-45~-27,-27~0"
					offset="0.001:120,-0.5~-0.25,-0.25~0.25,0.25~1.0"
				[/magic_missile_trail_3_frame]
				[magic_missile_flare_frame]
					duration="600"
					halo="halo/mage-preparation-halo1.png,halo/mage-preparation-halo2.png,halo/mage-preparation-halo3.png,halo/mage-preparation-halo4.png,halo/mage-preparation-halo5.png,halo/mage-preparation-halo6.png,halo/mage-preparation-halo7.png,misc/blank-hex.png:1"
					halo_x="11"
					halo_y="-20"
					offset="0"
				[/magic_missile_flare_frame]
				[frame]
					begin="-800"
					end="-700"
					image="units/human-magi/mage-attack-magic1.png"
				[/frame]
				[frame]
					begin="-700"
					end="-350"
					image="units/human-magi/mage-attack-magic2.png"
				[/frame]
				[if]
					hits="no"
					[frame]
						begin="-350"
						end="-100"
						image="units/human-magi/mage-attack-magic2.png"
						sound="magic-missile-1-miss.ogg,magic-missile-2-miss.ogg,magic-missile-3-miss.ogg"
					[/frame]
				[/if]
				[else]
					hits="yes"
					[frame]
						begin="-350"
						end="-100"
						image="units/human-magi/mage-attack-magic2.png"
						sound="magic-missile-1.ogg,magic-missile-2.ogg,magic-missile-3.ogg"
					[/frame]
				[/else]
				[frame]
					begin="-100"
					end="100"
					image="units/human-magi/mage-attack-magic1.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				[filter_attack]
					name="staff"
				[/filter_attack]
				[frame]
					begin="-250"
					end="-200"
					image="units/human-magi/mage.png"
				[/frame]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-magi/mage-attack-staff1.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-magi/mage-attack-staff2.png"
						sound="staff.wav"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-magi/mage-attack-staff2.png"
						sound="miss-1.ogg,miss-2.ogg,miss-3.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-magi/mage-attack-magic1.png"
				[/frame]
				[frame]
					begin="150"
					end="200"
					image="units/human-magi/mage.png"
				[/frame]
			[/attack_anim]
			[defend]
				start_time="-126"
				[frame]
					duration="1"
					image="units/human-magi/mage.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-magi/mage-defend.png"
				[/frame]
				[if]
					hits="hit"
					[frame]
						duration="150"
						image="units/human-magi/mage-defend.png"
						sound="human-old-hit-1.ogg,human-old-hit-2.ogg,human-old-hit-3.ogg,human-old-hit-4.ogg"
					[/frame]
				[/if]
				[else]
					hits="miss,kill"
					[frame]
						duration="150"
						image="units/human-magi/mage-defend.png"
					[/frame]
				[/else]
				[frame]
					duration="1"
					image="units/human-magi/mage.png"
				[/frame]
			[/defend]
			[portrait]
				image="portraits/humans/transparent/mage.png"
				mirror="false"
				side="left"
				size="400"
			[/portrait]
			[portrait]
				image="portraits/humans/transparent/mage.png"
				mirror="true"
				side="right"
				size="400"
			[/portrait]
			[defense]
				castle="40"
				cave="60"
				deep_water="80"
				flat="60"
				forest="50"
				frozen="80"
				fungus="50"
				hills="50"
				impassable="60"
				mountains="40"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="80"
				unwalkable="80"
				village="40"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="99"
				flat="1"
				forest="2"
				frozen="3"
				fungus="2"
				hills="2"
				impassable="99"
				mountains="3"
				reef="2"
				sand="2"
				shallow_water="3"
				swamp_water="3"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="80"
				blade="100"
				cold="100"
				fire="100"
				impact="100"
				pierce="100"
			[/resistance]
			[variables]
			[/variables]
			[status]
			[/status]
			[attack]
				damage="5"
				description=_ "staff"
				icon="attacks/staff-magic.png"
				name="staff"
				number="1"
				range="melee"
				type="impact"
			[/attack]
			[attack]
				damage="7"
				description=_ "missile"
				icon="attacks/magic-missile.png"
				name="missile"
				number="3"
				range="ranged"
				type="fire"
				[specials]
					[chance_to_hit]
						cumulative="no"
#textdomain wesnoth
						description=_ "Magical:
This attack always has a 70% chance to hit regardless of the defensive ability of the unit being attacked."
						id="magical"
						name=_ "magical"
						value="70"
					[/chance_to_hit]
				[/specials]
			[/attack]
			[modifications]
				[trait]
					female_name=_ "female^resilient"
					id="resilient"
					male_name=_ "resilient"
					name=_ "resilient"
					[effect]
						apply_to="hitpoints"
						increase_total="4"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="1"
						times="per level"
					[/effect]
				[/trait]
				[trait]
					female_name=_ "female^quick"
					id="quick"
					male_name=_ "quick"
					name=_ "quick"
					[effect]
						apply_to="movement"
						increase="1"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="-5%"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Knight,Lancer"
			alignment="lawful"
			alpha="256"
			attacks_left="0"
			cost="23"
			die_sound="horse-die.ogg"
			ellipse="misc/ellipse"
			experience="10"
			facing="n"
			flag_rgb="magenta"
			flying="no"
			gender="male"
			goto_x="-999"
			goto_y="-999"
			hitpoints="22"
			id="Horseman-72"
			image="units/human-loyalists/horseman.png"
#textdomain wesnoth-units
			language_name=_ "Horseman"
			level="1"
			max_attacks="1"
			max_experience="31"
			max_hitpoints="37"
			max_moves="9"
			movement="8"
			movement_type="mounted"
			moves="0"
			name="Tunvan"
			profile="portraits/humans/horseman.png"
			race="human"
			random_gender="no"
			random_traits="no"
			resting="no"
			side="2"
			type="Horseman"
			undead_variation="mounted"
			underlying_id="72"
			unrenamable="no"
			upkeep="full"
			usage="fighter"
			x="28"
			y="6"
			zoc="yes"
			[attack_anim]
				hits="no"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-250"
					end="-225"
					image="units/human-loyalists/horseman.png"
					sound="horse-canter.wav"
				[/frame]
				[frame]
					begin="-225"
					end="-150"
					image="units/human-loyalists/horseman-moving.png"
				[/frame]
				[frame]
					begin="-150"
					end="100"
					image="units/human-loyalists/horseman-attack.png"
					sound="miss-1.ogg,miss-2.ogg,miss-3.ogg"
				[/frame]
				[frame]
					begin="100"
					end="175"
					image="units/human-loyalists/horseman-moving.png"
				[/frame]
				[frame]
					begin="175"
					end="200"
					image="units/human-loyalists/horseman.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				hits="yes"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-250"
					end="-200"
					image="units/human-loyalists/horseman.png"
					sound="horse-canter.wav"
				[/frame]
				[frame]
					begin="-200"
					end="-150"
					image="units/human-loyalists/horseman-moving.png"
				[/frame]
				[frame]
					begin="-150"
					end="100"
					image="units/human-loyalists/horseman-attack.png"
					sound="spear.ogg"
				[/frame]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/horseman-moving.png"
				[/frame]
				[frame]
					begin="150"
					end="200"
					image="units/human-loyalists/horseman.png"
				[/frame]
			[/attack_anim]
			[defend]
				start_time="-126"
				[frame]
					duration="1"
					image="units/human-loyalists/horseman.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/horseman-defend.png"
				[/frame]
				[if]
					hits="hit"
					[frame]
						duration="150"
						image="units/human-loyalists/horseman-defend.png"
						sound="horse-hit-1.ogg,horse-hit-2.ogg,horse-hit-3.ogg"
					[/frame]
				[/if]
				[else]
					hits="miss,kill"
					[frame]
						duration="150"
						image="units/human-loyalists/horseman-defend.png"
					[/frame]
				[/else]
				[frame]
					duration="1"
					image="units/human-loyalists/horseman.png"
				[/frame]
			[/defend]
			[movement_anim]
				[frame]
					begin="0"
					end="150"
					image="units/human-loyalists/horseman-moving.png"
				[/frame]
			[/movement_anim]
			[defense]
				castle="60"
				cave="80"
				deep_water="80"
				flat="60"
				forest="70"
				frozen="70"
				fungus="80"
				hills="60"
				impassable="80"
				mountains="80"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="80"
				unwalkable="80"
				village="60"
			[/defense]
			[movement_costs]
				castle="1"
				cave="4"
				deep_water="99"
				flat="1"
				forest="3"
				frozen="2"
				fungus="4"
				hills="2"
				impassable="99"
				mountains="99"
				reef="3"
				sand="2"
				shallow_water="4"
				swamp_water="4"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="80"
				blade="80"
				cold="100"
				fire="100"
				impact="70"
				pierce="120"
			[/resistance]
			[variables]
			[/variables]
			[status]
			[/status]
			[attack]
				damage="10"
				description=_ "spear"
				name="spear"
				number="2"
				range="melee"
				type="pierce"
				[specials]
					[damage]
						active_on="offense"
						apply_to="both"
#textdomain wesnoth
						description=_ "Charge:
When used offensively, this attack deals double damage to the target. It also causes this unit to take double damage from the target's counterattack."
						id="charge"
						multiply="2"
						name=_ "charge"
					[/damage]
				[/specials]
			[/attack]
			[modifications]
				[trait]
					female_name=_ "female^quick"
					id="quick"
					male_name=_ "quick"
					name=_ "quick"
					[effect]
						apply_to="movement"
						increase="1"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="-5%"
					[/effect]
				[/trait]
				[trait]
					female_name=_ "female^strong"
					id="strong"
					male_name=_ "strong"
					name=_ "strong"
					[effect]
						apply_to="attack"
						increase_damage="1"
						range="melee"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="1"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="White Mage,Red Mage"
			alignment="lawful"
			alpha="256"
			attacks_left="0"
			cost="20"
			die_sound="human-female-die-1.ogg,human-female-die-2.ogg,human-female-die-3.ogg"
			ellipse="misc/ellipse"
			experience="2"
			facing="nw"
			flag_rgb="magenta"
			flying="no"
			gender="female"
			goto_x="-999"
			goto_y="-999"
			hitpoints="20"
			id="Mage-75"
			image="units/human-magi/mage+female.png"
#textdomain wesnoth-units
			language_name=_ "female^Mage"
			level="1"
			max_attacks="1"
			max_experience="42"
			max_hitpoints="30"
			max_moves="5"
			movement="5"
			movement_type="smallfoot"
			moves="0"
			name="Realyan"
			profile="portraits/humans/mage+female.png"
			race="human"
			random_gender="no"
			random_traits="no"
			resting="no"
			side="2"
			type="Mage"
			underlying_id="75"
			unrenamable="no"
			upkeep="full"
			usage="mixed fighter"
			x="23"
			y="9"
			zoc="yes"
			[attack_anim]
				magic_missile_flare_start_time="-750"
				magic_missile_start_time="-750"
				magic_missile_trail_1_start_time="-350"
				magic_missile_trail_2_start_time="-350"
				magic_missile_trail_3_start_time="-350"
				offset="0"
				[filter_attack]
					name="missile"
				[/filter_attack]
				[magic_missile_frame]
					duration="400"
					halo="halo/mage-halo1.png,halo/mage-halo2.png,halo/mage-halo3.png,halo/mage-halo4.png,halo/mage-halo5.png"
					halo_x="11~0"
					halo_y="-20~-54"
					offset="0.001~-0.083,-0.083~-0.25,-0.25~-0.5"
				[/magic_missile_frame]
				[magic_missile_frame]
					duration="350"
					halo="halo/mage-halo1.png,halo/mage-halo2.png,halo/mage-halo3.png,halo/mage-halo4.png,halo/mage-halo5.png,misc/blank-hex.png:1"
					halo_y="-54~-45,-45~-27,-27~0"
					offset="-0.5~-0.25,-0.25~0.25,0.25~1.0"
				[/magic_missile_frame]
				[magic_missile_trail_1_frame]
					duration="350"
					halo="misc/blank-hex.png:40,halo/mage-preparation-halo1.png,halo/mage-preparation-halo2.png,halo/mage-preparation-halo3.png,halo/mage-preparation-halo4.png,halo/mage-preparation-halo5.png,halo/mage-preparation-halo6.png,halo/mage-preparation-halo7.png,misc/blank-hex.png:1"
					halo_y="-54:40,-54~-45,-45~-27,-27~0"
					offset="0.001:40,-0.5~-0.25,-0.25~0.25,0.25~1.0"
				[/magic_missile_trail_1_frame]
				[magic_missile_trail_2_frame]
					duration="350"
					halo="misc/blank-hex.png:80,halo/mage-preparation-halo1.png,halo/mage-preparation-halo2.png,halo/mage-preparation-halo3.png,halo/mage-preparation-halo4.png,halo/mage-preparation-halo5.png,halo/mage-preparation-halo6.png,halo/mage-preparation-halo7.png,misc/blank-hex.png:1"
					halo_y="-54:80,-54~-45,-45~-27,-27~0"
					offset="0.001:80,-0.5~-0.25,-0.25~0.25,0.25~1.0"
				[/magic_missile_trail_2_frame]
				[magic_missile_trail_3_frame]
					duration="350"
					halo="misc/blank-hex.png:120,halo/mage-preparation-halo1.png,halo/mage-preparation-halo2.png,halo/mage-preparation-halo3.png,halo/mage-preparation-halo4.png,halo/mage-preparation-halo5.png,halo/mage-preparation-halo6.png,halo/mage-preparation-halo7.png,misc/blank-hex.png:1"
					halo_y="-54:120,-54~-45,-45~-27,-27~0"
					offset="0.001:120,-0.5~-0.25,-0.25~0.25,0.25~1.0"
				[/magic_missile_trail_3_frame]
				[magic_missile_flare_frame]
					duration="600"
					halo="halo/mage-preparation-halo1.png,halo/mage-preparation-halo2.png,halo/mage-preparation-halo3.png,halo/mage-preparation-halo4.png,halo/mage-preparation-halo5.png,halo/mage-preparation-halo6.png,halo/mage-preparation-halo7.png,misc/blank-hex.png:1"
					halo_x="11"
					halo_y="-20"
					offset="0"
				[/magic_missile_flare_frame]
				[frame]
					begin="-800"
					end="-700"
					image="units/human-magi/mage+female-attack-magic1.png"
				[/frame]
				[frame]
					begin="-700"
					end="-350"
					image="units/human-magi/mage+female-attack-magic2.png"
				[/frame]
				[if]
					hits="no"
					[frame]
						begin="-350"
						end="-100"
						image="units/human-magi/mage+female-attack-magic2.png"
						sound="magic-missile-1-miss.ogg,magic-missile-2-miss.ogg,magic-missile-3-miss.ogg"
					[/frame]
				[/if]
				[else]
					hits="yes"
					[frame]
						begin="-350"
						end="-100"
						image="units/human-magi/mage+female-attack-magic2.png"
						sound="magic-missile-1.ogg,magic-missile-2.ogg,magic-missile-3.ogg"
					[/frame]
				[/else]
				[frame]
					begin="-100"
					end="100"
					image="units/human-magi/mage+female-attack-magic1.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				[filter_attack]
					name="staff"
				[/filter_attack]
				[frame]
					begin="-250"
					end="-200"
					image="units/human-magi/mage+female.png"
				[/frame]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-magi/mage+female-attack-staff1.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-magi/mage+female-attack-staff2.png"
						sound="staff.wav"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-magi/mage+female-attack-staff2.png"
						sound="miss-1.ogg,miss-2.ogg,miss-3.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-magi/mage+female-attack-magic1.png"
				[/frame]
				[frame]
					begin="150"
					end="200"
					image="units/human-magi/mage+female.png"
				[/frame]
			[/attack_anim]
			[defend]
				start_time="-126"
				[frame]
					duration="1"
					image="units/human-magi/mage+female.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-magi/mage+female-defend.png"
				[/frame]
				[if]
					hits="hit"
					[frame]
						duration="150"
						image="units/human-magi/mage+female-defend.png"
						sound="human-female-hit-1.ogg,human-female-hit-2.ogg,human-female-hit-3.ogg"
					[/frame]
				[/if]
				[else]
					hits="miss,kill"
					[frame]
						duration="150"
						image="units/human-magi/mage+female-defend.png"
					[/frame]
				[/else]
				[frame]
					duration="1"
					image="units/human-magi/mage+female.png"
				[/frame]
			[/defend]
			[portrait]
				image="portraits/humans/transparent/mage+female.png"
				mirror="false"
				side="left"
				size="400"
			[/portrait]
			[portrait]
				image="portraits/humans/transparent/mage+female.png"
				mirror="true"
				side="right"
				size="400"
			[/portrait]
			[defense]
				castle="40"
				cave="60"
				deep_water="80"
				flat="60"
				forest="50"
				frozen="80"
				fungus="50"
				hills="50"
				impassable="60"
				mountains="40"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="80"
				unwalkable="80"
				village="40"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="99"
				flat="1"
				forest="2"
				frozen="3"
				fungus="2"
				hills="2"
				impassable="99"
				mountains="3"
				reef="2"
				sand="2"
				shallow_water="3"
				swamp_water="3"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="80"
				blade="100"
				cold="100"
				fire="100"
				impact="100"
				pierce="100"
			[/resistance]
			[variables]
			[/variables]
			[status]
			[/status]
			[attack]
				damage="6"
				description=_ "staff"
				icon="attacks/staff-magic.png"
				name="staff"
				number="1"
				range="melee"
				type="impact"
			[/attack]
			[attack]
				damage="7"
				description=_ "missile"
				icon="attacks/magic-missile.png"
				name="missile"
				number="3"
				range="ranged"
				type="fire"
				[specials]
					[chance_to_hit]
						cumulative="no"
#textdomain wesnoth
						description=_ "Magical:
This attack always has a 70% chance to hit regardless of the defensive ability of the unit being attacked."
						id="magical"
						name=_ "magical"
						value="70"
					[/chance_to_hit]
				[/specials]
			[/attack]
			[modifications]
				[trait]
					female_name=_ "female^strong"
					id="strong"
					male_name=_ "strong"
					name=_ "female^strong"
					[effect]
						apply_to="attack"
						increase_damage="1"
						range="melee"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="1"
					[/effect]
				[/trait]
				[trait]
					female_name=_ "female^resilient"
					id="resilient"
					male_name=_ "resilient"
					name=_ "female^resilient"
					[effect]
						apply_to="hitpoints"
						increase_total="4"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="1"
						times="per level"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Shock Trooper"
			alignment="lawful"
			alpha="256"
			attacks_left="1"
			cost="19"
			die_sound="human-die-1.ogg,human-die-2.ogg,human-die-3.ogg"
			ellipse="misc/ellipse"
			experience="0"
			facing="n"
			flag_rgb="magenta"
			flying="no"
			gender="male"
			goto_x="-999"
			goto_y="-999"
			hitpoints="37"
			id="Heavy Infantryman-78"
			image="units/human-loyalists/heavyinfantry.png"
#textdomain wesnoth-units
			language_name=_ "Heavy Infantryman"
			level="1"
			max_attacks="1"
			max_experience="28"
			max_hitpoints="37"
			max_moves="5"
			movement="4"
			movement_type="armoredfoot"
			moves="0"
			name="Yreonry"
			profile="portraits/humans/heavy-infantry.png"
			race="human"
			random_gender="no"
			random_traits="no"
			resting="no"
			side="2"
			type="Heavy Infantryman"
			underlying_id="78"
			unrenamable="no"
			upkeep="full"
			usage="fighter"
			x="19"
			y="15"
			zoc="yes"
			[attack_anim]
				[filter_attack]
					name="mace"
				[/filter_attack]
				[frame]
					begin="-230"
					end="-100"
					image="units/human-loyalists/heavyinfantry-attack-1.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/heavyinfantry-attack-2.png"
						sound="mace.wav"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/heavyinfantry-attack-2.png"
						sound="miss-1.ogg,miss-2.ogg,miss-3.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="200"
					image="units/human-loyalists/heavyinfantry.png"
				[/frame]
			[/attack_anim]
			[defend]
				start_time="-126"
				[frame]
					duration="1"
					image="units/human-loyalists/heavyinfantry-defend-1.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavyinfantry-defend-2.png"
				[/frame]
				[if]
					hits="hit"
					[frame]
						duration="150"
						image="units/human-loyalists/heavyinfantry-defend-2.png"
						sound="human-hit-1.ogg,human-hit-2.ogg,human-hit-3.ogg,human-hit-4.ogg,human-hit-5.ogg"
					[/frame]
				[/if]
				[else]
					hits="miss,kill"
					[frame]
						duration="150"
						image="units/human-loyalists/heavyinfantry-defend-2.png"
					[/frame]
				[/else]
				[frame]
					duration="1"
					image="units/human-loyalists/heavyinfantry-defend-1.png"
				[/frame]
			[/defend]
			[idle_anim]
				start_time="0"
				[filter]
					[not]
						[filter_wml]
							[status]
								poisoned="yes"
							[/status]
						[/filter_wml]
					[/not]
				[/filter]
				[filter]
					[filter_adjacent]
						count="0"
						is_enemy="yes"
					[/filter_adjacent]
				[/filter]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-1.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-2.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-3.png"
				[/frame]
				[frame]
					duration="300"
					image="units/human-loyalists/heavy-infantry-idle-4.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-5.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-6.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-7.png"
				[/frame]
				[frame]
					duration="1000"
					image="units/human-loyalists/heavy-infantry-idle-8.png"
				[/frame]
				[frame]
					duration="1000"
					image="units/human-loyalists/heavy-infantry-idle-9.png"
				[/frame]
				[frame]
					duration="1000"
					image="units/human-loyalists/heavy-infantry-idle-8.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-7.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-6.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-5.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-4.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-3.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-2.png"
				[/frame]
				[frame]
					duration="100"
					image="units/human-loyalists/heavy-infantry-idle-1.png"
				[/frame]
			[/idle_anim]
			[portrait]
				image="portraits/humans/transparent/heavy-infantry.png"
				mirror="false"
				side="left"
				size="400"
			[/portrait]
			[portrait]
				image="portraits/humans/transparent/heavy-infantry.png"
				mirror="true"
				side="right"
				size="400"
			[/portrait]
			[trait]
#textdomain wesnoth
				description=_ "Fights normally during unfavorable times of day/night"
				female_name=_ "female^fearless"
				id="fearless"
				male_name=_ "fearless"
			[/trait]
			[defense]
				castle="50"
				cave="60"
				deep_water="80"
				flat="70"
				forest="60"
				frozen="80"
				fungus="60"
				hills="60"
				impassable="60"
				mountains="80"
				reef="80"
				sand="80"
				shallow_water="90"
				swamp_water="90"
				unwalkable="80"
				village="60"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="99"
				flat="1"
				forest="2"
				frozen="4"
				fungus="2"
				hills="3"
				impassable="99"
				mountains="99"
				reef="3"
				sand="2"
				shallow_water="4"
				swamp_water="4"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="80"
				blade="50"
				cold="110"
				fire="110"
				impact="90"
				pierce="60"
			[/resistance]
			[variables]
			[/variables]
			[status]
				hidden="yes"
			[/status]
			[attack]
				damage="12"
#textdomain wesnoth-units
				description=_ "mace"
				name="mace"
				number="2"
				range="melee"
				type="impact"
			[/attack]
			[modifications]
				[trait]
#textdomain wesnoth
					female_name=_ "female^strong"
					id="strong"
					male_name=_ "strong"
					name=_ "strong"
					[effect]
						apply_to="attack"
						increase_damage="1"
						range="melee"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="1"
					[/effect]
				[/trait]
				[trait]
					female_name=_ "female^quick"
					id="quick"
					male_name=_ "quick"
					name=_ "quick"
					[effect]
						apply_to="movement"
						increase="1"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="-5%"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Swordsman,Pikeman,Javelineer"
			alignment="lawful"
			alpha="256"
			attacks_left="0"
			cost="14"
			die_sound="human-die-1.ogg,human-die-2.ogg,human-die-3.ogg"
			ellipse="misc/ellipse"
			experience="0"
			facing="nw"
			flag_rgb="magenta"
			flying="no"
			gender="male"
			goto_x="-999"
			goto_y="-999"
			hitpoints="37"
			id="Spearman-79"
			image="units/human-loyalists/spearman.png"
#textdomain wesnoth-units
			language_name=_ "Spearman"
			level="1"
			max_attacks="1"
			max_experience="24"
			max_hitpoints="37"
			max_moves="5"
			movement="5"
			movement_type="smallfoot"
			moves="0"
			name="Gubry"
			profile="portraits/humans/spearman.png"
			race="human"
			random_gender="no"
			random_traits="no"
			resting="no"
			side="2"
			type="Spearman"
			underlying_id="79"
			unrenamable="no"
			upkeep="full"
			usage="fighter"
			x="19"
			y="20"
			zoc="yes"
			[attack_anim]
				[filter_attack]
					name="javelin"
				[/filter_attack]
				[missile_frame]
					begin="-150"
					end="0"
					image="projectiles/spear-n.png"
					image_diagonal="projectiles/spear-ne.png"
				[/missile_frame]
				[frame]
					begin="-250"
					end="-150"
					image="units/human-loyalists/spearman-death1.png"
					sound="throw-1.wav,throw-2.wav,throw-3.wav,throw-4.wav"
				[/frame]
				[frame]
					begin="-150"
					end="-100"
					image="units/human-loyalists/spearman-attack-ranged.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="-50"
						image="units/human-loyalists/spearman-attack-ranged.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="-50"
						image="units/human-loyalists/spearman-attack-ranged.png"
					[/frame]
				[/else]
				[frame]
					begin="-50"
					end="50"
					image="units/human-loyalists/spearman-attack-ranged2.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="s"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-150"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[frame]
					begin="-150"
					end="-50"
					image="units/human-loyalists/spearman-attack-s-1.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-50"
						end="100"
						image="units/human-loyalists/spearman-attack-s-2.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-50"
						end="100"
						image="units/human-loyalists/spearman-attack-s-2.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman-attack-s-1.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="n"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-n.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-n.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="ne,nw"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-ne.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-ne.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="se,sw"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman.png"
				[/frame]
			[/attack_anim]
			[death]
				[frame]
					begin="0"
					end="125"
					image="units/human-loyalists/spearman-death1.png"
				[/frame]
				[frame]
					begin="125"
					end="250"
					image="units/human-loyalists/spearman-death2.png"
				[/frame]
				[frame]
					begin="250"
					end="375"
					image="units/human-loyalists/spearman-death3.png"
				[/frame]
				[frame]
					begin="375"
					end="500"
					image="units/human-loyalists/spearman-death4.png"
				[/frame]
			[/death]
			[defend]
				[frame]
					begin="-100"
					end="-90"
					image="units/human-loyalists/spearman-defend-2.png"
				[/frame]
				[frame]
					begin="-90"
					end="90"
					image="units/human-loyalists/spearman-defend.png"
				[/frame]
				[frame]
					begin="90"
					end="100"
					image="units/human-loyalists/spearman-defend-2.png"
				[/frame]
			[/defend]
			[portrait]
				image="portraits/humans/transparent/spearman.png"
				mirror="false"
				side="left"
				size="400"
			[/portrait]
			[portrait]
				image="portraits/humans/transparent/spearman.png"
				mirror="true"
				side="right"
				size="400"
			[/portrait]
			[defense]
				castle="40"
				cave="60"
				deep_water="80"
				flat="60"
				forest="50"
				frozen="80"
				fungus="50"
				hills="50"
				impassable="60"
				mountains="40"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="80"
				unwalkable="80"
				village="40"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="99"
				flat="1"
				forest="2"
				frozen="3"
				fungus="2"
				hills="2"
				impassable="99"
				mountains="3"
				reef="2"
				sand="2"
				shallow_water="3"
				swamp_water="3"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="80"
				blade="100"
				cold="100"
				fire="100"
				impact="100"
				pierce="100"
			[/resistance]
			[variables]
			[/variables]
			[status]
			[/status]
			[attack]
				damage="8"
				description=_ "spear"
				icon="attacks/spear.png"
				name="spear"
				number="3"
				range="melee"
				type="pierce"
				[specials]
					[firststrike]
#textdomain wesnoth
						description=_ "First Strike:
This unit always strikes first with this attack, even if they are defending."
						id="firststrike"
						name=_ "firststrike"
					[/firststrike]
				[/specials]
			[/attack]
			[attack]
				damage="6"
#textdomain wesnoth-units
				description=_ "javelin"
				icon="attacks/javelin-human.png"
				name="javelin"
				number="1"
				range="ranged"
				type="pierce"
			[/attack]
			[modifications]
				[trait]
#textdomain wesnoth
					female_name=_ "female^intelligent"
					id="intelligent"
					male_name=_ "intelligent"
					name=_ "intelligent"
					[effect]
						apply_to="max_experience"
						increase="-20%"
					[/effect]
				[/trait]
				[trait]
					female_name=_ "female^strong"
					id="strong"
					male_name=_ "strong"
					name=_ "strong"
					[effect]
						apply_to="attack"
						increase_damage="1"
						range="melee"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="1"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
		[unit]
			advances_to="Swordsman,Pikeman,Javelineer"
			alignment="lawful"
			alpha="256"
			attacks_left="0"
			cost="14"
			die_sound="human-die-1.ogg,human-die-2.ogg,human-die-3.ogg"
			ellipse="misc/ellipse"
			experience="0"
			facing="n"
			flag_rgb="magenta"
			flying="no"
			gender="male"
			goto_x="-999"
			goto_y="-999"
			hitpoints="34"
			id="Spearman-80"
			image="units/human-loyalists/spearman.png"
#textdomain wesnoth-units
			language_name=_ "Spearman"
			level="1"
			max_attacks="1"
			max_experience="24"
			max_hitpoints="34"
			max_moves="6"
			movement="5"
			movement_type="smallfoot"
			moves="0"
			name="Linry"
			profile="portraits/humans/spearman.png"
			race="human"
			random_gender="no"
			random_traits="no"
			resting="no"
			side="2"
			type="Spearman"
			underlying_id="80"
			unrenamable="no"
			upkeep="full"
			usage="fighter"
			x="21"
			y="20"
			zoc="yes"
			[attack_anim]
				[filter_attack]
					name="javelin"
				[/filter_attack]
				[missile_frame]
					begin="-150"
					end="0"
					image="projectiles/spear-n.png"
					image_diagonal="projectiles/spear-ne.png"
				[/missile_frame]
				[frame]
					begin="-250"
					end="-150"
					image="units/human-loyalists/spearman-death1.png"
					sound="throw-1.wav,throw-2.wav,throw-3.wav,throw-4.wav"
				[/frame]
				[frame]
					begin="-150"
					end="-100"
					image="units/human-loyalists/spearman-attack-ranged.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="-50"
						image="units/human-loyalists/spearman-attack-ranged.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="-50"
						image="units/human-loyalists/spearman-attack-ranged.png"
					[/frame]
				[/else]
				[frame]
					begin="-50"
					end="50"
					image="units/human-loyalists/spearman-attack-ranged2.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="s"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-150"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[frame]
					begin="-150"
					end="-50"
					image="units/human-loyalists/spearman-attack-s-1.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-50"
						end="100"
						image="units/human-loyalists/spearman-attack-s-2.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-50"
						end="100"
						image="units/human-loyalists/spearman-attack-s-2.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman-attack-s-1.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="n"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-n.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-n.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="ne,nw"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-ne.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack-ne.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman.png"
				[/frame]
			[/attack_anim]
			[attack_anim]
				direction="se,sw"
				[filter_attack]
					name="spear"
				[/filter_attack]
				[frame]
					begin="-200"
					end="-100"
					image="units/human-loyalists/spearman.png"
				[/frame]
				[if]
					hits="yes"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack.png"
						sound="spear.ogg"
					[/frame]
				[/if]
				[else]
					hits="no"
					[frame]
						begin="-100"
						end="100"
						image="units/human-loyalists/spearman-attack.png"
						sound="spear-miss.ogg"
					[/frame]
				[/else]
				[frame]
					begin="100"
					end="150"
					image="units/human-loyalists/spearman.png"
				[/frame]
			[/attack_anim]
			[death]
				[frame]
					begin="0"
					end="125"
					image="units/human-loyalists/spearman-death1.png"
				[/frame]
				[frame]
					begin="125"
					end="250"
					image="units/human-loyalists/spearman-death2.png"
				[/frame]
				[frame]
					begin="250"
					end="375"
					image="units/human-loyalists/spearman-death3.png"
				[/frame]
				[frame]
					begin="375"
					end="500"
					image="units/human-loyalists/spearman-death4.png"
				[/frame]
			[/death]
			[defend]
				[frame]
					begin="-100"
					end="-90"
					image="units/human-loyalists/spearman-defend-2.png"
				[/frame]
				[frame]
					begin="-90"
					end="90"
					image="units/human-loyalists/spearman-defend.png"
				[/frame]
				[frame]
					begin="90"
					end="100"
					image="units/human-loyalists/spearman-defend-2.png"
				[/frame]
			[/defend]
			[portrait]
				image="portraits/humans/transparent/spearman.png"
				mirror="false"
				side="left"
				size="400"
			[/portrait]
			[portrait]
				image="portraits/humans/transparent/spearman.png"
				mirror="true"
				side="right"
				size="400"
			[/portrait]
			[defense]
				castle="40"
				cave="60"
				deep_water="80"
				flat="60"
				forest="50"
				frozen="80"
				fungus="50"
				hills="50"
				impassable="60"
				mountains="40"
				reef="70"
				sand="70"
				shallow_water="80"
				swamp_water="80"
				unwalkable="80"
				village="40"
			[/defense]
			[movement_costs]
				castle="1"
				cave="2"
				deep_water="99"
				flat="1"
				forest="2"
				frozen="3"
				fungus="2"
				hills="2"
				impassable="99"
				mountains="3"
				reef="2"
				sand="2"
				shallow_water="3"
				swamp_water="3"
				unwalkable="99"
				village="1"
			[/movement_costs]
			[resistance]
				arcane="80"
				blade="100"
				cold="100"
				fire="100"
				impact="100"
				pierce="100"
			[/resistance]
			[variables]
			[/variables]
			[status]
			[/status]
			[attack]
				damage="7"
				description=_ "spear"
				icon="attacks/spear.png"
				name="spear"
				number="3"
				range="melee"
				type="pierce"
				[specials]
					[firststrike]
#textdomain wesnoth
						description=_ "First Strike:
This unit always strikes first with this attack, even if they are defending."
						id="firststrike"
						name=_ "firststrike"
					[/firststrike]
				[/specials]
			[/attack]
			[attack]
				damage="6"
#textdomain wesnoth-units
				description=_ "javelin"
				icon="attacks/javelin-human.png"
				name="javelin"
				number="1"
				range="ranged"
				type="pierce"
			[/attack]
			[modifications]
				[trait]
#textdomain wesnoth
					female_name=_ "female^quick"
					id="quick"
					male_name=_ "quick"
					name=_ "quick"
					[effect]
						apply_to="movement"
						increase="1"
					[/effect]
					[effect]
						apply_to="hitpoints"
						increase_total="-5%"
					[/effect]
				[/trait]
				[trait]
					female_name=_ "female^intelligent"
					id="intelligent"
					male_name=_ "intelligent"
					name=_ "intelligent"
					[effect]
						apply_to="max_experience"
						increase="-20%"
					[/effect]
				[/trait]
			[/modifications]
		[/unit]
	[/side]
	[time]
		blue="0"
		green="-20"
		id="dawn"
		image="misc/schedule-dawn.png"
		lawful_bonus="0"
		name=_ "Dawn"
		red="-20"
	[/time]
	[time]
		blue="0"
		green="0"
		id="morning"
		image="misc/schedule-morning.png"
		lawful_bonus="25"
		name=_ "Morning"
		red="0"
	[/time]
	[time]
		blue="0"
		green="0"
		id="afternoon"
		image="misc/schedule-afternoon.png"
		lawful_bonus="25"
		name=_ "Afternoon"
		red="0"
	[/time]
	[time]
		blue="-20"
		green="-20"
		id="dusk"
		image="misc/schedule-dusk.png"
		lawful_bonus="0"
		name=_ "Dusk"
		red="0"
	[/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_after="0"
		ms_before="12000"
		name="knolls.ogg"
	[/music]
	[music]
		append="yes"
		ms_after="0"
		ms_before="12000"
		name="wanderer.ogg"
	[/music]
	[music]
		append="yes"
		ms_after="0"
		ms_before="12000"
		name="battle.ogg"
	[/music]
	[music]
		append="yes"
		ms_after="0"
		ms_before="12000"
		name="transience.ogg"
	[/music]
	[music]
		append="yes"
		ms_after="0"
		ms_before="12000"
		name="revelation.ogg"
	[/music]
	[music]
		append="yes"
		ms_after="0"
		ms_before="12000"
		name="loyalists.ogg"
	[/music]
	[music]
		append="yes"
		ms_after="0"
		ms_before="12000"
		name="the_king_is_dead.ogg"
	[/music]
	[music]
		append="yes"
		ms_after="0"
		ms_before="12000"
		name="knalgan_theme.ogg"
	[/music]
	[music]
		append="yes"
		ms_after="0"
		ms_before="12000"
		name="the_city_falls.ogg"
	[/music]
	[music]
		append="yes"
		ms_after="0"
		ms_before="12000"
		name="nunc_dimittis.ogg"
	[/music]
	[music]
		append="yes"
		ms_after="0"
		ms_before="12000"
		name="breaking_the_chains.ogg"
	[/music]
	[music]
		append="yes"
		ms_after="0"
		ms_before="12000"
		name="elvish-theme.ogg"
	[/music]
	[music]
		append="yes"
		ms_after="0"
		ms_before="12000"
		name="legends_of_the_north.ogg"
	[/music]
	[music]
		append="yes"
		ms_after="0"
		ms_before="12000"
		name="traveling_minstrels.ogg"
	[/music]
	[music]
		append="yes"
		ms_after="0"
		ms_before="12000"
		name="underground.ogg"
	[/music]
	[music]
		append="yes"
		ms_after="0"
		ms_before="12000"
		name="vengeful.ogg"
	[/music]
	[music]
		append="yes"
		ms_after="0"
		ms_before="12000"
		name="frantic.ogg"
	[/music]
	[music]
		append="yes"
		ms_after="0"
		ms_before="12000"
		name="the_dangerous_symphony.ogg"
	[/music]
	[music]
		append="yes"
		ms_after="0"
		ms_before="12000"
		name="heroes_rite.ogg"
	[/music]
	[music]
		append="yes"
		ms_after="0"
		ms_before="12000"
		name="suspense.ogg"
	[/music]
	[music]
		append="yes"
		ms_after="0"
		ms_before="12000"
		name="the_deep_path.ogg"
	[/music]
	[music]
		append="yes"
		ms_after="0"
		ms_before="12000"
		name="siege_of_laurelmor.ogg"
	[/music]
	[variables]
		damage_inflicted="4"
		side_number="1"
		turn_number="16"
	[/variables]
	[player]
		can_recruit="Bowman,Cavalryman,Fencer,Heavy Infantryman,Horseman,Mage,Merman Fighter,Spearman"
		gold="-1"
		gold_add="no"
		save_id="Hagbart2"
	[/player]
	[player]
		can_recruit="Dark Adept,Ghost,Ghoul,Skeleton,Skeleton Archer,Vampire Bat,Walking Corpse"
		gold="-1"
		gold_add="no"
		save_id="foxsatan1"
	[/player]
[/snapshot]
[replay_start]
	current_tod="0"
	description="The Freelands, also known to the people of the far east as The Land of No Kings, lie in between the Wilderlands and the Kingdom of Carorath, separating a land of absolute law from a land of absolute savagery. The people of the Freelands have been battling would-be conquerors of their land for hundreds of years, repelling great beasts from their western borders, and Carorathian Imperialists from their eastern borders."
	experience_modifier="70"
	hash="AZpjPHK9RkU0>,MQ5rgweyP<JzghTihOJuI7sg1ofROR9BWAOxx4eNCrLCAawpGy1PNS9jQpzls8f-x>JH6Z+AjIQoLdwN-L<ur6gO9uHgd>jKtxiiu590Q8hM4gox7."
	id="multiplayer_The_Freelands"
	map_data="border_size=1
usage=map

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

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

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

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

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

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

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

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

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

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

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

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

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

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

#returns average defense of the unit #

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

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

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

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


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


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

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

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

# ==2== based on village possession #

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

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

# multipled by 1000 to increase precision #

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

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

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

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

#==1==  basic evaluation #

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

#returns average defense of the unit #

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

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

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

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


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


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

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

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

# ==2== based on village possession #

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

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

# multipled by 1000 to increase precision #

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

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

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

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

#==1==  basic evaluation #

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

#returns average defense of the unit #

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

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

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

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


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


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

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

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

# ==2== based on village possession #

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

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

# multipled by 1000 to increase precision #

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

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

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

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

#==1==  basic evaluation #

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

#returns average defense of the unit #

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

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

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

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


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


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

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

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

# ==2== based on village possession #

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

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

# multipled by 1000 to increase precision #

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

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

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

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

#==1==  basic evaluation #

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

#returns average defense of the unit #

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

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

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

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


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


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

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

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

# ==2== based on village possession #

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

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

# multipled by 1000 to increase precision #

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

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

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

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

#==1==  basic evaluation #

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

#returns average defense of the unit #

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

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

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

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


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


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

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

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

# ==2== based on village possession #

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

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

# multipled by 1000 to increase precision #

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

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

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

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

#==1==  basic evaluation #

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

#returns average defense of the unit #

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

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

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

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


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


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

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

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

# ==2== based on village possession #

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

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

# multipled by 1000 to increase precision #

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

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

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

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

#==1==  basic evaluation #

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

faiend
"
			[/team_formula]
		[/ai]
		[ai]
			villages_per_scout="8"
		[/ai]
	[/side]
	[side]
		allow_changes="yes"
		allow_player="yes"
		canrecruit="yes"
		colour="2"
		controller="network"
		current_player="Hagbart"
		flag_rgb="magenta"
		fog="yes"
		gender="male"
		gold="100"
		id="Hagbart2"
		image="units/human-loyalists/lieutenant.png"
		income="0"
		leader="Lieutenant,Swordsman,Pikeman,Javelineer,Shock Trooper,Longbowman,White Mage,Red Mage"
		mp_countdown="yes"
		mp_countdown_action_bonus="13"
		mp_countdown_init_time="270"
		mp_countdown_reservoir_time="330"
		mp_countdown_turn_bonus="285"
		name="Hagbart"
		random_leader="Lieutenant,Swordsman,Pikeman,Javelineer,Longbowman,Red Mage"
		recruit="Cavalryman,Horseman,Spearman,Fencer,Heavy Infantryman,Bowman,Mage,Merman Fighter"
		save_id="Hagbart2"
		share_maps="no"
		share_view="yes"
		shroud="no"
		side="2"
		team_name="south"
		terrain_liked="Gg, Ww, Wo"
		type="Javelineer"
		user_team_name="wesnoth-multiplayerteamname^South"
		village_gold="2"
		[ai]
			recruitment_pattern="fighter,fighter,fighter,archer,mixed fighter,scout"
			villages_per_scout="8"
			[team_formula]
				rulebase="fai 'recruitment.fai'
		# ===== Some general functions used later ==== #

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

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

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

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

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

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

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

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

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

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

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

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

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

#returns average defense of the unit #

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

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

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

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


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


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

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

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

# ==2== based on village possession #

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

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

# multipled by 1000 to increase precision #

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

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

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

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

#==1==  basic evaluation #

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

faiend
"
			[/team_formula]
		[/ai]
		[ai]
			villages_per_scout="8"
		[/ai]
	[/side]
[/replay_start]
[statistics]
	mid_scenario="yes"
	[scenario]
		scenario="2p - The Freelands"
		[team]
			[recruits]
				Bowman="1"
				Cavalryman="1"
				Heavy Infantryman="2"
				Horseman="2"
				Mage="3"
				Spearman="8"
			[/recruits]
			[recalls]
			[/recalls]
			[advances]
			[/advances]
			[deaths]
				Bowman="1"
				Spearman="1"
			[/deaths]
			[killed]
				Dark Adept="1"
				Ghoul="2"
				Skeleton="1"
				Skeleton Archer="2"
				Vampire Bat="1"
				Walking Corpse="1"
			[/killed]
			[attacks]
				[sequence]
					s0="2"
					s000="1"
					s01="3"
					s1="1"
					s10="1"
					s100="1"
					s111="1"
					_num="40"
				[/sequence]
				[sequence]
					s01="1"
					_num="50"
				[/sequence]
				[sequence]
					s001="1"
					s1="1"
					s10="1"
					s100="1"
					s11="2"
					s111="1"
					_num="60"
				[/sequence]
				[sequence]
					s001="1"
					s100="1"
					s11="1"
					s111="2"
					_num="70"
				[/sequence]
			[/attacks]
			[defends]
				[sequence]
					s="7"
					_num="0"
				[/sequence]
				[sequence]
					s000="2"
					s111="1"
					_num="40"
				[/sequence]
				[sequence]
					s0="1"
					s001="1"
					s10="1"
					s110="1"
					_num="50"
				[/sequence]
				[sequence]
					s="1"
					s0="2"
					s011="1"
					s1="3"
					s11="1"
					_num="60"
				[/sequence]
				[sequence]
					s111="1"
					_num="70"
				[/sequence]
			[/defends]
			recruit_cost="287"
			recall_cost="0"
			damage_inflicted="325"
			damage_taken="216"
			expected_damage_inflicted="286716"
			expected_damage_taken="253230"
			turn_damage_inflicted="142"
			turn_damage_taken="110"
			turn_expected_damage_inflicted="137650"
			turn_expected_damage_taken="117642"
			save_id="Hagbart2"
		[/team]
		[team]
			[recruits]
				Dark Adept="5"
				Ghost="1"
				Ghoul="4"
				Skeleton="4"
				Skeleton Archer="2"
				Vampire Bat="1"
				Walking Corpse="3"
			[/recruits]
			[recalls]
			[/recalls]
			[advances]
			[/advances]
			[deaths]
				Dark Adept="1"
				Ghoul="2"
				Skeleton="1"
				Skeleton Archer="2"
				Vampire Bat="1"
				Walking Corpse="1"
			[/deaths]
			[killed]
				Bowman="1"
				Spearman="1"
			[/killed]
			[attacks]
				[sequence]
					s000="2"
					s010="1"
					s101="1"
					_num="40"
				[/sequence]
				[sequence]
					s000="1"
					s011="1"
					_num="50"
				[/sequence]
				[sequence]
					s010="1"
					s011="2"
					s1="1"
					s101="3"
					s110="1"
					s111="2"
					_num="60"
				[/sequence]
				[sequence]
					s00="2"
					s01="3"
					s11="2"
					_num="70"
				[/sequence]
			[/attacks]
			[defends]
				[sequence]
					s="11"
					_num="0"
				[/sequence]
				[sequence]
					s1="1"
					_num="40"
				[/sequence]
				[sequence]
					s0="1"
					s011="1"
					s11="1"
					_num="50"
				[/sequence]
				[sequence]
					s="1"
					s0="1"
					s00="1"
					s01="2"
					_num="60"
				[/sequence]
				[sequence]
					s01="1"
					s1="1"
					s11="1"
					_num="70"
				[/sequence]
			[/defends]
			recruit_cost="289"
			recall_cost="0"
			damage_inflicted="216"
			damage_taken="325"
			expected_damage_inflicted="253230"
			expected_damage_taken="286716"
			turn_damage_inflicted="0"
			turn_damage_taken="0"
			turn_expected_damage_inflicted="0"
			turn_expected_damage_taken="0"
			save_id="foxsatan1"
		[/team]
	[/scenario]
[/statistics]
