diff --git a/Content.Server/Atmos/EntitySystems/BarotraumaSystem.cs b/Content.Server/Atmos/EntitySystems/BarotraumaSystem.cs index 6493abdcd88..2b8518f2174 100644 --- a/Content.Server/Atmos/EntitySystems/BarotraumaSystem.cs +++ b/Content.Server/Atmos/EntitySystems/BarotraumaSystem.cs @@ -238,7 +238,7 @@ public override void Update(float frameTime) if (pressure <= Atmospherics.HazardLowPressure) { // Deal damage and ignore resistances. Resistance to pressure damage should be done via pressure protection gear. - _damageableSystem.TryChangeDamage(uid, barotrauma.Damage * Atmospherics.LowPressureDamage, true, false, canSever: false); // backmen + _damageableSystem.TryChangeDamage(uid, barotrauma.Damage * Atmospherics.LowPressureDamage, true, false, canSever: false, partMultiplier: 0.5f); // backmen if (!barotrauma.TakingDamage) { barotrauma.TakingDamage = true; @@ -252,7 +252,7 @@ public override void Update(float frameTime) var damageScale = MathF.Min(((pressure / Atmospherics.HazardHighPressure) - 1) * Atmospherics.PressureDamageCoefficient, Atmospherics.MaxHighPressureDamage); // Deal damage and ignore resistances. Resistance to pressure damage should be done via pressure protection gear. - _damageableSystem.TryChangeDamage(uid, barotrauma.Damage * damageScale, true, false, canSever: false); // backmen + _damageableSystem.TryChangeDamage(uid, barotrauma.Damage * damageScale, true, false, canSever: false, partMultiplier: 0.5f); // backmen RaiseLocalEvent(uid, new MoodEffectEvent("MobHighPressure")); // backmen: mood if (!barotrauma.TakingDamage) diff --git a/Content.Server/Medical/DefibrillatorSystem.cs b/Content.Server/Medical/DefibrillatorSystem.cs index fdd3f7a5119..ed0b594fd49 100644 --- a/Content.Server/Medical/DefibrillatorSystem.cs +++ b/Content.Server/Medical/DefibrillatorSystem.cs @@ -8,6 +8,7 @@ using Content.Server.PowerCell; using Content.Server.Traits.Assorted; using Content.Shared.Backmen.Chat; +using Content.Shared.Backmen.Targeting; using Content.Shared.Damage; using Content.Shared.DoAfter; using Content.Shared.Interaction; @@ -201,7 +202,7 @@ public void Zap(EntityUid uid, EntityUid target, EntityUid user, DefibrillatorCo else { if (_mobState.IsDead(target, mob)) - _damageable.TryChangeDamage(target, component.ZapHeal, true, origin: uid); + _damageable.TryChangeDamage(target, component.ZapHeal, true, origin: uid, targetPart: TargetBodyPart.Torso); // backmen: surgery if (_mobThreshold.TryGetThresholdForState(target, MobState.Dead, out var threshold) && TryComp(target, out var damageableComponent) && diff --git a/Content.Server/Weapons/Ranged/Systems/GunSystem.cs b/Content.Server/Weapons/Ranged/Systems/GunSystem.cs index d22b5ec2af7..4a09c1a539a 100644 --- a/Content.Server/Weapons/Ranged/Systems/GunSystem.cs +++ b/Content.Server/Weapons/Ranged/Systems/GunSystem.cs @@ -212,7 +212,7 @@ public override void Shoot(EntityUid gunUid, GunComponent gun, List<(EntityUid? var hitName = ToPrettyString(hitEntity); if (dmg != null) - dmg = Damageable.TryChangeDamage(hitEntity, dmg, origin: user); + dmg = Damageable.TryChangeDamage(hitEntity, dmg, origin: user, canEvade: true); // backmen: surgery // check null again, as TryChangeDamage returns modified damage values if (dmg != null) diff --git a/Content.Shared/Backmen/Magic/BkmMagicSystem.cs b/Content.Shared/Backmen/Magic/BkmMagicSystem.cs index e7096c7375c..1d3eecbeb93 100644 --- a/Content.Shared/Backmen/Magic/BkmMagicSystem.cs +++ b/Content.Shared/Backmen/Magic/BkmMagicSystem.cs @@ -1,4 +1,5 @@ using Content.Shared.Backmen.Magic.Events; +using Content.Shared.Backmen.Targeting; using Content.Shared.Body.Components; using Content.Shared.Damage; @@ -22,6 +23,6 @@ private void OnHealSpell(HealSpellEvent ev) if (!HasComp(ev.Target)) return; - DamageableSystem.TryChangeDamage(ev.Target, ev.HealAmount, true, origin: ev.Target); + DamageableSystem.TryChangeDamage(ev.Target, ev.HealAmount, true, origin: ev.Target, targetPart: TargetBodyPart.All); // backmen: surgery } } diff --git a/Content.Shared/Backmen/Standing/SharedLayingDownSystem.cs b/Content.Shared/Backmen/Standing/SharedLayingDownSystem.cs index 46821ed51b4..d17b13d1fba 100644 --- a/Content.Shared/Backmen/Standing/SharedLayingDownSystem.cs +++ b/Content.Shared/Backmen/Standing/SharedLayingDownSystem.cs @@ -320,7 +320,7 @@ standingState.CurrentState is not StandingState.Lying || obj.Value, uid, PopupType.MediumCaution); - _damageable.TryChangeDamage(uid, new DamageSpecifier(){DamageDict = {{"Blunt", 5}}}, ignoreResistances: true, canEvade: true, targetPart: TargetBodyPart.Head); + _damageable.TryChangeDamage(uid, new DamageSpecifier(){DamageDict = {{"Blunt", 5}}}, ignoreResistances: true, canEvade: false, canSever: false, targetPart: TargetBodyPart.Head); _stun.TryStun(uid, TimeSpan.FromSeconds(2), true); _audioSystem.PlayPredicted(_bonkSound, uid, obj.Value); return false; diff --git a/Content.Shared/Backmen/Surgery/Body/SharedBodySystem.Targeting.cs b/Content.Shared/Backmen/Surgery/Body/SharedBodySystem.Targeting.cs index c2ec23e1194..97f1d694965 100644 --- a/Content.Shared/Backmen/Surgery/Body/SharedBodySystem.Targeting.cs +++ b/Content.Shared/Backmen/Surgery/Body/SharedBodySystem.Targeting.cs @@ -140,7 +140,7 @@ private void OnTryChangePartDamage(Entity ent, ref TryChangePartD else if (args.Origin.HasValue && _queryTargeting.TryComp(args.Origin.Value, out var targeter)) { targetPart = targeter.Target; - // If the target is Torso then have a 33% chance to hit another part + // If the target is Torso then have a 33% chance to also hit another part if (targetPart.Value == TargetBodyPart.Torso) { var additionalPart = GetRandomPartSpread(_random, 10); @@ -259,12 +259,10 @@ private void OnDamageChanged(Entity partEnt, ref DamageChange /// /// Gets the random body part rolling a number between 1 and 9, and returns /// Torso if the result is 9 or more. The higher torsoWeight is, the higher chance to return it. - /// By default, the chance to return Torso is 50%. /// private static TargetBodyPart GetRandomPartSpread(IRobustRandom random, ushort torsoWeight = 9) { const int targetPartsAmount = 9; - // 5 = amount of target parts except Torso return random.Next(1, targetPartsAmount + torsoWeight) switch { 1 => TargetBodyPart.Head, diff --git a/Content.Shared/Backmen/Surgery/Effects/Step/SurgeryDamageChangeEffectComponent.cs b/Content.Shared/Backmen/Surgery/Effects/Step/SurgeryDamageChangeEffectComponent.cs index 602433f3653..d6fbe90bd0b 100644 --- a/Content.Shared/Backmen/Surgery/Effects/Step/SurgeryDamageChangeEffectComponent.cs +++ b/Content.Shared/Backmen/Surgery/Effects/Step/SurgeryDamageChangeEffectComponent.cs @@ -10,7 +10,7 @@ public sealed partial class SurgeryDamageChangeEffectComponent : Component public DamageSpecifier Damage = default!; [DataField] - public float SleepModifier = 0.5f; + public float SleepModifier = 1.5f; [DataField] public bool IsConsumable; diff --git a/Content.Shared/Backmen/Surgery/SharedSurgerySystem.Steps.cs b/Content.Shared/Backmen/Surgery/SharedSurgerySystem.Steps.cs index cd7131e36b4..594da55028a 100644 --- a/Content.Shared/Backmen/Surgery/SharedSurgerySystem.Steps.cs +++ b/Content.Shared/Backmen/Surgery/SharedSurgerySystem.Steps.cs @@ -273,14 +273,14 @@ private void OnTendWoundsStep(Entity ent, ref // Right now the bonus is based off the body's total damage, maybe we could make it based off each part in the future. var bonus = ent.Comp.HealMultiplier * damageable.DamagePerGroup[ent.Comp.MainGroup]; if (_mobState.IsDead(args.Body)) - bonus *= 0.2; + bonus *= 1.2; var adjustedDamage = new DamageSpecifier(ent.Comp.Damage); foreach (var type in group) adjustedDamage.DamageDict[type] -= bonus; - var ev = new SurgeryStepDamageEvent(args.User, args.Body, args.Part, args.Surgery, adjustedDamage, 0.5f); + var ev = new SurgeryStepDamageEvent(args.User, args.Body, args.Part, args.Surgery, adjustedDamage, 1.5f); RaiseLocalEvent(args.Body, ref ev); } diff --git a/Content.Shared/Backmen/Targeting/TargetBodyPart.cs b/Content.Shared/Backmen/Targeting/TargetBodyPart.cs index 68162d892c0..b00306d95a1 100644 --- a/Content.Shared/Backmen/Targeting/TargetBodyPart.cs +++ b/Content.Shared/Backmen/Targeting/TargetBodyPart.cs @@ -22,9 +22,20 @@ public enum TargetBodyPart : ushort RightLeg = 1 << 9, RightFoot = 1 << 10, + LeftFullArm = LeftArm | LeftHand, + LeftFullLeg = LeftLeg | LeftFoot, + RightFullArm = RightArm | RightHand, + RightFullLeg = RightLeg | RightFoot, + Hands = LeftHand | RightHand, Arms = LeftArm | RightArm, Legs = LeftLeg | RightLeg, Feet = LeftFoot | RightFoot, + + FullArms = Arms | Hands, + FullLegs = Feet | Legs, + + BodyMiddle = Torso | Groin | FullArms, + All = Head | Torso | Groin | LeftArm | LeftHand | RightArm | RightHand | LeftLeg | LeftFoot | RightLeg | RightFoot, } diff --git a/Content.Shared/Body/Part/BodyPartComponent.cs b/Content.Shared/Body/Part/BodyPartComponent.cs index 179e0e6449e..df1c790e89f 100644 --- a/Content.Shared/Body/Part/BodyPartComponent.cs +++ b/Content.Shared/Body/Part/BodyPartComponent.cs @@ -78,7 +78,7 @@ public sealed partial class BodyPartComponent : Component, ISurgeryToolComponent /// Shitmed Change: How long it takes to run another self heal tick on the body part. /// [DataField] - public float HealingTime = 30; + public float HealingTime = 10; /// /// Shitmed Change: How long it has been since the last self heal tick on the body part. @@ -89,7 +89,7 @@ public sealed partial class BodyPartComponent : Component, ISurgeryToolComponent /// Shitmed Change: How much health to heal on the body part per tick. /// [DataField] - public float SelfHealingAmount = 5; + public float SelfHealingAmount = 0.15f; /// /// Shitmed Change: The name of the container for this body part. Used in insertion surgeries. diff --git a/Content.Shared/Chat/SharedSuicideSystem.cs b/Content.Shared/Chat/SharedSuicideSystem.cs index d341ea89a8f..2906147081e 100644 --- a/Content.Shared/Chat/SharedSuicideSystem.cs +++ b/Content.Shared/Chat/SharedSuicideSystem.cs @@ -3,6 +3,7 @@ using Content.Shared.Mobs.Components; using Robust.Shared.Prototypes; using System.Linq; +using Content.Shared.Backmen.Targeting; namespace Content.Shared.Chat; @@ -38,7 +39,7 @@ public void ApplyLethalDamage(Entity target, DamageSpecifie appliedDamageSpecifier.DamageDict[key] = Math.Ceiling((double) (value * lethalAmountOfDamage / totalDamage)); } - _damageableSystem.TryChangeDamage(target, appliedDamageSpecifier, true, origin: target); + _damageableSystem.TryChangeDamage(target, appliedDamageSpecifier, true, origin: target, targetPart: TargetBodyPart.Head); // backmen } /// @@ -62,6 +63,6 @@ public void ApplyLethalDamage(Entity target, ProtoId(args.Climber, out var physics) && physics.Mass <= component.MassLimit) return; - _damageableSystem.TryChangeDamage(args.Climber, component.ClimberDamage, origin: args.Climber); + _damageableSystem.TryChangeDamage(args.Climber, component.ClimberDamage, origin: args.Climber, targetPart: TargetBodyPart.FullLegs); // backmen: surgery _damageableSystem.TryChangeDamage(uid, component.TableDamage, origin: args.Climber); _stunSystem.TryParalyze(args.Climber, TimeSpan.FromSeconds(component.StunTime), true); diff --git a/Content.Shared/Clumsy/ClumsySystem.cs b/Content.Shared/Clumsy/ClumsySystem.cs index e034458197f..14a0f1864a8 100644 --- a/Content.Shared/Clumsy/ClumsySystem.cs +++ b/Content.Shared/Clumsy/ClumsySystem.cs @@ -1,3 +1,4 @@ +using Content.Shared.Backmen.Targeting; using Content.Shared.CCVar; using Content.Shared.Chemistry.Hypospray.Events; using Content.Shared.Climbing.Components; @@ -137,7 +138,7 @@ public void HitHeadClumsy(Entity target, EntityUid table) { stunTime = bonkComp.BonkTime; if (bonkComp.BonkDamage != null) - _damageable.TryChangeDamage(target, bonkComp.BonkDamage, true); + _damageable.TryChangeDamage(target, bonkComp.BonkDamage, true, targetPart: TargetBodyPart.Head); } _stun.TryParalyze(target, stunTime, true); diff --git a/Content.Shared/Damage/Systems/DamageOnAttackedSystem.cs b/Content.Shared/Damage/Systems/DamageOnAttackedSystem.cs index 29de43fba4a..c511a0cab2e 100644 --- a/Content.Shared/Damage/Systems/DamageOnAttackedSystem.cs +++ b/Content.Shared/Damage/Systems/DamageOnAttackedSystem.cs @@ -73,7 +73,7 @@ private void OnAttacked(Entity entity, ref AttackedEv } } - totalDamage = _damageableSystem.TryChangeDamage(args.User, totalDamage, entity.Comp.IgnoreResistances, origin: entity); + totalDamage = _damageableSystem.TryChangeDamage(args.User, totalDamage, entity.Comp.IgnoreResistances, origin: entity, canEvade: true); if (totalDamage != null && totalDamage.AnyPositive()) { diff --git a/Content.Shared/Damage/Systems/DamageOnInteractSystem.cs b/Content.Shared/Damage/Systems/DamageOnInteractSystem.cs index 1bbc2d8080b..3f7245f0c35 100644 --- a/Content.Shared/Damage/Systems/DamageOnInteractSystem.cs +++ b/Content.Shared/Damage/Systems/DamageOnInteractSystem.cs @@ -68,8 +68,8 @@ private void OnHandInteract(Entity entity, ref Intera { targetPart = hands.ActiveHand.Location switch { - HandLocation.Left => TargetBodyPart.LeftArm, - HandLocation.Right => TargetBodyPart.RightArm, + HandLocation.Left => TargetBodyPart.LeftFullArm, + HandLocation.Right => TargetBodyPart.RightFullArm, _ => null }; } diff --git a/Content.Shared/Doors/Systems/SharedDoorSystem.cs b/Content.Shared/Doors/Systems/SharedDoorSystem.cs index 69905d1bd6b..136f2663a3a 100644 --- a/Content.Shared/Doors/Systems/SharedDoorSystem.cs +++ b/Content.Shared/Doors/Systems/SharedDoorSystem.cs @@ -2,6 +2,7 @@ using Content.Shared.Access.Components; using Content.Shared.Access.Systems; using Content.Shared.Administration.Logs; +using Content.Shared.Backmen.Targeting; using Content.Shared.Damage; using Content.Shared.Database; using Content.Shared.Doors.Components; @@ -542,7 +543,7 @@ public void Crush(EntityUid uid, DoorComponent? door = null, PhysicsComponent? p { door.CurrentlyCrushing.Add(entity); if (door.CrushDamage != null) - _damageableSystem.TryChangeDamage(entity, door.CrushDamage, origin: uid); + _damageableSystem.TryChangeDamage(entity, door.CrushDamage, origin: uid, targetPart: TargetBodyPart.BodyMiddle); // backmen: surgery _stunSystem.TryParalyze(entity, stunTime, true); } diff --git a/Resources/Prototypes/Body/Parts/base.yml b/Resources/Prototypes/Body/Parts/base.yml index 57f239b891a..7505813574e 100644 --- a/Resources/Prototypes/Body/Parts/base.yml +++ b/Resources/Prototypes/Body/Parts/base.yml @@ -30,13 +30,13 @@ - trigger: !type:DamageTypeTrigger damageType: Blunt - damage: 75 + damage: 120 behaviors: - !type:GibPartBehavior { } - trigger: !type:DamageTypeTrigger damageType: Slash - damage: 100 + damage: 120 behaviors: - !type:GibPartBehavior { } - trigger: diff --git a/Resources/Prototypes/Body/Parts/skeleton.yml b/Resources/Prototypes/Body/Parts/skeleton.yml index 849d84b8a18..058ee29db1d 100644 --- a/Resources/Prototypes/Body/Parts/skeleton.yml +++ b/Resources/Prototypes/Body/Parts/skeleton.yml @@ -23,13 +23,13 @@ - trigger: !type:DamageTypeTrigger damageType: Blunt - damage: 75 + damage: 120 behaviors: - !type:GibPartBehavior { } - trigger: !type:DamageTypeTrigger damageType: Slash - damage: 100 + damage: 120 behaviors: - !type:GibPartBehavior { } - trigger: diff --git a/Resources/Prototypes/_Backmen/Body/Parts/harpy.yml b/Resources/Prototypes/_Backmen/Body/Parts/harpy.yml index a7e915cb2ec..65f0bf3fedb 100644 --- a/Resources/Prototypes/_Backmen/Body/Parts/harpy.yml +++ b/Resources/Prototypes/_Backmen/Body/Parts/harpy.yml @@ -28,13 +28,13 @@ - trigger: !type:DamageTypeTrigger damageType: Blunt - damage: 110 + damage: 120 behaviors: - !type:GibPartBehavior { } - trigger: !type:DamageTypeTrigger damageType: Slash - damage: 150 + damage: 120 behaviors: - !type:GibPartBehavior { } - trigger: diff --git a/Resources/Prototypes/_Backmen/Body/Parts/shadowkin.yml b/Resources/Prototypes/_Backmen/Body/Parts/shadowkin.yml index f1792b46530..a87aca23e4f 100644 --- a/Resources/Prototypes/_Backmen/Body/Parts/shadowkin.yml +++ b/Resources/Prototypes/_Backmen/Body/Parts/shadowkin.yml @@ -29,13 +29,13 @@ - trigger: !type:DamageTypeTrigger damageType: Blunt - damage: 75 + damage: 120 behaviors: - !type:GibPartBehavior { } - trigger: !type:DamageTypeTrigger damageType: Slash - damage: 100 + damage: 120 behaviors: - !type:GibPartBehavior { } - trigger: