stick_in_the_eye.xml
<abilities>
<ability>
<name>Stick in the Eye</name>
<key>stick_in_the_eye</key>
<skill>staffs</skill>
<icon>stick_in_the_eye</icon>
<tagline>It was all fun and games until now.</tagline>
<description>
Jab your staff directly into your opponents face region with +75% stun chance and +25% crit chance.
</description>
<type>Target</type>
<subType>2_Abilities</subType>
<abilitySoundPack>stick_in_the_eye</abilitySoundPack>
<cost>30.0</cost>
<cooldown>8</cooldown>
<targetInfo>
<type>TileSelection</type>
<aoeTargeting>
<selectionArea>
<type>square</type>
<allowTargets>
<allowCreature>true</allowCreature>
<allowEmpty>false</allowEmpty>
<allowPlayer>false</allowPlayer>
</allowTargets>
<params>
<params type="width">0</params>
<params type="height">0</params>
<params type="expandStat">Range</params>
</params>
</selectionArea>
<targetArea>
<type>square</type>
<params>
<params type="width">0</params>
<params type="height">0</params>
</params>
</targetArea>
</aoeTargeting>
<abilityUseTime>
<type>weapon</type>
<calculator>stick_in_the_eye_use_time_calculator</calculator>
</abilityUseTime>
</targetInfo>
<unlockInfo>
<autoDiscover>0</autoDiscover>
<unlockRequirements>
<requiredPoints>2</requiredPoints>
</unlockRequirements>
</unlockInfo>
<extraTexts>
<extraTexts>
{{upgrade_text -> ability:undivided_attention,
text:If only 1 enemy is within 2 tiles\, twice as fast.}}
</extraTexts>
<extraTexts>
{{upgrade_text -> ability:lethal_precision,
text:+100% crit damage.}}
</extraTexts>
</extraTexts>
<requirements>
<requirements>
<type>Weapon</type>
<params>
<params type="weapon">Staff</params>
</params>
</requirements>
</requirements>
<attacks>
<attacks>
<count>0</count>
<animation>meteorite</animation>
<modifiers>
<modifiers>
<type>CritChance</type>
<amount>0.25</amount>
</modifiers>
<modifiers>
<type>CritDamage</type>
<amount>1.0</amount>
<requiresAbility>lethal_precision</requiresAbility>
</modifiers>
<modifiers>
<type>StunChance</type>
<amount>0.75</amount>
</modifiers>
</modifiers>
<selfEffects>
<selfEffects>
IF PlayerHasAbility -> key:undivided_attention;
AND NOT EnemiesNearby -> enemies:2, distance:2;
THEN write_log2 -> text:Stick in the Eye is extra fast (Undivided Attention)., type:combat,
queue:postCombat;
</selfEffects>
</selfEffects>
</attacks>
</attacks>
</ability>
</abilities>