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

48 lines
970 B
Ucode
Raw Normal View History

Class Ext_TraitZedative extends Ext_TraitBase;
var localized string GroupDescription;
function string GetPerkDescription()
{
local string S;
S = Super.GetPerkDescription();
S $= "|"$GroupDescription;
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;
2023-05-14 02:49:12 +00:00
2020-11-28 20:12:58 +00:00
if (Lvl==0)
{
i = Perk.PerkStats.Find('StatType','Heal');
2020-11-28 20:12:58 +00:00
if (i>=0)
return (Perk.PerkStats[i].CurrentValue>=25);
}
2023-05-14 02:49:12 +00:00
return true;
}
2020-11-28 20:04:55 +00:00
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
{
Ext_PerkFieldMedic(Perk).bUseSlug = true;
}
2020-11-28 20:04:55 +00:00
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
{
Ext_PerkFieldMedic(Perk).bUseSlug = false;
}
defaultproperties
{
SupportedPerk=class'Ext_PerkFieldMedic'
TraitGroup=class'Ext_TGroupZEDTime'
NumLevels=1
DefLevelCosts(0)=50
DefMinLevel=65
}