]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
New Salvage Mob: Basilisk (#37135)
authorNemanja <98561806+EmoGarbage404@users.noreply.github.com>
Mon, 12 May 2025 23:42:51 +0000 (19:42 -0400)
committerGitHub <noreply@github.com>
Mon, 12 May 2025 23:42:51 +0000 (19:42 -0400)
* Basilisk

* Less health

* Unique projectile

* Selfmerge incoming

* Update Resources/Textures/Mobs/Aliens/Asteroid/basilisk.rsi/meta.json

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
13 files changed:
Content.Server/NPC/Queries/Considerations/TargetLowTempCon.cs [new file with mode: 0644]
Content.Server/NPC/Systems/NPCUtilitySystem.cs
Resources/Prototypes/Entities/Markers/Spawners/Random/Salvage/spawners.yml
Resources/Prototypes/Entities/Mobs/NPCs/asteroid.yml
Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml
Resources/Prototypes/NPCs/basilisk.yml [new file with mode: 0644]
Resources/Prototypes/NPCs/utility_queries.yml
Resources/Textures/Mobs/Aliens/Asteroid/basilisk.rsi/basilisk.png [new file with mode: 0644]
Resources/Textures/Mobs/Aliens/Asteroid/basilisk.rsi/basilisk_alert.png [new file with mode: 0644]
Resources/Textures/Mobs/Aliens/Asteroid/basilisk.rsi/basilisk_dead.png [new file with mode: 0644]
Resources/Textures/Mobs/Aliens/Asteroid/basilisk.rsi/meta.json [new file with mode: 0644]
Resources/Textures/Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi/ice.png [new file with mode: 0644]
Resources/Textures/Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi/meta.json

diff --git a/Content.Server/NPC/Queries/Considerations/TargetLowTempCon.cs b/Content.Server/NPC/Queries/Considerations/TargetLowTempCon.cs
new file mode 100644 (file)
index 0000000..7e8553c
--- /dev/null
@@ -0,0 +1,14 @@
+namespace Content.Server.NPC.Queries.Considerations;
+
+/// <summary>
+/// Returns if the target is below a certain temperature.
+/// </summary>
+public sealed partial class TargetLowTempCon : UtilityConsideration
+{
+    /// <summary>
+    /// The minimum temperature they must be.
+    /// </summary>
+    [DataField]
+    public float MinTemp;
+}
+
index 7b485eeb96f62c290988219451e010707815d36c..c5b463d0d3a4b7c58f98641869cc763140c06478 100644 (file)
@@ -7,6 +7,7 @@ using Content.Server.NPC.Queries.Queries;
 using Content.Server.Nutrition.Components;
 using Content.Server.Nutrition.EntitySystems;
 using Content.Server.Storage.Components;
+using Content.Server.Temperature.Components;
 using Content.Shared.Chemistry.EntitySystems;
 using Content.Shared.Damage;
 using Content.Shared.Examine;
@@ -14,7 +15,6 @@ using Content.Shared.Fluids.Components;
 using Content.Shared.Hands.Components;
 using Content.Shared.Inventory;
 using Content.Shared.Mobs;
-using Content.Shared.Mobs.Components;
 using Content.Shared.Mobs.Systems;
 using Content.Shared.NPC.Systems;
 using Content.Shared.Nutrition.Components;
@@ -376,6 +376,13 @@ public sealed class NPCUtilitySystem : EntitySystem
 
                     return 0f;
                 }
+            case TargetLowTempCon con:
+                {
+                    if (!TryComp<TemperatureComponent>(targetUid, out var temperature))
+                        return 0f;
+
+                    return temperature.CurrentTemperature <= con.MinTemp ? 1f : 0f;
+                }
             default:
                 throw new NotImplementedException();
         }
index f1d632c186860e95eb6f64b3fcd2494dacd6d429..1de12a1511305cf34fddca810f4d4bdc4d9afa4c 100644 (file)
     table: !type:GroupSelector
       children:
       - id: MobGoliath
-        weight: 65
+        weight: 45
       - id: MobHivelord
         weight: 35
-
+      - id: MobBasilisk
+        weight: 20
index 8db0294981c25f4c217e5a4ded86350f7f83b075..c4c131a7ab21aca9ef5494b55eedd8c4e9c360d5 100644 (file)
@@ -81,6 +81,8 @@
         6
       AggroVisionRadius: !type:Single
         10
+      NavSmash: !type:Bool
+        true
   - type: NPCUseActionOnTarget
     actionId: ActionGoliathTentacle
   - type: Tag
         4
       AggroVisionRadius: !type:Single
         9
+      NavSmash: !type:Bool
+        true
   - type: Butcherable
     spawned:
     - id: FoodHivelordRemains
         15
       AggroVisionRadius: !type:Single
         15
+      NavSmash: !type:Bool
+        true
   - type: TimedDespawn
     lifetime: 100
 
   - type: Tag
     tags:
     - HivelordRemains
+
+
+- type: entity
+  id: MobBasilisk
+  parent: [ BaseMobAsteroid, MobBloodstream ]
+  name: basilisk
+  description: A territorial beast, covered in a thick shell that absorbs energy. Its stare causes victims to freeze from the inside.
+  components:
+  - type: Sprite
+    sprite: Mobs/Aliens/Asteroid/basilisk.rsi
+    layers:
+    - map: ["enum.DamageStateVisualLayers.Base"]
+      state: basilisk
+  - type: DamageStateVisuals
+    states:
+      Alive:
+        Base: basilisk
+      Dead:
+        Base: basilisk_dead
+  - type: MovementSpeedModifier
+    baseWalkSpeed : 3
+    baseSprintSpeed : 3.5
+  - type: MobThresholds
+    thresholds:
+      0: Alive
+      80: Dead
+  - type: MeleeWeapon
+    angle: 0
+    animation: WeaponArcBite
+    soundHit:
+      path: /Audio/Effects/bite.ogg
+    damage:
+      types:
+        Slash: 7
+        Piercing: 5
+  - type: Gun
+    fireRate: 0.75
+    selectedMode: SemiAuto
+    showExamineText: false
+    availableModes: [ SemiAuto ]
+    soundGunshot: /Audio/Weapons/Guns/Gunshots/syringe_gun.ogg
+  - type: RechargeBasicEntityAmmo
+    showExamineText: false
+    rechargeCooldown: 0
+    rechargeSound: null
+  - type: BasicEntityAmmoProvider
+    proto: BasiliskRay
+    capacity: 1
+    count: 1
+  - type: Bloodstream
+    bloodMaxVolume: 200
+    chemicalMaxVolume: 0
+  - type: NpcFactionMember
+    factions:
+    - SimpleHostile
+  - type: HTN
+    rootTask:
+      task: BasiliskCompound
+    blackboard:
+      VisionRadius: !type:Single
+        7
+      AggroVisionRadius: !type:Single
+        12
+      NavSmash: !type:Bool
+        true
+  - type: Reflect
+    reflectProb: 1
+    reflects:
+    - Energy
+  - type: Butcherable
+    spawned:
+    - id: DiamondOre1
+      amount: 1
+      maxAmount: 3
index 63d9e6234916f3d3114e7b0497ef3e97fca50567..60b19626b0321f77fdbf331c21cf3a84667dceb8 100644 (file)
   - type: ChangeTemperatureOnCollide
     heat: 100000 #This may be a bit underpowered, but in testing, 130000 was RIDICULOUS and killed in seconds.
 
+- type: entity
+  parent: BaseBullet
+  id: BasiliskRay
+  name: basilisk ray
+  categories: [ HideSpawnMenu ]
+  components:
+  - type: FlyBySound
+    sound:
+      collection: EnergyMiss
+      params:
+        volume: 5
+  - type: Sprite
+    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
+    layers:
+    - state: ice
+      shader: unshaded
+  - type: Ammo
+    muzzleFlash: null
+  - type: Physics
+  - type: Fixtures
+    fixtures:
+      projectile:
+        shape:
+          !type:PhysShapeAabb
+          bounds: "-0.2,-0.2,0.2,0.2"
+        hard: false
+        mask:
+        - Opaque
+      fly-by: *flybyfixture
+  - type: Projectile
+    impactEffect: BulletImpactEffectDisabler
+    damage:
+      types:
+        Cold: 5
+  - type: TimedDespawn
+    lifetime: 3
+  - type: ChangeTemperatureOnCollide
+    heat: -50000
+
 - type: entity
   id: BulletKinetic
   name: kinetic bolt
diff --git a/Resources/Prototypes/NPCs/basilisk.yml b/Resources/Prototypes/NPCs/basilisk.yml
new file mode 100644 (file)
index 0000000..601d048
--- /dev/null
@@ -0,0 +1,22 @@
+- type: htnCompound
+  id: BasiliskCompound
+  branches:
+  - tasks:
+    - !type:HTNCompoundTask
+      task: BasiliskMeleeCombatCompound
+  - tasks:
+    - !type:HTNCompoundTask
+      task: InnateRangedCombatCompound
+  - tasks:
+    - !type:HTNCompoundTask
+      task: IdleCompound
+
+- type: htnCompound
+  id: BasiliskMeleeCombatCompound
+  branches:
+  - tasks:
+    - !type:HTNPrimitiveTask
+      operator: !type:UtilityOperator
+        proto: NearbyColdMeleeTargets
+    - !type:HTNCompoundTask
+      task: BeforeMeleeAttackTargetCompound
index 69ae4a337ded09edf9374ca4f8a97f828d79e4f3..23ad7a59a1f49c8d7f87443204aa03bacb8c4238 100644 (file)
     - !type:TargetInLOSOrCurrentCon
       curve: !type:BoolCurve
 
+- type: utilityQuery
+  id: NearbyColdMeleeTargets
+  query:
+  - !type:NearbyHostilesQuery
+  considerations:
+  - !type:TargetLowTempCon
+    curve: !type:BoolCurve
+    minTemp: 250
+  - !type:TargetIsAliveCon
+    curve: !type:BoolCurve
+  - !type:TargetDistanceCon
+    curve: !type:PresetCurve
+      preset: TargetDistance
+  - !type:TargetHealthCon
+    curve: !type:PresetCurve
+      preset: TargetHealth
+  - !type:TargetAccessibleCon
+    curve: !type:BoolCurve
+  - !type:TargetInLOSOrCurrentCon
+    curve: !type:BoolCurve
+
 - type: utilityQuery
   id: OrderedTargets
   query:
     - !type:TargetIsCritCon
       curve: !type:InverseBoolCurve
     - !type:TargetIsStunnedCon
-      curve: !type:InverseBoolCurve  
+      curve: !type:InverseBoolCurve
     - !type:TurretTargetingCon
       curve: !type:BoolCurve
     - !type:TargetDistanceCon
diff --git a/Resources/Textures/Mobs/Aliens/Asteroid/basilisk.rsi/basilisk.png b/Resources/Textures/Mobs/Aliens/Asteroid/basilisk.rsi/basilisk.png
new file mode 100644 (file)
index 0000000..5177522
Binary files /dev/null and b/Resources/Textures/Mobs/Aliens/Asteroid/basilisk.rsi/basilisk.png differ
diff --git a/Resources/Textures/Mobs/Aliens/Asteroid/basilisk.rsi/basilisk_alert.png b/Resources/Textures/Mobs/Aliens/Asteroid/basilisk.rsi/basilisk_alert.png
new file mode 100644 (file)
index 0000000..3bd4e6e
Binary files /dev/null and b/Resources/Textures/Mobs/Aliens/Asteroid/basilisk.rsi/basilisk_alert.png differ
diff --git a/Resources/Textures/Mobs/Aliens/Asteroid/basilisk.rsi/basilisk_dead.png b/Resources/Textures/Mobs/Aliens/Asteroid/basilisk.rsi/basilisk_dead.png
new file mode 100644 (file)
index 0000000..fcd6472
Binary files /dev/null and b/Resources/Textures/Mobs/Aliens/Asteroid/basilisk.rsi/basilisk_dead.png differ
diff --git a/Resources/Textures/Mobs/Aliens/Asteroid/basilisk.rsi/meta.json b/Resources/Textures/Mobs/Aliens/Asteroid/basilisk.rsi/meta.json
new file mode 100644 (file)
index 0000000..73710c9
--- /dev/null
@@ -0,0 +1,48 @@
+{
+  "version": 1,
+  "license": "CC-BY-SA-3.0",
+  "copyright": "Taken from vgstation13 at https://github.com/vgstation-coders/vgstation13/blob/9bd459b27c73575fd5e3bf2efea13b816d0ac7c8/icons/mob/animal.dmi",
+  "size": {
+    "x": 32,
+    "y": 32
+  },
+  "states": [
+    {
+      "name": "basilisk",
+      "directions": 4
+    },
+    {
+      "name": "basilisk_alert",
+      "directions": 4,
+      "delays": [
+        [
+          0.1,
+          0.1,
+          0.1,
+          0.1
+        ],
+        [
+          0.1,
+          0.1,
+          0.1,
+          0.1
+        ],
+        [
+          0.1,
+          0.1,
+          0.1,
+          0.1
+        ],
+        [
+          0.1,
+          0.1,
+          0.1,
+          0.1
+        ]
+      ]
+    },
+    {
+      "name": "basilisk_dead"
+    }
+  ]
+}
diff --git a/Resources/Textures/Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi/ice.png b/Resources/Textures/Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi/ice.png
new file mode 100644 (file)
index 0000000..71633de
Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi/ice.png differ
index d7b6a34f54e7322feeecd3e0f930531f67bc71b9..872a5ab72164bab41331ae9b40901bd5a13bd88f 100644 (file)
@@ -55,6 +55,9 @@
     },
     {
       "name": "heavylaser_flash"
+    },
+    {
+      "name": "ice"
     }
   ]
-}
\ No newline at end of file
+}