<abilities>
  <ability>
    <name>Focused Attunement</name>
    <key>focused_attunement</key>
    <skill>pyromancy</skill>
    <icon>focused_attunement</icon>
    <description>
      Whenever you cast a Pyromancy spell, 30% chance to gain +1 Tyros attunement for 30 turns.

      [p]If your Tyros attunement is 3 or higher, instead gain 3 health.
      [p]Cannot trigger again while the status effect is active.
    </description>
    <type>Passive</type>
    <passiveInfo>
      <triggers>
        <triggers>
          KEY focused_attunement_trigger_heal;
          WHEN PlayerUsesAbility -> valid_skills:pyromancy;
          AND NOT HasStatusEffect -> key:focused_attunement, target:player;
          AND Roll -> odds:0.3;
          AND HasStat -> key:TyrosAttunement, amount:3, target:player;

          THEN GiveHealth -> amount:3, overhead:true;
          THEN PlaySound -> key:spell_heal;
        </triggers>
        <triggers>
          KEY focused_attunement_trigger_buff;
          WHEN PlayerUsesAbility -> valid_skills:pyromancy;
          AND NOT HasStatusEffect -> key:focused_attunement, target:player;
          AND Roll -> odds:0.3;
          AND NOT HasStat -> key:TyrosAttunement, amount:3, target:player;
          THEN ApplyStatusEffect -> key:focused_attunement, target:player;
          THEN PlaySound -> key:buff_attack_1;
        </triggers>
      </triggers>
    </passiveInfo>
    <unlockInfo>
      <autoDiscover>0</autoDiscover>
      <unlockRequirements>
        <requiredPoints>2</requiredPoints>
        <requires>line_of_fire OR ignite</requires>
      </unlockRequirements>
    </unlockInfo>
  </ability>
</abilities>
