<?xml version="1.0" encoding="UTF-8" ?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

	<xs:element name="attackers">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="attacker"	minOccurs="1" maxOccurs="unbounded" />
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<xs:element name="attacker">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="stats" />
				<xs:element ref="exstats" />
				<xs:element ref="weapon" />
				<xs:element ref="animation" />
				<xs:element ref="sounds" />
			</xs:sequence>
			<xs:attribute name="type"		type="att_type" use="required" />
			<xs:attribute name="id"			type="xs:string" use="required" />
		</xs:complexType>
	</xs:element>

		<xs:simpleType name="att_type">
			<xs:restriction base="xs:string">
				<xs:enumeration value="Hero"/>
				<xs:enumeration value="Fighter"/>
			</xs:restriction>
		</xs:simpleType>
				
	<xs:element name="exstats">
		<xs:complexType>
			<xs:attribute name="gold"		type="xs:unsignedInt" use="required" />
		</xs:complexType>
	</xs:element>

	<xs:element name="sounds">
		<xs:complexType>
			<xs:attribute name="dead"		type="xs:string" use="required" />
			<xs:attribute name="strike"		type="xs:string" use="required" />
			<xs:attribute name="upgrade"	type="xs:string" use="optional" />
		</xs:complexType>
	</xs:element>

	<xs:element name="stats">
		<xs:complexType>
			<xs:attribute name="viewrange"	type="xs:float" use="required" />
			<xs:attribute name="speed"		type="xs:float" use="required" />
			<xs:attribute name="hp"			type="xs:unsignedInt" use="required" />
			<xs:attribute name="armor"		type="xs:unsignedInt" use="required" />
		</xs:complexType>
	</xs:element>

	<xs:element name="weapon">
		<xs:complexType>
			<xs:attribute name="id"			type="xs:integer" use="required" />
		</xs:complexType>
	</xs:element>

	<xs:element name="animation">
		<xs:complexType>
			<xs:attribute name="file"		type="xs:string" use="required" />
		</xs:complexType>
	</xs:element>

</xs:schema>