- type: entity
  name: pickaxe
  parent: BaseItem
  id: Pickaxe
  description: Notched to perfection, for jamming it into rocks.
  components:
  - type: Tag
    tags:
    - Pickaxe
  - type: Sprite
    sprite: Objects/Weapons/Melee/pickaxe.rsi
    state: pickaxe
  - type: MeleeWeapon
    attackRate: 0.7
    wideAnimationRotation: -135
    soundHit:
      collection: MiningPick # starcup: new sounds
    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
    materialComposition:
      Steel: 100
      Wood: 100
  # begin starcup: mining quality to remove stone floors
  - type: Tool
    qualities:
    - Mining
    useSound:
      collection: MiningPick
  - type: ToolTileCompatible
  - type: Prying
  # end starcup

- 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
    wideAnimationRotation: -90
    soundHit:
      path: "/Audio/Items/drill_hit.ogg"
    attackRate: 4
    damage:
      groups:
        Brute: 3
      types:
        Structural: 15
  # begin starcup: mining quality to remove stone floors
  - type: Tool
    qualities:
    - Mining
    useSound:
      path: "/Audio/Items/drill_hit.ogg"
  - type: ToolTileCompatible
    delay: 0.3
  - type: Prying
  # end starcup

- 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
    wideAnimationRotation: -90
    soundHit:
      path: "/Audio/Items/drill_hit.ogg"
    attackRate: 4
    damage:
      groups:
        Brute: 6
      types:
        Structural: 30


- 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: PointLight
    color: "#ffeead"
    enabled: false
    radius: 4
  # begin starcup: mining quality to remove stone floors
  - type: Tool
    qualities:
    - Mining
  - type: ToolTileCompatible
    delay: 3
  - type: Prying
  # end starcup

# Very high burst damage if you land a mark, while also providing a small amount of healing.
- type: entity
  parent: [BaseWeaponCrusher, BaseSecurityCargoContraband, BaseExaminableClothing] # starcup: examinable clothing
  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: LeechOnMarker
    leech:
      groups:
        Brute: -10 # # starcup: revert salvage damage nerf (6 > 10)
  - 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: 1.5 # starcup: revert salvage damage nerf (1 > 1.5)
    wideAnimationRotation: -135
    damage:
      types:
        Blunt: 10 # starcup: revert salvage damage nerf (6 > 10)
        Slash: 5 # starcup: revert salvage damage nerf (4 > 5)
    soundHit:
      collection: MetalThud
  - type: Wieldable
  - type: IncreaseDamageOnWield
    damage:
      types:
        Blunt: 2.5 # starcup: revert salvage damage nerf (6 > 2.5)
        Slash: 2.5 # starcup: revert salvage damage nerf (2 > 2.5)
        Structural: 30
  - type: GunRequiresWield
  - type: DisarmMalus
  - type: Prying
  # begin starcup: examinable clothing
  - type: ExaminableClothing
    examineText: clothing-crusher
  # end starcup

# 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
    wideAnimationRotation: -135
    attackRate: 2
    damage:
      types:
        Slash: 12
  - 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
  # begin starcup: examinable clothing
  - type: ExaminableClothing
    examineText: clothing-crusher-dagger
  # end starcup

# Like a crusher... but better
- type: entity
  parent: [ WeaponCrusher, BaseSecurityCargoContraband]
  id: WeaponCrusherGlaive
  name: crusher glaive
  description: An early design of the proto-kinetic accelerator, in glaive form. # starcup: no longer has 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
  # begin starcup: use standard crusher projectile
  # - type: BasicEntityAmmoProvider
  #   proto: BulletChargeGlaive
  #   capacity: 1
  #   count: 1
  # end starcup
  - type: LeechOnMarker
    leech:
      groups:
        Brute: -21
  - type: Tag
    tags:
      - Pickaxe
  - type: MeleeWeapon
  # begin starcup: revert salvage damage nerf
  #   attackRate: 1
  #   wideAnimationRotation: -135
  #   damage:
  #     types:
  #       Blunt: 3
  #       Slash: 7
  # - type: IncreaseDamageOnWield
  #   damage:
  #     types:
  #       Blunt: 2
  #       Slash: 6
  #       Structural: 20
  # end starcup
  # begin starcup: examinable clothing
  - type: ExaminableClothing
    examineText: clothing-crusher-glaive
  # end starcup
