<unit>
	<parameters>
		<size value="4" />
		<height value="2" />
		<max-hp value="6000" regeneration="0"/>
		<max-ep value="0" />
		<armor value="0" />
		<armor-type value="stone"/>
		<sight value="6" />
		<time value="100" />
		<multi-selection value="false" />
		<cellmap value="true">
			<row value="1011"/>
			<row value="0000"/>
			<row value="1011"/>
			<row value="1011"/>
		</cellmap>
		<levels/>
		<fields>
			<field value="land" />
		</fields>
		<properties>
			<property value="burnable"/>
		</properties>
		<light enabled="false" />
		<rotationAllowed value="true" />
		<unit-requirements>
			<unit name="castle" />
		</unit-requirements>
		<upgrade-requirements />
		<resource-requirements>
			<resource name="gold" amount="100" />
			<resource name="stone" amount="150" />
			<resource name="wood" amount="50" />
		</resource-requirements>
		<resources-stored />
		<image path="images/barracks.png" />
		<image-cancel path="../archer/images/order_cancel.png"/>
		<meeting-point value="true" image-path="images/meeting_point.png"/>
		<selection-sounds enabled="true">
			<sound path="$COMMONDATAPATH/sounds/tech_click.wav" />
		</selection-sounds>
		<command-sounds enabled="true">
			<sound path="$COMMONDATAPATH/sounds/tech_click.wav" />
		</command-sounds>
	</parameters>
	
	<skills>
		<skill>
			<type value="stop"/>	
			<name value="stop_skill"/>
			<ep-cost value="0" />
			<speed value="50" />
			<anim-speed value="100" />
			<animation path="models/barracks.g3d" />
			<sound enabled="false" />
		</skill>		
		<skill>
			<type value="stop"/>	
			<name value="bedding_skill"/>
			<ep-cost value="0" />
			<speed value="50" />
			<anim-speed value="100" />
			<animation path="models/barracks.g3d" />
			<sound enabled="false" />
			<attack-boost>
				<allow-multiple-boosts value="false" />
				<radius value="2"/>
				<target value="faction">
					<!--unit-type name="armed_peasant"/-->					
					<unit-type name="militia"/>				
					<unit-type name="swordsman"/>
					<unit-type name="spearman"/>
					<unit-type name="archer"/>				
					<unit-type name="man_at_arms"/>
					<unit-type name="crossbowman"/>	
					<unit-type name="pikeman"/>						
					<unit-type name="banner_guard"/>					
					<unit-type name="knight"/>
					<unit-type name="paladin"/>					
				</target>
				<max-hp value="0" regeneration="1"/>
				<max-ep value="0"/>
				<sight value="0"/>
				<attack-strenght value="0"/>
				<attack-range value="0"/>
				<armor value="10"/>
				<particles value="false"/>
			</attack-boost>			
		</skill>				
		<skill>
			<type value="be_built" />	
			<name value="be_built_skill"/>		
			<ep-cost value="0" />
			<speed value="300" />
			<anim-speed value="300" />
			<animation path="../castle/construction_models/barracks_construction.g3d" />
			<sound enabled="false" />
		</skill>		
		<skill>
			<type value="upgrade"/>	
			<name value="upgrade_skill"/>	
			<ep-cost value="0" />
			<speed value="300" />
			<anim-speed value="300" />
			<animation path="models/barracks.g3d" />
			<sound enabled="false" />
		</skill>		
		<skill>
			<type value="produce"/>
			<name value="produce_skill"/>	
			<ep-cost value="0" />
			<speed value="300" />
			<anim-speed value="300" />
			<animation path="models/barracks.g3d" />
			<sound enabled="false" />
		</skill>			
		<skill>
			<type value="die" />	
			<name value="die_skill"/>		
			<ep-cost value="0" />
			<speed value="300" />
			<anim-speed value="300" />
			<animation path="../castle/destruction_models/barracks_destruction.g3d" />
			<particles value="true">
				<particle-file path="smoke_particles.xml"/>
				<particle-file path="glow_particles.xml"/>
			</particles>
			<sound enabled="true" start-time="0">
				<sound-file path="$COMMONDATAPATH/sounds/tech_building_fall4.wav"/>
			</sound>			
			<fade value="false"/>
		</skill>
	</skills>
	
	<commands>	
		<command>
			<type value="stop"/>
			<name value="beds_ready"/>
			<image path="images/barracks2.png"/>
			<unit-requirements/>
			<upgrade-requirements>
				<upgrade name="beddings"/>
			</upgrade-requirements>	
			<stop-skill value="bedding_skill"/>
		</command>	
		<!--command>
			<type value="produce"/>
			<name value="conscript_militia" />
			<image path="../militia/images/militia.png" />
			<unit-requirements />
			<upgrade-requirements />
			<produce-skill value="produce_skill"/>
			<produced-unit name="militia"/>
		</command-->		
		<command>
			<type value="produce"/>
			<name value="train_swordsman" />
			<image path="../swordsman/images/swordsman.png" />
			<unit-requirements />
			<upgrade-requirements />
			<produce-skill value="produce_skill"/>
			<produced-unit name="swordsman"/>
		</command>
		<command>
			<type value="produce"/>
			<name value="train_spearman" />
			<image path="../spearman/images/spearman.png" />
			<unit-requirements />
			<upgrade-requirements />
			<produce-skill value="produce_skill"/>
			<produced-unit name="spearman"/>
		</command>		
		<command>
			<type value="produce"/>
			<name value="train_archer" />
			<image path="../archer/images/archer.png" />
			<unit-requirements />
			<upgrade-requirements />
			<produce-skill value="produce_skill"/>
			<produced-unit name="archer"/>
		</command>
		<command>
			<type value="produce"/>
			<name value="train_man_at_arms"/>
			<image path="../man_at_arms/images/man_at_arms.png"/>
			<unit-requirements/>
			<upgrade-requirements/>
			<produce-skill value="produce_skill"/>
			<produced-unit name="man_at_arms"/>
		</command>			
		<command>
			<type value="produce"/>
			<name value="train_pikeman" />
			<image path="../pikeman/images/pikeman.png" />
			<unit-requirements/>
			<upgrade-requirements />
			<produce-skill value="produce_skill"/>
			<produced-unit name="pikeman"/>
		</command>
		<command>
			<type value="produce"/>
			<name value="train_crossbowman"/>
			<image path="../crossbowman/images/crossbowman.png"/>
			<unit-requirements/>
			<upgrade-requirements />
			<produce-skill value="produce_skill"/>
			<produced-unit name="crossbowman"/>
		</command>			
		<command>
			<type value="produce"/>
			<name value="summon_banner_guard" />
			<image path="../banner_guard/images/banner_guard.png" />
			<unit-requirements/>
			<upgrade-requirements/>
			<produce-skill value="produce_skill"/>
			<produced-unit name="banner_guard"/>
		</command>					
		<command>
			<type value="upgrade"/>
			<name value="create_training_field"/>
			<image path="../../upgrades/training_field/images/training_field.png"/>
			<unit-requirements />
			<upgrade-requirements />
			<upgrade-skill value="upgrade_skill"/>
			<produced-upgrade name="training_field"/>
		</command>	
        <command>
			<type value="upgrade"/>
			<name value="upgrade_beddings"/>
			<image path="../../upgrades/beddings/images/beddings.png"/>
			<unit-requirements/>
			<upgrade-requirements/>
			<upgrade-skill value="upgrade_skill"/>
			<produced-upgrade name="beddings"/>
		</command>						
	</commands>
</unit>