From f41e39410dfb7cba5d7a337f927436bc28a7bb8a Mon Sep 17 00:00:00 2001 From: ancientpower Date: Mon, 31 Aug 2020 12:11:22 -0500 Subject: [PATCH] Tweaks damage types and classes (#1969) Co-authored-by: ancientpower --- Content.Server/Chat/ChatCommands.cs | 9 ++- .../Interfaces/GameObjects/ISuicideAct.cs | 11 ++-- Content.Shared/Damage/DamageClass.cs | 12 ++-- Content.Shared/Damage/DamageType.cs | 25 +++++--- .../Prototypes/Damage/damage_containers.yml | 1 + .../Prototypes/Damage/resistance_sets.yml | 64 +++++++++++++------ 6 files changed, 82 insertions(+), 40 deletions(-) diff --git a/Content.Server/Chat/ChatCommands.cs b/Content.Server/Chat/ChatCommands.cs index a309a344f0..302d0add91 100644 --- a/Content.Server/Chat/ChatCommands.cs +++ b/Content.Server/Chat/ChatCommands.cs @@ -139,12 +139,15 @@ namespace Content.Server.Chat damageableComponent.ChangeDamage(kind switch { SuicideKind.Blunt => DamageType.Blunt, + SuicideKind.Slash => DamageType.Slash, SuicideKind.Piercing => DamageType.Piercing, SuicideKind.Heat => DamageType.Heat, - SuicideKind.Disintegration => DamageType.Disintegration, - SuicideKind.Cellular => DamageType.Cellular, - SuicideKind.DNA => DamageType.DNA, + SuicideKind.Shock => DamageType.Shock, + SuicideKind.Cold => DamageType.Cold, + SuicideKind.Poison => DamageType.Poison, + SuicideKind.Radiation => DamageType.Radiation, SuicideKind.Asphyxiation => DamageType.Asphyxiation, + SuicideKind.Bloodloss => DamageType.Bloodloss, _ => DamageType.Blunt }, 500, diff --git a/Content.Server/Interfaces/GameObjects/ISuicideAct.cs b/Content.Server/Interfaces/GameObjects/ISuicideAct.cs index 78d0d9974f..a23353adac 100644 --- a/Content.Server/Interfaces/GameObjects/ISuicideAct.cs +++ b/Content.Server/Interfaces/GameObjects/ISuicideAct.cs @@ -14,12 +14,15 @@ namespace Content.Server.Interfaces.GameObjects //Damage type suicides Blunt, + Slash, Piercing, Heat, - Disintegration, - Cellular, - DNA, - Asphyxiation + Shock, + Cold, + Poison, + Radiation, + Asphyxiation, + Bloodloss } } diff --git a/Content.Shared/Damage/DamageClass.cs b/Content.Shared/Damage/DamageClass.cs index 393b999486..406dc8bb73 100644 --- a/Content.Shared/Damage/DamageClass.cs +++ b/Content.Shared/Damage/DamageClass.cs @@ -12,7 +12,8 @@ namespace Content.Shared.Damage Brute, Burn, Toxin, - Airloss + Airloss, + Genetic } public static class DamageClassExtensions @@ -20,10 +21,11 @@ namespace Content.Shared.Damage private static readonly ImmutableDictionary> ClassToType = new Dictionary> { - {DamageClass.Brute, new List {DamageType.Blunt, DamageType.Piercing}}, - {DamageClass.Burn, new List {DamageType.Heat, DamageType.Disintegration}}, - {DamageClass.Toxin, new List {DamageType.Cellular, DamageType.DNA}}, - {DamageClass.Airloss, new List {DamageType.Asphyxiation}} + {DamageClass.Brute, new List {DamageType.Blunt, DamageType.Slash, DamageType.Piercing}}, + {DamageClass.Burn, new List {DamageType.Heat, DamageType.Shock, DamageType.Cold}}, + {DamageClass.Toxin, new List {DamageType.Poison, DamageType.Radiation}}, + {DamageClass.Airloss, new List {DamageType.Asphyxiation, DamageType.Bloodloss}}, + {DamageClass.Genetic, new List {DamageType.Cellular}} }.ToImmutableDictionary(); public static List ToTypes(this DamageClass @class) diff --git a/Content.Shared/Damage/DamageType.cs b/Content.Shared/Damage/DamageType.cs index 96cfb2eecb..0de82925f7 100644 --- a/Content.Shared/Damage/DamageType.cs +++ b/Content.Shared/Damage/DamageType.cs @@ -10,12 +10,16 @@ namespace Content.Shared.Damage public enum DamageType { Blunt, + Slash, Piercing, Heat, - Disintegration, - Cellular, - DNA, - Asphyxiation + Shock, + Cold, + Poison, + Radiation, + Asphyxiation, + Bloodloss, + Cellular } public static class DamageTypeExtensions @@ -25,12 +29,17 @@ namespace Content.Shared.Damage new Dictionary { {DamageType.Blunt, DamageClass.Brute}, + {DamageType.Slash, DamageClass.Brute}, {DamageType.Piercing, DamageClass.Brute}, {DamageType.Heat, DamageClass.Burn}, - {DamageType.Disintegration, DamageClass.Burn}, - {DamageType.Cellular, DamageClass.Toxin}, - {DamageType.DNA, DamageClass.Toxin}, - {DamageType.Asphyxiation, DamageClass.Airloss} + {DamageType.Shock, DamageClass.Burn}, + {DamageType.Cold, DamageClass.Burn}, + {DamageType.Poison, DamageClass.Toxin}, + {DamageType.Radiation, DamageClass.Toxin}, + {DamageType.Asphyxiation, DamageClass.Airloss}, + {DamageType.Bloodloss, DamageClass.Airloss}, + {DamageType.Cellular, DamageClass.Genetic } + }.ToImmutableDictionary(); public static DamageClass ToClass(this DamageType type) diff --git a/Resources/Prototypes/Damage/damage_containers.yml b/Resources/Prototypes/Damage/damage_containers.yml index bb950b47f1..5fad0c557c 100644 --- a/Resources/Prototypes/Damage/damage_containers.yml +++ b/Resources/Prototypes/Damage/damage_containers.yml @@ -5,6 +5,7 @@ - Burn - Toxin - Airloss + - Genetic - type: damageContainer id: metallicDamageContainer diff --git a/Resources/Prototypes/Damage/resistance_sets.yml b/Resources/Prototypes/Damage/resistance_sets.yml index 5b829d48df..47fe96ef92 100644 --- a/Resources/Prototypes/Damage/resistance_sets.yml +++ b/Resources/Prototypes/Damage/resistance_sets.yml @@ -2,55 +2,79 @@ id: defaultResistances coefficients: Blunt: 1.0 + Slash: 1.0 Piercing: 1.0 Heat: 1.0 - Disintegration: 1.0 - Cellular: 1.0 - DNA: 1.0 + Shock: 1.0 + Cold: 1.0 + Poison: 1.0 + Radiation: 1.0 Asphyxiation: 1.0 + Bloodloss: 1.0 + Cellular: 1.0 flatReductions: Blunt: 0 + Slash: 0 Piercing: 0 Heat: 0 - Disintegration: 0 + Shock: 0 + Cold: 0 + Poison: 0 + Radiation: 0 + Asphyxiation: 0 + Bloodloss: 0 Cellular: 0 - DNA: 0 - Asphyxiation: 0 - type: resistanceSet id: dionaResistances coefficients: Blunt: 0.5 + Slash: 1.2 Piercing: 0.7 Heat: 1.8 - Disintegration: 1.8 - Cellular: 1.0 - DNA: 1.0 + Shock: 0.5 + Cold: 1.5 + Poison: 0.8 + Radiation: 0 Asphyxiation: 1.0 + Bloodloss: 1.0 + Cellular: 1.0 flatReductions: Blunt: 0 + Slash: 0 Piercing: 0 Heat: 0 - Disintegration: 0 - Cellular: 0 - DNA: 0 + Shock: 0 + Cold: 0 + Poison: 0 + Radiation: 0 Asphyxiation: 0 + Bloodloss: 0 + Cellular: 0 - type: resistanceSet id: metallicResistances coefficients: Blunt: 0.7 + Slash: 0.5 Piercing: 0.7 Heat: 1.0 - Disintegration: 1.0 - Cellular: 0.0 - DNA: 0.0 - Asphyxiation: 0.0 + Shock: 1.2 + Cold: 0 + Poison: 0 + Radiation: 0 + Asphyxiation: 0 + Bloodloss: 0 + Cellular: 0 flatReductions: Blunt: 0 + Slash: 0 Piercing: 0 Heat: 0 - Disintegration: 0 - Cellular: 0 - DNA: 0 - Asphyxiation: 0 \ No newline at end of file + Shock: 0 + Cold: 0 + Poison: 0 + Radiation: 0 + Asphyxiation: 0 + Bloodloss: 0 + Cellular: 0 \ No newline at end of file