<rules>
<if status="idle">
<equip when="aftercast|idle" set="idle"/>
</if>
<elseif status="engaged">
<if advanced='("$atk" = "main")'>
<equip when="engaged|aftercast" set="main"/>
</if>
<elseif advanced='("$atk" = "eva")'>
<equip when="engaged|aftercast" set="eva"/>
</elseif>
<elseif advanced='("$atk" = "mdt")'>
<equip when="engaged|aftercast" set="mdt"/>
</elseif>
<else>
<equip when="engaged|aftercast" set="pdt"/>
</else>
</elseif>
<!-- Jigs -->
<if type="jig">
<if spell="spectral jig">
<if buffActive="Sneak">
<action type="CastDelay" delay="1"/>
<command when="precast">cancel 71</command>
</if>
<equip when="precast" set="jig"/>
</if>
<if spell="chocobo jig">
<addtochat color="121">.............................Using %spell.....</addtochat>
<equip when="precast" set="jig"/>
</if>
</if>
<!-- Waltzes -->
<if type="waltz">
<if mode="and" spell="*waltz*" notspell="healing waltz">
<equip when="precast" set="waltz"/>
<if mode="and" Area="Aby*" notBuffActive="weakness">
<if spell="Curing waltz V">
<if advanced='("%TP" < "80" AND "%TP" > "64")'>
<action type="ChangeSpell" Spell="Curing waltz iv" />
<if advanced="%SpellTargetHPP >85">
<action type="ChangeSpell" Spell="Curing waltz ii" />
</if>
<elseif advanced="%SpellTargetHPP >70">
<action type="ChangeSpell" Spell="Curing waltz iii" />
</elseif>
</if>
<elseif advanced='("%TP" < "65" AND "%TP" > "49")'>
<action type="ChangeSpell" Spell="Curing waltz iii" />
<if advanced="%SpellTargetHPP >85">
<action type="ChangeSpell" Spell="Curing waltz ii" />
</if>
</elseif>
<else>
<if advanced="%SpellTargetHPP >85">
<action type="ChangeSpell" Spell="Curing waltz ii" />
</if>
<elseif advanced="%SpellTargetHPP >70">
<action type="ChangeSpell" Spell="Curing waltz iii" />
</elseif>
<elseif advanced="%SpellTargetHPP >55">
<action type="ChangeSpell" Spell="Curing waltz iv" />
</elseif>
</else>
</if>
</if>
<else>
<if spell="Curing waltz V">
<if advanced='("%TP" < "80" AND "%TP" > "64")'>
<if advanced="%SpellTargetHPP >85">
<action type="ChangeSpell" Spell="Curing waltz ii" />
</if>
<elseif advanced="%SpellTargetHPP >70">
<action type="ChangeSpell" Spell="Curing waltz iii" />
</elseif>
<else>
<action type="ChangeSpell" Spell="Curing waltz iv" />
</else>
</if>
<elseif advanced='("%TP" < "65" AND "%TP" > "49")'>
<if advanced="%SpellTargetHPP >85">
<action type="ChangeSpell" Spell="Curing waltz ii" />
</if>
<else>
<action type="ChangeSpell" Spell="Curing waltz iii" />
</else>
</elseif>
<else>
<if advanced="%SpellTargetHPP >90">
<action type="ChangeSpell" Spell="Curing waltz" />
</if>
<elseif advanced="%SpellTargetHPP >80">
<action type="ChangeSpell" Spell="Curing waltz ii" />
</elseif>
<elseif advanced="%SpellTargetHPP >62">
<action type="ChangeSpell" Spell="Curing waltz iii" />
</elseif>
<elseif advanced="%SpellTargetHPP >37">
<action type="ChangeSpell" Spell="Curing waltz iv" />
</elseif>
</else>
</if>
</else>
</if>
<if spell="healing waltz">
<if advanced='("%target" = "%playername")'>
<if notBuffActive="Bio|Bind|Burn|choke|dia|flash|frost|gravity|rasp|slow|weight|bane|blind|curse|disease|paralysis|poison|silence|plague|*down" >
<addtochat color="121">.............................No debuffs.....</addtochat>
<action type="cancelSpell" />
</if>
</if>
</if>
</if>
<!-- Steps -->
<if type="step">
<if notBuffActive="Presto" >
<action type = "CastDelay" delay = "1.5"/>
<action type = "Command" when = "Precast">input /raw /ja Presto <me></action>
</if>
<if spell="feather step">
<addtochat color="121">.............................Using Feather Step on %target.....</addtochat>
<equip when="precast" set="fstep"/>
</if>
<else>
<addtochat color="121">.............................Using %spell on %target.....</addtochat>
<equip when="precast" set="step"/>
</else>
</if>
<!-- Sambas -->
<if type="samba">
<addtochat color="121">.............................Using %spell.....</addtochat>
<equip when="precast" set="samba"/>
</if>
<!-- Weapon Skills -->
<if type="weaponskill">
<if spell="rudra's storm">
<if buffActive="Climactic Flourish">
<action type="CastDelay" delay=".5"/>
<equip when="precast" set="rudracrit"/>
</if>
<elseif buffActive="aftermath">
<if buffActive="Climactic Flourish">
<action type="CastDelay" delay=".5"/>
<equip when="precast" set="rudracrit">
<head>Aias Bonnet</head>
</equip>
</if>
<else>
<action type="CastDelay" delay=".5"/>
<equip when="precast" set="rudra"/>
</else>
</elseif>
<else>
<action type="CastDelay" delay=".5"/>
<equip when="precast" set="rudra"/>
</else>
</if>
<if spell="pyrrhic kleos">
<action type="CastDelay" delay=".5"/>
<equip when="precast" set="pk"/>
</if>
<if spell="evisceration">
<action type="CastDelay" delay=".5"/>
<equip when="precast" set="ws"/>
</if>
<if spell="dancing edge">
<action type="CastDelay" delay=".5"/>
<equip when="precast" set="de"/>
</if>
<if spell="exenterator">
<action type="CastDelay" delay=".5"/>
<equip when="precast" set="exen"/>
</if>
<if spell="aeolian edge">
<equip when="precast" set="ae"/>
</if>
</if>
<!-- Flourishes -->
<if type="flourish*">
<if spell="violent flourish|kura*|hojo*|jubaku*">
<addtochat color="121">.............................Using %spell.....</addtochat>
<action type="CastDelay" delay=".1"/>
<equip when="precast" set="stun"/>
</if>
<if spell="reverse flourish">
<addtochat color="121">.............................Using %spell.....</addtochat>
<action type="CastDelay" delay=".1"/>
<equip when="precast">
<body>Etoile Casaque +2</body>
<hands>Charis Bangles +2</hands>
</equip>
</if>
<if spell="striking flourish">
<action type="CastDelay" delay=".1"/>
<equip when="precast">
<body>Charis Casaque +2</body>
<aftercastdelay delay="5"/>
</equip>
</if>
<if spell="provoke|animated flourish|warcry">
<equip when="precast" set="hate"/>
</if>
</if>
<!-- Random Crap -->
<if spell="nofootrise">
<addtochat color="121">.............................Using %spell.....</addtochat>
<action type="CastDelay" delay=".1"/>
<equip when="precast">
<body>Etoile Casaque +2</body>
</equip>
</if>
<if spell="cure">
<action type="changeSpell" Spell="Curing Waltz V" />
</if>
<if spell="trance">
<action type="CastDelay" delay=".1"/>
<equip when="precast">
<head>Etoile Tiara +2</head>
</equip>
</if>
<if spell="dancing chains">
<equip when="precast|aftercast" set="$atk" />
</if>
</rules>