<?xml version="1.0" ?>
<spellcast>
<config RequireVersion="2.11" Debug="true" ShowSpellInfo="True" ShowGearSwaps="False" />
<variables>
<var name="RestoreSet">Standard</var>
<var name="LASTCAST">Ichi</var>
<var name="NiUp">1</var>
<var name="IchiUp">1</var>
</variables>
<sets>
<group default="yes" name="THF">
<set name="Standard">
<head>War beret +1</head>
<neck>Peacock Charm</neck>
<lear>Suppanomimi</lear>
<rear>Merman's Earring</rear>
<body>Rapparee harness</body>
<hands>Dusk gloves</hands>
<lring>Rajas Ring</lring>
<rring>Sniper's ring</rring>
<back>Amemet Mantle +1</back>
<waist>Swift Belt</waist>
<legs>Bravo's subligar</legs>
<feet>Tabin Boots +1</feet>
</set>
<set name="SA" baseset="Standard">
<head>Empress hairpin</head>
<neck>Spike Necklace</neck>
<body>Scorpion Harness +1 +1</body>
<hands>Custom M gloves</hands>
<lring>Rajas Ring</lring>
<rring>Grace Ring</rring>
<rear>Minuet earring</rear>
<waist>Royal Knight's belt</waist>
<legs>Republic Subligar</legs>
<feet>Leaping boots</feet>
</set>
<set name="TA" baseset="Standard">
<head>Empress hairpin</head>
<neck>Peacock Charm</neck>
<lear>Suppanomimi</lear>
<rear>Drone earring</rear>
<body>Scorpion Harness +1 +1</body>
<waist>Royal Knight's belt</waist>
<legs>Bravo's Subligar</legs>
<feet>Leaping boots</feet>
</set>
<set name="SATA" baseset="Standard">
<head>Empress hairpin</head>
<neck>Spike Necklace</neck>
<body>Scorpion Harness +1</body>
<hands>Custom M Gloves</hands>
<lring>Rajas ring</lring>
<rring>Grace Ring</rring>
<lear>Suppanomimi</lear>
<rear>Drone earring</rear>
<waist>Royal Knight's belt</waist>
<legs>Bravo's subligar</legs>
<feet>Leaping boots</feet>
</set>
<set name="SAWS" baseset="Standard">
<head>Empress hairpin</head>
<neck>Spike Necklace</neck>
<rear>Minuet Earring</rear>
<body>Scorpion Harness +1 +1</body>
<hands>Custom M gloves</hands>
<lring>Rajas Ring</lring>
<rring>Grace Ring</rring>
<waist>Royal Knight's belt</waist>
<legs>Republic Subligar</legs>
<feet>Leaping boots</feet>
</set>
<set name="TAWS" baseset="Standard">
<head>Empress hairpin</head>
<neck>Spike Necklace</neck>
<lear>Drone Earring</lear>
<body>Scorpion Harness +1</body>
<waist>Royal Knight's belt</waist>
<legs>Bravo's Subligar</legs>
<feet>Leaping Boots</feet>
</set>
<set name="SATAWS" baseset="Standard">
<head>Empress hairpin</head>
<neck>Spike Necklace</neck>
<lear>Drone Earring</lear>
<rear>Minuet Earring</rear>
<body>Scorpion Harness +1</body>
<hands>Custom M gloves</hands>
<lring>Rajas Ring</lring>
<rring>Grace Ring</rring>
<waist>Royal Knight's belt</waist>
<legs>Bravo's Subligar</legs>
<feet>Leaping boots</feet>
</set>
<set name="TADE" baseset="TAWS">
<head>War beret +1</head>
<neck>Peacock Charm</neck>
</set>
<set name="SADE" baseset="SAWS">
<head>War beret +1</head>
<neck>Peacock Charm</neck>
</set>
<set name="SATADE" baseset="SATAWS">
<head>War beret +1</head>
<neck>Peacock Charm</neck>
</set>
<set name="WS" baseset="Standard">
<head>Empress hairpin</head>
<body>Scorpion Harness +1</body>
<waist>Life Belt</waist>
<legs>Republic Subligar</legs>
</set>
<set name="DE" baseset="WS">
<head>War beret +1</head>
<neck>Peacock Charm</neck>
</set>
<set name="RA" baseset="Standard">
<head>War beret +1</head>
<body>Rapparee Harness</body>
<waist>Royal Knight's belt</waist>
<rear>Drone Earring</rear>
<legs>Republic subligar</legs>
<feet>Leaping boots</feet>
<rring>Scorpion Ring +1</rring>
<lring>Scorpion Ring +1</lring>
</set>
<set name="Utsusemi">
<body>Rapparee Harness</body>
<waist>Swift Belt</waist>
<legs>Bravo's subligar</legs>
<hands>Dusk Gloves</hands>
</set>
<set name="Evasion" baseset="Standard">
<head>Empress hairpin</head>
<body>Scorpion Harness +1</body>
<hands>Akinji bazubands</hands>
<waist>Survival belt</waist>
<lear>Suppanomimi</lear>
<rear>Dodge earring</rear>
</set>
<set name="Accuracy" baseset="Standard">
<body>Scorpion Harness +1</body>
<waist>Life Belt</waist>
</set>
<set name="Idling">
<hands>Akinji bazubands</hands>
</set>
</group>
</sets>
<rules>
<!--Equip idling set to keep movement speed up when not engaged-->
<if set="Standard">
<action type="equip" when="Idle" set="Idling" />
<action type="command" when="Idle">input /echo ---Equipping Idle Set---</action>
</if>
<!--Equip RestoreSet upon engaging a mob, so you don't end up meleeing with your idling gear on-->
<if notset="$RestoreSet">
<action type="equip" when="Engaged" set="$RestoreSet" />
<action type="command" when="Engaged">input /echo ---Engaging %target, equipping $RestoreSet---</action>
</if>
<if type="JobAbility">
<if spell="Sneak Attack">
<if buffactive="Trick Attaack">
<action type="equip" when="precast" set="SATA" />
<action type="command" when="aftercast">input /echo ---Sneak Attack/Trick Attack--</action>
</if>
<else>
<action type="equip" when="precast" set="SA" />
<action type="command" when="aftercast">input /echo ---Sneak Attack--</action>
</else>
</if>
<elseif spell="Trick Attack">
<if buffActive="Sneak Attack">
<action type="equip" when="precast" set="SATA" />
<action type="command" when="aftercast">input /echo ---Sneak Attack/Trick Attack--</action>
</if>
<else>
<action type="equip" when="precast" set="TA" />
<action type="command" when="aftercast">input /echo ---Trick Attack--</action>
</else>
</elseif>
<!--I'm level 72 and have neglected thus far to do any of my AF quests.-->
<!--<elseif spell="Flee">
<!--<action type="Equip" when="precast">-->
<!--<feet>Rogue's Poulaines</feet>-->
<!--</action>-->
<!--<if status="Idle">-->
<!-- <action type="Equip" when="Aftercast" set="$RestoreSet" />-->
<!-- <action type="Equip" when="Aftercast" set="Idling" />-->
<!--</if>-->
<!--<elseif status="Engaged">-->
<!-- <action type="Equip" when="Aftercast" set="$RestoreSet" />-->
<!--</elseif>-->
<!--</elseif>-->
</if>
<elseif type="WeaponSkill">
<if NotTPLT="100">
<!-- Weapon Skill Only -->
<if mode="AND" notBuffActive="Sneak Attack" notBuffActive="Trick Attack">
<if spell="Dancing Edge">
<!--Accuracy varies with TP-->
<!--Modifiers: DEX:30% ; CHR:40%-->
<action type="castdelay" delay=".2" />
<action type="Equip" when="precast" set="DE" />
<action type="command" when="aftercast">input /echo ---Dancing Edge--</action>
</if>
<elseif spell="Shark Bite">
<!--Damage Varies with TP-->
<!--Modifiers: DEX:50%-->
<action type="castdelay" delay=".2" />
<action type="Equip" when="precast" set="WS" />
<action type="command" when="aftercast">input /echo ---Shark Bite--</action>
</elseif>
<elseif spell="Evisceration">
<!--Critical hit chance varies with TP-->
<!--Modifiers: DEX:30% ; CHR:40%-->
<action type="castdelay" delay=".2" />
<action type="Equip" when="precast" set="WS" />
<action type="command" when="aftercast">input /echo ---Evisceration--</action>
</elseif>
<action type="Equip" when="aftercast" set="$RestoreSet" />
</if>
<!-- Trick Attack, Weapon Skill -->
<elseif mode="AND" notBuffActive="Sneak Attack" BuffActive="Trick Attack">
<if spell="Dancing Edge">
<action type="castdelay" delay=".2" />
<action type="Equip" when="precast" set="TADE" />
<action type="command" when="aftercast">input /echo ---Trick Attack Dancing Edge--</action>
</if>
<elseif spell="Shark Bite">
<action type="castdelay" delay=".2" />
<action type="Equip" when="precast" set="TAWS" />
<action type="command" when="aftercast">input /echo ---Trick Attack Shark Bite--</action>
</elseif>
<elseif spell="Evisceration">
<action type="castdelay" delay=".2" />
<action type="Equip" when="precast" set="TADE" />
<action type="command" when="aftercast">input /echo ---Trick Attack Evisceration--</action>
</elseif>
</elseif>
<!-- Sneak Attack, Weapon Skill -->
<elseif mode="AND" BuffActive="Sneak Attack" notBuffActive="Trick Attack">
<if spell="Dancing Edge">
<action type="castdelay" delay=".2" />
<action type="Equip" when="precast" set="SADE" />
<action type="command" when="aftercast">input /echo ---Sneak Attack Dancing Edge--</action>
</if>
<elseif spell="Shark Bite">
<action type="castdelay" delay=".2" />
<action type="Equip" when="precast" set="SAWS" />
<action type="command" when="aftercast">input /echo ---Sneak Attack Shark Bite--</action>
</elseif>
<elseif spell="Evisceration">
<action type="castdelay" delay=".2" />
<action type="Equip" when="precast" set="SADE" />
<action type="command" when="aftercast">input /echo ---Sneak Attack Evisceration--</action>
</elseif>
<action type="Equip" when="aftercast" set="$RestoreSet" />
</elseif>
<!-- Sneak Attack, Trick Attack, Weapon Skill -->
<elseif mode="AND" BuffActive="Sneak Attack" BuffActive="Trick Attack">
<if spell="Dancing Edge">
<action type="castdelay" delay=".2" />
<action type="Equip" when="precast" set="SATADE" />
<action type="command" when="aftercast">input /echo ---SATA Dancing Edge--</action>
</if>
<elseif spell="Shark Bite">
<action type="castdelay" delay=".2" />
<action type="Equip" when="precast" set="SATAWS" />
<action type="command" when="aftercast">input /echo ---SATA Shark Bite--</action>
</elseif>
<elseif spell="Evisceration">
<action type="castdelay" delay=".2" />
<action type="Equip" when="precast" set="SATADE" />
<action type="command" when="aftercast">input /echo ---SATA Evisceration--</action>
</elseif>
</elseif>
<action type="Equip" when="Aftercast" set="$RestoreSet" />
</if>
</elseif>
<!-- Utsusemi rules -->
<elseif type="Ninjutsu">
<!-- Haste biuld for cast Utsusemi: Ni -->
<if mode="AND" notBuffActive="Silence" Spell="Utsusemi: Ni" Advanced='("$NiUp" = "1")'>
<action type="Var" cmd="set NiUp 0" />
<action Type="Command">wait 25; sc var set NiUp 1;input /echo Utsusemi: Ni Available</action>
<action type="equip" when="precast" set="Utsusemi" />
<action type="equip" when="aftercast" set="$RestoreSet" />
<action type="Var" cmd="Set LASTCAST Ni" />
</if>
<!-- Cancel shadows if we have Ni up and want cast Ichi, equip evasion gear for beginning -->
<elseif mode="AND" spell="Utsusemi: Ichi" notBuffActive="Silence" Advanced='("IchiUp" = "1")'>
<action type="Var" cmd="set IchiUp 0" />
<action type="Command">wait 25; sc var set IchiUp 1;input /echo Utsusemi: Ichi available</action>
<action type="Equip" when="precast" set="Evasion" />
<action type="midcastdelay" delay="2.8" />
<if mode="AND" BuffActive="Copy Image" advanced='"$LASTCAST"=="Ni"'>
<action type="Command" when="midcast">cancel 66</action>
</if>
<action type="Equip" when="midcast" set="Utsusemi" />
<action type="Var" cmd="Set LASTCAST Ichi" />
<if status="Idle">
<action type="Equip" when="aftercast" set="$RestoreSet" />
<action type="Equip" when="aftercast" set="Idling" />
<action type="command" when="aftercast">input /echo ---Utsusemi: Ichi Idle::Equipping idle gear and $RestoreSet--</action>
</if>
<elseif status="Engaged">
<action type="Equip" when="aftercast" set="$RestoreSet" />
<action type="command" when="aftercast">input /echo ---Utsusemi: Ichi Engaged::Equipping $RestoreSet---</action>
</elseif>
</elseif>
<!--Do not change gear if Utsusemi is not up-->
<else>
<action type="commmand">input /echo SPELL NOT AVAILABLE</action>
<action Type="CancelSpell" />
<action Type="Return" />
</else>
</elseif>
<elseif spell="Ranged">
<action type="Equip" when="precast" set="RA" />
<if status="Idle">
<action type="Equip" when="aftercast" set="Evasion" />
<action type="Command" when="aftercast">input /echo ---Pulling---</action>
</if>
<else>
<action type="Equip" when="aftercast" set="$RestoreSet" />
<action type="Command" when="aftercast">input /echo ---Ranged Attack---</action>
</else>
</elseif>
</rules>
</spellcast>