<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">

	<xs:include schemaLocation="../import.xsd" />
	<xs:include schemaLocation="../modifiers.xsd" />
	<xs:include schemaLocation="../items/item_templates.xsd" />

	<xs:element name="skill_data" type="skillData" />

	<xs:complexType name="skillData">
		<xs:sequence>
			<xs:element ref="import" minOccurs="0" maxOccurs="unbounded" />
			<xs:element name="skill_template" type="SkillTemplate"
				minOccurs="0" maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="SkillTemplate">
		<xs:sequence>
			<xs:element name="initproperties" type="Properties"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="startconditions" type="Conditions"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="setproperties" type="Properties"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="useconditions" type="Conditions"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="effects" type="Effects" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="actions" type="Actions" minOccurs="0"
				maxOccurs="1" />
		</xs:sequence>
		<xs:attribute name="penalty_skill_id" type="skillId"/>
		<xs:attribute name="skill_id" type="skillId" use="required" />
		<xs:attribute name="name" type="xs:string" />
		<xs:attribute name="nameId" type="xs:int" />
		<xs:attribute name="stack" type="xs:string" />
		<xs:attribute name="lvl" type="xs:int" />
		<xs:attribute name="skilltype" type="skillType" use="required" />
		<xs:attribute name="skillsubtype" type="skillSubType"
			use="required" />
		<xs:attribute name="tslot" type="TargetSlot" />
		<xs:attribute name="activation" type="activationAttribute"
			use="required" />
		<xs:attribute name="duration" type="xs:int" use="required" />
		<xs:attribute name="cooldown" type="xs:int" use="optional"
			default="0" />
		<xs:attribute name="pvp_damage" type="xs:int" />
		<xs:attribute name="pvp_duration" type="xs:int" />
	</xs:complexType>

	<xs:complexType name="Effects">
		<xs:sequence minOccurs="0" maxOccurs="unbounded">
			<xs:element name="root" type="RootEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="stun" type="StunEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="sleep" type="SleepEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="snare" type="SnareEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="slow" type="SlowEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="poison" type="PoisonEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="bleed" type="BleedEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="stumble" type="StumbleEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="spin" type="SpinEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="stagger" type="StaggerEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="openaerial" type="OpenAerialEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="closeaerial" type="CloseAerialEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="bind" type="BindEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="shield" type="ShieldEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="dispel" type="DispelEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="statup" type="StatupEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="statboost" type="StatboostEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="weaponstatboost"
				type="WeaponStatboostEffect" minOccurs="0" maxOccurs="1" />
			<xs:element name="wpnmastery" type="WeaponMasteryEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="statdown" type="StatdownEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="dot" type="DamageOverTimeEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="hot" type="HealOverTimeEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="transform" type="TransformEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="hide" type="HideEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="search" type="SearchEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="heal" type="HealEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="healmp" type="HealMpEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="healdp" type="HealDpEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="healfp" type="HealFpEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="skillatk" type="SkillAttackEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="spellatk" type="SpellAttackEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="dash" type="DashEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="backdash" type="BackDashEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="delaydamage" type="DelayDamageEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="return" type="ReturnEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="itemheal" type="ItemHealEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="itemhealmp" type="ItemHealMpEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="itemhealdp" type="ItemHealDpEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="itemhealfp" type="ItemHealFpEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="carvesignet" type="CarveSignetEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="signet" type="SignetEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="signetburst" type="SignetBurstEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="silence" type="SilenceEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="curse" type="CurseEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="blind" type="BlindEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="desease" type="DeseaseEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="boosthate" type="BoostHateEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="hostileup" type="HostileUpEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="paralyze" type="ParalyzeEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="confuse" type="ConfuseEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="alwaysresist" type="AlwaysResistEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="alwaysblock" type="AlwaysBlockEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="alwaysparry" type="AlwaysParryEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="alwaysdodge" type="AlwaysDodgeEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="dispeldebuffphysical"
				type="DispelDebuffPhysicalEffect" minOccurs="0" maxOccurs="1" />
			<xs:element name="dispeldebuff" type="DispelDebuffEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="mpuseovertime" type="MpUseOverTimeEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="switchhpmp" type="SwitchHpMpEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="aura" type="AuraEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="summon" type="SummonEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="fear" type="FearEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="resurrect" type="ResurrectEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="dispeldebuffmental" type="DispelDebuffMentalEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="reflector" type="ReflectorEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="returnpoint" type="ReturnPointEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="provoker" type="ProvokerEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="spellatkdraininstant" type="SpellAtkDrainInstantEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="onetimeboostskillattack" type="OneTimeBoostSkillAttackEffect"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="armormastery" type="ArmorMasteryEffect"
				minOccurs="0" maxOccurs="1" />
		</xs:sequence>
		<xs:attribute name="food" type="xs:boolean"/>
	</xs:complexType>

	<xs:complexType name="Conditions">
		<xs:sequence minOccurs="0" maxOccurs="unbounded">
			<xs:element name="mp" type="MpCondition" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="dp" type="DpCondition" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="target" type="TargetCondition"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="playermove" type="PlayerMovedCondition"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="arrowcheck" type="ArrowCheckCondition"
				minOccurs="0" maxOccurs="1" />
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="Properties">
		<xs:sequence minOccurs="0" maxOccurs="unbounded">
			<xs:element name="addweaponrange" type="AddWeaponRangeProperty"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="firsttarget" type="FirstTargetProperty"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="firsttargetrange" type="FirstTargetRangeProperty"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="targetrange" type="TargetRangeProperty"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="targetrelation" type="TargetRelationProperty"
				minOccurs="0" maxOccurs="1" />
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="Actions">
		<xs:sequence minOccurs="0" maxOccurs="unbounded">
			<xs:element name="itemuse" type="ItemUseAction" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="mpuse" type="MpUseAction" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="hpuse" type="HpUseAction" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="dpuse" type="DpUseAction" minOccurs="0"
				maxOccurs="1" />
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="ActionModifiers">
		<xs:sequence minOccurs="0" maxOccurs="unbounded">
			<xs:element name="backdamage" type="BackDamageModifier"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="frontdamage" type="FrontDamageModifier"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="stundamage" type="StunDamageModifier"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="stumbledamage" type="StumbleDamageModifier"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="poisondamage" type="PoisonDamageModifier"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="targetrace" type="TargetRaceDamageModifier"
				minOccurs="0" maxOccurs="1" />
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="Condition" abstract="true" />
	<xs:complexType name="Action" abstract="true" />

	<xs:complexType name="Effect" abstract="true">
		<xs:sequence>
			<xs:element name="subeffect" type="SubEffect" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="modifiers" type="ActionModifiers"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="change" type="Change" minOccurs="0"
				maxOccurs="unbounded" />
		</xs:sequence>
		<xs:attribute name="hopa" type="xs:int" />
		<xs:attribute name="hopb" type="xs:int" />
		<xs:attribute name="hoptype" type="HopType" />
		<xs:attribute name="element" type="SkillElement" />
		<xs:attribute name="basiclvl" type="xs:int" />
		<xs:attribute name="e" type="xs:int" />
		<xs:attribute name="effectid" type="xs:int" />
		<xs:attribute name="duration" type="xs:int" />
	</xs:complexType>

	<xs:complexType name="Property" abstract="true" />
	<xs:complexType name="ActionModifier" abstract="true" />

	<xs:complexType name="SubEffect">
		<xs:attribute name="skill_id" type="skillId" />
	</xs:complexType>

	<!-- ACTIONS -->

	<xs:complexType name="ItemUseAction">
		<xs:complexContent>
			<xs:extension base="Action">
				<xs:attribute name="itemid" type="xs:int" use="required" />
				<xs:attribute name="count" type="xs:int" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="MpUseAction">
		<xs:complexContent>
			<xs:extension base="Action">
				<xs:attribute name="value" type="xs:int" use="required" />
				<xs:attribute name="delta" type="xs:int" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="HpUseAction">
		<xs:complexContent>
			<xs:extension base="Action">
				<xs:attribute name="value" type="xs:int" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="DpUseAction">
		<xs:complexContent>
			<xs:extension base="Action">
				<xs:attribute name="value" type="xs:int" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<!-- ACTION MODIFIERS -->

	<xs:complexType name="BackDamageModifier">
		<xs:complexContent>
			<xs:extension base="ActionModifier">
				<xs:attribute name="delta" type="xs:int" use="required" />
				<xs:attribute name="value" type="xs:int" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="FrontDamageModifier">
		<xs:complexContent>
			<xs:extension base="ActionModifier">
				<xs:attribute name="delta" type="xs:int" use="required" />
				<xs:attribute name="value" type="xs:int" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="StunDamageModifier">
		<xs:complexContent>
			<xs:extension base="ActionModifier">
				<xs:attribute name="delta" type="xs:int" use="required" />
				<xs:attribute name="value" type="xs:int" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="StumbleDamageModifier">
		<xs:complexContent>
			<xs:extension base="ActionModifier">
				<xs:attribute name="delta" type="xs:int" use="required" />
				<xs:attribute name="value" type="xs:int" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="PoisonDamageModifier">
		<xs:complexContent>
			<xs:extension base="ActionModifier">
				<xs:attribute name="delta" type="xs:int" use="required" />
				<xs:attribute name="value" type="xs:int" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="TargetRaceDamageModifier">
		<xs:complexContent>
			<xs:extension base="ActionModifier">
				<xs:attribute name="race" type="SkillTargetRace" use="required" />
				<xs:attribute name="delta" type="xs:int" use="required" />
				<xs:attribute name="value" type="xs:int" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<!-- EFFECTS -->

	<xs:complexType name="HideEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
				<xs:attribute name="value" type="xs:int" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="SearchEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
				<xs:attribute name="value" type="xs:int" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="DispelEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
				<xs:sequence minOccurs="0" maxOccurs="1">
					<xs:element name="effectids" type="xs:int" minOccurs="0"
						maxOccurs="unbounded" />
				</xs:sequence>
				<xs:attribute name="dispeltype" type="DispelType" />
				<xs:attribute name="value" type="xs:int" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="RootEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="StunEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="SleepEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="SnareEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="SlowEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="StumbleEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="StaggerEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="SpinEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="BindEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="OpenAerialEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="CloseAerialEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="ShieldEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
				<xs:attribute name="hitdelta" type="xs:int" />
				<xs:attribute name="hitvalue" type="xs:int" />
				<xs:attribute name="percent" type="xs:boolean" />
				<xs:attribute name="delta" type="xs:int" />
				<xs:attribute name="value" type="xs:int" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="DamageOverTimeEffect">
		<xs:complexContent>
			<xs:extension base="DamageEffect">
				<xs:attribute name="checktime" type="xs:int" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="BleedEffect">
		<xs:complexContent>
			<xs:extension base="DamageEffect">
				<xs:attribute name="checktime" type="xs:int" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="HealOverTimeEffect">
		<xs:complexContent>
			<xs:extension base="AbstractHealEffect">
				<xs:attribute name="type" type="HealType" use="required" />
				<xs:attribute name="checktime" type="xs:int" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="MpUseOverTimeEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
				<xs:attribute name="value" type="xs:int" use="required" />
				<xs:attribute name="checktime" type="xs:int" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="SwitchHpMpEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="PoisonEffect">
		<xs:complexContent>
			<xs:extension base="DamageEffect">
				<xs:attribute name="checktime" type="xs:int" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="BufEffect" abstract="true">
		<xs:complexContent>
			<xs:extension base="Effect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="StatupEffect">
		<xs:complexContent>
			<xs:extension base="BufEffect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="StatboostEffect">
		<xs:complexContent>
			<xs:extension base="BufEffect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="WeaponStatboostEffect">
		<xs:complexContent>
			<xs:extension base="BufEffect">
				<xs:attribute name="weapon" type="xs:string"/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="WeaponMasteryEffect">
		<xs:complexContent>
			<xs:extension base="BufEffect">
				<xs:attribute name="weapon" type="weaponType" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="ArmorMasteryEffect">
		<xs:complexContent>
			<xs:extension base="BufEffect">
				<xs:attribute name="armor" type="armorType" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="StatdownEffect">
		<xs:complexContent>
			<xs:extension base="BufEffect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="TransformEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
				<xs:attribute name="model" type="xs:int" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="ItemHealEffect">
		<xs:complexContent>
			<xs:extension base="AbstractHealEffect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="ItemHealMpEffect">
		<xs:complexContent>
			<xs:extension base="AbstractHealEffect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="ItemHealDpEffect">
		<xs:complexContent>
			<xs:extension base="AbstractHealEffect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="ItemHealFpEffect">
		<xs:complexContent>
			<xs:extension base="AbstractHealEffect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="AbstractHealEffect" abstract="true">
		<xs:complexContent>
			<xs:extension base="Effect">
				<xs:attribute name="percent" type="xs:boolean" />
				<xs:attribute name="delta" type="xs:int" />
				<xs:attribute name="value" type="xs:int" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="HealEffect">
		<xs:complexContent>
			<xs:extension base="AbstractHealEffect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="HealMpEffect">
		<xs:complexContent>
			<xs:extension base="AbstractHealEffect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="HealDpEffect">
		<xs:complexContent>
			<xs:extension base="AbstractHealEffect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="HealFpEffect">
		<xs:complexContent>
			<xs:extension base="AbstractHealEffect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="DamageEffect" abstract="true">
		<xs:complexContent>
			<xs:extension base="Effect">
				<xs:attribute name="delta" type="xs:int" />
				<xs:attribute name="value" type="xs:int" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="SkillAttackEffect">
		<xs:complexContent>
			<xs:extension base="DamageEffect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="SpellAttackEffect">
		<xs:complexContent>
			<xs:extension base="DamageEffect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="DashEffect">
		<xs:complexContent>
			<xs:extension base="DamageEffect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="BackDashEffect">
		<xs:complexContent>
			<xs:extension base="DamageEffect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="CarveSignetEffect">
		<xs:complexContent>
			<xs:extension base="DamageEffect">
				<xs:attribute name="signetlvl" type="xs:int" use="required" />
				<xs:attribute name="signetid" type="xs:int" use="required" />
				<xs:attribute name="signet" type="xs:string" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="SignetEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="SignetBurstEffect">
		<xs:complexContent>
			<xs:extension base="DamageEffect">
				<xs:attribute name="signet" type="xs:string" use="required" />
				<xs:attribute name="signetlvl" type="xs:int" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="DelayDamageEffect">
		<xs:complexContent>
			<xs:extension base="DamageEffect">
				<xs:attribute name="delay" type="xs:int" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:simpleType name="DamageType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="PHYSICAL" />
			<xs:enumeration value="MAGICAL" />
		</xs:restriction>
	</xs:simpleType>

	<xs:complexType name="ReturnEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="SilenceEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="CurseEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
				<xs:attribute name="delta" type="xs:int" />
				<xs:attribute name="value" type="xs:int" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="BlindEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
				<xs:attribute name="value" type="xs:int" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="DeseaseEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="BoostHateEffect">
		<xs:complexContent>
			<xs:extension base="BufEffect">
				<xs:attribute name="value" type="xs:int" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="HostileUpEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
				<xs:attribute name="delta" type="xs:int" />
				<xs:attribute name="value" type="xs:int" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="ParalyzeEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
				<xs:attribute name="delta" type="xs:int" />
				<xs:attribute name="value" type="xs:int" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="ConfuseEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
				<xs:attribute name="delta" type="xs:int" />
				<xs:attribute name="value" type="xs:int" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="AlwaysResistEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
				<xs:attribute name="value" type="xs:int" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="AlwaysBlockEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
				<xs:attribute name="value" type="xs:int" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="AlwaysParryEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
				<xs:attribute name="value" type="xs:int" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="AlwaysDodgeEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
				<xs:attribute name="value" type="xs:int" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="DispelDebuffPhysicalEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
				<xs:attribute name="value" type="xs:int" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="DispelDebuffEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="AuraEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
				<xs:attribute name="distance" type="xs:int" />
				<xs:attribute name="skill_id" type="xs:int" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="SummonEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
				<xs:attribute name="npc_id" type="xs:int" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="FearEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="ResurrectEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="DispelDebuffMentalEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
				<xs:attribute name="value" type="xs:int" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="ReflectorEffect">
		<xs:complexContent>
			<xs:extension base="Effect">
				<xs:attribute name="radius" type="xs:int" />
				<xs:attribute name="delta" type="xs:int" />
				<xs:attribute name="value" type="xs:int" />			
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="ReturnPointEffect">
		<xs:complexContent>
			<xs:extension base="Effect">		
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="ProvokerEffect">
		<xs:complexContent>
			<xs:extension base="Effect">				
				<xs:attribute name="prob2" type="xs:int" />	
				<xs:attribute name="prob1" type="xs:int" />	
				<xs:attribute name="provoke_target" type="ProvokeTarget" />
				<xs:attribute name="provoke_type" type="ProvokeType" />	
				<xs:attribute name="skill_id" type="xs:int" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="SpellAtkDrainInstantEffect">
		<xs:complexContent>
			<xs:extension base="DamageEffect">				
				<xs:attribute name="percent" type="xs:int" />	
				<xs:attribute name="heal_type" type="HealType" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="OneTimeBoostSkillAttackEffect">
		<xs:complexContent>
			<xs:extension base="BufEffect">				
				<xs:attribute name="count" type="xs:int" />	
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<!-- CONDITIONS -->

	<xs:complexType name="MpCondition">
		<xs:complexContent>
			<xs:extension base="Condition">
				<xs:attribute name="value" type="xs:int" use="required" />
				<xs:attribute name="delta" type="xs:int" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<xs:complexType name="DpCondition">
		<xs:complexContent>
			<xs:extension base="Condition">
				<xs:attribute name="value" type="xs:int" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="PlayerMovedCondition">
		<xs:complexContent>
			<xs:extension base="Condition">
				<xs:attribute name="allow" type="xs:boolean" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="TargetCondition">
		<xs:complexContent>
			<xs:extension base="Condition">
				<xs:attribute name="value" type="TargetAttribute" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="ArrowCheckCondition">
		<xs:complexContent>
			<xs:extension base="Condition">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<!-- PROPERTIES -->

	<!-- init properties -->

	<xs:complexType name="AddWeaponRangeProperty">
		<xs:complexContent>
			<xs:extension base="Property">
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<!-- set properties -->

	<xs:complexType name="FirstTargetProperty">
		<xs:complexContent>
			<xs:extension base="Property">
				<xs:attribute name="value" type="FirstTargetAttribute"
					use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="FirstTargetRangeProperty">
		<xs:complexContent>
			<xs:extension base="Property">
				<xs:attribute name="value" type="xs:int" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="TargetRangeProperty">
		<xs:complexContent>
			<xs:extension base="Property">
				<xs:attribute name="maxcount" type="xs:int" />
				<xs:attribute name="distance" type="xs:int" />
				<xs:attribute name="value" type="TargetRangeAttribute"
					use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="TargetRelationProperty">
		<xs:complexContent>
			<xs:extension base="Property">
				<xs:attribute name="value" type="TargetRelationAttribute"
					use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<!-- MISC -->

	<xs:simpleType name="TargetAttribute">
		<xs:restriction base="xs:string">
			<xs:enumeration value="NPC" />
			<xs:enumeration value="PC" />
			<xs:enumeration value="ALL" />
			<xs:enumeration value="NONE" />
			<xs:enumeration value="SELF" />
		</xs:restriction>
	</xs:simpleType>

	<xs:complexType name="Change">
		<xs:attribute name="stat" type="modifiersenum" use="required" />
		<xs:attribute name="func" type="StatFunc" use="required" />
		<xs:attribute name="value" type="xs:string" use="required" />
		<xs:attribute name="delta" type="xs:int" />
	</xs:complexType>

	<xs:simpleType name="TargetSlot">
		<xs:restriction base="xs:string">
			<xs:enumeration value="NONE" />
			<xs:enumeration value="BUFF" />
			<xs:enumeration value="DEBUFF" />
			<xs:enumeration value="SPEC" />
			<xs:enumeration value="SPEC2" />
			<xs:enumeration value="BOOST" />
			<xs:enumeration value="NOSHOW" />
			<xs:enumeration value="CHANT" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="DispelType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="EFFECTID" />
			<xs:enumeration value="EFFECTTYPE" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="skillType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="NONE" />
			<xs:enumeration value="PHYSICAL" />
			<xs:enumeration value="MAGICAL" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="skillSubType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="NONE" />
			<xs:enumeration value="ATTACK" />
			<xs:enumeration value="CHANT" />
			<xs:enumeration value="HEAL" />
			<xs:enumeration value="BUFF" />
			<xs:enumeration value="DEBUFF" />
			<xs:enumeration value="SUMMON" />
			<xs:enumeration value="SUMMONHOMING" />
			<xs:enumeration value="SUMMONTRAP" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="activationAttribute">
		<xs:restriction base="xs:string">
			<xs:enumeration value="NONE" />
			<xs:enumeration value="ACTIVE" />
			<xs:enumeration value="PROVOKED" />
			<xs:enumeration value="MAINTAIN" />
			<xs:enumeration value="TOGGLE" />
			<xs:enumeration value="PASSIVE" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="FirstTargetAttribute">
		<xs:restriction base="xs:string">
			<xs:enumeration value="NONE" />
			<xs:enumeration value="TARGETORME" />
			<xs:enumeration value="ME" />
			<xs:enumeration value="MYPET" />
			<xs:enumeration value="TARGET" />
			<xs:enumeration value="PASSIVE" />
			<xs:enumeration value="TARGET_MYPARTY_NONVISIBLE" />
			<xs:enumeration value="POINT" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="TargetRangeAttribute">
		<xs:restriction base="xs:string">
			<xs:enumeration value="NONE" />
			<xs:enumeration value="ONLYONE" />
			<xs:enumeration value="PARTY" />
			<xs:enumeration value="AREA" />
			<xs:enumeration value="PARTY_WITHPET" />
			<xs:enumeration value="POINT" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="TargetRelationAttribute">
		<xs:restriction base="xs:string">
			<xs:enumeration value="NONE" />
			<xs:enumeration value="ENEMY" />
			<xs:enumeration value="MYPARTY" />
			<xs:enumeration value="ALL" />
			<xs:enumeration value="FRIEND" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="skillId">
		<xs:restriction base="xs:int">
			<xs:minInclusive value="1" />
			<xs:maxInclusive value="60000" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="StatFunc">
		<xs:restriction base="xs:string">
			<xs:enumeration value="ADD" />
			<xs:enumeration value="PERCENT" />
			<xs:enumeration value="REPLACE" />
		</xs:restriction>
	</xs:simpleType>
	
	<xs:simpleType name="HealType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="HP" />
			<xs:enumeration value="MP" />
			<xs:enumeration value="DP" />
			<xs:enumeration value="FP" />
		</xs:restriction>
	</xs:simpleType>
	
	<xs:simpleType name="SkillTargetRace">
		<xs:restriction base="xs:string">
			<xs:enumeration value="ELYOS" />
			<xs:enumeration value="ASMODIANS" />
			<!-- TODO other races -->
		</xs:restriction>
	</xs:simpleType>
	
	<xs:simpleType name="SkillElement">
		<xs:restriction base="xs:string">
			<xs:enumeration value="FIRE" />
			<xs:enumeration value="WIND" />
			<xs:enumeration value="WATER" />
			<xs:enumeration value="EARTH" />
		</xs:restriction>
	</xs:simpleType>
	
	<xs:simpleType name="HopType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="DAMAGE" />
			<xs:enumeration value="SKILLLV" />
		</xs:restriction>
	</xs:simpleType>
	
	<xs:simpleType name="ProvokeType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="ATTACK" />
			<xs:enumeration value="ATTACKED" />
		</xs:restriction>
	</xs:simpleType>
	
	<xs:simpleType name="ProvokeTarget">
		<xs:restriction base="xs:string">
			<xs:enumeration value="ME" />
			<xs:enumeration value="OPPONENT" />
		</xs:restriction>
	</xs:simpleType>
	
</xs:schema>

