<?xml version="1.0" encoding="utf-8"?>
<Defs>
  
  <ThingDef ParentName="TreeBase" Name="TreeAnima">
    <defName>Plant_TreeAnima</defName>
    <label>anima tree</label>
    <description>A rare tree with warm, skin-smooth bark and long iridescent leaves. Infused with bioluminescent micro-organisms, anima trees develop a unique form of psychic symbiosis with surrounding lifeforms, allowing them to grow in a wide variety of biomes.\n\nIf a person (psycaster or not) meditates near an anima tree, it will grow anima grass around its base. Once enough grass is grown, it becomes possible to carry out a psychic linking ritual with the tree and upgrade a person's psychic powers. Only tribal peoples know the secret of this ritual. Tribal psycasters are also able to draw psyfocus from anima trees while meditating to them.\n\nAnima trees' psychic properties are weakened if artificial structures are placed nearby. They refuse to be caged or studied, and must remain part of nature.\n\nMost tribes believe that anima trees are not simply trees, but are rather the physical extremities of a single world spirit.</description>
    <graphicData>
      <texPath>Things/Plant/TreeAnima</texPath>
      <graphicClass>Graphic_Random</graphicClass>
      <shadowData>
        <volume>(0.12, 0.08, 0.1)</volume>
        <offset>(0,0,-0.25)</offset>
      </shadowData>
    </graphicData>
    <drawGUIOverlay>True</drawGUIOverlay>
    <minifiedDef IsNull="True" />
    <statBases>
      <Beauty>5</Beauty>
      <BeautyOutdoors>5</BeautyOutdoors>
      <MeditationFocusStrength>0.28</MeditationFocusStrength>
      <Flammability>0</Flammability>
      <MaxHitPoints>400</MaxHitPoints>
      <MeditationPlantGrowthOffset>0</MeditationPlantGrowthOffset>
    </statBases>
    <ingestible />
    <preventSkyfallersLandingOn>true</preventSkyfallersLandingOn>
    <plant>
      <growDays>25</growDays>
      <visualSizeRange>1.8~2.5</visualSizeRange>
      <sowMinSkill>0</sowMinSkill>
      <sowTags Inherit="False"/>
      <dieIfNoSunlight>False</dieIfNoSunlight>
      <dieFromToxicFallout>False</dieFromToxicFallout>
      <lifespanDaysPerGrowDays>0</lifespanDaysPerGrowDays>
      <fertilityMin>0.02</fertilityMin>
      <fertilitySensitivity>0</fertilitySensitivity>
      <sowResearchPrerequisites Inherit="False" />
      <allowAutoCut>false</allowAutoCut>
      <warnIfMarkedForCut>true</warnIfMarkedForCut>
      <choppedThingDef>ChoppedStump_Anima</choppedThingDef>
      <smashedThingDef>SmashedStump_Anima</smashedThingDef>
    </plant>
    <comps>
      <li Class="CompProperties_MeditationFocus">
        <statDef>MeditationFocusStrength</statDef>
        <focusTypes>
          <li>Natural</li>
        </focusTypes>
        <offsets>
          <li Class="FocusStrengthOffset_ArtificialBuildings">
            <radius>34.9</radius>
            <curve>
              <points>
                <li>(0,   0.0)</li>
                <li>(5,  -0.08)</li>
                <li>(10, -0.15)</li>
                <li>(50, -0.3)</li>
              </points>
            </curve>
          </li>
          <li Class="FocusStrengthOffset_BuildingDefs">
            <defs>
              <AnimusStone>0.02</AnimusStone>
              <NatureShrine_Small>0.01</NatureShrine_Small>
              <NatureShrine_Large>0.01</NatureShrine_Large>
            </defs>
            <radius>9.9</radius>
            <maxBuildings>4</maxBuildings>
            <explanationKey>MeditationFocusPerAnimusStoneAndShrine</explanationKey>
            <explanationKeyAbstract>MeditationFocusPerAnimusStoneAndShrineAbstract</explanationKeyAbstract>
          </li>
        </offsets>
      </li>
      <li Class="CompProperties_Glower">
        <glowRadius>3.75</glowRadius>
        <glowColor>(110,116,125,0)</glowColor>
      </li>
      <li Class="CompProperties_SpawnSubplant">
        <compClass>CompSpawnSubplant</compClass>
        <subplant>Plant_GrassAnima</subplant>
        <spawnSound>AnimaTreeProgress</spawnSound>
      </li>
      <li Class="CompProperties_Psylinkable">
        <requiredSubplantCountPerPsylinkLevel>
          <li>20</li>
          <li>20</li>
          <li>20</li>
          <li>20</li>
          <li>20</li>
          <li>20</li>
        </requiredSubplantCountPerPsylinkLevel>
        <requiredFocus>Natural</requiredFocus>
        <linkSound>AnimaTreeLink</linkSound>
        <enoughPlantsLetterLabel>About: Anima tree linking</enoughPlantsLetterLabel>
        <enoughPlantsLetterText>The anima tree now has {0} anima grass around it. This is enough for a tribal person to begin their first linking ritual!\n\nThe linking ritual gives a level of psylink and the ability to use psychic powers. Upgrading to a higher level requires 20 grass.\n\nThe anima grass requirements for linking rituals to upgrade psycasters are:\n\n{1}\n\nNote: Only those with the nature focus type can meditate to or link with anima trees. You can see a person's focus types by looking at their info card with the 'i' button.</enoughPlantsLetterText>
      </li>
      <li Class="CompProperties_GiveThoughtToAllMapPawnsOnDestroy">
        <thought>AnimaScream</thought>
        <message>The anima tree has died and emitted a disturbing psychic scream.</message>
      </li>
      <li Class="CompProperties_PlaySoundOnDestroy">
        <sound>AnimaTreeScream</sound>
      </li>
      <li Class="CompProperties_SelfhealHitpoints">
        <ticksPerHeal>2000</ticksPerHeal> <!-- 30 hp per day, must be a multiple of 2000, since plants have Long ticker -->
      </li>
      <li Class="CompProperties_ToggleDrawAffectedMeditationFoci" />
    </comps>
  </ThingDef>

  <ThingDef ParentName="StumpChoppedBase">
    <defName>ChoppedStump_Anima</defName>
    <label>chopped anima stump</label>
    <description>A stump left behind after an anima tree has been felled. The stump can be extracted but yields very little usable wood. Left outdoors, the stump will deteriorate in time.</description>
    <graphicData>
      <texPath>Things/Plant/Stumps/AnimaChopped</texPath>
      <graphicClass>Graphic_Random</graphicClass>
    </graphicData>
  </ThingDef>

  <ThingDef ParentName="StumpSmashedBase">
    <defName>SmashedStump_Anima</defName>
    <label>smashed anima stump</label>
    <description>The remnants of an anima tree destroyed by damage. It's ugly. The stump can be extracted but yields very little usable wood. Left outdoors, the stump will deteriorate in time.</description>
    <graphicData>
      <texPath>Things/Plant/Stumps/AnimaSmashed</texPath>
      <graphicClass>Graphic_Random</graphicClass>
    </graphicData>
  </ThingDef>

  <ThingDef ParentName="PlantBaseNonEdible">
    <defName>Plant_GrassAnima</defName>
    <label>anima grass</label>
    <description>A grass infused with luminous microorganisms. Tribal peoples find that anima grass grows around the base of an anima tree as they meditate. It seems to reflect some kind of strengthening of the tree's psychic power.\n\nOffworld scientists have tried to study the phenomenon, but the grass degenerates into normal plant matter when observed too closely.\n\nAnimals refuse eat anima grass. Tribal stories say this is done out of respect and fear.</description>
    <statBases>
      <MaxHitPoints>85</MaxHitPoints>
      <Flammability>1.3</Flammability>
    </statBases>
    <graphicData>
      <texPath>Things/Plant/Grass_Anima</texPath>
      <graphicClass>Graphic_Random</graphicClass>
    </graphicData>
    <plant>
      <fertilityMin>0.02</fertilityMin>
      <fertilitySensitivity>0</fertilitySensitivity>
      <sowMinSkill>0</sowMinSkill>
      <growDays>1</growDays>
      <lifespanDaysPerGrowDays>60</lifespanDaysPerGrowDays>
      <harvestWork>40</harvestWork>
      <maxMeshCount>9</maxMeshCount>
      <visualSizeRange>0.3~0.45</visualSizeRange>
      <topWindExposure>0.4</topWindExposure>
      <wildOrder>1</wildOrder>
      <dieFromToxicFallout>False</dieFromToxicFallout>
      <allowAutoCut>false</allowAutoCut>
    </plant>
  </ThingDef>
  
</Defs>