#region Limited life times
- type: entity
  abstract: true
  id: ConjuredObject10
  suffix: Conjured
  description: A magically created entity, that'll vanish from existence eventually.
  components:
  - type: TimedDespawn
    lifetime: 10

- type: entity
  abstract: true
  parent: ConjuredObject10
  id: ConjuredObject30
  components:
  - type: TimedDespawn
    lifetime: 30

- type: entity
  abstract: true
  parent: ConjuredObject10
  id: ConjuredObject60
  components:
  - type: TimedDespawn
    lifetime: 60

- type: entity
  abstract: true
  parent: ConjuredObject10
  id: ConjuredObject180
  components:
  - type: TimedDespawn
    lifetime: 180

- type: entity
  abstract: true
  parent: ConjuredObject10
  id: ConjuredObject300
  components:
  - type: TimedDespawn
    lifetime: 300

# From BBBullet
- type: entity
  abstract: true
  parent: BaseItem
  id: BluntObject
  name: blunt object
  description: If you can see this you're probably dead!
  components:
  - type: Item
  - type: Reflective
  - type: Clickable
  - type: Sprite
    noRot: false
  - type: Physics
    bodyType: Dynamic
    linearDamping: 0
    angularDamping: 0
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.1,-0.1,0.1,0.1"
        hard: true
        mask:
        - Impassable
        - BulletImpassable
  - type: Projectile
    impactEffect: BulletImpactEffect
    damage:
      types:
        Piercing: 14
  - type: TimedDespawn
    lifetime: 10
  - type: SpaceGarbage

# region soaps
- type: entity
  parent: [ BaseBullet, Soap, ConjuredObject10 ]
  id: SoapConjured
  name: conjured soap
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: _NF/Objects/Specific/Wizard/conjuredsoap.rsi
    layers:
    - state: soap-4
      map: ["enum.SolutionContainerLayers.Fill"]
      shader: unshaded
  - type: SolutionContainerVisuals
    maxFillLevels: 4
    fillBaseName: soap-
    changeColor: false
  - type: Fixtures
    fixtures:
      fix1:
        shape: !type:PhysShapeCircle
          radius: 0.2
        density: 5
        mask:
        - ItemMask
        restitution: 0.3
        friction: 0.2
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.1,-0.1,0.1,0.1"
        hard: false
        mask:
        - Impassable
        - BulletImpassable
  - type: Ammo
    muzzleFlash: null
  - type: Projectile
    deleteOnCollide: false
    onlyCollideWhenShot: true
    damage:
      types:
        Blunt: 9 # 12 hits to crit unarmored target
  - type: StaminaDamageOnCollide
    damage: 10 # 6 hits to slow, 10 hits to stun
  - type: PointLight
    color: MediumPurple
    radius: 1.5
    softness: 1

- type: entity
  parent: SoapConjured
  id: SoapConjuredAdept
  categories: [ HideSpawnMenu ]
  components:
  - type: Projectile
    deleteOnCollide: false
    onlyCollideWhenShot: false
    damage:
      types:
        Blunt: 14
  - type: StaminaDamageOnCollide
    damage: 10

- type: entity
  parent: SoapConjured
  id: SoapConjuredMaster
  categories: [ HideSpawnMenu ]
  components:
  - type: Projectile
    deleteOnCollide: false
    onlyCollideWhenShot: false
    damage:
      types:
        Blunt: 22
  - type: StaminaDamageOnCollide
    damage: 16

# Blood Cult Soaps
- type: entity
  parent: SoapConjured
  id: SoapletBloodCult
  name: conjured soaplet
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    layers:
    - state: soaplet
      shader: unshaded
      color: red
  - type: StepTrigger
    intersectRatio: 0.04
  - type: Fixtures
    fixtures:
      fix1:
        shape: !type:PhysShapeCircle
          radius: 0.2
        density: 5
        mask:
        - ItemMask
        restitution: 0.3
        friction: 0.1
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.08,-0.06,0.08,0.06"
        hard: false
        mask:
        - Impassable
        - BulletImpassable
  - type: Projectile
    deleteOnCollide: false
    onlyCollideWhenShot: false
    damage:
      types:
        Slash: 1
  - type: StaminaDamageOnCollide
    damage: 1
  - type: PointLight
    color: red
    radius: 1.2
    softness: 1

- type: entity
  parent: [ Soap, ConjuredObject10 ]
  id: SoapConjuredBloodCultCluster # I swear, I'll use it some how
  name: soap
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: _NF/Objects/Specific/Wizard/conjuredsoap.rsi
    layers:
    - state: soap-4
      shader: unshaded
      color: red
  - type: Appearance
  - type: ScatteringGrenade
    fillPrototype: SoapletBloodCult
    capacity: 20
    intervalBetweenTriggersMax: 0
    intervalBetweenTriggersMin: 0
    delayBeforeTriggerContents: 60
    randomDistance: true
    velocity: 25
  - type: DamageOnLand
    damage:
      types:
        Blunt: 9
  - type: PassiveDamage
    damage:
      groups:
        Brute: 10
  - type: Damageable
    damageContainer: Inorganic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 10
      behaviors:
      - !type:TriggerBehavior
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: ContainerContainer
    containers:
      cluster-payload: !type:Container
  - type: Ammo
    muzzleFlash: null
  - type: Projectile
    deleteOnCollide: false
    onlyCollideWhenShot: true
    damage:
      types:
        Slash: 5
  - type: PointLight
    color: red
    radius: 1.2
    softness: 1

- type: entity
  id: ShellSoapConjuredBloodCultCluster
  parent:
  - SoapConjured
  - BaseCartridge
  #- ConjuredObject10
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: _NF/Objects/Specific/Wizard/conjuredsoap.rsi
    layers:
    - state: soap-4
      shader: unshaded
      color: red
  - type: CartridgeAmmo
    muzzleFlash: null
    deleteOnSpawn: true
    proto: SoapletBloodCultSpread # SoapConjuredBloodCultCluster

- type: entity
  id: SoapletBloodCultSpread
  parent: SoapletBloodCult
  categories: [ HideSpawnMenu ]
  components:
  - type: ProjectileSpread
    proto: SoapletBloodCult
    count: 35
    spread: 40

# region bricks
- type: entity
  parent: [ BluntObject, ConjuredObject10 ]
  id: BrickConjured
  name: brick
  categories: [ HideSpawnMenu ]
  components:
  - type: Projectile
    deleteOnCollide: false
    damage:
      types:
        Blunt: 10
        Structural: 10
  - type: StaminaDamageOnCollide
    damage: 15
  - type: Sprite
    noRot: false
    sprite: _NF/Objects/Specific/Wizard/conjuredbrick.rsi
    layers:
    - state: brick
  - type: Ammo
    muzzleFlash: null

- type: entity
  parent: BrickConjured
  id: BrickConjuredAdept
  categories: [ HideSpawnMenu ]
  components:
  - type: Projectile
    deleteOnCollide: false
    damage:
      types:
        Blunt: 16
        Structural: 15
  - type: StaminaDamageOnCollide
    damage: 12

- type: entity
  parent: BrickConjured
  id: BrickConjuredMaster
  categories: [ HideSpawnMenu ]
  components:
  - type: Projectile
    deleteOnCollide: false
    damage:
      types:
        Blunt: 25
        Structural: 20
  - type: StaminaDamageOnCollide
    damage: 16
