diff --git a/About/About.xml b/About/About.xml index b3541a641f..6f063c7d1b 100644 --- a/About/About.xml +++ b/About/About.xml @@ -6,5 +6,5 @@
  • 1.0
  • https://ludeon.com/forums/index.php?topic=33461.0 - Version: 1.0.1.6a\n\nExtends combat mechanics to make them deeper and more tactical. + Version: 1.0.1.7\n\nExtends combat mechanics to make them deeper and more tactical. diff --git a/About/Manifest.xml b/About/Manifest.xml index 55189b3da0..e5aa6d0454 100644 --- a/About/Manifest.xml +++ b/About/Manifest.xml @@ -1,7 +1,7 @@ CombatExtended - 1.0.1.6a + 1.0.1.7 diff --git a/About/ModSync.xml b/About/ModSync.xml index 483a4edbb2..f60855b377 100644 --- a/About/ModSync.xml +++ b/About/ModSync.xml @@ -2,7 +2,7 @@ 32418f60-269c-4a70-ae6e-a51d7a34cb2f Combat Extended - 1.0.1.6a + 1.0.1.7 False NoImageAvailable diff --git a/Assemblies/CombatExtended.dll b/Assemblies/CombatExtended.dll index a46a307440..e0117f31fc 100644 Binary files a/Assemblies/CombatExtended.dll and b/Assemblies/CombatExtended.dll differ diff --git a/Defs/Ammo/Rifle/762x39mmSoviet.xml b/Defs/Ammo/Rifle/762x39mmSoviet.xml index fd40accecd..3e617db458 100644 --- a/Defs/Ammo/Rifle/762x39mmSoviet.xml +++ b/Defs/Ammo/Rifle/762x39mmSoviet.xml @@ -148,7 +148,7 @@ 17 - 7 + 6 41.08 @@ -162,7 +162,7 @@ 10 - 14 + 12 41.08 @@ -176,7 +176,7 @@ 21 - 4 + 3 41.08 @@ -186,7 +186,7 @@ 10 - 14 + 12 41.08
  • @@ -202,7 +202,7 @@ 17 - 7 + 6 41.08
  • @@ -218,7 +218,7 @@ 8 - 25 + 21 53.36 216 diff --git a/Defs/Ammo/Rifle/762x51mmNATO.xml b/Defs/Ammo/Rifle/762x51mmNATO.xml index 9d2c5408e3..08c5be1803 100644 --- a/Defs/Ammo/Rifle/762x51mmNATO.xml +++ b/Defs/Ammo/Rifle/762x51mmNATO.xml @@ -143,7 +143,7 @@ 20 - 6 + 7 66.72 @@ -153,7 +153,7 @@ 12 - 12 + 14 66.72 @@ -163,7 +163,7 @@ 25 - 3 + 4 66.72 @@ -173,7 +173,7 @@ 12 - 12 + 14 66.72
  • @@ -189,7 +189,7 @@ 20 - 6 + 7 66.72
  • @@ -205,7 +205,7 @@ 10 - 21 + 25 86.28 252 diff --git a/Languages/English/Keyed/ModMenu.xml b/Languages/English/Keyed/ModMenu.xml index eb1ea953f0..aed75eff17 100644 --- a/Languages/English/Keyed/ModMenu.xml +++ b/Languages/English/Keyed/ModMenu.xml @@ -16,6 +16,9 @@ Allow hunting with melee weapons Hunters will still be allowed to hunt if they have a melee weapon equipped. + + Smoke effects + Fire generates dangerous black smoke clouds, causing health complications to anyone not wearing protective gear. diff --git a/Patches/Core/Stats/Stats.xml b/Patches/Core/Stats/Stats.xml index 1c8e3ebac1..e5602863c5 100644 --- a/Patches/Core/Stats/Stats.xml +++ b/Patches/Core/Stats/Stats.xml @@ -91,14 +91,14 @@ Defs/StatDef[defName = "ArmorRating_Sharp"]/description - The chance to affect sharp damage like bullets, knife stabs, explosions, and animal bites.\n\nUpon taking damage, the attack's armor penetration value is compared against this armor rating.\n\nDamage is scaled based on the ratio of penetration to armor, where post-armor damage is 50% if both values are equal, 0% if penetration is half or less of armor and 100% if it is twice the value of armor.\n\nArmor penetration is scaled by the same factor, making it harder to penetrate subsequent layers of armor.\n\nAfterwards, the attack has to pass a deflection check, where the remaining armor penetration is randomized by +-0.05 and compared against the armor. If the randomized penetration value is higher than the armor value it will penetrate, else it will be converted into blunt damage and checked again against this apparel's blunt armor. + Mitigation effect on sharp damage such as bullets, knife stabs, and animal bites.\n\nThis armor rating is compared against an attack's armor penetration, with deflection occurring if armor is the higher stat. Otherwise, armor penetration has the armor rating subtracted from it, and damage is reduced by the ratio of modified to initial AP, as follows:\n\nModifiedAP = InitialAP - ArmorRating\nModifiedDamage = InitialDamage * (ModifiedAP / InitialAP)\n\nThese reductions apply for each layer the attack goes through, lowering its ability to penetrate and damage subsequent layers. If an attack is deflected, it's converted to blunt, and checked against the apparel's blunt armor rating. Defs/StatDef[defName = "ArmorRating_Blunt"]/description - The chance to affect sharp damage like bullets, knife stabs, explosions, and animal bites.\n\nUpon taking damage, the attack's armor penetration value is compared against this armor rating.\n\nDamage is scaled based on the ratio of penetration to armor, where post-armor damage is 50% if both values are equal, 0% if penetration is half or less of armor and 100% if it is twice the value of armor.\n\nArmor penetration is scaled by the same factor, making it harder to penetrate subsequent layers of armor. + Mitigation effect on blunt-force damage such as maces, explosions, and animal hoofs.\n\nThis armor rating is compared against an attack's armor penetration, with no damage occurring if armor is the higher stat. Otherwise, armor penetration has the armor rating subtracted from it, and damage is reduced by the ratio of modified to initial AP, as follows:\n\nModifiedAP = InitialAP - ArmorRating\nModifiedDamage = InitialDamage * (ModifiedAP / InitialAP)\n\nThese reductions apply for each layer the attack goes through, lowering its ability to penetrate and damage subsequent layers. diff --git a/Source/CombatExtended/CombatExtended.csproj b/Source/CombatExtended/CombatExtended.csproj index 5bed96ffb5..6fcf588b27 100644 --- a/Source/CombatExtended/CombatExtended.csproj +++ b/Source/CombatExtended/CombatExtended.csproj @@ -302,6 +302,7 @@ + @@ -311,6 +312,7 @@ + diff --git a/Source/CombatExtended/CombatExtended/Settings.cs b/Source/CombatExtended/CombatExtended/Settings.cs index c277801384..f42b778ba3 100644 --- a/Source/CombatExtended/CombatExtended/Settings.cs +++ b/Source/CombatExtended/CombatExtended/Settings.cs @@ -16,10 +16,12 @@ public class Settings : ModSettings private bool showCasings = true; private bool showTaunts = true; private bool allowMeleeHunting = false; + private bool smokeEffects = true; public bool ShowCasings => showCasings; public bool ShowTaunts => showTaunts; public bool AllowMeleeHunting => allowMeleeHunting; + public bool SmokeEffects => smokeEffects; public bool ShowTutorialPopup = true; @@ -67,6 +69,7 @@ public override void ExposeData() Scribe_Values.Look(ref showCasings, "showCasings", true); Scribe_Values.Look(ref showTaunts, "showTaunts", true); Scribe_Values.Look(ref allowMeleeHunting, "allowMeleeHunting", false); + Scribe_Values.Look(ref smokeEffects, "smokeEffects", true); #if DEBUG // Debug settings @@ -107,6 +110,7 @@ public void DoWindowContents(Rect canvas) list.CheckboxLabeled("CE_Settings_ShowCasings_Title".Translate(), ref showCasings, "CE_Settings_ShowCasings_Desc".Translate()); list.CheckboxLabeled("CE_Settings_ShowTaunts_Title".Translate(), ref showTaunts, "CE_Settings_ShowTaunts_Desc".Translate()); list.CheckboxLabeled("CE_Settings_AllowMeleeHunting_Title".Translate(), ref allowMeleeHunting, "CE_Settings_AllowMeleeHunting_Desc".Translate()); + list.CheckboxLabeled("CE_Settings_SmokeEffects_Title".Translate(), ref smokeEffects, "CE_Settings_SmokeEffects_Desc".Translate()); #if DEBUG // Do Debug settings diff --git a/Source/CombatExtended/CombatExtended/Things/Smoke.cs b/Source/CombatExtended/CombatExtended/Things/Smoke.cs index a7970a4eb5..72457b45ae 100644 --- a/Source/CombatExtended/CombatExtended/Things/Smoke.cs +++ b/Source/CombatExtended/CombatExtended/Things/Smoke.cs @@ -11,7 +11,7 @@ public class Smoke : Gas private int _ticksUntilMove; private const int BaseTicksUntilMove = 40; private const int TicksUntilMoveDelta = 20; - private const float InhalationPerSec = 0.0075f / GenTicks.TicksPerRealSecond; + private const float InhalationPerSec = 0.0150f / GenTicks.TicksPerRealSecond; public override void ExposeData() { @@ -84,12 +84,12 @@ private void ApplyHediffs() return; var pawns = Position.GetThingList(Map).Where(t => t is Pawn).ToList(); - foreach (var cell in GenAdjFast.AdjacentCells8Way(Position)) - { - if (!cell.InBounds(Map)) - continue; - pawns.AddRange(cell.GetThingList(Map).Where(t => t is Pawn)); - } + //foreach (var cell in GenAdjFast.AdjacentCells8Way(Position)) + //{ + // if (!cell.InBounds(Map)) + // continue; + // pawns.AddRange(cell.GetThingList(Map).Where(t => t is Pawn)); + //} foreach (Pawn pawn in pawns) { diff --git a/Source/CombatExtended/Harmony/Harmony-Fire.cs b/Source/CombatExtended/Harmony/Harmony-Fire.cs index 84d612e4ac..c6b5aa4174 100644 --- a/Source/CombatExtended/Harmony/Harmony-Fire.cs +++ b/Source/CombatExtended/Harmony/Harmony-Fire.cs @@ -84,6 +84,7 @@ internal static IEnumerable Transpiler(IEnumerable 0) + { + int smokeCount = __instance?.ListerThings?.AllThings?.Where(t => t is Smoke)?.Count() ?? 0; + if (smokeCount > 0) + { + __result = Danger.Deadly; + } + } + } + } +}