<abilities>
  <ability>
    <name>Protector of the Realm</name>
    <key>protector_of_the_realm</key>
    <skill>chivalry</skill>
    <icon>protector_of_the_realm</icon>
    <tagline>"I am the shield that protects this land."</tagline>
    <description>
      Whenever you take damage from an attack, 1% chance per chivalry level to gain "Protector of the
      Realm" for 3 turns.
      [p]"Protector of the Realm" gives +10% physical resist and +3 HP per turn, and can be stacked multiple
      times.
    </description>
    <type>passive</type>
    <subType>1_Unique Passives</subType>
    <passiveInfo>
      <triggers>
        <triggers>
          KEY protector_of_the_realm_trigger;
          WHEN PlayerIsAttacked -> chance:0.01, damageDealt:true, skillScaling:chivalry;
          THEN ApplyStatusEffect -> key:protector_of_the_realm_status, target:player;
        </triggers>
      </triggers>
    </passiveInfo>
    <unlockInfo>
      <autoDiscover>0</autoDiscover>
      <unlockRequirements>
        <requiredPoints>4</requiredPoints>
        <requires>otherworldly_protection</requires>
      </unlockRequirements>
    </unlockInfo>
    <statusEffects>
      <statusEffects>
        <turns>3</turns>
        <name>Protector of the Realm</name>
        <key>protector_of_the_realm_status</key>
        <icon>protector_of_the_realm</icon>
        <allowMany>true</allowMany>
        <reduceOnStartOfTurn>true</reduceOnStartOfTurn>
        <modifiers>
          <modifiers>
            <type>PhysicalResist</type>
            <amount>0.1</amount>
          </modifiers>
          <modifiers>
            <type>OnTurnHealthGain</type>
            <amount>3.0</amount>
          </modifiers>
        </modifiers>
      </statusEffects>
    </statusEffects>
  </ability>
</abilities>
