<abilities>
  <ability>
    <name>Thunder Storm</name>
    <key>thunder_storm</key>
    <skill>fulmination</skill>
    <icon>thunder_storm</icon>
    <description>
      Place a devastating thunder storm in target 7x7 area.
      [p]
      Upon casting, electricity will flood the storm area. Then for 20 turns, electrified tiles will
      spread, and Thunder Tornadoes will randomly spawn.
      [p]
      Thunder Tornadoes are 2x2 in size and last 7-12 turns. Each turn, they deal 10-22 damage to
      all units within and have a 40% chance to stun.
    </description>
    <type>Target</type>
    <abilitySoundPack>thunder_storm</abilitySoundPack>
    <cost>70.0</cost>
    <cooldown>30</cooldown>
    <targetInfo>
      <type>TileSelection</type>
      <aoeTargeting>
        <selectionArea>
          <type>square</type>
          <allowTargets>
            <allowCreature>true</allowCreature>
            <allowEmpty>true</allowEmpty>
            <allowPlayer>true</allowPlayer>
          </allowTargets>
          <params>
            <params type="width">5</params>
            <params type="height">5</params>
          </params>
        </selectionArea>
        <targetArea>
          <type>square</type>
          <params>
            <params type="width">3</params>
            <params type="height">3</params>
          </params>
        </targetArea>
      </aoeTargeting>
      <usesAmmo>false</usesAmmo>
      <abilityUseTime>
        <type>standard</type>
      </abilityUseTime>
    </targetInfo>
    <unlockInfo>
      <autoDiscover>0</autoDiscover>
      <unlockRequirements>
        <requiredPoints>4</requiredPoints>
        <requires>magnetic_pull OR chain_lightning</requires>
      </unlockRequirements>
    </unlockInfo>
    <requirements>
      <requirements>
        <type>HasStat</type>
        <params>
          <params type="key">TyrosAttunement</params>
          <params type="amount">3</params>
        </params>
      </requirements>
    </requirements>
    <attacks>
      <attacks>
        <count>0</count>
        <specialModifiers>
          <specialModifiers>
            <type>EffectsOnly</type>
            <amount>0</amount>
          </specialModifiers>
          <specialModifiers>
            <type>IsMagic</type>
            <amount>0</amount>
          </specialModifiers>
        </specialModifiers>
        <tileEffects>
          <tileEffects>
            IF Roll -> odds:0.80;
            THEN PlaceFeature -> key:electrified_tile, positionSource:entity, delay:200;
          </tileEffects>
        </tileEffects>
        <originTileEffects>
          <originTileEffects>
            THEN PlaceFeature -> key:thunder_storm_area, positionSource:entity, center:true;
          </originTileEffects>
        </originTileEffects>
      </attacks>
    </attacks>
  </ability>
</abilities>
