X2CommunityCore / X2WOTCCommunityHighlander

https://steamcommunity.com/workshop/filedetails/?id=1134256495
MIT License
60 stars 69 forks source link

Whiplash can do more damage than intended if assigned to a weapon #1386

Open faanlez opened 2 months ago

faanlez commented 2 months ago

Skirmisher Whiplash has a damage value specified in code but not bIgnoreBaseDamage. This is not a problem in base game because it is not assigned to a weapon slot in Skirmisher class data. But mods often assign it to a weapon slot when they assume it's a ripjack ability and this causes it to additionally do the weapon's damage in both damage effects on it.

WeaponDamageEffect = new class'X2Effect_ApplyWeaponDamage';
WeaponDamageEffect.EffectDamageValue = default.WHIPLASH_BASEDAMAGE;
Template.AddTargetEffect(WeaponDamageEffect);

// Jwats: Double damage for robotic
WeaponDamageEffect = new class'X2Effect_ApplyWeaponDamage';
WeaponDamageEffect.bIgnoreArmor = true;     //  armor was applied the first time, don't let it be applied the second time as well -jbouscher
WeaponDamageEffect.EffectDamageValue = default.WHIPLASH_BASEDAMAGE;
UnitPropertyCondition = new class'X2Condition_UnitProperty';
UnitPropertyCondition.ExcludeRobotic = false;
UnitPropertyCondition.ExcludeOrganic = true;
WeaponDamageEffect.TargetConditions.AddItem(UnitPropertyCondition);
Template.AddTargetEffect(WeaponDamageEffect);

Suggested fix: add bIgnoreBaseDamage = true to both of these damage effects.

Iridar commented 2 months ago

Bit of a grey area.

On one hand, Highlander isn't meant to be the place for preventive fixes for issues that occur only when people shoot themselves in the foot.

On two hand, this fix doesn't alter base game behavior.

A case can be made that this change would be potentially breaking for mods that specifically rely for this fix to not be there, but ehhh that'd be MrNice / Xym's level of cautious.

Overall I'm about 3/10 on being convinced this should be fixed in Highlander.