diff --git a/Content.Server/Disease/Effects/DiseasePolymorph.cs b/Content.Server/Disease/Effects/DiseasePolymorph.cs new file mode 100644 index 0000000000..7e3e60a549 --- /dev/null +++ b/Content.Server/Disease/Effects/DiseasePolymorph.cs @@ -0,0 +1,41 @@ +using Content.Server.Polymorph.Systems; +using Content.Shared.Audio; +using Content.Shared.Disease; +using Content.Shared.Disease.Components; +using Content.Shared.Polymorph; +using Content.Shared.Popups; +using Content.Shared.Sound; +using JetBrains.Annotations; +using Robust.Shared.Audio; +using Robust.Shared.Player; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; + +namespace Content.Server.Disease.Effects +{ + [UsedImplicitly] + public sealed class DiseasePolymorph : DiseaseEffect + { + [DataField("polymorphId", required: true, customTypeSerializer: typeof(PrototypeIdSerializer))] + [ViewVariables(VVAccess.ReadWrite)] + public readonly string PolymorphId = default!; + + [DataField("polymorphSound")] + [ViewVariables(VVAccess.ReadWrite)] + public SoundSpecifier? PolymorphSound; + + [DataField("polymorphMessage")] + [ViewVariables(VVAccess.ReadWrite)] + public string? PolymorphMessage; + + public override void Effect(DiseaseEffectArgs args) + { + EntityUid? polyUid = EntitySystem.Get().PolymorphEntity(args.DiseasedEntity, PolymorphId); + + if (PolymorphSound != null && polyUid != null) + SoundSystem.Play(PolymorphSound.GetSound(), Filter.Pvs(polyUid.Value), polyUid.Value, AudioHelpers.WithVariation(0.2f)); + + if (PolymorphMessage != null && polyUid != null) + EntitySystem.Get().PopupEntity(Loc.GetString(PolymorphMessage), polyUid.Value, Filter.Entities(polyUid.Value), Shared.Popups.PopupType.Large); + } + } +} diff --git a/Resources/Locale/en-US/disease/disease.ftl b/Resources/Locale/en-US/disease/disease.ftl index ee30b59ebf..dc4d889593 100644 --- a/Resources/Locale/en-US/disease/disease.ftl +++ b/Resources/Locale/en-US/disease/disease.ftl @@ -11,3 +11,4 @@ disease-banana-compulsion = You really want to eat some bananas. disease-beat-chest-compulsion = {CAPITALIZE(THE($person))} beats {POSS-ADJ($person)} chest. disease-vomit = {CAPITALIZE(THE($person))} vomits. disease-think = You feel like you can't think straight. +disease-polymorph = You feel your body twist and change form! \ No newline at end of file diff --git a/Resources/Prototypes/Diseases/infectious.yml b/Resources/Prototypes/Diseases/infectious.yml index 2a6cc73b45..9cbb6896fa 100644 --- a/Resources/Prototypes/Diseases/infectious.yml +++ b/Resources/Prototypes/Diseases/infectious.yml @@ -118,35 +118,95 @@ id: AMIV name: AMIV cureResist: 0.10 + stages: + - 0 + - 120 + - 780 effects: + # compulsion pop ups - !type:DiseasePopUp probability: 0.015 type: Pvs message: disease-beat-chest-compulsion visualType: Medium + stages: + - 0 + - 1 + - 2 - !type:DiseasePopUp probability: 0.03 message: disease-banana-compulsion visualType: Medium + stages: + - 0 + - 1 + - 2 + # Screeches - spreads disease + - !type:DiseaseSnough + probability: 0.01 + snoughMessage: disease-screech + snoughSound: + collection: MonkeyScreeches + stages: + - 0 - !type:DiseaseSnough probability: 0.02 snoughMessage: disease-screech snoughSound: collection: MonkeyScreeches + stages: + - 1 + - !type:DiseaseSnough + probability: 0.04 + snoughMessage: disease-screech + snoughSound: + collection: MonkeyScreeches + stages: + - 2 + # monkey accent chance when speaking - !type:DiseaseGenericStatusEffect - probability: 0.3 + probability: 0.2 key: Stutter component: MonkeyAccent + stages: + - 1 + - !type:DiseaseGenericStatusEffect + probability: 0.5 + key: Stutter + component: MonkeyAccent + stages: + - 2 + # asphyxiation damage, probably from all the screeching - !type:DiseaseHealthChange probability: 0.53 damage: types: Asphyxiation: 1 + stages: + - 1 + - 2 + # possible monkefication if ignored too long + - !type:DiseasePolymorph + probability: 0.000427 ## ~5% chance over 120 secs + polymorphId: AMIVMorph + polymorphMessage: disease-polymorph + polymorphSound: + path: /Audio/Animals/monkey_scream.ogg + stages: + - 2 cures: - !type:DiseaseJustWaitCure - maxLength: 1600 + maxLength: 900 + stages: + - 0 + - 1 + - 2 - !type:DiseaseReagentCure reagent: BananaHonk + stages: + - 0 + - 1 + - 2 - type: disease id: BleedersBite diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml index 3c21bb71d3..df72353925 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml @@ -844,6 +844,8 @@ - type: Bloodstream bloodMaxVolume: 50 - type: DiseaseCarrier #The other class lab animal and disease vector + naturalImmunities: + - AMIV - type: CanEscapeInventory - type: MobPrice price: 50 diff --git a/Resources/Prototypes/Polymorphs/polymorph.yml b/Resources/Prototypes/Polymorphs/polymorph.yml index aec7946591..88a9a1b624 100644 --- a/Resources/Prototypes/Polymorphs/polymorph.yml +++ b/Resources/Prototypes/Polymorphs/polymorph.yml @@ -43,3 +43,12 @@ entity: SuperSynthesizerInstrument forced: true inventory: Drop + +- type: polymorph + id: AMIVMorph + entity: MobMonkey + forced: true + inventory: Transfer + transferName: true + revertOnCrit: false + revertOnDeath: false \ No newline at end of file