From ad5808d0d033c98a2c1922bbe42d659b4fd19324 Mon Sep 17 00:00:00 2001 From: pacable <77161122+pxc1984@users.noreply.github.com> Date: Mon, 16 Sep 2024 14:06:54 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=D1=80=D1=84=20=D0=B3=D0=B5=D0=BD?= =?UTF-8?q?=D0=BE=D0=BA=D1=80=D0=B0=D0=B4=D0=BE=D0=B2=20(#381)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * makao sprite security Signed-off-by: pacable * нерф генокрада Количество биомассы повышено с 30 до 50 единиц. Голод генокрадов уменьшен. Невидимость генокрада теперь тратит химикаты когда активна. Нахождение в стазисе тратит биомассу. Уменьшен урон руки-клинка. Для покупки руки-клинка теперь необходимо съесть 2 жертвы. Укус фальшивой руки-клинка теперь действует 30 секунд вместо 60. Поглощение тела наносит 180 генетического урона вместо 200 Исправлен баг с перегружением мышц. Signed-off-by: pacable * Revert "makao sprite security" This reverts commit aa9d52447a415142003c75c81151cc720d6c4414. * реверт хуйни Signed-off-by: pacable * снижено количество очков для покупки разума улья Signed-off-by: pacable --------- Signed-off-by: pacable --- .../Changeling/ChangelingSystem.Abilities.cs | 57 +++++++++++++------ Content.Server/Changeling/ChangelingSystem.cs | 26 ++++++++- .../Changeling/ChangelingComponent.cs | 12 +++- Resources/Prototypes/Actions/changeling.yml | 5 +- .../Prototypes/Catalog/changeling_catalog.yml | 2 +- .../Weapons/Melee/changeling_armblade.yml | 5 +- .../Weapons/Throwable/throwing_stars.yml | 6 +- 7 files changed, 84 insertions(+), 29 deletions(-) diff --git a/Content.Server/Changeling/ChangelingSystem.Abilities.cs b/Content.Server/Changeling/ChangelingSystem.Abilities.cs index efc2ce9cf0..2c6f7100d1 100644 --- a/Content.Server/Changeling/ChangelingSystem.Abilities.cs +++ b/Content.Server/Changeling/ChangelingSystem.Abilities.cs @@ -125,7 +125,7 @@ public sealed partial class ChangelingSystem : EntitySystem UpdateBiomass(uid, comp, comp.MaxBiomass - comp.TotalAbsorbedEntities); - var dmg = new DamageSpecifier(_proto.Index(AbsorbedDamageGroup), 200); + var dmg = new DamageSpecifier(_proto.Index(AbsorbedDamageGroup), 180); _damage.TryChangeDamage(target, dmg, false, false); _blood.ChangeBloodReagent(target, "FerrochromicAcid"); _blood.SpillAllSolutions(target); @@ -217,6 +217,8 @@ public sealed partial class ChangelingSystem : EntitySystem comp.Chemicals = 0f; + ToggleChameleonSkin(uid, comp, false); + if (_mobState.IsAlive(uid)) { // fake our death @@ -231,6 +233,8 @@ public sealed partial class ChangelingSystem : EntitySystem _mobState.ChangeMobState(uid, MobState.Dead); comp.IsInStasis = true; + + args.Handled = true; } private void OnExitStasis(EntityUid uid, ChangelingComponent comp, ref ExitStasisEvent args) { @@ -260,6 +264,8 @@ public sealed partial class ChangelingSystem : EntitySystem _popup.PopupEntity(Loc.GetString("changeling-stasis-exit"), uid, uid); comp.IsInStasis = false; + + args.Handled = true; } #endregion @@ -341,7 +347,7 @@ public sealed partial class ChangelingSystem : EntitySystem } private void OnToggleStrainedMuscles(EntityUid uid, ChangelingComponent comp, ref ToggleStrainedMusclesEvent args) { - if (!TryUseAbility(uid, comp, args)) + if (!TryUseAbility(uid, comp, args) || _gravity.IsWeightless(uid)) return; ToggleStrainedMuscles(uid, comp); @@ -350,13 +356,13 @@ public sealed partial class ChangelingSystem : EntitySystem { if (!comp.StrainedMusclesActive) { - _speed.ChangeBaseSpeed(uid, 125f, 150f, 1f); + _speed.ChangeBaseSpeed(uid, 4f, 7.5f, 20f); _popup.PopupEntity(Loc.GetString("changeling-muscles-start"), uid, uid); comp.StrainedMusclesActive = true; } else { - _speed.ChangeBaseSpeed(uid, 100f, 100f, 1f); + _speed.ChangeBaseSpeed(uid, 2.5f, 4.5f, 20f); _popup.PopupEntity(Loc.GetString("changeling-muscles-end"), uid, uid); comp.StrainedMusclesActive = false; } @@ -444,7 +450,7 @@ public sealed partial class ChangelingSystem : EntitySystem #region Utilities - public void OnAnatomicPanacea(EntityUid uid, ChangelingComponent comp, ref ActionAnatomicPanaceaEvent args) + private void OnAnatomicPanacea(EntityUid uid, ChangelingComponent comp, ref ActionAnatomicPanaceaEvent args) { if (!TryUseAbility(uid, comp, args)) return; @@ -460,7 +466,8 @@ public sealed partial class ChangelingSystem : EntitySystem else return; PlayMeatySound(uid, comp); } - public void OnAugmentedEyesight(EntityUid uid, ChangelingComponent comp, ref ActionAugmentedEyesightEvent args) + + private void OnAugmentedEyesight(EntityUid uid, ChangelingComponent comp, ref ActionAugmentedEyesightEvent args) { if (!TryUseAbility(uid, comp, args)) return; @@ -474,7 +481,8 @@ public sealed partial class ChangelingSystem : EntitySystem EnsureComp(uid); _popup.PopupEntity(Loc.GetString("changeling-passive-activate"), uid, uid); } - public void OnBiodegrade(EntityUid uid, ChangelingComponent comp, ref ActionBiodegradeEvent args) + + private void OnBiodegrade(EntityUid uid, ChangelingComponent comp, ref ActionBiodegradeEvent args) { if (!TryUseAbility(uid, comp, args)) return; @@ -501,24 +509,38 @@ public sealed partial class ChangelingSystem : EntitySystem } _puddle.TrySplashSpillAt(uid, Transform(uid).Coordinates, soln, out _); } - public void OnChameleonSkin(EntityUid uid, ChangelingComponent comp, ref ActionChameleonSkinEvent args) + + private void OnChameleonSkin(EntityUid uid, ChangelingComponent comp, ref ActionChameleonSkinEvent args) { if (!TryUseAbility(uid, comp, args)) return; - if (HasComp(uid) && HasComp(uid)) + if (comp.StealthEnabled && HasComp(uid) && HasComp(uid)) + ToggleChameleonSkin(uid, comp, false); + else + ToggleChameleonSkin(uid, comp, true); + } + + public void ToggleChameleonSkin(EntityUid uid, ChangelingComponent comp, bool toState) + { + if (!toState) { RemComp(uid); RemComp(uid); _popup.PopupEntity(Loc.GetString("changeling-chameleon-end"), uid, uid); - return; + comp.StealthEnabled = false; + } + else + { + EnsureComp(uid); + var stealthonmove = EnsureComp(uid); + stealthonmove.PassiveVisibilityRate = -0.37f; + _popup.PopupEntity(Loc.GetString("changeling-chameleon-start"), uid, uid); + comp.StealthEnabled = true; } - - EnsureComp(uid); - EnsureComp(uid); - _popup.PopupEntity(Loc.GetString("changeling-chameleon-start"), uid, uid); } - public void OnEphedrineOverdose(EntityUid uid, ChangelingComponent comp, ref ActionEphedrineOverdoseEvent args) + + private void OnEphedrineOverdose(EntityUid uid, ChangelingComponent comp, ref ActionEphedrineOverdoseEvent args) { if (!TryUseAbility(uid, comp, args)) return; @@ -539,7 +561,7 @@ public sealed partial class ChangelingSystem : EntitySystem } } // john space made me do this - public void OnHealUltraSwag(EntityUid uid, ChangelingComponent comp, ref ActionFleshmendEvent args) + private void OnHealUltraSwag(EntityUid uid, ChangelingComponent comp, ref ActionFleshmendEvent args) { if (!TryUseAbility(uid, comp, args)) return; @@ -551,7 +573,8 @@ public sealed partial class ChangelingSystem : EntitySystem }; if (TryInjectReagents(uid, reagents)) _popup.PopupEntity(Loc.GetString("changeling-fleshmend"), uid, uid); - else return; + else + return; PlayMeatySound(uid, comp); } public void OnLastResort(EntityUid uid, ChangelingComponent comp, ref ActionLastResortEvent args) diff --git a/Content.Server/Changeling/ChangelingSystem.cs b/Content.Server/Changeling/ChangelingSystem.cs index c8e5c3336b..61485762dd 100644 --- a/Content.Server/Changeling/ChangelingSystem.cs +++ b/Content.Server/Changeling/ChangelingSystem.cs @@ -55,6 +55,7 @@ using Content.Shared.Mobs.Components; using Content.Server.Stunnable; using Content.Shared.Jittering; using System.Linq; +using Content.Shared.Radio; namespace Content.Server.Changeling; @@ -220,13 +221,36 @@ public sealed partial class ChangelingSystem : EntitySystem } private void UpdateAbilities(EntityUid uid, ChangelingComponent comp) { + var stamina = EnsureComp(uid); if (comp.StrainedMusclesActive) { - var stamina = EnsureComp(uid); _stamina.TakeStaminaDamage(uid, 7.5f, visual: false); if (stamina.StaminaDamage >= stamina.CritThreshold || _gravity.IsWeightless(uid)) ToggleStrainedMuscles(uid, comp); } + + if (comp.StealthEnabled) + { + if (comp.Chemicals > comp.StealthDrain) + comp.Chemicals -= comp.StealthDrain; + else + { + _stamina.TakeStaminaDamage(uid, 35f, visual: false); + if (stamina.StaminaDamage >= stamina.CritThreshold) + ToggleChameleonSkin(uid, comp, false); + } + } + + if (comp.IsInStasis) + { + if (comp.Biomass > comp.StasisDrain) + comp.Biomass -= comp.StasisDrain; + else + { + comp.IsInStasis = false; + _mobState.ChangeMobState(uid, MobState.Dead); + } + } } #region Helper Methods diff --git a/Content.Shared/Changeling/ChangelingComponent.cs b/Content.Shared/Changeling/ChangelingComponent.cs index afef3648f5..89e48a54a3 100644 --- a/Content.Shared/Changeling/ChangelingComponent.cs +++ b/Content.Shared/Changeling/ChangelingComponent.cs @@ -49,6 +49,14 @@ public sealed partial class ChangelingComponent : Component public bool IsInLesserForm = false; + public bool StealthEnabled = false; + + [DataField] + public float StealthDrain = 1.5f; + + [DataField] + public float StasisDrain = 0.2f; + public Dictionary Equipment = new(); @@ -56,13 +64,13 @@ public sealed partial class ChangelingComponent : Component /// Amount of biomass changeling currently has. /// [DataField, AutoNetworkedField] - public float Biomass = 30f; + public float Biomass = 50f; /// /// Maximum amount of biomass a changeling can have. /// [DataField, AutoNetworkedField] - public float MaxBiomass = 30f; + public float MaxBiomass = 50f; /// /// How much biomass should be removed per cycle. diff --git a/Resources/Prototypes/Actions/changeling.yml b/Resources/Prototypes/Actions/changeling.yml index d5648c9467..93f2c72c2e 100644 --- a/Resources/Prototypes/Actions/changeling.yml +++ b/Resources/Prototypes/Actions/changeling.yml @@ -145,7 +145,8 @@ state: armblade event: !type:ToggleArmbladeEvent {} - type: ChangelingAction - chemicalCost: 15 + chemicalCost: 30 + requireAbsorbed: 2 - type: entity id: ActionCreateBoneShard @@ -247,7 +248,7 @@ state: strained_muscles event: !type:ToggleStrainedMusclesEvent {} - type: ChangelingAction - chemicalCost: 0 + chemicalCost: 30 useInLesserForm: true # stings diff --git a/Resources/Prototypes/Catalog/changeling_catalog.yml b/Resources/Prototypes/Catalog/changeling_catalog.yml index 5047e05335..2dfdfc0375 100644 --- a/Resources/Prototypes/Catalog/changeling_catalog.yml +++ b/Resources/Prototypes/Catalog/changeling_catalog.yml @@ -333,7 +333,7 @@ icon: { sprite: Changeling/changeling_abilities.rsi, state: hivemind_access } productAction: ActionHivemindAccess cost: - EvolutionPoint: 4 + EvolutionPoint: 2 categories: - ChangelingAbilityUtility conditions: diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/changeling_armblade.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/changeling_armblade.yml index 49ddd9fb78..2c3961e352 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/changeling_armblade.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/changeling_armblade.yml @@ -12,8 +12,7 @@ attackRate: 0.75 damage: types: - Blunt: 5 - Slash: 12.5 + Slash: 7.5 Piercing: 10 Structural: 10 soundHit: @@ -45,4 +44,4 @@ Piercing: 1 Structural: 1 - type: TimedDespawn - lifetime: 60 \ No newline at end of file + lifetime: 30 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Throwable/throwing_stars.yml b/Resources/Prototypes/Entities/Objects/Weapons/Throwable/throwing_stars.yml index c91b63a47a..65a05e4ef3 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Throwable/throwing_stars.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Throwable/throwing_stars.yml @@ -38,9 +38,9 @@ Slash: 8 Piercing: 10 - type: StaminaDamageOnCollide - damage: 45 + damage: 30 - type: StaminaDamageOnEmbed - damage: 10 + damage: 5 - type: entity parent: ThrowingStar @@ -63,4 +63,4 @@ - state: icon map: ["base"] - type: TimedDespawn - lifetime: 30 \ No newline at end of file + lifetime: 30