<?xml version="1.0" encoding="utf-8" ?>
<Defs>

  <ThingDef ParentName="CavePlantBase">
    <defName>Plant_Nutrifungus</defName>
    <label>nutrifungus</label>
    <description>A meaty bioengineered mushroom grown for its nutritious value. It can grow on fungal gravel, but only in darkness - exposing it to any kind of light, including darklights, will kill it.</description>
    <statBases>
      <MaxHitPoints>85</MaxHitPoints>
      <Nutrition>0.25</Nutrition>
    </statBases>
    <graphicData>
      <texPath>Things/Plant/Nutrifungus</texPath>
      <graphicClass>Graphic_Random</graphicClass>
      <shadowData>
        <volume>(0.2, 0.3, 0.13)</volume>
        <offset>(-0.03,0,-0.44)</offset>
      </shadowData>
    </graphicData>
    <selectable>true</selectable>
    <pathCost>14</pathCost>
    <ingestible />
    <plant>
      <fertilityMin>0.3</fertilityMin>
      <fertilitySensitivity>0.15</fertilitySensitivity>
      <harvestTag>Standard</harvestTag>
      <harvestedThingDef>RawFungus</harvestedThingDef>
      <harvestYield>11</harvestYield>
      <sowTags>
        <li>Ground</li>
        <li>Hydroponic</li>
      </sowTags>
      <topWindExposure>0</topWindExposure>
      <growDays>6</growDays>
      <cavePlantWeight>0</cavePlantWeight>
      <visualSizeRange>0.3~0.65</visualSizeRange>
      <purpose>Food</purpose>
      <humanFoodPlant>true</humanFoodPlant>
      <maxMeshCount>9</maxMeshCount>
    </plant>
  </ThingDef>

  <ThingDef ParentName="TreeBase">
    <defName>Plant_TreeBonsai</defName>
    <label>bonsai tree</label>
    <description>A small tree, pruned and shaped to look visually pleasing.</description>
    <graphicData>
      <texPath>Things/Plant/BonsaiTree</texPath>
      <graphicClass>Graphic_Random</graphicClass>
    </graphicData>
    <altitudeLayer>Item</altitudeLayer>
    <minifiedDef IsNull="True" />
    <statBases>
      <MaxHitPoints>85</MaxHitPoints>
      <Beauty>15</Beauty>
      <BeautyOutdoors>15</BeautyOutdoors>
      <Nutrition>0.25</Nutrition>
      <Mass>15</Mass>
    </statBases>
    <blockWind>false</blockWind>
    <pathCost>0</pathCost>
    <fillPercent>0.01</fillPercent>
    <plant>
      <sowTags Inherit="False">
        <li>DecorativeTree</li>
      </sowTags>
      <harvestTag>Wood</harvestTag>
      <harvestYield>2</harvestYield>
      <skipDeteriorationMessage>true</skipDeteriorationMessage>
      <autoHarvestable>false</autoHarvestable>
      <burnedThingDef IsNull="True" />
      <choppedThingDef IsNull="True" />
      <smashedThingDef IsNull="True" />
      <sowWork>750</sowWork>
      <growMinGlow>0.3</growMinGlow>
      <topWindExposure>0.1</topWindExposure>
      <growDays>1.5</growDays>
      <visualSizeRange>0.3~1.05</visualSizeRange>
      <interferesWithRoof>false</interferesWithRoof>
      <blockAdjacentSow>false</blockAdjacentSow>
      <treeLoversCareIfChopped>false</treeLoversCareIfChopped>
      <purpose>Beauty</purpose>
      <treeCategory>Mini</treeCategory>
    </plant>
  </ThingDef>

  <ThingDef ParentName="PlantBaseNonEdible">
    <defName>Plant_Fibercorn</defName>
    <label>fibercorn</label>
    <description>An inedible, fibrous plant which produces a small amount of a wood-like substance.</description>
    <graphicData>
      <texPath>Things/Plant/Fibercorn</texPath>
      <graphicClass>Graphic_Random</graphicClass>
    </graphicData>
    <minifiedDef IsNull="True" />
    <statBases>
      <MaxHitPoints>85</MaxHitPoints>
    </statBases>
    <selectable>true</selectable>
    <pathCost>14</pathCost>
    <plant>
      <fertilityMin>0.2</fertilityMin>
      <fertilitySensitivity>0.1</fertilitySensitivity>
      <growMinGlow>0.3</growMinGlow>
      <harvestWork>300</harvestWork>
      <harvestedThingDef>WoodLog</harvestedThingDef>
      <burnedThingDef IsNull="True" />
      <harvestYield>2</harvestYield>
      <harvestTag>Wood</harvestTag>
      <sowTags>
        <li>Ground</li>
        <li>Hydroponic</li>
      </sowTags>
      <topWindExposure>0</topWindExposure>
      <growDays>6</growDays>
      <visualSizeRange>0.3~0.65</visualSizeRange>
      <treeLoversCareIfChopped>false</treeLoversCareIfChopped>
    </plant>
  </ThingDef>

  <ThingDef ParentName="TreeBase">
    <defName>Plant_Timbershroom</defName>
    <label>timbershroom</label>
    <description>A tall brown mushroom with a long stem. When harvested, it yields a wood-like substance.</description>
    <fillPercent>0.4</fillPercent>
    <graphicData>
      <texPath>Things/Plant/Timbershroom</texPath>
      <graphicClass>Graphic_Random</graphicClass>
      <shadowData>
        <volume>(0.2, 0.6, 0.2)</volume>
        <offset>(0,0,-0.3)</offset>
      </shadowData>
    </graphicData>
    <minifiedDef IsNull="True" />
    <plant>
      <topWindExposure>0</topWindExposure>
      <fertilityMin>0.01</fertilityMin>
      <growDays>20</growDays>
      <harvestYield>25</harvestYield>
      <neverBlightable>true</neverBlightable>
      <wildClusterWeight>0</wildClusterWeight>
      <growMinGlow>0</growMinGlow>
      <growOptimalGlow>0</growOptimalGlow>
      <cavePlant>true</cavePlant>
      <wildOrder>1</wildOrder>
      <sowResearchPrerequisites Inherit="False" />
      <treeLoversCareIfChopped>false</treeLoversCareIfChopped>
      <burnedThingDef IsNull="True" />
      <choppedThingDef IsNull="True" />
      <smashedThingDef IsNull="True" />
    </plant>
  </ThingDef>

  <ThingDef ParentName="TreeBase">
    <defName>Plant_TreeGauranlen</defName>
    <label>Gauranlen tree</label>
    <description>A large, distinctive-looking tree with a unique life-cycle. Each Gauranlen tree contains a small non-conscious dryad queen. The queen births creatures called dryads which guard and tend the tree. In exchange, the tree nurtures its protectors by feeding them directly. From the outside, it appears the dryads are created by the tree directly and act as part of it.\n\nIt is possible for a person to form a connection with a Gauranlen tree and partially control the dryads it produces.\n\nSome say Gauranlen trees are the homes of nature spirits that follow humanity across worlds.</description>
    <drawerType>MapMeshAndRealTime</drawerType>
    <graphicData>
      <texPath>Things/Plant/GauranlenTree</texPath>
      <graphicClass>Graphic_Random</graphicClass>
      <shadowData>
        <volume>(0.21, 0.6, 0.21)</volume>
      </shadowData>
    </graphicData>
    <tickerType>Normal</tickerType>
    <descriptionHyperlinks>
      <ThingDef>Plant_PodGauranlen</ThingDef>
      <ThingDef>GauranlenSeed</ThingDef>
    </descriptionHyperlinks>
    <minifiedDef IsNull="True" />
    <statBases>
      <Beauty>6</Beauty>
      <BeautyOutdoors>6</BeautyOutdoors>
      <Flammability>1</Flammability>
      <MaxHitPoints>300</MaxHitPoints>
    </statBases>
    <ingestible />
    <preventSkyfallersLandingOn>true</preventSkyfallersLandingOn>
    <plant>
      <growDays>10</growDays>
      <visualSizeRange>1.5~2.1</visualSizeRange>
      <sowMinSkill>0</sowMinSkill>
      <sowTags Inherit="False"/>
      <lifespanDaysPerGrowDays>0</lifespanDaysPerGrowDays>
      <fertilityMin>0.05</fertilityMin>
      <fertilitySensitivity>0</fertilitySensitivity>
      <wildClusterWeight>0</wildClusterWeight>
      <sowWork>400</sowWork>
      <harvestYield>35</harvestYield>
      <treeCategory>Super</treeCategory>
      <dieIfNoSunlight>false</dieIfNoSunlight>
      <growMinGlow>0</growMinGlow>
      <sowResearchPrerequisites Inherit="False" />
      <dieFromToxicFallout>False</dieFromToxicFallout>
      <showGrowthInInspectPane>false</showGrowthInInspectPane>
      <minSpacingBetweenSamePlant>4.9</minSpacingBetweenSamePlant>
      <warnIfMarkedForCut>true</warnIfMarkedForCut>
      <choppedThingDef>ChoppedStump_Gauranlen</choppedThingDef>
      <smashedThingDef>SmashedStump_Gauranlen</smashedThingDef>
    </plant>
    <comps>
      <li Class="CompProperties_SpawnSubplant">
        <compClass>CompSpawnSubplantDuration</compClass>
        <subplant>Plant_MossGauranlen</subplant>
        <maxRadius>7.9</maxRadius>
        <subplantSpawnDays>1</subplantSpawnDays>
        <minGrowthForSpawn>0.6</minGrowthForSpawn>
        <initialGrowthRange>0.2~0.8</initialGrowthRange>
        <canSpawnOverPlayerSownPlants>false</canSpawnOverPlayerSownPlants>
        <plantsToNotOverwrite>
          <li>Plant_PodGauranlen</li>
          <li MayRequire="Ludeon.RimWorld.Royalty">Plant_GrassAnima</li>
          <li MayRequire="Ludeon.RimWorld.Royalty">Plant_TreeAnima</li>
        </plantsToNotOverwrite>
      </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_TreeConnection">
        <pawnKind>Dryad_Basic</pawnKind>
        <spawnDays>8</spawnDays>
        <initialConnectionStrengthRange>0.25~0.45</initialConnectionStrengthRange>
        <connectionStrengthLossPerDryadDeath>0.1</connectionStrengthLossPerDryadDeath>
        <connectionStrengthGainPerHourPruningBase>0.01</connectionStrengthGainPerHourPruningBase>
        <spawningPodOffset>(-0.15, 0, -0.55)</spawningPodOffset>
        <spawningPodSizeRange>0.4~0.65</spawningPodSizeRange>
        <maxDryadsWild>2</maxDryadsWild>
        <maxDryadsPerConnectionStrengthCurve>
          <points>
            <li>(0, 0)</li>
            <li>(0.05, 1)</li>
            <li>(0.25, 2)</li>
            <li>(0.5, 3)</li>
            <li>(0.75, 4)</li>
          </points>
        </maxDryadsPerConnectionStrengthCurve>
        <connectionLossPerLevelCurve>
          <points>
            <li>(0, 0)</li>
            <li>(0.001, 0.02)</li>
            <li>(0.33, 0.04)</li>
            <li>(0.66, 0.06)</li>
          </points>
        </connectionLossPerLevelCurve>
        <connectionLossDailyPerBuildingDistanceCurve>
          <points>
            <li>(0,0.07)</li>
            <li>(7.9,0.01)</li>
          </points>
        </connectionLossDailyPerBuildingDistanceCurve>
        <connectionStrengthGainPerPlantSkill>
          <points>
            <li>(0, 0.8)</li>
            <li>(8, 1)</li>
            <li>(20, 1.2)</li>
          </points>
        </connectionStrengthGainPerPlantSkill>
      </li>
    </comps>
    <ritualFocus>
      <spectateDistance>4</spectateDistance>
      <allowedSpectateSides>All</allowedSpectateSides>
    </ritualFocus>
    <drawPlaceWorkersWhileSelected>true</drawPlaceWorkersWhileSelected>
    <placeWorkers>
      <li>PlaceWorker_ConnectionStrengthOffsetBuildingsNear</li>
    </placeWorkers>
  </ThingDef>

  <ThingDef ParentName="StumpChoppedBase">
    <defName>ChoppedStump_Gauranlen</defName>
    <label>chopped gauranlen stump</label>
    <description>A stump left behind after a garuanlen 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/StumpChoppedGauranlen</texPath>
      <graphicClass>Graphic_Single</graphicClass>
    </graphicData>
  </ThingDef>

  <ThingDef ParentName="StumpSmashedBase">
    <defName>SmashedStump_Gauranlen</defName>
    <label>smashed gauranlen stump</label>
    <description>The remnants of a gauranlen 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/StumpSmashedGauranlen</texPath>
      <graphicClass>Graphic_Single</graphicClass>
    </graphicData>
  </ThingDef>

  <ThingDef ParentName="PlantBaseNonEdible">
    <defName>Plant_MossGauranlen</defName>
    <label>Gauranlen moss</label>
    <description>Symbiotic moss that grows near Gauranlen trees.</description>
    <statBases>
      <MaxHitPoints>100</MaxHitPoints>
      <Beauty>10</Beauty>
      <BeautyOutdoors>10</BeautyOutdoors>
    </statBases>
    <descriptionHyperlinks>
      <ThingDef>Plant_TreeGauranlen</ThingDef>
    </descriptionHyperlinks>
    <graphicData>
      <texPath>Things/Plant/GauranlenMoss</texPath>
      <graphicClass>Graphic_Random</graphicClass>
      <drawSize>(0.75, 0.75)</drawSize>
    </graphicData>
    <plant>
      <fertilityMin>0.05</fertilityMin>
      <fertilitySensitivity>0</fertilitySensitivity>
      <sowMinSkill>0</sowMinSkill>
      <growDays>5</growDays>
      <visualSizeRange>0.5~0.7</visualSizeRange>
      <topWindExposure>0</topWindExposure>
      <allowAutoCut>false</allowAutoCut>
      <wildClusterWeight>0</wildClusterWeight>
      <maxMeshCount>4</maxMeshCount>
    </plant>
  </ThingDef>

  <ThingDef ParentName="PlantBaseNonEdible">
    <defName>Plant_PodGauranlen</defName>
    <label>Gauranlen pod</label>
    <description>A small pod that protects a single Gauranlen seed. This seed can be harvested and used to plant a Gauranlen tree.</description>
    <statBases>
      <MaxHitPoints>100</MaxHitPoints>
    </statBases>
    <graphicData>
      <texPath>Things/Plant/GauranlenPod</texPath>
      <graphicClass>Graphic_Random</graphicClass>
    </graphicData>
    <descriptionHyperlinks>
      <ThingDef>Plant_TreeGauranlen</ThingDef>
      <ThingDef>GauranlenSeed</ThingDef>
    </descriptionHyperlinks>
    <selectable>true</selectable>
    <neverMultiSelect>false</neverMultiSelect>
    <pathCost>14</pathCost>
    <preventSkyfallersLandingOn>true</preventSkyfallersLandingOn>
    <plant>
      <fertilitySensitivity>0.15</fertilitySensitivity>
      <growDays>6</growDays>
      <harvestYield>1</harvestYield>
      <harvestTag>Standard</harvestTag>
      <harvestAfterGrowth>0</harvestAfterGrowth>
      <harvestedThingDef>GauranlenSeed</harvestedThingDef>
      <harvestFailable>false</harvestFailable>
      <harvestYieldAffectedByDifficulty>false</harvestYieldAffectedByDifficulty>
      <visualSizeRange>0.6~1.1</visualSizeRange>
      <topWindExposure>0.1</topWindExposure>
      <wildClusterWeight>0</wildClusterWeight>
      <purpose>Misc</purpose>
      <allowAutoCut>false</allowAutoCut>
      <dieFromToxicFallout>False</dieFromToxicFallout>
      <warnIfMarkedForCut>true</warnIfMarkedForCut>
    </plant>
  </ThingDef>

  <ThingDef ParentName="ResourceBase">
    <defName>GauranlenSeed</defName>
    <label>Gauranlen seed</label>
    <description>The seed of a Gauranlan tree. It can be planted to create a new Gauranlen tree.</description>
    <descriptionHyperlinks>
      <ThingDef>Plant_TreeGauranlen</ThingDef>
      <ThingDef>Plant_PodGauranlen</ThingDef>
    </descriptionHyperlinks>
    <statBases>
      <MaxHitPoints>50</MaxHitPoints>
      <Mass>0.3</Mass>
      <Beauty>0</Beauty>
      <MarketValue>70</MarketValue>
    </statBases>
    <graphicData>
      <texPath>Things/Item/GauranlenSeed</texPath>
      <graphicClass>Graphic_StackCount</graphicClass>
      <drawSize>(0.6, 0.6)</drawSize>
    </graphicData>
    <thingCategories>
      <li>ItemsMisc</li>
    </thingCategories>
    <comps>
      <li Class="CompProperties_Plantable">
        <plantDefToSpawn>Plant_TreeGauranlen</plantDefToSpawn>
      </li>
    </comps>
  </ThingDef>

</Defs>