# Upstream tree variants
- type: entity
  parent: BaseTree
  id: FloraTreeAutumn
  name: tree
  suffix: autumn
  description: The sun sets on the leaves of this swaying veteran.
  components:
  - type: Sprite
    sprite: _starcup/Structures/Nature/Flora/Trees/DeciduousTrees/flora_autumn_trees.rsi
    layers:
    - state: tree01
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        tree01: ""
        tree02: ""
        tree03: ""
        tree04: ""
        tree05: ""
        tree06: ""
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 400
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 150
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: TreeFall
          params:
            volume: 5
            variation: 0.05
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:SpawnEntitiesBehavior
        spawn:
          Log:
            min: 2
            max: 8
          DeciduousStump:
            min: 1
            max: 1
        offset: 0

- type: entity
  parent: BaseTree
  id: FloraTreeVerdant
  name: tree
  suffix: verdant
  description: A sturdy tree in the spring of its youth.
  components:
  - type: Sprite
    sprite: _starcup/Structures/Nature/Flora/Trees/DeciduousTrees/flora_verdant_trees.rsi
    layers:
    - state: tree01
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        tree01: ""
        tree02: ""
        tree03: ""
        tree04: ""
        tree05: ""
        tree06: ""

- type: entity
  parent: BaseTree
  id: FloraTreeTemperate
  name: tree
  suffix: temperate
  description: The oak's stength is tempered by experience.
  components:
  - type: Sprite
    sprite: _starcup/Structures/Nature/Flora/Trees/DeciduousTrees/flora_temperate_trees.rsi
    layers:
    - state: tree01
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        tree01: ""
        tree02: ""
        tree03: ""
        tree04: ""
        tree05: ""
        tree06: ""

- type: entity
  parent: FloraTreeLarge
  id: FloraTreeLargeDark
  name: dark wood
  suffix: large
  description: A foreboding canopy to hide the stars.
  components:
  - type: Sprite
    sprite: _starcup/Structures/Nature/Flora/Trees/DeciduousTrees/flora_treeslarge_dark.rsi
    layers:
    - state: treelarge01
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        treelarge01: ""
        treelarge02: ""
        treelarge03: ""
        treelarge04: ""
        treelarge05: ""
        treelarge06: ""
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 400
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 150
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: TreeFall
          params:
            volume: 5
            variation: 0.05
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:SpawnEntitiesBehavior
        spawn:
          Log:
            min: 3
            max: 8
          DeciduousLargeDarkStump:
            min: 1
            max: 1
        offset: 0

# Dead trees
- type: entity
  parent: BaseTree
  id: FloraTreeDeadBrown
  name: tree
  suffix: dead, brown
  description: The bones of the earth make for a beautifully haunting tombstone.
  components:
  - type: Sprite
    sprite: _starcup/Structures/Nature/Flora/Trees/DeciduousTrees/flora_dead_trees_brown.rsi
    layers:
    - state: tree01
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        tree01: ""
        tree02: ""
        tree03: ""
        tree04: ""
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 400
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: TreeFall
          params:
            volume: 5
            variation: 0.05
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:SpawnEntitiesBehavior
        spawn:
          Log:
            min: 2
            max: 8
          DeadStumpBrown:
            min: 1
            max: 1
        offset: 0

- type: entity
  parent: BaseStumpStarcup
  id: DeadStumpBrown
  suffix: dead, brown
  components:
  - type: Sprite
    sprite: _starcup/Structures/Nature/Flora/Trees/DeciduousTrees/flora_dead_trees_brown.rsi
    layers:
    - state: treestump1
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        treestump1: ""
        treestump2: ""

- type: entity
  parent: BaseTree
  id: FloraTreeDeadPurple
  name: tree
  suffix: dead, purple
  description: The bones of the earth make for a beautifully haunting tombstone.
  components:
  - type: Sprite
    sprite: _starcup/Structures/Nature/Flora/Trees/DeciduousTrees/flora_dead_trees_purple.rsi
    layers:
    - state: tree01
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        tree01: ""
        tree02: ""
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 400
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: TreeFall
          params:
            volume: 5
            variation: 0.05
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:SpawnEntitiesBehavior
        spawn:
          Log:
            min: 2
            max: 8
          DeadStumpPurple:
            min: 1
            max: 1
        offset: 0

- type: entity
  parent: BaseStumpStarcup
  id: DeadStumpPurple
  suffix: dead, purple
  components:
  - type: Sprite
    sprite: _starcup/Structures/Nature/Flora/Trees/DeciduousTrees/flora_dead_trees_purple.rsi
    layers:
    - state: treestump1
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        treestump1: ""
        treestump2: ""

- type: entity
  parent: FloraTreeDeadBrown
  id: FloraTreeDeadThick
  suffix: dead, thick
  components:
  - type: Sprite
    sprite: _starcup/Structures/Nature/Flora/Trees/DeciduousTrees/flora_dead_trees_ms.rsi
    layers:
    - state: tree01
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        tree01: ""
        tree02: ""
        tree03: ""
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 400
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: TreeFall
          params:
            volume: 5
            variation: 0.05
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:SpawnEntitiesBehavior
        spawn:
          Log:
            min: 2
            max: 8
          DeadStumpThick:
            min: 1
            max: 1
        offset: 0

- type: entity
  parent: BaseStumpStarcup
  id: DeadStumpThick
  suffix: dead, thick
  components:
  - type: Sprite
    offset: 0,0.95
    sprite: _starcup/Structures/Nature/Flora/Trees/DeciduousTrees/flora_dead_trees_ms.rsi
    layers:
    - state: treestump1
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        treestump1: ""
        treestump2: ""
        treestump3: ""

# Original trees
- type: entity
  parent: BaseTree
  id: FloraTreeAspbirch
  name: tree
  suffix: aspen birch
  description: The criss-crossed pale wood of this tree, and the leaves that crown it, make it unclear whether it is a son of the aspen, or the birch.
  components:
  - type: Sprite
    sprite: _starcup/Structures/Nature/Flora/Trees/DeciduousTrees/flora_aspen_birches.rsi
    layers:
    - state: tree01
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        tree01: ""
        tree02: ""
        tree03: ""
        tree04: ""
        tree05: ""
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 400
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: TreeFall
          params:
            volume: 5
            variation: 0.05
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:SpawnEntitiesBehavior
        spawn:
          Log:
            min: 2
            max: 6
          AspenStump:
            min: 1
            max: 1
        offset: 0
  - type: SolutionContainerManager
    solutions:
      vasculature:
        maxVol: 45
        reagents:
        - ReagentId: Sap
          Quantity: 45
  - type: SolutionRegeneration
    solution: vasculature
    generated:
      reagents:
      - ReagentId: Sap
        Quantity: 0.1

- type: entity
  parent: BaseStumpStarcup
  id: AspenStump
  suffix: aspen
  components:
  - type: Sprite
    offset: 0,1
    sprite: _starcup/Structures/Nature/Flora/Trees/DeciduousTrees/flora_aspen_birches.rsi
    layers:
    - state: treestump1
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        treestump1: ""
        treestump2: ""
        treestump3: ""

- type: entity
  parent: BaseTree
  id: FloraTreeTeal
  name: tree
  suffix: teal
  description: A hybrid of indeterminate species seen across many worlds of the Chalice sector.
  components:
  - type: Sprite
    sprite: _starcup/Structures/Nature/Flora/Trees/DeciduousTrees/flora_trees_teal.rsi
    layers:
    - state: tree01
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        tree01: ""
        tree02: ""
        tree03: ""
        tree04: ""
        tree05: ""
        tree06: ""
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 400
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: TreeFall
          params:
            volume: 5
            variation: 0.05
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:SpawnEntitiesBehavior
        spawn:
          Log:
            min: 2
            max: 6
          TealStump:
            min: 1
            max: 1
        offset: 0

- type: entity
  parent: BaseStumpStarcup
  id: TealStump
  suffix: teal
  components:
  - type: Sprite
    offset: 0,0.9
    sprite: _starcup/Structures/Nature/Flora/Trees/DeciduousTrees/flora_trees_teal.rsi
    layers:
    - state: treestump1
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        treestump1: ""
        treestump2: ""

- type: entity
  parent: BaseTree
  id: FloraTreeLargeTeal
  name: large tree
  suffix: teal
  description: A large, curiously shaped tree. Could it hear the thoughts of those pondering in its shade?
  components:
  - type: Sprite
    offset: 0,1.5
    sprite: _starcup/Structures/Nature/Flora/Trees/DeciduousTrees/flora_treeslarge_teal.rsi
    layers:
    - state: treelarge01
      map: ["random"]
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.3,-0.4,0.3,0.4"
        density: 1000
        layer:
        - WallLayer
  - type: RandomSprite
    available:
    - random:
        treelarge01: ""
        treelarge02: ""
        treelarge03: ""
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 400
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 150
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: TreeFall
          params:
            volume: 5
            variation: 0.05
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:SpawnEntitiesBehavior
        spawn:
          Log:
            min: 2
            max: 6
          TealStumpLarge:
            min: 1
            max: 1
        offset: 0

- type: entity
  parent: BaseStumpStarcup
  id: TealStumpLarge
  suffix: teal, large
  components:
  - type: Sprite
    offset: 0,1.5
    sprite: _starcup/Structures/Nature/Flora/Trees/DeciduousTrees/flora_treeslarge_teal.rsi
    layers:
    - state: treestump1
      map: ["random"]
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.03,-0.05,0.03,0.05"
        density: 1000
        layer:
        - WallLayer
  - type: RandomSprite
    available:
    - random:
        treestump1: ""
        treestump2: ""

- type: entity
  parent: BaseTree
  id: FloraTreePink
  name: cherry tree
  description: Love is the fruit that blooms from this tree.
  components:
  - type: Sprite
    sprite: _starcup/Structures/Nature/Flora/Trees/DeciduousTrees/flora_cherry_trees.rsi
    layers:
    - state: tree01
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        tree01: ""
        tree02: ""
        tree03: ""
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 400
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 150
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: TreeFall
          params:
            volume: 5
            variation: 0.05
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:SpawnEntitiesBehavior
        spawn:
          Log:
            min: 2
            max: 6
          CherryStump:
            min: 1
            max: 1
        offset: 0

- type: entity
  parent: BaseStumpStarcup
  id: CherryStump
  suffix: cherry
  components:
  - type: Sprite
    offset: 0,0.95
    sprite: _starcup/Structures/Nature/Flora/Trees/DeciduousTrees/flora_cherry_trees.rsi
    layers:
    - state: treestump1
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        treestump1: ""
        treestump2: ""

- type: entity
  parent: BaseTree
  id: FloraTreeJuniper
  name: juniper tree
  description: Jagged and twisted, this son of distant Terra may have changed somewhat in shape, but carries within it its forefathers' soul.
  components:
  - type: Sprite
    sprite: _starcup/Structures/Nature/Flora/Trees/DeciduousTrees/flora_juniper_trees.rsi
    layers:
    - state: tree01
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        tree01: ""
        tree02: ""
        tree03: ""
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 400
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 150
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          path: /Audio/Effects/tree_fell.ogg
          params:
            volume: 5
            variation: 0.05
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:SpawnEntitiesBehavior
        spawn:
          Log:
            min: 2
            max: 8
          JuniperStump:
            min: 1
            max: 1
        offset: 0

- type: entity
  parent: BaseStumpStarcup
  id: JuniperStump
  suffix: juniper
  components:
  - type: Sprite
    offset: 0,1
    sprite: _starcup/Structures/Nature/Flora/Trees/DeciduousTrees/flora_juniper_trees.rsi
    state: treestump
    layers:
    - state: treestump1
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        treestump1: ""
        treestump2: ""
