combustion3.xml
<abilities>
<ability>
<clone>combustion</clone>
<key>combustion3</key>
<description>
Whenever you cast a Pyromancy or other spell that requires Tyros attunement, gain 1 stack of combustion.
[p]Each stack of combustion grants ⮃+6% fire damage⮃.
[p]If no new stacks are gained in 5 turns, lose 1 stack. Maximum ⮃15 stacks⮃.
</description>
<passiveInfo>
<triggers>
<triggers>
KEY combustion_trigger;
WHEN PlayerUsesAbility -> hasStatRequirement:TyrosAttunement;
THEN RemoveStatusEffect -> key:«LINK:combustion», starts_with:true;
THEN RemoveStatusEffect -> key:«LINK:combustion2», starts_with:true;
THEN ApplyStatusEffect -> key:«LINK:combustion3», target:player;
THEN ModifyGlobalFlag -> global_flag:combustion_turn_tracker, operation:set, amount:6;
THEN ModifyGlobalFlag -> global_flag:combustion_stacks, operation:add, amount:1;
THEN ModifyGlobalFlag -> global_flag:combustion_stacks, operation:minimum, amount:15;
</triggers>
</triggers>
</passiveInfo>
<unlockInfo>
<autoDiscover>0</autoDiscover>
<unlockRequirements>
<requiredPoints>1</requiredPoints>
</unlockRequirements>
<replaces>combustion2</replaces>
</unlockInfo>
</ability>
</abilities>