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

28 lines
637 B
Ucode
Raw Permalink Normal View History

2017-10-20 02:00:49 +00:00
Class Ext_TraitHeavyArmor extends Ext_TraitBase;
2020-11-28 20:04:55 +00:00
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
2017-10-20 02:00:49 +00:00
{
Perk.bHeavyArmor = true;
}
2020-11-28 21:54:57 +00:00
2020-11-28 20:04:55 +00:00
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
2017-10-20 02:00:49 +00:00
{
Perk.bHeavyArmor = false;
}
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-21 09:04:19 +00:00
{
2020-11-28 20:12:58 +00:00
if (Level <= 1)
2017-10-21 09:04:19 +00:00
return;
2023-05-14 02:49:12 +00:00
2017-10-21 09:04:19 +00:00
Level == 2 ? Player.AddArmor(50) : Player.AddArmor(Player.MaxArmor);
}
2017-10-20 02:00:49 +00:00
defaultproperties
{
NumLevels=3
DefLevelCosts(0)=50
DefLevelCosts(1)=20
DefLevelCosts(2)=60
DefMinLevel=50
}