- type: entity
  id: MuzzleFlashEffect
  categories: [ HideSpawnMenu ]
  components:
  - type: TimedDespawn
    lifetime: 0.4
  - type: Sprite
    drawdepth: BelowMobs
    layers:
    - shader: unshaded
      map: ["enum.EffectLayers.Unshaded"]
      sprite: Objects/Weapons/Guns/Projectiles/projectiles.rsi
      state: muzzle_bullet
  - type: EffectVisuals
  - type: Tag
    tags:
      - HideContextMenu
  - type: AnimationPlayer

- type: entity
  parent: MuzzleFlashEffect
  id: MuzzleFlashEffectOmnilaser
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    drawdepth: BelowMobs
    offset: 0.15, 0
    layers:
    - shader: unshaded
      map: ["enum.EffectLayers.Unshaded"]
      sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
      state: omnilaser_flash

- type: entity
  parent: MuzzleFlashEffect
  id: MuzzleFlashEffectHeavyLaser
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    drawdepth: BelowMobs
    offset: 0.15, 0
    layers:
    - shader: unshaded
      map: ["enum.EffectLayers.Unshaded"]
      sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
      state: heavylaser_flash

# One bullet to bring them all into the darkness and bind them
- type: entity
  id: BaseBullet
  name: BaseBullet
  description: If you can see this you're probably dead!
  abstract: true
  components:
  - type: Reflective
  - type: FlyBySound
  - type: Clickable
  - type: Sprite
    noRot: false
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: bullet
      shader: unshaded
  - type: Physics
    bodyType: Dynamic
  - type: TileFrictionModifier
    modifier: 0
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.1,-0.10,0.1,0.30"
        hard: false
        mask:
        - Impassable
        - BulletImpassable
      fly-by: &flybyfixture
        shape: !type:PhysShapeCircle
          radius: 1.5
        layer:
        - Impassable
        - MidImpassable
        - HighImpassable
        - LowImpassable
        hard: False
  - type: Projectile
    impactEffect: BulletImpactEffect
    damage:
      types:
        Piercing: 14
    soundHit:
      path: /Audio/Weapons/Guns/Hits/bullet_hit.ogg
  - type: TimedDespawn
    lifetime: 10

- type: entity
  id: BaseBulletTrigger # Trigger-on-collide bullets
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: TriggerOnCollide
    fixtureID: projectile
    maxTriggers: 1
  - type: Projectile
    damage:
      types:
        Blunt: 7 # more damage than a punch.
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.15,-0.45,0.15,0.15"
        hard: false
        mask:
        - Impassable
        - BulletImpassable
      fly-by: *flybyfixture

- type: entity
  id: BaseBulletPractice
  name: base bullet practice
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: practice
  - type: Projectile
    damage:
      types:
        Blunt: 1

- type: entity
  id: BaseBulletIncendiary
  name: base bullet incendiary
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Projectile
    damage:
      types:
        Piercing: 10
        Heat: 4
  - type: PointLight
    enabled: true
    color: "#ff4300"
    radius: 2.0
    energy: 7.0
  - type: IgniteOnCollide
    fireStacks: 0.25

- type: entity
  id: BaseBulletAP
  name: base bullet armor-piercing
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: piercing
  - type: Projectile
    damage:
      types:
        Piercing: 11 # 20% decrease
    ignoreResistances: true

- type: entity
  id: BaseBulletUranium
  name: base bullet uranium
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: uranium
      shader: unshaded
 # - type: PointLight // Too resource intensive for what little effect it has, one day...
 #   enabled: true
 #   color: "#059919"
 #   radius: 2.0
  - type: Projectile
    damage:
      types:
        Radiation: 11

# Energy projectiles
- type: entity
  name: taser bolt
  id: BulletTaser
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: FlyBySound
    sound:
      collection: EnergyMiss
      params:
        volume: 5
  - type: Sprite
    noRot: true
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    color: "#ffff33"
    layers:
    - state: spark
      shader: unshaded
  - type: Physics
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.15,-0.45,0.15,0.15"
        hard: false
        mask:
        - Opaque
        - Impassable
        - BulletImpassable
      fly-by: *flybyfixture
  - type: Ammo
  - type: Projectile
    damage:
      types:
        Shock: 0
    soundHit:
      path: "/Audio/Weapons/Guns/Hits/taser_hit.ogg"
    forceSound: true
  - type: TimedDespawn
    lifetime: 0.170 # Very short range
  - type: StunOnCollide
    stunAmount: 0
    knockdownAmount: 2.5 # Enough to subdue and follow up with a stun baton
    drop: false #Ranged KD and item drop are too strong in one package
    slowdownAmount: 2.5
    walkSpeedModifier: 0.5
    sprintSpeedModifier: 0.5

- type: entity
  parent: BulletTaser
  id: BulletTaserSuper
  categories: [ HideSpawnMenu ]
  name: taser bolt
  description: If you can see this, you've probably been stun-meta'd
  components:
  - type: Sprite
    noRot: true
    sprite: Structures/Power/Generation/Tesla/energy_miniball.rsi
    color: "#ffff33"
    layers:
    - state: tesla_projectile
      shader: unshaded
  - type: PointLight
    enabled: true
    color: "#ffff33"
    radius: 2.0
    energy: 7.01
  - type: TimedDespawn
    lifetime: 1.0 # Not so short range
  - type: StunOnCollide
    stunAmount: 5
    drop: true # this is the evil taser
    knockdownAmount: 10
    slowdownAmount: 10
    walkSpeedModifier: 0.5
    sprintSpeedModifier: 0.5

- type: entity
  name : disabler bolt
  id: BulletDisabler
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Reflective
    reflective:
    - Energy
  - type: FlyBySound
    sound:
      collection: EnergyMiss
      params:
        volume: 5
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
    layers:
    - state: omnilaser
      shader: unshaded
  - type: Physics
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.15,-0.3,0.15,0.3"
        hard: false
        mask:
        - Opaque
        - Impassable
        - BulletImpassable
      fly-by: *flybyfixture
  - type: Ammo
  - type: StaminaDamageOnCollide
    damage: 33
  - type: Projectile
    impactEffect: BulletImpactEffectDisabler
    damage:
      types:
        Heat: 0
    soundHit:
      collection: WeakHit
    forceSound: true

- type: entity
  name : disabler bolt practice
  id: BulletDisablerPractice
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: FlyBySound
    sound:
      collection: EnergyMiss
      params:
        volume: 5
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
    layers:
    - state: omnilaser
      shader: unshaded
  - type: Physics
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.15,-0.3,0.15,0.3"
        hard: false
        mask:
        - Opaque
        - Impassable
        - BulletImpassable
      fly-by: *flybyfixture
  - type: Ammo
  - type: StaminaDamageOnCollide
    damage: 1
  - type: Projectile
    impactEffect: BulletImpactEffectDisabler
    damage:
      types:
        Heat: 0
    soundHit:
      collection: WeakHit
    forceSound: true

- type: entity
  name: emitter bolt
  id: EmitterBolt
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Structures/Power/Generation/Singularity/emitter.rsi
    layers:
      - state: projectile
        shader: unshaded
  - type: Ammo
    muzzleFlash: null
  - type: Physics
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.2,-0.2,0.2,0.2"
        hard: false
        mask:
        - Opaque
      fly-by: *flybyfixture
  - type: Projectile
#   soundHit:  Waiting on serv3
    damage:
      types:
        Heat: 14
  # mining laser real
  - type: GatheringProjectile
  - type: Tag
    tags:
    - EmitterBolt
  - type: TimedDespawn
    lifetime: 3

- type: entity
  name: watcher bolt
  id: WatcherBolt
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: FlyBySound
    sound:
      collection: EnergyMiss
      params:
        volume: 5
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
    layers:
    - state: omnilaser
      shader: unshaded
  - type: Ammo
    muzzleFlash: MuzzleFlashEffectOmnilaser
  - type: Physics
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.2,-0.2,0.2,0.2"
        hard: false
        mask:
        - Opaque
        - Impassable
        - BulletImpassable
      fly-by: *flybyfixture
  - type: Projectile
    #   soundHit:  Waiting on serv3
    impactEffect: BulletImpactEffectDisabler
    damage:
      types:
        Cold: 0
  - type: TimedDespawn
    lifetime: 3
  - type: ChangeTemperatureOnCollide
    heat: -50000

- type: entity
  name: freezing bolt
  id: BoltTempgunCold
  parent: WatcherBolt
  categories: [ HideSpawnMenu ]
  components:
  - type: Reflective
    reflective:
    - Energy
  - type: Projectile
    #   soundHit:  Waiting on serv3
    impactEffect: BulletImpactEffectDisabler
    damage:
      types:
        Cold: 10
  - type: TimedDespawn
    lifetime: 3
  - type: ChangeTemperatureOnCollide
    heat: -100000

- type: entity
  name: magmawing watcher bolt
  id: WatcherBoltMagmawing
  parent: WatcherBolt
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
    layers:
    - state: omnilaser_greyscale
      shader: unshaded
      color: orangered
  - type: Ammo
    muzzleFlash: MuzzleFlashEffectHeavyLaser
  - type: Projectile
    #   soundHit:  Waiting on serv3
    impactEffect: BulletImpactEffectOrangeDisabler
    damage:
      types:
        Heat: 0
  - type: ChangeTemperatureOnCollide
    heat: 50000

- type: entity
  name: scorching bolt
  id: BoltTempgunHot
  parent: WatcherBoltMagmawing
  categories: [ HideSpawnMenu ]
  components:
  - type: Reflective
    reflective:
    - Energy
  - type: Projectile
    #   soundHit:  Waiting on serv3
    impactEffect: BulletImpactEffectOrangeDisabler
    damage:
      types:
        Heat: 10
  - type: ChangeTemperatureOnCollide
    heat: 100000 #This may be a bit underpowered, but in testing, 130000 was RIDICULOUS and killed in seconds.

- type: entity
  parent: BaseBullet
  id: BasiliskRay
  name: basilisk ray
  categories: [ HideSpawnMenu ]
  components:
  - type: FlyBySound
    sound:
      collection: EnergyMiss
      params:
        volume: 5
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
    layers:
    - state: ice
      shader: unshaded
  - type: Ammo
    muzzleFlash: null
  - type: Physics
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.05,-0.05,0.05,0.05"
        hard: false
        mask:
        - Opaque
      fly-by: *flybyfixture
  - type: Projectile
    impactEffect: BulletImpactEffectDisabler
    damage:
      types:
        Cold: 5
  - type: TimedDespawn
    lifetime: 3
  - type: ChangeTemperatureOnCollide
    heat: -50000

- type: entity
  id: BulletKinetic
  name: kinetic bolt
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  description: Not too bad, but you still don't want to get hit by it.
  components:
  - type: Reflective
    reflective:
      - NonEnergy
  - type: Sprite
    noRot: false
    sprite: Objects/Weapons/Guns/Projectiles/magic.rsi
    layers:
    - state: chronobolt
      shader: unshaded
  - type: Projectile
    impactEffect: BulletImpactEffectKinetic
    damage:
      types:
        Blunt: 25 # starcup: revert salvage damage nerf (15 > 25)
        Structural: 30
  # Short lifespan
  - type: TimedDespawn
    lifetime: 0.22 # roughly 5.5 tiles
  - type: GatheringProjectile

- type: entity
  id: BulletKineticShuttle
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    noRot: false
    sprite: Objects/Weapons/Guns/Projectiles/magic.rsi
    layers:
    - state: chronobolt
      shader: unshaded
  - type: Projectile
    impactEffect: BulletImpactEffectKinetic
    damage:
      types:
        Blunt: 30
        Structural: 35
  - type: Ammo
    muzzleFlash: HitscanEffect
  - type: TimedDespawn
    lifetime: 1.5
  - type: PointLight
    radius: 2.5
    color: white
    energy: 0.5
  - type: GatheringProjectile

- type: entity
  id: BulletCharge
  name: charge bolt
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  description: Marks a target for additional damage.
  components:
  - type: Reflective
    reflective:
    - NonEnergy
  - type: Sprite
    noRot: false
    sprite: Objects/Weapons/Guns/Projectiles/magic.rsi
    layers:
      - state: chronobolt
        shader: unshaded
  - type: GatheringProjectile
  - type: DamageMarkerOnCollide
    whitelist:
      components:
        - MobState
    damage:
      types:
        Blunt: 20 # starcup: revert salvage damage nerf (18 > 20)
        Slash: 5 # starcup: revert salvage damage nerf (4 > 5)
  - type: Projectile
    impactEffect: BulletImpactEffectKinetic
    damage:
      types:
        Blunt: 0
  # Short lifespan
  - type: TimedDespawn
    lifetime: 0.4

  # Deals less damage, glaive has better HP recovery
- type: entity
  id: BulletChargeGlaive
  name: leech bolt
  parent: BulletCharge
  components:
  - type: DamageMarkerOnCollide
    whitelist:
      components:
        - MobState
    damage:
      types:
        Blunt: 1
        Slash: 5

- type: entity
  parent: BaseBullet
  id: AnomalousParticleDelta
  name: delta particles
  categories: [ HideSpawnMenu ]
  components:
  - type: PointLight
    enabled: true
    color: "#c2385d"
    radius: 2.0
    energy: 7.0
  - type: AnomalousParticle
    particleType: Delta
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/magic.rsi
    layers:
      - state: magicm_red
        shader: unshaded
  - type: Ammo
    muzzleFlash: null
  - type: Physics
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.2,-0.2,0.2,0.2"
        hard: false
        mask:
        - Opaque
      fly-by: *flybyfixture
  - type: Projectile
    damage:
      types:
        Heat: 5
  - type: TimedDespawn
    lifetime: 3
  - type: Reflective
    reflective:
    - Energy


- type: entity
  parent: AnomalousParticleDelta
  id: AnomalousParticleDeltaStrong
  categories: [ HideSpawnMenu ]
  components:
  - type: AnomalousParticle
    particleType: Delta
    severityPerSeverityHit: 0.05
    stabilityPerDestabilizingHit: 0.08
    healthPerWeakeningeHit: -0.1
    stabilityPerWeakeningeHit: -0.2

- type: entity
  parent: AnomalousParticleDelta
  id: AnomalousParticleEpsilon
  name: epsilon particles
  categories: [ HideSpawnMenu ]
  components:
  - type: PointLight
    enabled: true
    color: "#38c296"
    radius: 2.0
    energy: 7.0
  - type: Sprite
    layers:
      - state: magicm_cyan
        shader: unshaded
  - type: AnomalousParticle
    particleType: Epsilon

- type: entity
  parent: AnomalousParticleEpsilon
  id: AnomalousParticleEpsilonStrong
  categories: [ HideSpawnMenu ]
  components:
  - type: AnomalousParticle
    particleType: Epsilon
    severityPerSeverityHit: 0.05
    stabilityPerDestabilizingHit: 0.08
    healthPerWeakeningeHit: -0.1
    stabilityPerWeakeningeHit: -0.2

- type: entity
  parent: AnomalousParticleDelta
  id: AnomalousParticleZeta
  name: zeta particles
  categories: [ HideSpawnMenu ]
  components:
  - type: PointLight
    enabled: true
    color: "#b9c238"
    radius: 2.0
    energy: 7.0
  - type: Sprite
    layers:
      - state: magicm_yellow
        shader: unshaded
  - type: AnomalousParticle
    particleType: Zeta

- type: entity
  parent: AnomalousParticleZeta
  id: AnomalousParticleZetaStrong
  categories: [ HideSpawnMenu ]
  components:
  - type: AnomalousParticle
    particleType: Zeta
    severityPerSeverityHit: 0.05
    stabilityPerDestabilizingHit: 0.08
    healthPerWeakeningeHit: -0.1
    stabilityPerWeakeningeHit: -0.2

- type: entity
  parent: AnomalousParticleDelta
  id: AnomalousParticleOmegaStrong
  name: omega particles
  categories: [ HideSpawnMenu ]
  components:
  - type: PointLight
    enabled: true
    color: "#38c24f"
    radius: 2.0
    energy: 7.0
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/magic.rsi
    layers:
      - state: magicm_green
        shader: unshaded
  - type: AnomalousParticle
    particleType: Default
    severityOverride: true
    severityPerSeverityHit: 0.1
    stabilityPerDestabilizingHit: 0.05
    healthPerWeakeningeHit: 1
    stabilityPerWeakeningeHit: -0.05
  - type: Projectile
    impactEffect: BulletImpactEffectKinetic
    damage:
      types:
        Heat: 20

- type: entity
  parent: AnomalousParticleDelta
  id: AnomalousParticleSigma
  name: sigma particles
  categories: [ HideSpawnMenu ]
  components:
  - type: PointLight
    enabled: true
    color: "#8d38c2"
    radius: 2.0
    energy: 7.0
  - type: Sprite
    layers:
      - state: magicm
        shader: unshaded
  - type: AnomalousParticle
    particleType: Sigma

- type: entity
  parent: AnomalousParticleSigma
  id: AnomalousParticleSigmaStrong
  name: sigma particles
  categories: [ HideSpawnMenu ]
  components:
  - type: AnomalousParticle
    particleType: Sigma

# Launcher projectiles (grenade / rocket)
- type: entity
  id: BulletRocket
  name: rocket
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
      - state: frag
  - type: ExplodeOnTrigger
  - type: Explosive
    explosionType: Default
    maxIntensity: 40
    intensitySlope: 6
    totalIntensity: 200
    maxTileBreak: 1
  - type: PointLight
    radius: 3.5
    color: orange
    energy: 0.5

- type: entity
  id: BulletWeakRocket
  name: weak rocket
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
      - state: frag
  - type: ExplodeOnTrigger
  - type: Explosive
    explosionType: Default
    maxIntensity: 2 # max 30 per tile
    intensitySlope: 1
    totalIntensity: 4 # 60 total damage to distribute over tiles
    maxTileBreak: 1
  - type: PointLight
    radius: 3.5
    color: orange
    energy: 0.5

- type: entity
  id: BulletGrenadeBaton
  name: baton grenade
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
      - state: grenade
  - type: Projectile
    deleteOnCollide: false
    damage:
      types:
        Blunt: 1
    soundHit:
      path: /Audio/Effects/gen_hit.ogg
  - type: StaminaDamageOnCollide
    damage: 80

- type: entity
  id: BulletGrenadeBlast
  name: blast grenade
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
      - state: grenade
  - type: ExplodeOnTrigger
  - type: Explosive
    explosionType: Default
    totalIntensity: 150 # a ~2 tile radius
    intensitySlope: 5
    maxIntensity: 10
    canCreateVacuum: false

- type: entity
  id: BulletGrenadeFlash
  name: flash grenade
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
      - state: grenade
  - type: FlashOnTrigger
    range: 7
  - type: SpawnOnTrigger
    proto: GrenadeFlashEffect
  - type: DeleteOnTrigger

- type: entity
  id: BulletGrenadeFrag
  name: frag grenade
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
      - state: grenade
  - type: ExplodeOnTrigger
  - type: Explosive
    explosionType: Default
    totalIntensity: 50
    intensitySlope: 1
    maxIntensity: 5
    canCreateVacuum: false
  - type: ContainerContainer
    containers:
      cluster-payload: !type:Container
  - type: ProjectileGrenade
    triggerKey: trigger
    fillPrototype: PelletClusterLessLethal
    capacity: 30

- type: entity
  parent: BaseBulletTrigger
  id: BulletGrenadeCleanade
  name: cleanade grenade round
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: cleanade
  - type: SmokeOnTrigger
    duration: 3.5
    spreadAmount: 30
    smokePrototype: Foam
    solution:
      reagents:
      - ReagentId: SpaceCleaner
        Quantity: 30
  - type: EmitSoundOnTrigger
    sound: /Audio/Items/smoke_grenade_smoke.ogg
    positional: true
  - type: ExplodeOnTrigger
  - type: Explosive
    explosionType: Default
    totalIntensity: 0.01 # a little pop
    intensitySlope: 1
    maxIntensity: 0.01
    tileBreakScale: 0.01

- type: entity
  id: BulletGrenadeEMP
  name: EMP rocket
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
      - state: frag
  - type: EmpOnTrigger
    range: 5
    energyConsumption: 50000
    disableDuration: 10
  - type: Ammo
    muzzleFlash: null
  - type: PointLight
    radius: 3.5
    color: blue
    energy: 0.5

- type: entity
  id: BulletCap
  name: cap bullet
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Fun/capgun.rsi
    layers:
      - state: capbullet
  - type: Projectile
    deleteOnCollide: true
    damage:
      types:
        Piercing: 0

- type: entity
  id: BulletAcid
  name: acid spit
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
    - type: Projectile
      damage:
        types:
          Caustic: 5
    - type: Sprite
      sprite: Objects/Weapons/Guns/Projectiles/xeno_toxic.rsi
      layers:
        - state: xeno_toxic
    - type: Ammo
      muzzleFlash: null

- type: entity
  id: BulletWaterShot
  name: water
  categories: [ HideSpawnMenu ]
  components:
  - type: Clickable
  - type: Physics
    bodyType: Dynamic
  - type: TileFrictionModifier
    modifier: 0
  - type: TimedDespawn
    lifetime: 10
  - type: Projectile
    damage:
      types:
        Blunt: 0 #it's just water, bro
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/water_shot.rsi
    layers:
    - state: icon
      map: ["enum.VaporVisualLayers.Base"]
  - type: Ammo
    muzzleFlash: null
  - type: SolutionContainerManager
    solutions:
      vapor:
        maxVol: 50
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.10,-0.30,0.10,0.15"
        hard: false
        mask:
        - Impassable
        - BulletImpassable
  - type: Vapor
    active: true
    transferAmountPercentage: 1
  - type: Appearance
  - type: VaporVisuals

- type: entity
  id: BulletHivebot
  name: hivebot bullet
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Projectile
    damage:
      types:
        Piercing: 10

- type: entity
  id: BulletCannonBall
  name: cannonball
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
      - state: ball
  - type: ExplodeOnTrigger
  - type: Explosive
    explosionType: DemolitionCharge
    maxIntensity: 9
    intensitySlope: 6
    totalIntensity: 60
    maxTileBreak: 0
  - type: PointLight
    radius: 1
    color: orange
    energy: 0.5

- type: entity
  id: GrapplingHook
  name: grappling hook
  categories: [ HideSpawnMenu ]
  components:
    - type: EmbeddableProjectile
      deleteOnRemove: true
    - type: Clickable
    - type: InteractionOutline
    - type: Sprite
      noRot: false
      sprite: Objects/Weapons/Guns/Launchers/grappling_gun.rsi
      layers:
        - state: hook
    - type: Physics
      bodyType: Dynamic
    - type: TileFrictionModifier
      modifier: 0
    - type: Projectile
      deleteOnCollide: false
      damage:
        types:
          Blunt: 0
    - type: Fixtures
      fixtures:
        projectile:
          shape:
            !type:PhysShapeAabb
            bounds: "-0.1,-0.1,0.1,0.1"
          hard: false
          mask:
            - Impassable
            - HighImpassable
    - type: GrapplingProjectile

- type: entity
  parent: GrapplingHook
  id: StickyHandPalm
  name: sticky hand palm
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Launchers/sticky_hand.rsi
  - type: Ammo
    muzzleFlash: null

- type: entity
  name : disabler bolt smg
  id: BulletDisablerSmg
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Reflective
    reflective:
    - Energy
  - type: FlyBySound
    sound:
      collection: EnergyMiss
      params:
        volume: 5
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
    layers:
    - state: omnilaser
      shader: unshaded
  - type: Physics
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.15,-0.3,0.15,0.3"
        hard: false
        mask:
        - Opaque
        - Impassable
        - BulletImpassable
      fly-by: *flybyfixture
  - type: Ammo
  - type: StaminaDamageOnCollide
    damage: 15
  - type: Projectile
    impactEffect: BulletImpactEffectDisabler
    damage:
      types:
        Heat: 0
    soundHit:
      collection: WeakHit
    forceSound: true

- type: entity
  name : energy bolt
  id: BulletEnergyTurretBase
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Reflective
    reflective:
    - Energy
  - type: FlyBySound
    sound:
      collection: EnergyMiss
      params:
        volume: 5
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
    layers:
    - state: heavylaser
      shader: unshaded
  - type: Physics
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.15,-0.3,0.15,0.3"
        hard: false
        mask:
        - Opaque
      fly-by: *flybyfixture
  - type: Ammo

- type: entity
  name : laser bolt
  id: BulletEnergyTurretLaser
  parent: BulletEnergyTurretBase
  categories: [ HideSpawnMenu ]
  components:
  - type: Ammo
    muzzleFlash: MuzzleFlashEffectHeavyLaser
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
    layers:
    - state: heavylaser
      shader: unshaded
  - type: Projectile
    impactEffect: BulletImpactEffectOrangeDisabler
    damage:
      types:
        Heat: 28

- type: entity
  name : disabler bolt
  id: BulletEnergyTurretDisabler
  parent: BulletEnergyTurretBase
  categories: [ HideSpawnMenu ]
  components:
  - type: Ammo
    muzzleFlash: MuzzleFlashEffectOmnilaser
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
    layers:
    - state: omnilaser
      shader: unshaded
  - type: StaminaDamageOnCollide
    damage: 30
  - type: Projectile
    impactEffect: BulletImpactEffectDisabler
    damage:
      types:
        Heat: 0
    soundHit:
      collection: WeakHit
    forceSound: true

- type: entity
  name: tesla gun lightning
  id: TeslaGunBullet
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: TimedDespawn
    lifetime: 5
  - type: Sprite
    sprite: Structures/Power/Generation/Tesla/energy_miniball.rsi
    layers:
    - state: tesla_projectile
      shader: unshaded
  - type: StaminaDamageOnCollide
    damage: 15
  - type: EmbeddableProjectile
  - type: Projectile
    deleteOnCollide: false
    soundHit:
      path: /Audio/Weapons/Guns/Hits/bullet_hit.ogg
  - type: LightningArcShooter
    arcDepth: 1
    maxLightningArc: 3
    shootMinInterval: 2.5
    shootMaxInterval: 4.5
    shootRange: 5
    lightningPrototype: Lightning
  - type: Electrified
    requirePower: false
  - type: Tag
    tags:
      - HideContextMenu

- type: entity
  name: laser bolt
  id: BulletLaser
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Reflective
    reflective:
    - Energy
  - type: FlyBySound
    sound:
      collection: EnergyMiss
      params:
        volume: 5
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
    layers:
    - state: heavylaser
      shader: unshaded
  - type: Physics
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.15,-0.3,0.15,0.3"
        hard: false
        mask:
        - Opaque
        - Impassable
        - BulletImpassable
      fly-by: *flybyfixture
  - type: Ammo
  - type: Projectile
    impactEffect: BulletImpactEffectOrangeDisabler
    damage:
      types:
        Heat: 13

- type: entity
  name: wide laser barrage
  id: BulletLaserSpread
  categories: [ HideSpawnMenu ]
  parent: BulletLaser
  components:
  - type: ProjectileSpread
    proto: BulletLaser
    count: 5 #65 heat damage if you hit all your shots, but wide spread
    spread: 30

- type: entity
  name: lethal laser barrage
  id: BulletLaserSpreadNarrow
  categories: [ HideSpawnMenu ]
  parent: BulletLaser
  components:
  - type: ProjectileSpread
    proto: BulletLaser
    count: 4 #52 heat damage if you hit all your shots, but narrower spread
    spread: 10

- type: entity
  name: disabling laser barrage
  id: BulletDisablerSmgSpread
  categories: [ HideSpawnMenu ]
  parent: BulletDisablerSmg
  components:
  - type: ProjectileSpread
    proto: BulletDisablerSmg
    count: 3 #bit stronger than a disabler if you hit your shots you goober, still not a 2 hit stun though
    spread: 9

- type: entity
  name: magnum laser bolt
  id: BulletLaserMagnum
  categories: [ HideSpawnMenu ]
  parent: BulletLaser
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles_magnum.rsi
    layers:
    - state: magnum
      shader: unshaded
  - type: PointLight
    enabled: true
    color: "#ff4300"
  - type: Projectile
    impactEffect: BulletImpactEffectOrangeDisabler
    damage:
      types:
        Heat: 30

- type: entity
  name: magnum window-piercing bolt
  id: BulletLaserWindowPiercingMagnum
  categories: [ HideSpawnMenu ]
  parent: BulletLaser
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles_magnum.rsi
    layers:
    - state: magnum_piercing
      shader: unshaded
  - type: PointLight
    enabled: true
    color: "#ff4300"
  - type: Projectile
    impactEffect: BulletImpactEffectOrangeDisabler
    damage:
      types:
        Heat: 20
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.1,-0.1,0.1,0.1"
        hard: false
        mask:
        - Opaque

- type: entity
  parent: BaseBullet
  id: EnergyCrossbowBolt
  categories: [ HideSpawnMenu ]
  name: energy bolt
  description: This'll hurt.
  components:
  - type: Reflective
    reflective:
    - NonEnergy
  - type: Ammo
    muzzleFlash: null
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: crossbowbolt
      shader: unshaded
  - type: Projectile
    damage:
      types:
        Piercing: 2
  - type: StunOnCollide #somewhat mirror to taser stats, meant to be tot 'sidegrade'
    stunAmount: 0
    knockdownAmount: 2.5
    slowdownAmount: 2.5
    walkSpeedModifier: 0.2
    sprintSpeedModifier: 0.2
    drop: false
  - type: StaminaDamageOnCollide #additional stam damage to make repeated pushups less of a viable counter
    damage: 45
  - type: SolutionContainerManager
    solutions:
      bolt:
        maxVol: 1.5
        reagents:
        - ReagentId: Toxin
          Quantity: 1.5
  - type: SolutionInjectOnProjectileHit
    transferAmount: 1.5
    solution: bolt
