2017-10-20 02:00:49 +00:00
|
|
|
Class Ext_PerkFieldMedic extends Ext_PerkBase;
|
|
|
|
|
|
|
|
var float RepairArmorRate,AirborneAgentHealRate;
|
|
|
|
var byte AirborneAgentLevel;
|
|
|
|
|
2017-10-20 07:02:53 +00:00
|
|
|
var bool bHealingBoost,bHealingDamageBoost,bHealingShield;
|
|
|
|
var byte HealingShield;
|
|
|
|
var const float SelfHealingSurgePct,MaxHealingSpeedBoost,HealingSpeedBoostDuration,MaxHealingDamageBoost,HealingDamageBoostDuration,MaxHealingShield,HealingShieldDuration;
|
|
|
|
var float HealingSpeedBoostPct, HealingDamageBoostPct, HealingShieldPct;
|
|
|
|
|
|
|
|
var bool bUseToxicDamage,bUseSlug,bUseAirborneAgent;
|
|
|
|
|
|
|
|
var const class<KFDamageType> ToxicDmgTypeClass;
|
|
|
|
|
|
|
|
simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCauser, optional KFPawn_Monster MyKFPM, optional KFPlayerController DamageInstigator, optional class<KFDamageType> DamageType, optional int HitZoneIdx )
|
|
|
|
{
|
|
|
|
local float TempDamage;
|
|
|
|
|
|
|
|
TempDamage = InDamage;
|
|
|
|
|
|
|
|
if( bUseSlug && WorldInfo.TimeDilation < 1.f && DamageType != none && ClassIsChildOf( DamageType, class'KFDT_Toxic' ) )
|
|
|
|
TempDamage += InDamage * 100;
|
|
|
|
|
|
|
|
InDamage = Round(TempDamage);
|
|
|
|
|
|
|
|
Super.ModifyDamageGiven(InDamage, DamageCauser, MyKFPM, DamageInstigator, DamageType, HitZoneIdx);
|
|
|
|
}
|
|
|
|
|
|
|
|
simulated function ModifyMagSizeAndNumber( KFWeapon KFW, out byte MagazineCapacity, optional array< Class<KFPerk> > WeaponPerkClass, optional bool bSecondary=false, optional name WeaponClassname )
|
|
|
|
{
|
|
|
|
if( MagazineCapacity>2 && (KFW==None ? WeaponPerkClass.Find(BasePerk)>=0 : IsWeaponOnPerk(KFW)) ) // Skip boomstick for this.
|
|
|
|
MagazineCapacity = Min(MagazineCapacity*Modifiers[10], bSecondary ? 150 : 255);
|
|
|
|
}
|
|
|
|
|
2017-10-20 02:00:49 +00:00
|
|
|
function bool RepairArmor( Pawn HealTarget )
|
|
|
|
{
|
|
|
|
local KFPawn_Human KFPH;
|
|
|
|
|
|
|
|
if( RepairArmorRate>0 )
|
|
|
|
{
|
|
|
|
KFPH = KFPawn_Human(Healtarget);
|
|
|
|
if( KFPH != none && KFPH.Armor < KFPH.MaxArmor )
|
|
|
|
{
|
|
|
|
KFPH.AddArmor( Round( float(KFPH.MaxArmor) * RepairArmorRate ) );
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
function bool ModifyHealAmount( out float HealAmount )
|
|
|
|
{
|
|
|
|
HealAmount*=Modifiers[9];
|
|
|
|
return (RepairArmorRate>0);
|
|
|
|
}
|
2020-07-07 14:04:37 +00:00
|
|
|
|
|
|
|
// Di
|
|
|
|
// simulated function ModifyHealerRechargeTime( out float RechargeRate )
|
|
|
|
// {
|
|
|
|
// super.ModifyHealerRechargeTime(RechargeRate)
|
|
|
|
// RechargeRate /= Clamp(Modifiers[9] * 2, 1.f, 3.f);
|
|
|
|
// }
|
2017-10-20 02:00:49 +00:00
|
|
|
|
|
|
|
function CheckForAirborneAgent( KFPawn HealTarget, class<DamageType> DamType, int HealAmount )
|
|
|
|
{
|
|
|
|
if( (AirborneAgentLevel==1 && WorldInfo.TimeDilation<1.f) || AirborneAgentLevel>1 )
|
|
|
|
GiveMedicAirborneAgentHealth( HealTarget, DamType, HealAmount );
|
|
|
|
}
|
|
|
|
|
|
|
|
function GiveMedicAirborneAgentHealth( KFPawn HealTarget, class<DamageType> DamType, int HealAmount )
|
|
|
|
{
|
|
|
|
local KFPawn KFP;
|
|
|
|
local int RoundedExtraHealAmount;
|
|
|
|
|
|
|
|
RoundedExtraHealAmount = FCeil( float(HealAmount) * AirborneAgentHealRate );
|
|
|
|
|
|
|
|
foreach WorldInfo.Allpawns(class'KFPawn', KFP, HealTarget.Location, 500.f)
|
|
|
|
{
|
|
|
|
if( KFP.IsAliveAndWell() && WorldInfo.GRI.OnSameTeam( HealTarget, KFP ) )
|
2020-07-07 14:04:37 +00:00
|
|
|
{
|
2017-10-20 02:00:49 +00:00
|
|
|
if ( HealTarget == KFP )
|
|
|
|
KFP.HealDamage( RoundedExtraHealAmount, PlayerOwner, DamType );
|
|
|
|
else KFP.HealDamage( RoundedExtraHealAmount + HealAmount, PlayerOwner, DamType );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-20 07:02:53 +00:00
|
|
|
static function class<KFDamageType> GetToxicDmgTypeClass()
|
|
|
|
{
|
|
|
|
return default.ToxicDmgTypeClass;
|
|
|
|
}
|
|
|
|
|
|
|
|
static function int ModifyToxicDmg(int ToxicDamage)
|
|
|
|
{
|
|
|
|
local float TempDamage;
|
|
|
|
|
|
|
|
TempDamage = float(ToxicDamage) * 1.2;
|
|
|
|
return FCeil( TempDamage );
|
|
|
|
}
|
|
|
|
|
|
|
|
function NotifyZedTimeStarted()
|
|
|
|
{
|
|
|
|
local KFPawn_Human HPawn;
|
|
|
|
|
|
|
|
HPawn = KFPawn_Human(PlayerOwner.Pawn);
|
|
|
|
|
|
|
|
if( bUseAirborneAgent && HPawn != none && HPawn.IsAliveAndWell() )
|
|
|
|
HPawn.StartAirBorneAgentEvent();
|
|
|
|
}
|
|
|
|
|
|
|
|
simulated function float GetSnarePower( optional class<DamageType> DamageType, optional byte HitZoneIdx )
|
|
|
|
{
|
|
|
|
if( bUseSlug && WorldInfo.TimeDilation < 1.f && class<KFDamageType>(DamageType)!=None && class<KFDamageType>(DamageType).Default.ModifierPerkList.Find(BasePerk)>=0 )
|
|
|
|
return 100;
|
|
|
|
|
|
|
|
return 0.f;
|
|
|
|
}
|
|
|
|
|
2020-07-06 16:28:35 +00:00
|
|
|
function AddDefaultInventory( KFPawn P )
|
|
|
|
{
|
2020-07-06 17:45:02 +00:00
|
|
|
local int i;
|
|
|
|
i = P.DefaultInventory.Find(class'ExtWeap_Pistol_9mm');
|
|
|
|
if(i != -1)
|
|
|
|
P.DefaultInventory[i] = class'ExtWeap_Pistol_MedicS';
|
2020-07-06 16:28:35 +00:00
|
|
|
super.AddDefaultInventory(P);
|
|
|
|
}
|
|
|
|
|
2017-10-20 07:02:53 +00:00
|
|
|
simulated function bool GetHealingSpeedBoostActive()
|
|
|
|
{
|
|
|
|
return bHealingBoost;
|
|
|
|
}
|
|
|
|
simulated function byte GetHealingSpeedBoost()
|
|
|
|
{
|
|
|
|
return byte(HealingSpeedBoostPct);
|
|
|
|
}
|
|
|
|
simulated function byte GetMaxHealingSpeedBoost()
|
|
|
|
{
|
|
|
|
return MaxHealingSpeedBoost;
|
|
|
|
}
|
|
|
|
simulated function float GetHealingSpeedBoostDuration()
|
|
|
|
{
|
|
|
|
return HealingSpeedBoostDuration;
|
|
|
|
}
|
|
|
|
simulated function bool GetHealingDamageBoostActive()
|
|
|
|
{
|
|
|
|
return bHealingDamageBoost;
|
|
|
|
}
|
|
|
|
simulated function byte GetHealingDamageBoost()
|
|
|
|
{
|
|
|
|
return byte(HealingDamageBoostPct);
|
|
|
|
}
|
|
|
|
simulated function byte GetMaxHealingDamageBoost()
|
|
|
|
{
|
|
|
|
return MaxHealingDamageBoost;
|
|
|
|
}
|
|
|
|
simulated function float GetHealingDamageBoostDuration()
|
|
|
|
{
|
|
|
|
return HealingDamageBoostDuration;
|
|
|
|
}
|
|
|
|
simulated function bool GetHealingShieldActive()
|
|
|
|
{
|
|
|
|
return bHealingShield;
|
|
|
|
}
|
|
|
|
simulated function byte GetHealingShield()
|
|
|
|
{
|
|
|
|
return byte(HealingShieldPct);
|
|
|
|
}
|
|
|
|
simulated function byte GetMaxHealingShield()
|
|
|
|
{
|
|
|
|
return MaxHealingShield;
|
|
|
|
}
|
|
|
|
simulated function float GetHealingShieldDuration()
|
|
|
|
{
|
|
|
|
return HealingShieldDuration;
|
|
|
|
}
|
|
|
|
simulated function float GetSelfHealingSurgePct()
|
|
|
|
{
|
|
|
|
return SelfHealingSurgePct;
|
|
|
|
}
|
|
|
|
|
2017-10-20 02:00:49 +00:00
|
|
|
defaultproperties
|
|
|
|
{
|
|
|
|
PerkName="Field Medic"
|
|
|
|
PerkIcon=Texture2D'UI_PerkIcons_TEX.UI_PerkIcon_Medic'
|
|
|
|
DefTraitList.Remove(class'Ext_TraitMedicPistol')
|
|
|
|
DefTraitList.Add(class'Ext_TraitAirborne')
|
|
|
|
DefTraitList.Add(class'Ext_TraitWPMedic')
|
2017-10-20 07:02:53 +00:00
|
|
|
DefTraitList.Add(class'Ext_TraitAcidicCompound')
|
|
|
|
DefTraitList.Add(class'Ext_TraitMedBoost')
|
|
|
|
DefTraitList.Add(class'Ext_TraitMedDamBoost')
|
|
|
|
DefTraitList.Add(class'Ext_TraitMedShield')
|
|
|
|
DefTraitList.Add(class'Ext_TraitZedative')
|
|
|
|
DefTraitList.Add(class'Ext_TraitAirborneAgent')
|
2020-06-24 00:47:18 +00:00
|
|
|
DefTraitList.Add(class'Ext_TraitArmorRep')
|
2017-10-20 02:00:49 +00:00
|
|
|
BasePerk=class'KFPerk_FieldMedic'
|
|
|
|
HealExpUpNum=3
|
|
|
|
|
2017-10-20 07:02:53 +00:00
|
|
|
HealingSpeedBoostPct = 10.0f
|
|
|
|
HealingDamageBoostPct = 5.0f
|
|
|
|
HealingShieldPct = 10.0f
|
|
|
|
|
|
|
|
ToxicDmgTypeClass=class'KFDT_Toxic_AcidicRounds'
|
|
|
|
|
|
|
|
SelfHealingSurgePct=0.1f
|
|
|
|
|
|
|
|
MaxHealingSpeedBoost=30
|
|
|
|
HealingSpeedBoostDuration=5.f
|
|
|
|
|
|
|
|
MaxHealingDamageBoost=20
|
|
|
|
HealingDamageBoostDuration=5.f
|
|
|
|
|
|
|
|
MaxHealingShield=30
|
|
|
|
HealingShieldDuration=5.0f
|
|
|
|
|
2017-10-20 02:00:49 +00:00
|
|
|
DefPerkStats(0)=(MaxValue=70)
|
|
|
|
DefPerkStats(9)=(bHiddenConfig=false) // Heal efficiency
|
|
|
|
DefPerkStats(15)=(bHiddenConfig=false) // Toxic resistance
|
|
|
|
DefPerkStats(16)=(bHiddenConfig=false) // Sonic resistance
|
|
|
|
DefPerkStats(17)=(bHiddenConfig=false) // Fire resistance
|
2020-07-07 14:04:37 +00:00
|
|
|
DefPerkStats(20)=(bHiddenConfig=false) // Heal recharge
|
2017-10-20 02:00:49 +00:00
|
|
|
|
|
|
|
PrimaryMelee=class'KFWeap_Knife_FieldMedic'
|
2020-07-06 16:28:35 +00:00
|
|
|
PrimaryWeapon=None
|
2017-10-20 02:00:49 +00:00
|
|
|
PerkGrenade=class'KFProj_MedicGrenade'
|
|
|
|
SuperGrenade=class'ExtProj_SUPERMedGrenade'
|
2020-07-06 16:28:35 +00:00
|
|
|
SecondaryWeaponDef=class'ExtWeapDef_MedicPistol'
|
2017-10-20 02:00:49 +00:00
|
|
|
|
2020-07-06 16:28:35 +00:00
|
|
|
PrimaryWeaponDef=None
|
2017-10-20 02:00:49 +00:00
|
|
|
KnifeWeaponDef=class'KFWeapDef_Knife_Medic'
|
|
|
|
GrenadeWeaponDef=class'KFWeapDef_Grenade_Medic'
|
|
|
|
|
2020-07-06 16:28:35 +00:00
|
|
|
AutoBuyLoadOutPath=(class'KFWeapDef_MedicSMG', class'KFWeapDef_MedicShotgun', class'KFWeapDef_MedicRifle')
|
2017-10-20 02:00:49 +00:00
|
|
|
}
|