KF2-Server-Extension/ServerExt/Classes/Ext_TraitSpartan.uc

31 lines
865 B
Ucode
Raw Permalink Normal View History

2017-10-20 02:00:49 +00:00
Class Ext_TraitSpartan extends Ext_TraitBase;
var array<float> AtkRates;
2020-11-28 20:04:55 +00:00
static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
2017-10-20 02:00:49 +00:00
{
2020-11-28 20:12:58 +00:00
if (ExtHumanPawn(Player)!=None)
2017-10-20 02:00:49 +00:00
ExtHumanPawn(Player).bMovesFastInZedTime = true;
Ext_PerkBerserker(Perk).ZedTimeMeleeAtkRate = 1.f/Default.AtkRates[Level-1];
}
2020-11-28 21:54:57 +00:00
2020-11-28 20:04:55 +00:00
static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
2017-10-20 02:00:49 +00:00
{
2020-11-28 20:12:58 +00:00
if (ExtHumanPawn(Player)!=None)
2017-10-20 02:00:49 +00:00
ExtHumanPawn(Player).bMovesFastInZedTime = false;
Ext_PerkBerserker(Perk).ZedTimeMeleeAtkRate = 1.f;
}
defaultproperties
{
SupportedPerk=class'Ext_PerkBerserker'
TraitGroup=class'Ext_TGroupZEDTime'
2017-10-20 02:00:49 +00:00
NumLevels=3
DefLevelCosts(0)=50
DefLevelCosts(1)=40
DefLevelCosts(2)=80
AtkRates.Add(1.5)
AtkRates.Add(2.2)
AtkRates.Add(4.0)
DefMinLevel=100
}