- type: entity
  id: BaseBulletStarlight
  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
    linearDamping: 0
    angularDamping: 0
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.1,-0.1,0.1,0.1"
        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
  name: taser bolt
  id: BulletAdvTaser
  parent: BaseBulletStarlight
  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:
        - Impassable
        - BulletImpassable
      fly-by: *flybyfixture
  - type: Ammo
  - type: Projectile
    damage:
      types:
        Heat: 5
    soundHit:
      path: "/Audio/Weapons/Guns/Hits/taser_hit.ogg"
    forceSound: true
  - type: TimedDespawn
    lifetime: 0.2
  - type: StaminaDamageOnCollide
    damage: 33
  - type: StunOnCollide
    knockdownAmount: 0.5

- type: entity
  id: BaseBulletRubber
  parent: BaseBulletStarlight
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: rubber
  - type: Projectile
    damage:
      types:
        Blunt: 1
    soundHit:
      path: /Audio/Weapons/Guns/Hits/snap.ogg
  - type: StaminaDamageOnCollide
    damage: 12 # 9 hits to stun sounds reasonable
      
- type: entity
  id: BulletEnergyCrossbow
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Reflective
    reflective:
      - NonEnergy
  - type: Sprite
    sprite: _Starlight/Objects/Weapons/Guns/Projectiles/projectiles.rsi
    layers:
    - state: cbbolt
  - type: StaminaDamageOnCollide
    damage: 30
  - type: StunOnCollide
    knockdownAmount: 1
  - type: Projectile
    damage:
      types:
        Poison: 20
  - type: TimedDespawn
    lifetime: 0.4
  - type: GatheringProjectile
  
- type: entity
  id: BulletMiniEnergyCrossbow
  parent: BulletEnergyCrossbow
  categories: [ HideSpawnMenu ]
  components:
  - type: StaminaDamageOnCollide
    damage: 40
  - type: StunOnCollide
    knockdownAmount: 2
  - type: Projectile
    damage:
      types:
        Poison: 10
