Skip to content

Commit 1fbf6e1

Browse files
committed
Merge #461 (cannonfodder1:ConfigMinDamage)
2 parents 3ab98db + d29acdb commit 1fbf6e1

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ All notable changes to Vanilla 'War Of The Chosen' Behaviour will be documented
119119
applied to targets (#89)
120120
- Added ability to prevent multi-part missions counting as separate missions
121121
for will loss purposes (#44)
122+
- Added option to mitigate all weapon damage using armor instead of always taking at
123+
least 1 damage (#321)
122124

123125
### Modding Exposures
124126
- Deprivatise variables to protected in XComIdleAnimationStateMachine to allow

X2WOTCCommunityHighlander/Config/XComGameCore.ini

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,10 @@
1515
+PlayerTurnOrder=eTeam_Two
1616

1717
[XComGame.X2AbilityToHitCalc_StandardAim]
18-
;+CritUpgradesThatDontUseEffects="MyFancyTemplateName" ;For modders to use to specify upgrades in their mods that use Issue #237 functionality
18+
;+CritUpgradesThatDontUseEffects="MyFancyTemplateName" ;For modders to use to specify upgrades in their mods that use Issue #237 functionality
19+
20+
; Issue 321
21+
; Set to false/commented out (vanilla behaviour) if you want to still damage the target by 1 even if armor is more than incoming damage
22+
; Set to true/uncomment it if you want damage that is less than target armor to be completely neutralized
23+
[XComGame.X2Effect_ApplyWeaponDamage]
24+
;+NO_MINIMUM_DAMAGE=true

X2WOTCCommunityHighlander/Src/XComGame/Classes/X2Effect_ApplyWeaponDamage.uc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ var bool bIgnoreArmor;
1919
var bool bBypassSustainEffects;
2020
var array<name> HideVisualizationOfResultsAdditional;
2121

22+
// Issue #321
23+
var config bool NO_MINIMUM_DAMAGE;
24+
2225
// These values are extra amount an ability may add or apply directly
2326
var WeaponDamageValue EffectDamageValue;
2427
var int EnvironmentalDamageAmount;
@@ -1036,7 +1039,8 @@ simulated function int CalculateDamageAmount(const out EffectAppliedData ApplyEf
10361039
ArmorMitigation -= ArmorPiercing;
10371040
if (ArmorMitigation < 0)
10381041
ArmorMitigation = 0;
1039-
if (ArmorMitigation >= WeaponDamage)
1042+
// Issue #321
1043+
if (ArmorMitigation >= WeaponDamage && !default.NO_MINIMUM_DAMAGE)
10401044
ArmorMitigation = WeaponDamage - 1;
10411045
if (ArmorMitigation < 0) // WeaponDamage could have been 0
10421046
ArmorMitigation = 0;

0 commit comments

Comments
 (0)