coup_de_grace.xml
<abilities>
<ability>
<name>Coup de Grace</name>
<key>coup_de_grace</key>
<skill>Swords</skill>
<icon>coup_de_grace</icon>
<tagline>"There is no shame in a killing blow. The only shame is in failing to deliver it."</tagline>
<description>
Attack with +50% crit chance. This ability cannot miss.
</description>
<type>Target</type>
<subType>2_Abilities</subType>
<abilitySoundPack>blade</abilitySoundPack>
<cost>35.0</cost>
<cooldown>7</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>
</abilityUseTime>
<postTargetEffects>
<postTargetEffect>
AND PlayerHasAbility -> key:perfect_finish;
AND IsDead;
THEN GiveEnergy -> amount:30, target:player;
THEN ReduceCooldown -> key:coup_de_grace, amount:99, starts_with:true;
THEN write_log -> logAfterCombat:true, text:You gain 30 energy (Perfect Finish), type:combat;
</postTargetEffect>
<postTargetEffect>
AND PlayerHasAbility -> key:justified_result;
AND NOT IsDead;
THEN ApplyStatusEffect -> key:«LINK:justified_result»;
THEN write_log -> logAfterCombat:true, text:Target is marked (Justified Result), type:combat;
</postTargetEffect>
</postTargetEffects>
</targetInfo>
<unlockInfo>
<autoDiscover>0</autoDiscover>
<unlockRequirements>
<requiredPoints>2</requiredPoints>
<requiresAbility>advanced_swords</requiresAbility>
</unlockRequirements>
</unlockInfo>
<extraTexts>
<extraTexts>
{{upgrade_text -> ability:perfect_finish}}
</extraTexts>
<extraTexts>
{{upgrade_text -> ability:justified_result}}
</extraTexts>
</extraTexts>
<requirements>
<requirements>
<type>Weapon</type>
<params>
<params type="weapon">Sword</params>
</params>
</requirements>
</requirements>
<attacks>
<attacks>
<count>0</count>
<animation>spell_stab_03</animation>
<modifiers>
<modifiers>
<type>CritChance</type>
<amount>0.5</amount>
</modifiers>
</modifiers>
<specialModifiers>
<specialModifiers>
<type>alwaysHit</type>
<amount>0</amount>
</specialModifiers>
</specialModifiers>
</attacks>
</attacks>
</ability>
</abilities>