# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  name: wonderprod
  parent: [BaseItem, BaseMajorContraband]
  id: Wonderprod
  description: Universal tool of the abductor agent.
  components:
  - type: Item
    sprite: _Shitmed/Objects/Weapons/Melee/wonderprod.rsi
    heldPrefix: stun
    size: Large
    storedRotation: -90
    shape:
    - 0,0,2,2
  - type: Clothing
    sprite: _Shitmed/Objects/Weapons/Melee/wonderprod.rsi
    quickEquip: false
    equippedPrefix: stun
    slots:
    - Back
    - suitStorage
  - type: Sprite
    sprite: _Shitmed/Objects/Weapons/Melee/wonderprod.rsi
    state: icon
  - type: GuideHelp
    guides:
    - Abductors
  - type: MeleeWeapon
    wideAnimationRotation: -135
    attackRate: 0.75
    damage:
      types:
        Shock: 0
    angle: 60
    animation: WeaponArcThrust
  - type: StaminaDamageOnHit
    damage: 60
    lightAttackDamageMultiplier: 2
    sound: /Audio/Weapons/Guns/Hits/taser_hit.ogg
#  - type: RestrictMeleeByUserTag
#    contains:
#    - Abductor
#    messages:
#    - abductors-weapon-restricted-1
#    - abductors-weapon-restricted-2
#    - abductors-weapon-restricted-3
#    - abductors-weapon-restricted-4
  - type: Tag
    tags:
    - Wonderprod
  - type: Multihit
    multihitWhitelist:
      tags:
      - Wonderprod
    conditions:
    - !type:MultihitUserWhitelistEvent
      whitelist:
        tags:
        - Abductor
  - type: DisarmMalus
  - type: ItemSwitch
    state: stun
    showLabel: true
    states:
      stun: !type:ItemSwitchState
        verb: stun
        sprite:
          sprite: _Shitmed/Objects/Weapons/Melee/wonderprod.rsi
          state: stun-icon
        components:
        - type: MeleeWeapon
          wideAnimationRotation: -135
          attackRate: 0.75
          damage:
            types:
              Shock: 0
          angle: 60
          animation: WeaponArcThrust
        - type: StaminaDamageOnHit
          damage: 60
          lightAttackDamageMultiplier: 2
          sound: /Audio/Weapons/Guns/Hits/taser_hit.ogg
        soundStateActivate:
          collection: sparks
          params:
            variation: 0.250

      cuffs: !type:ItemSwitchState
        verb: cuffs
        sprite:
          sprite: _Shitmed/Objects/Weapons/Melee/wonderprod.rsi
          state: cuffs-icon
        components:
        - type: MeleeWeapon
          wideAnimationRotation: -135
          attackRate: 0.75
          damage:
            types:
              Shock: 0
          angle: 60
          animation: WeaponArcThrust
        - type: CuffsOnHit
          proto: Cablecuffs

      sleep: !type:ItemSwitchState
        verb: sleep
        sprite:
          sprite: _Shitmed/Objects/Weapons/Melee/wonderprod.rsi
          state: sleep-icon
        components:
        - type: MeleeWeapon
          wideAnimationRotation: -135
          attackRate: 1
          damage:
            types:
              Ion: 30
          angle: 60
          animation: WeaponArcThrust
        - type: InjectOnHit
          reagents:
          - ReagentId: Nocturine
            Quantity: 5
          limit: 20
          needsRestrain: true
