diff --git a/Content.Server/RatKing/RatKingComponent.cs b/Content.Server/RatKing/RatKingComponent.cs
index 4685d14cf2..f10945c7a1 100644
--- a/Content.Server/RatKing/RatKingComponent.cs
+++ b/Content.Server/RatKing/RatKingComponent.cs
@@ -39,16 +39,9 @@ namespace Content.Server.RatKing
public float HungerPerDomainUse = 50f;
///
- /// The disease prototype id that the Domain ability spreads
+ /// How many moles of Miasma are released after one us of Domain
///
- [ViewVariables, DataField("domainDiseaseId", customTypeSerializer: typeof(PrototypeIdSerializer))]
- public string DomainDiseaseId = "Plague";
-
- ///
- /// The range of the Domain ability.
- ///
- [ViewVariables(VVAccess.ReadWrite), DataField("domainRange")]
- public float DomainRange = 3f;
-
+ [ViewVariables, DataField("molesMiasmaPerDomain")]
+ public float MolesMiasmaPerDomain = 75f;
}
};
diff --git a/Content.Server/RatKing/RatKingSystem.cs b/Content.Server/RatKing/RatKingSystem.cs
index c39dd090ad..a4548b3932 100644
--- a/Content.Server/RatKing/RatKingSystem.cs
+++ b/Content.Server/RatKing/RatKingSystem.cs
@@ -1,9 +1,11 @@
using Content.Server.Actions;
+using Content.Server.Atmos.EntitySystems;
using Content.Server.Disease;
using Content.Server.Disease.Components;
using Content.Server.Nutrition.Components;
using Content.Server.Popups;
using Content.Shared.Actions;
+using Content.Shared.Atmos;
using Robust.Shared.Player;
namespace Content.Server.RatKing
@@ -14,6 +16,7 @@ namespace Content.Server.RatKing
[Dependency] private readonly ActionsSystem _action = default!;
[Dependency] private readonly DiseaseSystem _disease = default!;
[Dependency] private readonly EntityLookupSystem _lookup = default!;
+ [Dependency] private readonly AtmosphereSystem _atmos = default!;
public override void Initialize()
{
@@ -54,8 +57,8 @@ namespace Content.Server.RatKing
}
///
- /// Gets all of the nearby disease-carrying entities in a radius
- /// and gives them the specified disease. It has a hunger cost as well
+ /// uses hunger to release a specific amount of miasma into the air. This heals the rat king
+ /// and his servants through a specific metabolism.
///
private void OnDomain(EntityUid uid, RatKingComponent component, RatKingDomainActionEvent args)
{
@@ -74,17 +77,11 @@ namespace Content.Server.RatKing
args.Handled = true;
hunger.CurrentHunger -= component.HungerPerDomainUse;
- _popup.PopupEntity(Loc.GetString("rat-king-domain-popup"), uid, Filter.Pvs(uid, default, EntityManager));
+ _popup.PopupEntity(Loc.GetString("rat-king-domain-popup"), uid, Filter.Pvs(uid));
- var tstalker = GetEntityQuery();
- foreach (var entity in _lookup.GetEntitiesInRange(uid, component.DomainRange)) //go through all of them, filtering only those in range that are not the king itself
- {
- if (entity == uid)
- continue;
-
- if (tstalker.TryGetComponent(entity, out var diseasecomp))
- _disease.TryInfect(diseasecomp, component.DomainDiseaseId); //infect them with w/e disease
- }
+ var tileMix = _atmos.GetTileMixture(Transform(uid).Coordinates);
+ if (tileMix != null)
+ tileMix.AdjustMoles(Gas.Miasma, component.MolesMiasmaPerDomain);
}
}
diff --git a/Resources/Locale/en-US/animals/rat-king/rat-king.ftl b/Resources/Locale/en-US/animals/rat-king/rat-king.ftl
index 35354daa08..d32167a6f1 100644
--- a/Resources/Locale/en-US/animals/rat-king/rat-king.ftl
+++ b/Resources/Locale/en-US/animals/rat-king/rat-king.ftl
@@ -2,7 +2,7 @@ rat-king-raise-army-name = Raise Army
rat-king-raise-army-description = Spend some hunger to summon an allied rat to help defend you.
rat-king-domain-name = Rat King's Domain
-rat-king-domain-description = Spend some hunger to infect those around you with the plague.
-rat-king-domain-popup = A cloud of plague is released into the air!
+rat-king-domain-description = Spend some hunger to release a cloud of miasma into the air.
+rat-king-domain-popup = A cloud of miasma is released into the air!
rat-king-too-hungry = You are too hungry to use this ability!
\ No newline at end of file
diff --git a/Resources/Prototypes/Body/Mechanisms/rat.yml b/Resources/Prototypes/Body/Mechanisms/rat.yml
new file mode 100644
index 0000000000..712674aeab
--- /dev/null
+++ b/Resources/Prototypes/Body/Mechanisms/rat.yml
@@ -0,0 +1,8 @@
+- type: entity
+ id: OrganRatLungs
+ parent: OrganHumanLungs
+ suffix: "rat"
+ components:
+ - type: Metabolizer
+ metabolizerTypes: [ Rat ]
+
diff --git a/Resources/Prototypes/Body/Parts/rat.yml b/Resources/Prototypes/Body/Parts/rat.yml
new file mode 100644
index 0000000000..8ec9af385b
--- /dev/null
+++ b/Resources/Prototypes/Body/Parts/rat.yml
@@ -0,0 +1,39 @@
+# Just copypasta of some animal basic body parts for interaction,
+# It's basically as animals except a different torso with different organs
+- type: entity
+ id: TorsoRat
+ name: "animal torso"
+ parent: PartAnimal
+ noSpawn: true
+ components:
+ - type: BodyPart
+ partType: Torso
+ size: 7
+ compatibility: Biological
+ mechanisms:
+ - OrganRatLungs
+ - OrganHumanStomach
+ - OrganHumanLiver
+ - OrganHumanHeart
+ - OrganHumanKidneys
+ - type: Damageable
+ damageContainer: Biological
+
+- type: entity
+ id: OrganRatLungs
+ parent: BaseAnimalOrgan
+ name: lungs
+ noSpawn: true
+ components:
+ - type: Mechanism
+ size: 1
+ compatibility: Biological
+ - type: Lung
+ - type: Metabolizer
+ removeEmpty: true
+ solutionOnBody: false
+ solution: "Lung"
+ metabolizerTypes: [ Rat ]
+ groups:
+ - id: Gas
+ rateModifier: 100.0
\ No newline at end of file
diff --git a/Resources/Prototypes/Body/Presets/rat.yml b/Resources/Prototypes/Body/Presets/rat.yml
new file mode 100644
index 0000000000..c48b5ec88a
--- /dev/null
+++ b/Resources/Prototypes/Body/Presets/rat.yml
@@ -0,0 +1,7 @@
+- type: bodyPreset
+ name: "animal preset"
+ id: RatPreset
+ partIDs:
+ legs: LegsAnimal
+ feet: FeetAnimal
+ torso: TorsoRat
diff --git a/Resources/Prototypes/Chemistry/metabolizer_types.yml b/Resources/Prototypes/Chemistry/metabolizer_types.yml
index 5ca7770f2d..2e13f9daff 100644
--- a/Resources/Prototypes/Chemistry/metabolizer_types.yml
+++ b/Resources/Prototypes/Chemistry/metabolizer_types.yml
@@ -15,3 +15,6 @@
- type: metabolizerType
id: Vox
+
+- type: metabolizerType
+ id: Rat
diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml b/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml
index ed6e564435..97af3b220a 100644
--- a/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml
+++ b/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml
@@ -50,6 +50,9 @@
types:
Slash: 12
Piercing: 8
+ - type: Body
+ template: AnimalTemplate
+ preset: RatPreset
- type: Appearance
- type: DamageStateVisuals
rotate: true
@@ -100,6 +103,13 @@
amount: 1
- type: DiseaseCarrier
carrierDiseases:
+ - VentCough
+ - AMIV
+ - SpaceCold
+ - SpaceFlu
+ - Bird Flew
+ - VanAusdallsRobovirus
+ - BleedersBite
- Plague
- type: SlowOnDamage
speedModifierThresholds:
@@ -117,8 +127,8 @@
components:
- type: CombatMode
- type: MovementSpeedModifier
- baseWalkSpeed : 4
- baseSprintSpeed : 4
+ baseWalkSpeed : 3.5
+ baseSprintSpeed : 3.5
- type: UtilityAI
behaviorSets:
- Idle
@@ -151,8 +161,8 @@
- type: MobState
thresholds:
0: !type:NormalMobState {}
- 25: !type:CriticalMobState {}
- 50: !type:DeadMobState {}
+ 30: !type:CriticalMobState {}
+ 60: !type:DeadMobState {}
- type: MeleeWeapon
range: 1
arcwidth: 0
@@ -160,7 +170,10 @@
damage:
types:
Slash: 5
- Piercing: 2
+ Piercing: 3
+ - type: Body
+ template: AnimalTemplate
+ preset: RatPreset
- type: Appearance
- type: DamageStateVisuals
rotate: true
@@ -174,6 +187,13 @@
- type: Puller
- type: DiseaseCarrier
carrierDiseases:
+ - VentCough
+ - AMIV
+ - SpaceCold
+ - SpaceFlu
+ - Bird Flew
+ - VanAusdallsRobovirus
+ - BleedersBite
- Plague
- type: Vocal
# mice are gender neutral who cares
diff --git a/Resources/Prototypes/Reagents/gases.yml b/Resources/Prototypes/Reagents/gases.yml
index da7c940a3a..85985e965e 100644
--- a/Resources/Prototypes/Reagents/gases.yml
+++ b/Resources/Prototypes/Reagents/gases.yml
@@ -17,6 +17,10 @@
conditions:
- !type:OrganType
type: Animal
+ - !type:Oxygenate
+ conditions:
+ - !type:OrganType
+ type: Rat
# Convert Oxygen into CO2.
- !type:ModifyLungGas
conditions:
@@ -157,6 +161,9 @@
effects:
- !type:ChemCauseRandomDisease
conditions:
+ - !type:OrganType
+ type: Rat
+ shouldHave: false
- !type:ReagentThreshold
reagent: Miasma
min: 1
@@ -168,8 +175,12 @@
- Bird Flew
- VanAusdallsRobovirus
- BleedersBite
+ - Plague
- !type:HealthChange
conditions:
+ - !type:OrganType
+ type: Rat
+ shouldHave: false
- !type:ReagentThreshold
reagent: Miasma
min: 1
@@ -181,6 +192,23 @@
- !type:ChemVomit
probability: 0.12
conditions:
+ - !type:OrganType
+ type: Rat
+ shouldHave: false
- !type:ReagentThreshold
reagent: Miasma
min: 0.8
+ - !type:HealthChange
+ conditions:
+ - !type:OrganType
+ type: Rat
+ - !type:ReagentThreshold
+ reagent: Miasma
+ min: 1
+ scaleByQuantity: true
+ ignoreResistances: true
+ damage:
+ types:
+ Blunt: -4
+ Slash: -3
+ Piercing: -3