2017-10-20 02:00:49 +00:00
|
|
|
Class Ext_PerkBerserker extends Ext_PerkBase;
|
|
|
|
|
|
|
|
var float VampRegenRate,ZedTimeMeleeAtkRate;
|
|
|
|
|
|
|
|
replication
|
|
|
|
{
|
|
|
|
// Things the server should send to the client.
|
2020-11-28 20:04:55 +00:00
|
|
|
if (true)
|
2017-10-20 02:00:49 +00:00
|
|
|
ZedTimeMeleeAtkRate;
|
|
|
|
}
|
|
|
|
|
2020-11-28 20:04:55 +00:00
|
|
|
simulated function ModifyMeleeAttackSpeed(out float InDuration)
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
|
|
|
InDuration *= Modifiers[4];
|
2020-11-28 20:12:58 +00:00
|
|
|
if (ZedTimeMeleeAtkRate<1.f && WorldInfo.TimeDilation<1.f)
|
2017-10-20 02:00:49 +00:00
|
|
|
InDuration *= ZedTimeMeleeAtkRate;
|
|
|
|
}
|
2020-11-28 21:54:57 +00:00
|
|
|
|
2020-11-28 20:04:55 +00:00
|
|
|
simulated function ModifyRateOfFire(out float InRate, KFWeapon KFW)
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
2020-11-28 20:12:58 +00:00
|
|
|
if (IsWeaponOnPerk(KFW))
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
|
|
|
InRate *= Modifiers[4];
|
2020-11-28 20:12:58 +00:00
|
|
|
if (ZedTimeMeleeAtkRate<1.f && WorldInfo.TimeDilation<1.f)
|
2017-10-20 02:00:49 +00:00
|
|
|
InRate *= ZedTimeMeleeAtkRate;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-28 20:04:55 +00:00
|
|
|
function PlayerKilled(KFPawn_Monster Victim, class<DamageType> DT)
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
2020-11-28 20:12:58 +00:00
|
|
|
if (VampRegenRate>0 && PlayerOwner.Pawn!=None && PlayerOwner.Pawn.Health>0 && class<KFDamageType>(DT)!=None && class<KFDamageType>(DT).Default.ModifierPerkList.Find(BasePerk)>=0)
|
2020-11-28 20:04:55 +00:00
|
|
|
PlayerOwner.Pawn.HealDamage(Max(PlayerOwner.Pawn.HealthMax*VampRegenRate,1), PlayerOwner, class'KFDT_Healing', false, false);
|
2017-10-20 02:00:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
defaultproperties
|
|
|
|
{
|
|
|
|
PerkIcon=Texture2D'UI_PerkIcons_TEX.UI_PerkIcon_Berserker'
|
|
|
|
DefTraitList.Add(class'Ext_TraitWPBers')
|
|
|
|
DefTraitList.Add(class'Ext_TraitUnGrab')
|
|
|
|
DefTraitList.Add(class'Ext_TraitVampire')
|
|
|
|
DefTraitList.Add(class'Ext_TraitSpartan')
|
|
|
|
DefPerkStats(15)=(bHiddenConfig=false) // Poison damage.
|
|
|
|
BasePerk=class'KFPerk_Berserker'
|
|
|
|
|
|
|
|
PrimaryMelee=class'KFWeap_Knife_Berserker'
|
|
|
|
PrimaryWeapon=class'KFWeap_Blunt_Crovel'
|
|
|
|
PerkGrenade=class'KFProj_EMPGrenade'
|
|
|
|
|
|
|
|
PrimaryWeaponDef=class'KFWeapDef_Crovel'
|
|
|
|
KnifeWeaponDef=class'KFweapDef_Knife_Berserker'
|
|
|
|
GrenadeWeaponDef=class'KFWeapDef_Grenade_Berserker'
|
|
|
|
|
|
|
|
AutoBuyLoadOutPath=(class'KFWeapDef_Crovel', class'KFWeapDef_Nailgun', class'KFWeapDef_Pulverizer', class'KFWeapDef_Eviscerator')
|
|
|
|
|
|
|
|
ZedTimeMeleeAtkRate=1.0
|
|
|
|
}
|