<abilities>
  <ability>
    <name>Animal Companion</name>
    <key>animal_companion</key>
    <skill>survival</skill>
    <icon>animal_companion</icon>
    <description>
      A friendly Hedgehog will follow you on your travels and bring you forest gifts.
      [p]Hedgehog will not attack other creatures, but can be attacked and has high defensive stats.
      [p]When near death he curls into a defensive ball.
    </description>
    <type>Toggle</type>
    <cost>0.0</cost>
    <cooldown>2</cooldown>
    <toggleInfo>
      <xpGain>
        <skill>survival</skill>
        <amount>0.0</amount>
        <amountToDisplay>0.0</amountToDisplay>
      </xpGain>
      <description>
        Your animal companion will follow you everywhere.
        [p]Automatically respawns if killed.
        [p]Turn off the toggle to temporarily release him.
      </description>
      <triggers>
        <triggers>
          KEY animal_companion_check;
          WHEN PlayerTurnStart;
          AND NOT HasStatusEffect -> key:friendly_hedgehog_cooldown, target:player;
          AND NOT SummonedCreatureExists -> key:friendly_hedgehog;
          THEN PlayerSummonMonster -> key:friendly_hedgehog;
        </triggers>
        <triggers>
          KEY animal_companion_mutated;
          WHEN NyrisVineMutatedCreature -> key:friendly_hedgehog;
          THEN ToggleAbilityOff -> key:animal_companion;
        </triggers>
      </triggers>
      <offEffects>
        <offEffects>
          AND SummonedCreatureExists -> key:friendly_hedgehog, statusKey:bonded_animal;
          THEN RemoveStatusEffect -> key:bond_formed, target:player;
        </offEffects>
        <offEffects>

          RemoveCreature -> key:friendly_hedgehog, isPlayerSummoned:true;
        </offEffects>
      </offEffects>
    </toggleInfo>
    <unlockInfo>
      <autoDiscover>0</autoDiscover>
      <unlockRequirements>
        <requiredPoints>1</requiredPoints>
        <requires>natural_immunity OR efficient_forager</requires>
      </unlockRequirements>
    </unlockInfo>
  </ability>
</abilities>
