# region base
- type: entity
  abstract: true
  parent:
  - NFMobNoEquipmentOnGib
  - MobStaminaFodder
  - MobMovementSpeedModifierMelee
  - MobNonHumanHostileBase
  - MobHumanoidInvetory
  id: MobExplorerBase
  components:
  - type: NpcFactionMember
    factions:
    - ExplorersExpeditionNF
  - type: MobThresholds
    thresholds:
      0: Alive
      80: Critical
      105: Dead
  - type: SlowOnDamage
    speedModifierThresholds:
      48: 0.7
      64: 0.5
  - type: DamageStateVisuals
  - type: RotationVisuals
    defaultRotation: 90
    horizontalRotation: 90
  - type: Butcherable
    butcheringType: Spike
    spawned:
    - id: FoodMeatRotten
      amount: 2
  - type: RechargeBasicEntityAmmo
    rechargeCooldown: 1.5
    rechargeSound:
      path: /Audio/_NF/Effects/silence.ogg
  - type: MeleeWeapon
    attackRate: 1.0
    altDisarm: false
    animation: WeaponArcPunch
    angle: 0
    damage:
      types:
        Slash: 10
        Structural: 30
    soundHit:
      collection: MetalThud
  - type: Vocalizer
    hideChat: true
    minVocalizeInterval: 30
    maxVocalizeInterval: 120
  - type: DatasetVocalizer
    dataset: mercenaryhumanoidchatter
  - type: AutoWakeUp
  - type: PointLight
    enabled: true
    autoRot: true
    netsync: false
    radius: 3
    energy: 1
    mask: /Textures/Effects/LightMasks/cone.png
    color: "#47f8ff"

# region Tier 1, melee
- type: entity
  parent: [ MobExplorerBase, MobHumanoidHostileAISimpleMelee ]
  id: MobExplorerMeleeT1
  categories: [ HideSpawnMenu ]
  name: looter
  description: Armed with a trusty pickaxe and greed, every group needs its grunts.
  components:
  - type: Loadout
    prototypes:
    - MobHumanoidExplorerGearMeleeT1
  - type: Sprite
    drawdepth: Mobs
    layers:
    # Body
    - sprite: _NF/Mobs/Species/Templates/human.rsi
      state: human
    # Softsuit
    - sprite: _NF/Clothing/OuterClothing/Suits/eva_color.rsi
      state: equipped-base
      color: "#deb733"
    - sprite: _NF/Clothing/OuterClothing/Suits/eva_color.rsi
      state: equipped-decals-01
      color: "#ad2aea"
    - sprite: _NF/Clothing/OuterClothing/Suits/eva_color.rsi
      state: equipped-reinforced-points
      color: "#786243"
    - sprite: _NF/Clothing/OuterClothing/Suits/eva_color.rsi
      state: equipped-breathing-gear
    - sprite: _NF/Clothing/OuterClothing/Suits/eva_color.rsi
      state: equipped-unshaded
      shader: unshaded
    - sprite: _NF/Clothing/Head/Helmets/eva_color.rsi
      state: equipped-head-base
      color: "#deb733"
    - sprite: _NF/Clothing/Head/Helmets/eva_color.rsi
      state: equipped-head-reinforced-points
      color: "#ad2aea"
    - sprite: _NF/Clothing/Head/Helmets/eva_color.rsi
      state: equipped-head-visor
      color: "#adcfd5"
    - sprite: _NF/Clothing/Head/Helmets/eva_color.rsi
      state: equipped-head-light
      color: "#47f8ff"
    # Weapons
    - sprite: Objects/Weapons/Melee/pickaxe.rsi
      state: wielded-inhand-right
    # Fluff
    - sprite: Objects/Tools/lantern.rsi
      state: on-equipped-BELT
      shader: unshaded
  - type: MeleeWeapon
    attackRate: 1.0
    altDisarm: false
    animation: WeaponArcPunch
    angle: 0
    damage:
      types:
        Blunt: 6
        Piercing: 6
        Structural: 30
    soundHit:
      collection: MetalThud

# region Tier 1, ranged
- type: entity
  parent: [ MobMovementSpeedModifierRanged, MobExplorerBase, MobHumanoidHostileAISimpleRanged ]
  id: MobExplorerRangedT1
  categories: [ HideSpawnMenu ]
  name: scrapper
  description: Proto-kinetic accelerator in one hand, flashlight in the other, beer in the belly. That's how you explore.
  components:
  - type: Loadout
    prototypes:
    - MobHumanoidExplorerGearRangedT1
  - type: Sprite
    drawdepth: Mobs
    layers:
    # Body
    - sprite: _NF/Mobs/Species/Templates/human.rsi
      state: human
    # Softsuit
    - sprite: _NF/Clothing/OuterClothing/Suits/eva_color.rsi
      state: equipped-base
      color: "#deb733"
    - sprite: _NF/Clothing/OuterClothing/Suits/eva_color.rsi
      state: equipped-decals-01
      color: "#ad2aea"
    - sprite: _NF/Clothing/OuterClothing/Suits/eva_color.rsi
      state: equipped-reinforced-points
      color: "#786243"
    - sprite: _NF/Clothing/OuterClothing/Suits/eva_color.rsi
      state: equipped-breathing-gear
    - sprite: _NF/Clothing/OuterClothing/Suits/eva_color.rsi
      state: equipped-unshaded
      shader: unshaded
    - sprite: _NF/Clothing/Head/Helmets/eva_color.rsi
      state: equipped-head-base
      color: "#deb733"
    - sprite: _NF/Clothing/Head/Helmets/eva_color.rsi
      state: equipped-head-reinforced-points
      color: "#ad2aea"
    - sprite: _NF/Clothing/Head/Helmets/eva_color.rsi
      state: equipped-head-visor
      color: "#adcfd5"
    - sprite: _NF/Clothing/Head/Helmets/eva_color.rsi
      state: equipped-head-light
      color: "#47f8ff"
    # Hands
    - sprite: Clothing/Hands/Gloves/Color/color.rsi
      state: equipped-HAND
      color: "#535353"
    # Weapons
    - sprite: Objects/Weapons/Guns/Basic/kinetic_accelerator.rsi
      state: inhand-right
    # Fluff
    - sprite: Objects/Tools/flashlight.rsi
      state: inhand-left
    - sprite: Objects/Tools/flashlight.rsi
      state: inhand-left-light
      shader: unshaded
  - type: RechargeBasicEntityAmmo
    rechargeCooldown: 1
    rechargeSound:
      path: /Audio/Weapons/Guns/MagIn/kinetic_reload.ogg
  - type: BasicEntityAmmoProvider
    proto: NFBulletKineticLowPower
    capacity: 1
    count: 1
  - type: Gun
    showExamineText: false
    fireRate: 0.5
    minAngle: 10
    maxAngle: 40
    angleIncrease: 5
    angleDecay: 3
    selectedMode: SemiAuto
    availableModes:
    - SemiAuto
    soundGunshot: /Audio/Weapons/Guns/Gunshots/kinetic_accel.ogg

# region Tier 2, melee
- type: entity
  parent: [ MobExplorerBase, MobHumanoidHostileAISimpleMelee ]
  id: MobExplorerMeleeT2
  name: scavenger
  categories: [ HideSpawnMenu ]
  description: A looter that scavenged enough coins to afford some decent equipment.
  components:
  - type: Loadout
    prototypes:
    - MobHumanoidExplorerGearMeleeT2
  - type: Damageable
    damageModifierSet: MobHostileDamageModifierSetMedium
  - type: Sprite
    drawdepth: Mobs
    layers:
    # Helmet
    - sprite: Clothing/Head/Hardsuits/spatiohelm.rsi
      state: equipped-head
    - sprite: Clothing/Head/Hardsuits/spatiohelm.rsi
      state: equipped-head-unshaded
      shader: unshaded
    - sprite: Clothing/Head/Hardsuits/spatiohelm.rsi
      state: equipped-head-light
      shader: unshaded
      color: "#47f8ff"
    # Suit
    - sprite: Clothing/OuterClothing/Hardsuits/spatio.rsi
      state: equipped-OUTERCLOTHING
    # Weapons
    - sprite: Objects/Weapons/Melee/crusher_glaive-inhands.rsi
      state: wielded-inhand-right
    # Fluff
  - type: MeleeWeapon
    attackRate: 1.5
    altDisarm: false
    animation: WeaponArcPunch
    angle: 0
    damage:
      types:
        Blunt: 7
        Slash: 6
        Structural: 30
    soundHit:
      collection: MetalThud

# region Tier 2, ranged
- type: entity
  parent: [ MobMovementSpeedModifierRanged, MobExplorerBase, MobHumanoidHostileAISimpleRanged ]
  id: MobExplorerRangedT2
  categories: [ HideSpawnMenu ]
  name: salvager
  description: Sawn-off proto-kinetic accelerator in one hand, crusher dagger in the other, magm-ale both in the belly and in the hardsuit's boots.
  components:
  - type: Loadout
    prototypes:
    - MobHumanoidExplorerGearRangedT2
  - type: Damageable
    damageModifierSet: MobHostileDamageModifierSetMedium
  - type: Sprite
    drawdepth: Mobs
    layers:
    # Helmet
    - sprite: Clothing/Head/Hardsuits/spatiohelm.rsi
      state: equipped-head
    - sprite: Clothing/Head/Hardsuits/spatiohelm.rsi
      state: equipped-head-unshaded
      shader: unshaded
    - sprite: Clothing/Head/Hardsuits/spatiohelm.rsi
      state: equipped-head-light
      shader: unshaded
      color: "#47f8ff"
    # Suit
    - sprite: Clothing/OuterClothing/Hardsuits/spatio.rsi
      state: equipped-OUTERCLOTHING
    # Weapons
    - sprite: _NF/Objects/Weapons/Guns/Basic/kinetic_accelerator_sawn.rsi
      state: inhand-right
    - sprite: Objects/Weapons/Melee/crusher_dagger.rsi
      state: inhand-left
    # Fluff
  - type: RechargeBasicEntityAmmo
    rechargeCooldown: 1
    rechargeSound:
      path: /Audio/Weapons/Guns/MagIn/kinetic_reload.ogg
  - type: BasicEntityAmmoProvider
    proto: NFBulletKineticLowPower
    capacity: 1
    count: 1
  - type: Gun
    showExamineText: false
    fireRate: 0.75
    selectedMode: FullAuto
    minAngle: 15
    maxAngle: 40
    angleIncrease: 5
    angleDecay: 3
    availableModes:
    - FullAuto
    soundGunshot: /Audio/Weapons/Guns/Gunshots/kinetic_accel.ogg

# region Tier 3, melee
- type: entity
  parent: [ MobExplorerBase, MobHumanoidHostileAISimpleMelee ]
  id: MobExplorerMeleeT3
  categories: [ HideSpawnMenu ]
  name: miner
  description: Drilling in the name of... drilling. No rock formation can withstand the power of dual-wielded mining drills - good thing you aren't a rock.
  components:
  - type: Loadout
    prototypes:
    - MobHumanoidExplorerGearMeleeT3
  - type: Damageable
    damageModifierSet: MobHostileDamageModifierSetHigh
  - type: Sprite
    drawdepth: Mobs
    layers:
    # Helmet
    - sprite: Clothing/Head/Hardsuits/salvage.rsi
      state: on-equipped-HELMET
    - sprite: Clothing/Head/Hardsuits/spatiohelm.rsi
      state: equipped-head-light
      shader: unshaded
      color: "#47f8ff"
    # Suit
    - sprite: Clothing/OuterClothing/Hardsuits/salvage.rsi
      state: equipped-OUTERCLOTHING
    # Weapons
    - sprite: Objects/Tools/handdrill.rsi
      state: inhand-right
    - sprite: Objects/Tools/handdrill.rsi
      state: inhand-left
    # Fluff
    - sprite: Objects/Tools/lantern.rsi
      state: on-equipped-BELT
      shader: unshaded
  - type: MeleeWeapon
    autoAttack: true
    angle: 0
    wideAnimationRotation: -90
    soundHit:
      path: "/Audio/Items/drill_hit.ogg"
    attackRate: 4
    damage:
      types:
        Blunt: 2
        Slash: 2
        Piercing: 2
        Structural: 25
  - type: PointLight
    radius: 7
    energy: 3

# region Tier 3, ranged
- type: entity
  parent: [ MobMovementSpeedModifierRanged, MobExplorerBase, MobHumanoidHostileAISimpleRanged ]
  id: MobExplorerRangedT3
  categories: [ HideSpawnMenu ]
  name: explorer
  description: Veteran scrappers, these salvagers are wealthy enough to explore abandoned ruins for the adrenaline rush and adventure alone.
  components:
  - type: Loadout
    prototypes:
    - MobHumanoidExplorerGearRangedT3
  - type: Damageable
    damageModifierSet: MobHostileDamageModifierSetHigh
  - type: Sprite
    drawdepth: Mobs
    layers:
    # Helmet
    - sprite: Clothing/Head/Hardsuits/luxury.rsi
      state: off-equipped-HELMET
    - sprite: Clothing/Head/Hardsuits/spatiohelm.rsi
      state: equipped-head-light
      shader: unshaded
      color: "#47f8ff"
    # Suit
    - sprite: Clothing/OuterClothing/Hardsuits/luxury.rsi
      state: equipped-OUTERCLOTHING
    # Weapons
    - sprite: Objects/Weapons/Guns/Basic/kinetic_accelerator.rsi
      state: wielded-inhand-right
    # Fluff
    - sprite: Objects/Tools/lantern.rsi
      state: on-equipped-BELT
      shader: unshaded
  - type: RechargeBasicEntityAmmo
    rechargeCooldown: 1
    rechargeSound:
      path: /Audio/Weapons/Guns/MagIn/kinetic_reload.ogg
  - type: BasicEntityAmmoProvider
    proto: NFBulletKineticMediumPower
    capacity: 1
    count: 1
  - type: Gun
    showExamineText: false
    fireRate: 0.75
    minAngle: 10
    maxAngle: 20
    angleIncrease: 2
    angleDecay: 3
    selectedMode: SemiAuto
    availableModes:
    - SemiAuto
    soundGunshot: /Audio/Weapons/Guns/Gunshots/kinetic_accel.ogg
  - type: PointLight
    radius: 7
    energy: 3

# region Tier 3, special
- type: entity
  parent: [ MobStaminaSpecial, MobExplorerBase, MobHumanoidHostileAISimpleMelee ]
  id: MobExplorerHauler
  categories: [ HideSpawnMenu ]
  name: hauler
  description: |-
   Loaded with heavy equipment for industrial-scale looting. Pardon me, "asset recovery".
  components:
  - type: Damageable
    damageModifierSet: MobRogueSiliconDamageModifierSet
  - type: Sprite
    drawdepth: Mobs
    sprite: Objects/Specific/Mech/mecha.rsi
    layers:
    - map: [ "enum.MechVisualLayers.Base" ]
      state: hauler
  - type: DamageStateVisuals
    states:
      Alive:
        Base: hauler
      Critical:
        Base: hauler-broken
      Dead:
        Base: hauler-broken
  - type: Bloodstream
    bloodReagent: WeldingFuel
    bloodMaxVolume: 100
  - type: MobThresholds
    thresholds:
      0: Alive
      160: Dead
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 155
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: GlassBreak
      - !type:SpawnEntitiesBehavior
        spawn:
          SpawnMobExplorerT2:
            min: 1
            max: 1
          SpawnDungeonLootEngineeringRipleyDisassembled:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: FootstepModifier
    footstepSoundCollection:
      path: /Audio/Mecha/sound_mecha_powerloader_step.ogg
  - type: MeleeWeapon
    hidden: true
    attackRate: 1
    damage:
      types:
        Blunt: 20
        Structural: 20
    soundHit:
      collection: MetalThud
  - type: PointLight
    radius: 5
    energy: 2

#region Tier 4, Boss
- type: entity
  parent: [ MobHostileBossBase, MobExplorerBase, MobHumanoidHostileAISimpleMelee ]
  id: MobExplorerBoss
  categories: [ HideSpawnMenu ]
  name: explorer captain
  description: Fearless and battle-hardened salvage team leaders, it takes years picking through the darkest corners of space and navigating the galaxy's criminal underbelly of the galaxy before you can become a captain. Not to be underestimated.
  components:
  - type: Reflect # Emulating holopickaxe to a degree
    reflectProb: 0.025
  - type: Loadout
    prototypes:
    - MobHumanoidExplorerGearBoss
  - type: Damageable
    damageModifierSet: MobHostileDamageModifierSetBoss
  - type: Sprite
    drawdepth: Mobs
    layers:
    # Helmet
    - sprite: _NF/Clothing/Head/Hardsuits/maxim_prototype.rsi
      state: off-equipped-HELMET
    - sprite: Clothing/Head/Hardsuits/spatiohelm.rsi
      state: equipped-head-light
      shader: unshaded
      color: "#47f8ff"
    # Suit
    - sprite: _NF/Clothing/OuterClothing/Hardsuits/maxim_prototype.rsi
      state: equipped-OUTERCLOTHING
    # Weapons
    - sprite: _NF/Objects/Weapons/Melee/energy_pickaxe.rsi
      state: inhand-left
    - sprite: _NF/Objects/Weapons/Melee/energy_pickaxe.rsi
      state: inhand-left-blade
      shader: unshaded
      color: "#e95151"
    # Fluff
    - sprite: Objects/Tools/lantern.rsi
      state: on-equipped-BELT
      shader: unshaded
  - type: PointLight
    radius: 7
    energy: 3
  - type: MobThresholds
    thresholds:
      100: Critical
      130: Dead
  - type: SlowOnDamage
    speedModifierThresholds:
      60: 0.7
      80: 0.5
  - type: MeleeWeapon
    hidden: true
    attackRate: 2
    damage:
      types:
        Heat: 16
        Piercing: 4
        Structural: 40
    soundHit:
      path: /Audio/Weapons/eblade1.ogg
      params:
        variation: 0.250
        volume: -10
  # Ghost role stuff
  - type: GhostRole
    allowMovement: true
    name: ghost-role-information-explorer-captain-dungeon-name
    description: ghost-role-information-explorer-captain-dungeon-description
    rules: ghost-role-information-dungeon-boss-rules
    raffle:
      settings: default
    mindRoles:
    - MindRoleGhostRoleTeamAntagonist
  - type: GhostTakeoverAvailable
  - type: ActionGun
    action: ActionSeismicCharge
    gunProto: SeismicChargeGun

- type: entity
  id: SeismicChargeGun
  name: seismic charge gun
  description: Needed to shoot the charge.
  categories: [ HideSpawnMenu ]
  components:
  - type: RechargeBasicEntityAmmo
    rechargeCooldown: 50
    rechargeSound:
      path: /Audio/Weapons/Guns/MagIn/kinetic_reload.ogg
  - type: BasicEntityAmmoProvider
    proto: NFBulletSeismicCharge
    capacity: 1
    count: 1
  - type: Gun
    minAngle: 5
    maxAngle: 15
    angleIncrease: 5
    angleDecay: 3
    fireRate: 1
    selectedMode: FullAuto
    availableModes:
      - FullAuto
    soundGunshot:
      path: /Audio/Items/bow_pull.ogg
    soundEmpty: null
    projectileSpeed: 15
  - type: UseDelay
    delay: 50

- type: entity
  id: ActionSeismicCharge
  parent: BaseAction
  categories: [ HideSpawnMenu ]
  name: "[color=yellow]Throw Seismic Charge[/color]"
  description: "Hurls activated seismic charge, that explodes on contact. [color=yellow]50 second cooldown.[/color]"
  components:
  - type: Action
    icon: { sprite : Objects/Weapons/Bombs/seismic.rsi, state: icon }
    priority: 2
    itemIconStyle: BigAction
    useDelay: 50
  - type: TargetAction
    checkCanAccess: false
    range: 0
  - type: WorldTargetAction
    event: !type:ActionGunShootEvent

#region space, t1
- type: entity
  parent: [ MobMovementSpeedModifierEVAMelee, MobExplorerMeleeT1 ]
  id: MobExplorerMeleeEVAT1
  categories: [ HideSpawnMenu ]

- type: entity
  parent: [ MobMovementSpeedModifierEVARanged, MobExplorerRangedT1 ]
  id: MobExplorerRangedEVAT1
  categories: [ HideSpawnMenu ]

#region space, t2
- type: entity
  parent: [ MobMovementSpeedModifierEVAMelee, MobExplorerMeleeT2 ]
  id: MobExplorerMeleeEVAT2
  categories: [ HideSpawnMenu ]

- type: entity
  parent: [ MobMovementSpeedModifierEVARanged, MobExplorerRangedT2 ]
  id: MobExplorerRangedEVAT2
  categories: [ HideSpawnMenu ]

#region space, t3
- type: entity
  parent: [ MobMovementSpeedModifierEVAMelee, MobExplorerMeleeT3 ]
  id: MobExplorerMeleeEVAT3
  categories: [ HideSpawnMenu ]

- type: entity
  parent: [ MobMovementSpeedModifierEVARanged, MobExplorerRangedT3 ]
  id: MobExplorerRangedEVAT3
  categories: [ HideSpawnMenu ]

- type: entity
  parent: MobExplorerHauler
  id: MobExplorerHaulerEVA
  components:
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 155
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: GlassBreak
      - !type:SpawnEntitiesBehavior
        spawn:
          SpawnMobExplorerEVAT2:
            min: 1
            max: 1
          SpawnDungeonLootEngineeringRipleyDisassembled:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
