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

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

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

	<xs:element name="weapon">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="stats" />
				<xs:element ref="particles" />
				<xs:element ref="sounds" />
			</xs:sequence>
			<xs:attribute name="id" type="xs:unsignedInt" use="required" />
			<xs:attribute name="fighttype" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="CLOSE" />
						<xs:enumeration value="DISTANT" />
						<xs:enumeration value="MISSILE" />
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="type" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="DAMAGE" />
						<xs:enumeration value="HEAL" />
						<xs:enumeration value="SLOWDOWN" />
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
		</xs:complexType>
	</xs:element>

	<xs:element name="stats">
		<xs:complexType>
			<xs:attribute name="shootrate"		type="xs:unsignedInt" use="required" />
			<xs:attribute name="range"			type="xs:float" use="required" />
			<xs:attribute name="value"			type="xs:unsignedInt" use="required" />
			<xs:attribute name="explosionrange" type="xs:unsignedInt" use="required" />
			<xs:attribute name="explosionpercent" type="xs:unsignedInt" use="required" />
			<xs:attribute name="time"			type="xs:unsignedInt" use="required" />
		</xs:complexType>
	</xs:element>

	<xs:element name="particles">
		<xs:complexType>
			<xs:attribute name="missile"	type="xs:string" use="required" />
			<xs:attribute name="hitranged"	type="xs:string" use="required" />
			<xs:attribute name="hit"		type="xs:string" use="required" />
		</xs:complexType>
	</xs:element>

	<xs:element name="sounds">
		<xs:complexType>
			<xs:attribute name="shoot"		type="xs:string" use="required" />
			<xs:attribute name="hit"		type="xs:string" use="required" />
		</xs:complexType>
	</xs:element>

</xs:schema>