pseudogrine Posted February 23, 2016 Share Posted February 23, 2016 Anyone know where the ability 'standardshot' applies weapon damage? static function X2AbilityTemplate Add_StandardShot( Name AbilityName='StandardShot') in X2Ability_WeaponCommon.uc does not appear to use the effect ApplyWeaponDamage at all, except for miss damage (IE stock attachments). The secondary weapons do clearly use ApplyWeaponDamage WeaponDamageEffect = new class'X2Effect_ApplyWeaponDamage'; Template.AddTargetEffect(WeaponDamageEffect); But I cannot for the life of me figure out what StandardShot, StandardShot_NoEnd and SniperStandardShot are using to calculate and apply damage. Any help would be greatly appreciated. Link to comment Share on other sites More sharing options...
Ghostlines Posted February 23, 2016 Share Posted February 23, 2016 (edited) Answered on your reddit thread, copying and pasting my answer here: Notice the Shredder effect is added as a target effect. Check out X2Effect_Shredder. Notice it extends X2Effect_ApplyWeaponDamage, so it does everything its super class does, plus whatever else is in the class. If you read the code for the only new function here, GetBonusEffectDamageValue(), you'll notice the bonus damage only gets applied when the soldier has the Shredder ability. So while it may seem a little weird, the intent was for the standard shot damage (which happens as expected, since the shredder effect IS an ApplyWeaponDamage effect) to automatically include shredder bonus damage, if the soldier had that ability. Secondary weapons aren't using this, so no secondary weapons can benefit from the shredder bonus damage. Edited February 23, 2016 by Ghostlines Link to comment Share on other sites More sharing options...
pseudogrine Posted February 23, 2016 Author Share Posted February 23, 2016 Ghostlines is absolutely correct. Thank you. Link to comment Share on other sites More sharing options...
Recommended Posts