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

63 lines
1.9 KiB
Ucode
Raw Permalink Normal View History

2020-12-13 15:01:13 +00:00
//=============================================================================
// KFDT_Dart_Toxic
//=============================================================================
// Toxic Dart DamageType
//=============================================================================
// Killing Floor 2
// Copyright (C) 2015 Tripwire Interactive LLC
// John "Ramm-Jaeger" Gibson
//=============================================================================
class KFDT_Dart_Toxic extends KFDT_Toxic
abstract
hidedropdown;
2023-09-21 19:31:11 +00:00
/** Called when damage is dealt to apply additional instant damage */
static function ModifyInstantDamage( KFPawn Victim, out int DamageTaken, optional Controller InstigatedBy )
{
class'KFDT_Dart_Toxic'.static.GetMedicToxicDmgType( DamageTaken, InstigatedBy );
}
/** 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 )
{
local class<KFDamageType> ToxicDT;
ToxicDT = class'KFDT_Dart_Toxic'.static.GetMedicToxicDmgType( DamageTaken, InstigatedBy );
if ( ToxicDT != None )
{
Victim.ApplyDamageOverTime(DamageTaken, InstigatedBy, ToxicDT);
}
}
/**
* Allows medic perk to add poison damage
*/
static function class<KFDamageType> GetMedicToxicDmgType( out int out_Damage, optional Controller InstigatedBy )
{
local KFPerk InstigatorPerk;
InstigatorPerk = KFPlayerController(InstigatedBy).GetPerk();
if( InstigatorPerk == none || (!InstigatorPerk.IsToxicDmgActive() && !InstigatorPerk.IsZedativeActive()) )
{
return None;
}
InstigatorPerk.ModifyToxicDmg( out_Damage );
return InstigatorPerk.GetToxicDmgTypeClass();
}
2020-12-13 15:01:13 +00:00
defaultproperties
{
WeaponDef=class'KFWeapDef_Healer'
2023-09-21 19:31:11 +00:00
DoT_Type=DOT_None
DoT_Duration=0.0
DoT_Interval=0.0
DoT_DamageScale=0.0
PoisonPower=0.f
2020-12-13 15:01:13 +00:00
}