# One bullet to bring them all into the darkness and bind them
- type: entity
  abstract: true
  id: BaseBullet
  name: BaseBullet
  description: If you can see this you're probably dead!
  components:
  - type: Sprite
    noRot: false
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: bullet
      shader: unshaded
  - type: Reflective
  - type: FlyBySound
  - type: Clickable
  - 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
  parent: BaseBullet
  id: BaseBulletTrigger # Trigger-on-collide bullets
  categories: [ HideSpawnMenu ]
  name: base bullet trigger
  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
  parent: BaseBullet
  id: BaseBulletPractice
  categories: [ HideSpawnMenu ]
  name: base bullet practice
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: practice
  - type: Projectile
    damage:
      types:
        Blunt: 1

- type: entity
  parent: BaseBullet
  id: BaseBulletIncendiary
  categories: [ HideSpawnMenu ]
  name: base bullet incendiary
  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
  parent: BaseBullet
  id: BaseBulletAP
  categories: [ HideSpawnMenu ]
  name: base bullet armor-piercing
  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
  parent: BaseBullet
  id: BaseBulletUranium
  categories: [ HideSpawnMenu ]
  name: base bullet uranium
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: uranium
      shader: unshaded
  - type: PointLight
    enabled: true
    color: "#059919"
    radius: 2.0
  - type: Projectile
    damage:
      types:
        Radiation: 11
