# SPDX-FileCopyrightText: 2023 AJCM-git <60196617+AJCM-git@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 I.K <45953835+notquitehadouken@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Nairod <110078045+Nairodian@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 kalane15 <118661099+kalane15@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2023 nikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 notquitehadouken <1isthisameme>
# SPDX-FileCopyrightText: 2024 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Alex Pavlenko <diraven@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Alice "Arimah" Heurlin <30327355+arimah@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Alzore <140123969+Blackern5000@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Boaz1111 <149967078+Boaz1111@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 BombasterDS <115770678+BombasterDS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 DrSmugleaf <10968691+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 Errant <35878406+Errant-4@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Flareguy <78941145+Flareguy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ghagliiarghii <68826635+Ghagliiarghii@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 HS <81934438+HolySSSS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2024 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MilenVolf <63782763+MilenVolf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.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 Redfire1331 <125223432+Redfire1331@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Rouge2t7 <81053047+Sarahon@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Tayrtahn <tayrtahn@gmail.com>
# SPDX-FileCopyrightText: 2024 Truoizys <153248924+Truoizys@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 Vasilis <vasilis@pikachu.systems>
# SPDX-FileCopyrightText: 2024 beck-thompson <107373427+beck-thompson@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 neutrino <67447925+neutrino-laser@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 osjarw <62134478+osjarw@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 plykiya <plykiya@protonmail.com>
# SPDX-FileCopyrightText: 2024 redfire1331 <Redfire1331@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 slarticodefast <161409025+slarticodefast@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Арт <123451459+JustArt1m@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 Aineias1 <dmitri.s.kiselev@gmail.com>
# SPDX-FileCopyrightText: 2025 Armok <155400926+ARMOKS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Eagle <lincoln.mcqueen@gmail.com>
# SPDX-FileCopyrightText: 2025 FaDeOkno <143940725+FaDeOkno@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 McBosserson <148172569+McBosserson@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Milon <plmilonpl@gmail.com>
# SPDX-FileCopyrightText: 2025 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2025 Pronana <66055347+Pronana@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 RedBookcase <crazykid1590@gmail.com>
# SPDX-FileCopyrightText: 2025 Rouden <149893554+Roudenn@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 SX-7 <sn1.test.preria.2002@gmail.com>
# SPDX-FileCopyrightText: 2025 SX_7 <sn1.test.preria.2002@gmail.com>
# SPDX-FileCopyrightText: 2025 Speebro <100388782+Speebr0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Speebro <speebro@notreal.com>
# SPDX-FileCopyrightText: 2025 TheBorzoiMustConsume <197824988+TheBorzoiMustConsume@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Unlumination <144041835+Unlumy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 VMSolidus <evilexecutive@gmail.com>
# SPDX-FileCopyrightText: 2025 coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2025 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 gluesniffler <linebarrelerenthusiast@gmail.com>
# SPDX-FileCopyrightText: 2025 gus <august.eymann@gmail.com>
# SPDX-FileCopyrightText: 2025 thebiggestbruh <marcus2008stoke@gmail.com>
# SPDX-FileCopyrightText: 2025 username <113782077+whateverusername0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 vanx <61917534+Vaaankas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 whateverusername0 <whateveremail>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  name: pickaxe
  parent: BaseItem
  id: Pickaxe
  description: Notched to perfection, for jamming it into rocks.
  components:
  - type: Tag
    tags:
    - Pickaxe
    - ItemPickaxe # Einstein Engines
  - type: Sprite
    sprite: Objects/Weapons/Melee/pickaxe.rsi
    state: pickaxe
  - type: MeleeWeapon
    attackRate: 0.7
    animationRotation: -45 # WWDP
    wideAnimationRotation: -135
    soundHit:
      path: "/Audio/Weapons/smash.ogg"
      params:
        volume: -3
    damage:
      groups:
        Brute: 5
  - type: Wieldable
  - type: IncreaseDamageOnWield
    damage:
      groups:
        Brute: 10
      types:
        Structural: 30
  - type: Item
    size: Normal
    shape:
    - 0,0,2,0
    - 1,1,1,2
    sprite: Objects/Weapons/Melee/pickaxe.rsi
    storedRotation: -45
  - type: UseDelay
  - type: PhysicalComposition #Goobstation - Recycle update
    materialComposition:
      Steel: 250
      Wood: 125

- type: entity
  name: mining drill
  parent: BaseItem
  id: MiningDrill
  description: Powerful tool used to quickly drill through rocks.
  components:
  - type: Item
    storedRotation: -90
  - type: Tag
    tags:
    - Pickaxe
  - type: Sprite
    sprite: Objects/Tools/handdrill.rsi
    state: handdrill
  - type: MeleeWeapon
    autoAttack: true
    angle: 0
    animationRotation: -90 # WWDP
    wideAnimationRotation: -90
    soundHit:
      path: "/Audio/Items/drill_hit.ogg"
    attackRate: 4
    heavyStaminaCost: 0 # Shitmed: Mining drill is for mining
    damage:
      groups:
        Brute: 3
      types:
        Structural: 15
  - type: PhysicalComposition #Goobstation - Recycle update
    materialComposition:
      Steel: 125
      Plastic: 25

- type: entity
  name: diamond tipped mining drill
  parent: MiningDrill
  id: MiningDrillDiamond
  description: A significantly more efficient mining drill tipped with diamond.
  components:
  - type: Sprite
    sprite: Objects/Tools/handdrilldiamond.rsi
    state: handdrill
  - type: MeleeWeapon
    autoAttack: true
    angle: 0
    animationRotation: -90 # WWDP
    wideAnimationRotation: -90
    soundHit:
      path: "/Audio/Items/drill_hit.ogg"
    attackRate: 4
    damage:
      groups:
        Brute: 6
      types:
        Structural: 31 #Goob
  - type: PhysicalComposition #Goobstation - Recycle update
    materialComposition:
      Steel: 150
      Plastic: 50
      Silver: 50
      Diamond: 25

- type: entity
  abstract: true
  parent: BaseItem
  id: BaseWeaponCrusher # Crusher? But I...
  name: crusher
  description: An early design of the proto-kinetic accelerator.
  components:
  - type: Sharp
  - type: Execution
    doAfterDuration: 4.0
  - type: UnpoweredFlashlight
  - type: MegafaunaWeaponLooter # So that the crusher, glaive, and dagger get this as well
  - type: PointLight
    color: "#ffeead"
    enabled: false
    radius: 4

# Very high burst damage if you land a mark, while also providing a small amount of healing.
- type: entity
  parent: [BaseWeaponCrusher, BaseSecurityCargoContraband]
  id: WeaponCrusher
  components:
  - type: Tag
    tags:
      - Pickaxe
  - type: Sprite
    sprite: Objects/Weapons/Melee/crusher.rsi
    state: icon
  - type: Item
    size: Ginormous
    sprite: Objects/Weapons/Melee/crusher-inhands.rsi
  - type: Clothing
    sprite: Objects/Weapons/Melee/crusher.rsi
    quickEquip: false
    slots:
    - Back
    - suitStorage
  - type: AmmoCounter
  - type: UseDelayOnShoot
  - type: UseDelay
    delay: 0.9
  - type: Gun
    soundGunshot: /Audio/Weapons/plasma_cutter.ogg
    fireRate: 1
    useKey: false
  - type: RechargeBasicEntityAmmo
    rechargeCooldown: 0.5
    rechargeSound:
      path: /Audio/Weapons/Guns/MagIn/kinetic_reload.ogg
  - type: BasicEntityAmmoProvider
    proto: BulletCharge
    capacity: 1
    count: 1
  - type: MeleeWeapon
    attackRate: 0.8 # Lavaland Change (slightly faster than fireaxe, still weaker damage wise)
    animationRotation: -45 # WWDP
    wideAnimationRotation: -135
    damage:
      types:
        Blunt: 10 # Lavaland Change: no damage when unwielded2
        Slash: 5
    soundHit:
      collection: MetalThud
  - type: Wieldable
  - type: GunRequiresWield
  - type: DisarmMalus
  - type: Prying
  # Lavaland Change Start
  - type: MeleeRequiresWield
    fumbleOnAttempt: true
  - type: DamageBoostOnMarker
    boost:
      types: # Totals to 70 damage when hitting marked targets
        Blunt: 32
        Slash: 18
    backstabBoost: # And 30 extra for a backstab. Adding up to 100
      types:
        Blunt: 19
        Slash: 11

# No mark ability in exchange for wideswing, autoattack, and being one-handed
- type: entity
  parent: [ BaseKnife, BaseWeaponCrusher, BaseSecurityCargoContraband]
  id: WeaponCrusherDagger
  name: crusher dagger
  description: A scaled down version of a proto-kinetic crusher. Uses kinetic energy to vibrate the blade at high speeds.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Melee/crusher_dagger.rsi
    state: icon
  - type: MeleeWeapon
    autoAttack: true
    animationRotation: -45 # WWDP
    wideAnimationRotation: -135
    attackRate: 2
    damage:
      types:
        Slash: 15
  - type: Tag
    tags:
    - Knife
  - type: EmbeddableProjectile
    sound: /Audio/Weapons/star_hit.ogg
    offset: -0.15,0.0
  - type: LandAtCursor
  - type: DamageOtherOnHit
    damage:
      types:
        Slash: 10
  - type: DisarmMalus
    malus: 0.225
  - type: ThrowingAngle
    angle: 225
  - type: Fixtures
    fixtures:
      fix1:
        shape: !type:PolygonShape
          radius: 0.01
          vertices:
          - -0.4,-0.2
          - -0.2,-0.4
          - 0.4,0.2
          - 0.2,0.4
        density: 20 # derived from base_item
        mask:
        - ItemMask
        restitution: 0.3
        friction: 0.2

# Less mark damage in exchange for more healing. Also has a better ratio of blunt to slash damage, but less structural.
- type: entity
  parent: [ WeaponCrusher, BaseSecurityCargoContraband]
  id: WeaponCrusherGlaive
  name: crusher glaive
  description: An early design of the proto-kinetic accelerator, in glaive form. Provides better healing in exchange for less charged damage.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Melee/crusher_glaive.rsi
    state: icon
  - type: Item
    size: Ginormous
    sprite: Objects/Weapons/Melee/crusher_glaive-inhands.rsi
  - type: Clothing
    sprite: Objects/Weapons/Melee/crusher_glaive.rsi
    quickEquip: false
    slots:
    - Back
    - suitStorage
  - type: UseDelay
    delay: 1.9
  - type: BasicEntityAmmoProvider
    proto: BulletChargeGlaive
    capacity: 1
    count: 1
  - type: LeechOnMarker
    leech:
      groups:
        Brute: -10 # Lavaland Change: lower crusher healing
  - type: Tag
    tags:
      - Pickaxe
  - type: MeleeWeapon
    attackRate: 1
    wideAnimationRotation: -135
