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

49 lines
1.0 KiB
Ucode
Raw Normal View History

Class Ext_TraitPenetrator extends Ext_TraitBase;
static function string GetPerkDescription()
{
local string S;
S = Super.GetPerkDescription();
S $= "|Trait requires prestige level: #{FF4000}2";
return S;
}
2020-11-28 20:04:55 +00:00
static function bool MeetsRequirements(byte Lvl, Ext_PerkBase Perk)
{
local int i;
2020-11-28 20:12:58 +00:00
if (Perk.CurrentLevel<Default.MinLevel || Perk.CurrentPrestige<2)
return false;
2020-11-28 20:12:58 +00:00
for (i=0; i<Perk.PerkTraits.Length; ++i)
{
2020-11-28 20:12:58 +00:00
if (Perk.PerkTraits[i].TraitType==Class'Ext_TraitAPShots')
{
2020-11-28 20:12:58 +00:00
if (Perk.PerkTraits[i].CurrentLevel <= 0)
return false;
else break;
}
}
return true;
}
2020-11-28 20:04:55 +00:00
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
{
Ext_PerkSupport(Perk).bUsePerforate = true;
}
2020-11-28 20:04:55 +00:00
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
{
Ext_PerkSupport(Perk).bUsePerforate = false;
}
defaultproperties
{
SupportedPerk=class'Ext_PerkSupport'
TraitGroup=class'Ext_TGroupZEDTime'
NumLevels=1
DefLevelCosts(0)=50
DefMinLevel=65
}