overload.xml
<abilities>
<ability>
<name>Overload</name>
<key>overload</key>
<skill>fulmination</skill>
<icon>overload</icon>
<description>
Gain 1 stack of Overload when casting Tyros-attuned spells.
[p]On basic attack: consume all Overload stacks to deal +3 thunder damage per stack to the target.
[p]At 5 stacks: the next targeted Fulmination spell consumes all stacks to deal +100% thunder damage and
has +100% stun chance.
[p]If no new stacks are gained in ⮃3 turns⮃, lose 1 stack. Maximum ⮃5 stacks⮃.
</description>
<type>Passive</type>
<passiveInfo>
<triggers>
<triggers>
KEY overload_gain_stack;
WHEN PlayerUsesAbility -> hasStatRequirement:TyrosAttunement,
exclude_root_abilities:phase_instability;
AND NOT HasStatusEffect -> key:overload_status, target:player;
THEN ApplyStatusEffect -> key:«LINK:overload_status», target:player;
</triggers>
</triggers>
<attackModifiers>
<attackModifiers>
<type>OverloadCustomBehavior</type>
</attackModifiers>
</attackModifiers>
</passiveInfo>
<unlockInfo>
<autoDiscover>0</autoDiscover>
<unlockRequirements>
<requiredPoints>2</requiredPoints>
<requires>galvanic_bloom OR static_lance</requires>
</unlockRequirements>
</unlockInfo>
<requirements>
<requirements>
<type>HasStat</type>
<params>
<params type="key">TyrosAttunement</params>
<params type="amount">1</params>
</params>
</requirements>
</requirements>
</ability>
</abilities>