# SPDX-FileCopyrightText: 2022 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2022 Pancake <Pangogie@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 AJCM-git <60196617+AJCM-git@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 ThunderBear2006 <100388962+ThunderBear2006@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Vordenburg <114301317+Vordenburg@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 brainfood1183 <113240905+brainfood1183@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Alzore <140123969+Blackern5000@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Brandon Hu <103440971+Brandon-Huu@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 CaasGit <87243814+CaasGit@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 CatMagic <135462166+CatMagic1@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Cojoke <83733158+Cojoke-dot@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ed <96445749+TheShuEd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Emisse <99158783+Emisse@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 EmoGarbage404 <retron404@gmail.com>
# SPDX-FileCopyrightText: 2024 Eoin Mcloughlin <helloworld@eoinrul.es>
# SPDX-FileCopyrightText: 2024 Errant <35878406+Errant-4@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Flareguy <78941145+Flareguy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Hrosts <35345601+Hrosts@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ian <ignaz.k@live.de>
# SPDX-FileCopyrightText: 2024 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Joel Zimmerman <JoelZimmerman@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 JustCone <141039037+JustCone14@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Killerqu00 <47712032+Killerqu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kira Bridgeton <161087999+Verbalase@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ko4ergaPunk <62609550+Ko4ergaPunk@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kukutis96513 <146854220+Kukutis96513@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Lye <128915833+Lyroth001@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MerrytheManokit <167581110+MerrytheManokit@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Mervill <mervills.email@gmail.com>
# SPDX-FileCopyrightText: 2024 Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MureixloI <132683811+MureixloI@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 NakataRin <45946146+NakataRin@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 OrangeMoronage9622 <whyteterry0092@gmail.com>
# SPDX-FileCopyrightText: 2024 PJBot <pieterjan.briers+bot@gmail.com>
# SPDX-FileCopyrightText: 2024 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2024 Plykiya <58439124+Plykiya@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 PoTeletubby <108604614+PoTeletubby@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 PoTeletubby <ajcraigaz@gmail.com>
# SPDX-FileCopyrightText: 2024 Preston Smith <92108534+thetolbean@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Psychpsyo <60073468+Psychpsyo@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Repo <47093363+Titian3@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 RiceMar1244 <138547931+RiceMar1244@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Simon <63975668+Simyon264@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Stalen <33173619+stalengd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 TakoDragon <69509841+BackeTako@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Thomas <87614336+Aeshus@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 TsjipTsjip <19798667+TsjipTsjip@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ubaser <134914314+UbaserB@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Unkn0wn_Gh0st <shadowstalkermll@gmail.com>
# SPDX-FileCopyrightText: 2024 Vasilis <vasilis@pikachu.systems>
# SPDX-FileCopyrightText: 2024 Vigers Ray <60344369+VigersRay@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 beck-thompson <107373427+beck-thompson@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deathride58 <deathride58@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2024 dffdff2423 <dffdff2423@gmail.com>
# SPDX-FileCopyrightText: 2024 eoineoineoin <github@eoinrul.es>
# SPDX-FileCopyrightText: 2024 foboscheshir <156405958+foboscheshir@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 keronshb <54602815+keronshb@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2024 nikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 plykiya <plykiya@protonmail.com>
# SPDX-FileCopyrightText: 2024 saintmuntzer <47153094+saintmuntzer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 shamp <140359015+shampunj@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 slarticodefast <161409025+slarticodefast@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 strO0pwafel <153459934+strO0pwafel@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 stroopwafel <j.o.luijkx@student.tudelft.nl>
# SPDX-FileCopyrightText: 2024 themias <89101928+themias@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 to4no_fix <156101927+chavonadelal@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 voidnull000 <18663194+voidnull000@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 Aviu00 <93730715+Aviu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 ScarKy0 <106310278+ScarKy0@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  id: ProjectileFireball
  name: fireball
  description: You better GITTAH WEIGH.
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: PointLight
    color: "#E25822"
    radius: 2.0
    energy: 5.0
  - type: Projectile
    damage:
      types:
        Heat: 10
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/magic.rsi
    layers:
    - state: fireball
      shader: unshaded
  - type: TriggerOnProjectileHit
    explosiveProjectile: true
  - type: Explosive
    explosionType: Default
    maxIntensity: 3.5 # Goob edit
    intensitySlope: 3 # Goob edit
    totalIntensity: 28 # Gobo edit
    maxTileBreak: 0
  - type: IgnitionSource
    temperature: 400
    ignited: true
  - type: IgniteOnCollide
    fireStacks: 0.35
  - type: Ammo # Goobstation
    muzzleFlash: null
  - type: FlashOnTrigger # Goobstation
    duration: 4
    range: 1.8
  - type: Flashbang # Goobstation
    stunTime: 1
    knockdownTime: 6
  - type: Reflective
    reflective: Magic
  - type: Tag # Goobstation
    tags:
      - FlashIgnoreResistances

- type: entity
  categories: [ HideSpawnMenu ]
  parent: BaseBulletTrigger
  id: ProjectileDragonsBreath
  name: dragon's breath
  description: Try not to get toasted.
  components:
  - type: PointLight
    color: "#E25822"
    radius: 3.0
    energy: 5.0
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/magic.rsi
    layers:
    - state: fireball
      shader: unshaded
  - type: Reflective
    reflective: Magic
  - type: IgnitionSource
    temperature: 1000
    ignited: true
  - type: RepeatingTrigger
    delay: 0.5 # line of fire as well as if it hits something
  - type: ExplodeOnTrigger
  - type: Explosive
    explosionType: FireBomb
    totalIntensity: 5 # low intensity, the point is to burn attackers not to break open walls, dragons can just eat them
    intensitySlope: 1
    maxIntensity: 3
    canCreateVacuum: false
    deleteAfterExplosion: false
    repeatable: true
  - type: TimedDespawn
    lifetime: 5

- type: entity
  id: ProjectileAnomalyFireball
  name: fireball
  description: Hovering blob of flame.
  parent: ProjectileFireball
  categories: [ HideSpawnMenu ]
  components:
  - type: Reflective
    reflective: Magic
  - type: TimedDespawn
    lifetime: 30
  - type: Explosive
    explosionType: Default
    maxIntensity: 100
    intensitySlope: 0.1
    totalIntensity: 0.3
    maxTileBreak: 0

- type: entity
  id: ProjectileLocker
  name: cursed locker
  description: A cursed magical locker! Can you resist?
  parent: ClosetSteelBase
  categories: [ HideSpawnMenu ]
  components:
  - type: ResistLocker
    resistTime: 60 # Goob edit
  - type: Ammo # Goobstation
    muzzleFlash: null
  - type: FadingTimedDespawn # Goobstation
    lifetime: 120
    fadeOutTime: 5
  - type: StoreOnCollide
    lockOnCollide: true
    disableWhenFirstOpened: true
    disableOnSleep: true # Goobstation
    whitelist:
      components:
        - Body
  - type: LockVisuals
    stateLocked: cursed_door
    stateUnlocked: decursed_door
  - type: Lock
    breakOnAccessBreaker: false
  - type: AccessReader
    access: [["Wizard"]]
    breakOnAccessBreaker: false
  - type: Projectile
    deleteOnCollide: false
    onlyCollideWhenShot: true
    damage:
      types:
        Brute: 0
  - type: Sprite
    noRot: true
    sprite: Structures/Storage/closet.rsi
    layers:
    - state: cursed
      map: [ "enum.StorageVisualLayers.Base" ]
    - state: decursed_door
      map: [ "enum.StorageVisualLayers.Door" ]
    - state: paper
      visible: false
      sprite: Structures/Storage/closet_labels.rsi
      map: [ "enum.PaperLabelVisuals.Layer" ]
    - state: cursed_door
      map: [ "enum.LockVisualLayers.Lock" ]
    - state: welded
      visible: false
      map: [ "enum.WeldableLayers.BaseWelded" ]
  #TODO: Will have to eventually make a custom visualizer for cursed lockers
  - type: EntityStorageVisuals
    stateBaseClosed: decursed
    stateDoorOpen: decursed_open
    stateDoorClosed: decursed_door
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.25,-0.48,0.25,0.48"
        density: 75
        mask:
        - MachineMask
        layer:
        - MachineLayer
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.15,-0.45,0.15,0.15"
        hard: false
        mask:
        - Impassable
        - BulletImpassable
      fly-by: &flybyfixture
        shape: !type:PhysShapeCircle
          radius: 0.6
        layer:
        - Impassable
        - MidImpassable
        - HighImpassable
        - LowImpassable
        hard: false

- type: entity
  id: ProjectilePolyboltBase
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/magic.rsi
    layers:
    - state: magicm_green # Goob edit
      shader: unshaded
  - type: Projectile
    damage:
      types:
        Poison: 0 # Goob edit
  - type: TriggerOnProjectileHit # Goob edit
  - type: Reflective # Goobstation
    reflective: Magic
  - type: Ammo # Goobstation
    muzzleFlash: null
  - type: Trail # Goobstation
    lerpTime: 0.05
    frequency: 0.02
    lifetime: 1
    alphaLerpAmount: 0.4
    shader: unshaded
    sprite:
      sprite: /Textures/Objects/Weapons/Guns/Projectiles/magic.rsi
      state: magicm_green

- type: entity
  id: ProjectilePolyboltCarp
  parent: ProjectilePolyboltBase
  name: carp polybolt
  description: Nooo, I don't wanna be fish!
  categories: [ HideSpawnMenu ]
  components:
  - type: Reflective
    reflective: Magic
  - type: PolymorphOnTrigger
    polymorph: WizardForcedCarp
  - type: TriggerWhitelist
    whitelist:
      components:
      - Body

- type: entity
  id: ProjectilePolyboltMonkey
  parent: ProjectilePolyboltBase
  name: monkey polybolt
  description: Nooo, I don't wanna be monkey!
  categories: [ HideSpawnMenu ]
  components:
  - type: Reflective
    reflective: Magic
  - type: PolymorphOnTrigger
    polymorph: WizardForcedMonkey
  - type: TriggerWhitelist
    whitelist:
      components:
      - Body

- type: entity
  id: ProjectilePolyboltDoor
  parent: ProjectilePolyboltBase
  name: door polybolt
  description: Nooo, I don't wanna be door!
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/magic.rsi
    layers:
    - state: spell
      color: brown
  - type: Reflective
    reflective: Magic
  - type: PolymorphOnTrigger
    polymorph: WizardWallDoor
  - type: TriggerWhitelist
    whitelist:
      components:
      - Airlock
      - Firelock
      tags:
      - Wall

- type: entity
  id: ProjectileHealingBolt
  name: healing bolt
  description: I COMMAND YOU TO LIVE!
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/magic.rsi
    layers:
    - state: magicm_yellow # Goob edit
      shader: unshaded
  - type: Projectile
    damage:
      types:
        Heat: 0 # Goob edit
  - type: RejuvenateOnProjectileHit # Goobstation
    undeadList:
      components:
      - Zombie
      tags:
      - Undead
    damage:
      types:
        Heat: 600
  - type: Reflective # Goobstation
    reflective: Magic
  - type: Ammo # Goobstation
    muzzleFlash: null
  - type: Trail # Goobstation
    lerpTime: 0.05
    frequency: 0.02
    lifetime: 1
    alphaLerpAmount: 0.4
    shader: unshaded
    sprite:
      sprite: /Textures/Objects/Weapons/Guns/Projectiles/magic.rsi
      state: magicm_yellow

- type: entity
  id: BulletInstakillMagic
  name: magical lead cylinder
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  description: This looks familiar.
  components:
  - type: Projectile
    damage:
      types:
        Piercing: 300
    ignoreResistances: true
  - type: Reflective
    reflective: Magic

- type: entity
  id: ProjectilePolyboltCluwne
  parent: ProjectilePolyboltBase
  name: cluwne polybolt
  description: KnoH KnoH!
  categories: [ HideSpawnMenu ]
  components:
  - type: Reflective
    reflective: Magic
  - type: PolymorphOnTrigger
    polymorph: WizardForcedCluwne
  - type: TriggerWhitelist
    whitelist:
      components:
      - Body

- type: entity
  id: ProjectileIcicle
  parent: BaseBullet
  name: icicle
  description: Brrrrr.
  categories: [ HideSpawnMenu ]
  components:
  - type: Reflective
    reflective: Magic
  - type: Sprite
    sprite: Structures/Specific/Anomalies/ice_anom.rsi
  - type: Projectile
    damage:
      types:
        Piercing: 20
        Cold: 20
        Structural: 50

- type: entity
  parent: ProjectilePolyboltBase
  id: ProjectilePolyboltBread
  name: bread polybolt
  description: Nooo, I don't wanna be bread!
  categories: [ HideSpawnMenu ]
  components:
  - type: Reflective
    reflective: Magic
  - type: PolymorphOnTrigger
    polymorph: BreadMorph
  - type: TriggerWhitelist
    whitelist:
      components:
      - Body
