<?xml version="1.0" encoding="utf-8" ?>
<Defs>

  <!-- Psychic Sensitivity -->
  
  <WeaponTraitDef>
    <defName>PsychicSensitivityUpMajor</defName>
    <label>psychic hypersensitizer</label>
    <description>This weapon amplifies the wielder's psychic sensitivity by 40%. This only applies while the weapon is held.</description>
    <commonality>0.75</commonality>
    <equippedStatOffsets>
      <PsychicSensitivity>0.4</PsychicSensitivity>
    </equippedStatOffsets>
    <exclusionTags>
      <li>PsychicSensitivity</li>
    </exclusionTags>
  </WeaponTraitDef>

  <WeaponTraitDef>
    <defName>PsychicSensitivityUpMinor</defName>
    <label>psychic sensitizer</label>
    <description>This weapon amplifies the wielder's psychic sensitivity by 20%. This only applies while the weapon is held.</description>
    <commonality>0.75</commonality>
    <equippedStatOffsets>
      <PsychicSensitivity>0.2</PsychicSensitivity>
    </equippedStatOffsets>
    <exclusionTags>
      <li>PsychicSensitivity</li>
    </exclusionTags>
  </WeaponTraitDef>

  <WeaponTraitDef>
    <defName>PsychicSensitivityDownMinor</defName>
    <label>psychic quiet</label>
    <description>This weapon suppresses the wielder's psychic sensitivity by 15%. This only applies while the weapon is held.</description>
    <commonality>0.75</commonality>
    <equippedStatOffsets>
      <PsychicSensitivity>-0.15</PsychicSensitivity>
    </equippedStatOffsets>
    <exclusionTags>
      <li>PsychicSensitivity</li>
    </exclusionTags>
  </WeaponTraitDef>

  <WeaponTraitDef>
    <defName>PsychicSensitivityDownMajor</defName>
    <label>psychic fog</label>
    <description>This weapon suppresses the wielder's psychic sensitivity by 30%. This only applies while the weapon is held.</description>
    <commonality>0.75</commonality>
    <equippedStatOffsets>
      <PsychicSensitivity>-0.30</PsychicSensitivity>
    </equippedStatOffsets>
    <exclusionTags>
      <li>PsychicSensitivity</li>
    </exclusionTags>
  </WeaponTraitDef>

  <!-- Thoughts -->

  <WeaponTraitDef>
    <defName>ThoughtKind</defName>
    <label>kind thoughts</label>
    <description>This weapon's persona is kind and supportive. It whispers kind thoughts to whoever it is bonded with, increasing their mood.</description>
    <bondedThought>BondedThoughtKind</bondedThought>
    <commonality>1</commonality>
    <marketValueOffset>500</marketValueOffset>
    <exclusionTags>
      <li>BondedThoughts</li>
      <li>NeverBond</li>
    </exclusionTags>
  </WeaponTraitDef>
  <ThoughtDef>
    <defName>BondedThoughtKind</defName>
    <thoughtClass>Thought_Situational</thoughtClass>
    <workerClass>ThoughtWorker_WeaponTraitBonded</workerClass>
    <stages>
      <li>
        <label>{WEAPON}'s kind thoughts</label>
        <description>{WEAPON}, my bonded weapon, is whispering kind thoughts to me.</description>
        <baseMoodEffect>6</baseMoodEffect>
      </li>
    </stages>
  </ThoughtDef>

  <WeaponTraitDef>
    <defName>ThoughtCalm</defName>
    <label>calm thoughts</label>
    <description>This weapon's persona is relaxed and steady. It whispers calming thoughts to whoever it is bonded with, increasing their mood.</description>
    <bondedThought>BondedThoughtCalm</bondedThought>
    <commonality>1</commonality>
    <marketValueOffset>300</marketValueOffset>
    <exclusionTags>
      <li>BondedThoughts</li>
      <li>NeverBond</li>
    </exclusionTags>
  </WeaponTraitDef>
  <ThoughtDef>
    <defName>BondedThoughtCalm</defName>
    <thoughtClass>Thought_Situational</thoughtClass>
    <workerClass>ThoughtWorker_WeaponTraitBonded</workerClass>
    <stages>
      <li>
        <label>{WEAPON}'s calm thoughts</label>
        <description>{WEAPON}, my bonded weapon, is whispering calming thoughts to me.</description>
        <baseMoodEffect>3</baseMoodEffect>
      </li>
    </stages>
  </ThoughtDef>

  <WeaponTraitDef>
    <defName>ThoughtMuttering</defName>
    <label>mad muttering</label>
    <description>This weapon's persona is neurotic and unstable. It mutters mad thoughts to whoever it is bonded with, reducing their mood.</description>
    <bondedThought>BondedThoughtMuttering</bondedThought>
    <commonality>1</commonality>
    <marketValueOffset>-500</marketValueOffset>
    <exclusionTags>
      <li>BondedThoughts</li>
      <li>NeverBond</li>
    </exclusionTags>
  </WeaponTraitDef>
  <ThoughtDef>
    <defName>BondedThoughtMuttering</defName>
    <thoughtClass>Thought_Situational</thoughtClass>
    <workerClass>ThoughtWorker_WeaponTraitBonded</workerClass>
    <stages>
      <li>
        <label>{WEAPON}'s muttering</label>
        <description>{WEAPON}, my bonded weapon, is muttering in my head. It's hard to ignore sometimes.</description>
        <baseMoodEffect>-3</baseMoodEffect>
      </li>
    </stages>
  </ThoughtDef>

  <WeaponTraitDef>
    <defName>ThoughtWailing</defName>
    <label>mad wailing</label>
    <description>This weapon's persona is highly disturbed and won't shut up about it. It wails mad notions to whoever it is bonded with, suppressing their mood.</description>
    <bondedThought>BondedThoughtWailing</bondedThought>
    <commonality>1</commonality>
    <marketValueOffset>-1000</marketValueOffset>
    <exclusionTags>
      <li>BondedThoughts</li>
      <li>NeverBond</li>
    </exclusionTags>
  </WeaponTraitDef>
  <ThoughtDef>
    <defName>BondedThoughtWailing</defName>
    <thoughtClass>Thought_Situational</thoughtClass>
    <workerClass>ThoughtWorker_WeaponTraitBonded</workerClass>
    <stages>
      <li>
        <label>{WEAPON}'s wailing</label>
        <description>{WEAPON}, my bonded weapon, is wailing madly in my head. I wish I could ignore it.</description>
        <baseMoodEffect>-6</baseMoodEffect>
      </li>
    </stages>
  </ThoughtDef>

  <!-- Killed pawn thoughts/effects -->

  <WeaponTraitDef>
    <defName>OnKill_PsyfocusGain</defName>
    <label>kill-focused</label>
    <description>This weapon's persona focuses on deaths. If the weapon kills someone, the wielder will instantly gain 20% psyfocus.</description>
    <workerClass>WeaponTraitWorker_PsyfocusOnKill</workerClass>
    <commonality>1</commonality>
    <marketValueOffset>500</marketValueOffset>
    <exclusionTags>
      <li>KillThoughts</li>
    </exclusionTags>
  </WeaponTraitDef>

  <WeaponTraitDef>
    <defName>OnKill_ThoughtGood</defName>
    <label>kill-happy</label>
    <description>This weapon's persona loves to kill. If this weapon kills someone, its joy will transmit psychically to the wielder, making them happier for a few days.</description>
    <killThought>OnKill_GoodThought</killThought>
    <commonality>1</commonality>
    <marketValueOffset>500</marketValueOffset>
    <exclusionTags>
      <li>KillThoughts</li>
    </exclusionTags>
  </WeaponTraitDef>
  <ThoughtDef>
    <defName>OnKill_GoodThought</defName>
    <thoughtClass>Thought_WeaponTrait</thoughtClass>
    <stackLimit>5</stackLimit>
    <durationDays>3</durationDays>
    <stackedEffectMultiplier>0.25</stackedEffectMultiplier>
    <stages>
      <li>
        <label>{WEAPON}'s kill happiness</label>
        <description>{WEAPON} was overjoyed with its kill, and I feel some of that too.</description>
        <baseMoodEffect>6</baseMoodEffect>
      </li>
    </stages>
  </ThoughtDef>

  <WeaponTraitDef>
    <defName>OnKill_ThoughtBad</defName>
    <label>kill sorrow</label>
    <description>This weapon's persona hates killing. If this weapon kills someone, its sorrow will transmit psychically to the wielder, reducing their mood for a few days.</description>
    <killThought>OnKill_BadThought</killThought>
    <commonality>1</commonality>
    <marketValueOffset>-500</marketValueOffset>
    <exclusionTags>
      <li>KillThoughts</li>
    </exclusionTags>
  </WeaponTraitDef>
  <ThoughtDef>
    <defName>OnKill_BadThought</defName>
    <thoughtClass>Thought_WeaponTrait</thoughtClass>
    <stackLimit>5</stackLimit>
    <durationDays>3</durationDays>
    <stackedEffectMultiplier>0.25</stackedEffectMultiplier>
    <stages>
      <li>
        <label>{WEAPON}'s kill sorrow</label>
        <description>{WEAPON}'s sorrow over its kill is affecting my mind as well.</description>
        <baseMoodEffect>-3</baseMoodEffect>
      </li>
    </stages>
  </ThoughtDef>

  <WeaponTraitDef>
    <defName>NeedKill</defName>
    <label>kill thirst</label>
    <description>This weapon's persona find purpose in bloodshed. If it does not kill for 20 days, it will become angry and psychically complain to whoever is bonded to it.</description>
    <commonality>1</commonality>
    <marketValueOffset>-700</marketValueOffset>
    <exclusionTags>
      <li>NeverBond</li>
      <li>KillThoughts</li>
    </exclusionTags>
  </WeaponTraitDef>
  <ThoughtDef>
    <defName>KillThirst</defName>
    <thoughtClass>Thought_Situational</thoughtClass>
    <workerClass>ThoughtWorker_WeaponTraitKillNeed</workerClass>
    <stages>
      <li>
        <label>{WEAPON}'s kill thirst</label>
        <description>My bonded weapon {WEAPON} is angry it has gone so long without killing. I can feel its rage.</description>
        <baseMoodEffect>-4</baseMoodEffect>
      </li>
    </stages>
  </ThoughtDef>

  <!-- No exclusion tags -->

  <WeaponTraitDef>
    <defName>PsyfocusMeditationBonus</defName>
    <label>psy-meditative</label>
    <description>This weapon's persona is naturally meditative and helps its wielder focus in psychic meditation. The wielder gains an extra 10% psyfocus per day of meditation, as long as the weapon is held.</description>
    <equippedStatOffsets>
      <MeditationFocusGain>0.1</MeditationFocusGain>
    </equippedStatOffsets>
    <commonality>1</commonality>
    <marketValueOffset>500</marketValueOffset>
  </WeaponTraitDef>

  <WeaponTraitDef>
    <defName>NoPain</defName>
    <label>painless</label>
    <description>This weapon's persona has some method of psychically disabling pain. The one holding the weapon will feel no pain of any kind.</description>
    <equippedHediffs>
      <li>NoPain</li>
    </equippedHediffs>
    <commonality>1</commonality>
    <marketValueOffset>400</marketValueOffset>
  </WeaponTraitDef>
  <HediffDef>
    <defName>NoPain</defName>
    <label>psychic painlessness</label>
    <description>Pain is disabled by the psychic influence of a wielded weapon.</description>
    <isBad>false</isBad>
    <stages>
      <li>
        <painFactor>0</painFactor>
      </li>
    </stages>
  </HediffDef>

  <WeaponTraitDef>
    <defName>SpeedBoost</defName>
    <label>fast mover</label>
    <description>This weapon's persona has a sense of motion. It confers this onto the wielder, making them move 15% faster as long as the weapon is held.</description>
    <equippedHediffs>
      <li>SpeedBoost</li>
    </equippedHediffs>
    <commonality>1</commonality>
    <marketValueOffset>600</marketValueOffset>
  </WeaponTraitDef>
  <HediffDef>
    <defName>SpeedBoost</defName>
    <label>psychic speed</label>
    <description>Movement is sped up by the psychic influence of a wielded weapon.</description>
    <isBad>false</isBad>
    <stages>
      <li>
        <capMods>
          <li>
            <capacity>Moving</capacity>
            <offset>0.15</offset>
          </li>
        </capMods>
      </li>
    </stages>
  </HediffDef>

  <WeaponTraitDef>
    <defName>HungerMaker</defName>
    <label>hunger pangs</label>
    <description>This weapon's persona loves food, and transmits that onto whoever bonds with it. The bonded person's hunger rate will be 50% higher.</description>
    <bondedHediffs>
      <li>HungerMaker</li>
    </bondedHediffs>
    <commonality>1</commonality>
    <marketValueOffset>-600</marketValueOffset>
  </WeaponTraitDef>
  <HediffDef>
    <defName>HungerMaker</defName>
    <label>psychic hunger</label>
    <description>Hunger is increased by the psychic influence of a bonded weapon.</description>
    <isBad>false</isBad>
    <stages>
      <li>
        <hungerRateFactorOffset>0.5</hungerRateFactorOffset>
      </li>
    </stages>
  </HediffDef>

  <WeaponTraitDef>
    <defName>NeuralHeatRecoveryGain</defName>
    <label>neural cooling</label>
    <description>This weapon's persona has the ability to help dissipate the wielder's neural heat. The wielder's neural heat dissipation is improved by 0.15 per second.</description>
    <equippedHediffs>
      <li>NeuralHeatRecoveryGain</li>
    </equippedHediffs>
    <commonality>1</commonality>
    <marketValueOffset>500</marketValueOffset>
  </WeaponTraitDef>
  <HediffDef>
    <defName>NeuralHeatRecoveryGain</defName>
    <label>assisted neural cooling</label>
    <description>Neural heat dissipation is improved by the psychic influence of a bonded weapon.</description>
    <isBad>false</isBad>
    <stages>
      <li>
        <statOffsets>
          <PsychicEntropyRecoveryRate>0.15</PsychicEntropyRecoveryRate>
        </statOffsets>
      </li>
    </stages>
  </HediffDef>


  <!-- Misc -->

  <WeaponTraitDef>
    <defName>NeverBond</defName>
    <label>freewielder</label>
    <description>This weapon's persona does not form bonds in the normal way. Anyone can pick it up and use it.</description>
    <neverBond>true</neverBond>
    <commonality>1</commonality>
    <exclusionTags>
      <li>NeverBond</li>
    </exclusionTags>
  </WeaponTraitDef>

  <WeaponTraitDef>
    <defName>Jealous</defName>
    <label>jealous</label>
    <description>This weapon's persona becomes angry when the bonded individual uses another weapon, thus reducing their mood.</description>
    <workerClass>WeaponTraitWorker_Jealous</workerClass>
    <commonality>1</commonality>
    <marketValueOffset>-600</marketValueOffset>
    <exclusionTags>
      <li>NeverBond</li>
    </exclusionTags>
  </WeaponTraitDef>
  <ThoughtDef>
    <defName>JealousRage</defName>
    <thoughtClass>Thought_WeaponTraitNotEquipped</thoughtClass>
    <durationDays>1</durationDays>
    <stages>
      <li>
        <label>{WEAPON}'s jealousy</label>
        <description>My bonded weapon {WEAPON} is jealous I am using another weapon. I can feel the rage it is screaming into my head.</description>
        <baseMoodEffect>-15</baseMoodEffect>
      </li>
    </stages>
  </ThoughtDef>

</Defs>
