1
0
KF2-Dev-Scripts/KFGameContent/Classes/KFDT_Piercing_IonThrusterStab.uc

56 lines
1.9 KiB
Ucode
Raw Normal View History

2020-12-13 15:01:13 +00:00
//=============================================================================
// KFDT_Piercing_IonThruster
//=============================================================================
// Killing Floor 2
// Copyright (C) 2017 Tripwire Interactive LLC
//=============================================================================
class KFDT_Piercing_IonThrusterStab extends KFDT_Piercing
2020-12-13 15:09:05 +00:00
abstract;
2020-12-13 15:01:13 +00:00
// Damage type to use for the burning damage over time
var class<KFDamageType> BurnDamageType;
/** Play damage type specific impact effects when taking damage */
static function PlayImpactHitEffects(KFPawn P, vector HitLocation, vector HitDirection, byte HitZoneIndex, optional Pawn HitInstigator)
{
// Play burn effect when dead
if (P.bPlayedDeath && P.WorldInfo.TimeSeconds > P.TimeOfDeath)
{
default.BurnDamageType.static.PlayImpactHitEffects(P, HitLocation, HitDirection, HitZoneIndex, HitInstigator);
return;
}
super.PlayImpactHitEffects(P, HitLocation, HitDirection, HitZoneIndex, HitInstigator);
}
/** Called when damage is dealt to apply additional damage type (e.g. Damage Over Time) */
static function ApplySecondaryDamage(KFPawn Victim, int DamageTaken, optional Controller InstigatedBy)
{
// Overriden to specific a different damage type to do the burn damage over
// time. We do this so we don't get shotgun pellet impact sounds/fx during
// the DOT burning.
if (default.BurnDamageType.default.DoT_Type != DOT_None)
{
Victim.ApplyDamageOverTime(DamageTaken, InstigatedBy, default.BurnDamageType);
}
}
defaultproperties
{
// Physics
KDamageImpulse=200
KDeathUpKick=250
// Afflictions
MeleeHitPower=100
BurnPower=25
BurnDamageType = class'KFDT_Fire_IonThrusterDoT'
EffectGroup=FXG_Slashing_Ion
GoreDamageGroup=DGT_Fire
WeaponDef=class'KFWeapDef_IonThruster'
ModifierPerkList(0)=class'KFPerk_Berserker'
}