Sharpshooter and perkstat changes + small fix
Medic Pistol is default weapon in hands for MedicPerk now Added Head Damage for Sharpshooter by default Removed Rack'em Up for Sharpshooter by default Now perk-stat menu shows maxvalue of stats
This commit is contained in:
parent
dfb0122263
commit
35e0160071
@ -1143,6 +1143,9 @@ simulated function float ApplyEffect( name Type, float Value, float Progress )
|
||||
case 'AllDmg':
|
||||
Modifiers[18] = 1.f / (1.f+Value*Progress);
|
||||
break;
|
||||
case 'HeadDamage':
|
||||
Modifiers[19] = Value*Progress;
|
||||
break;
|
||||
}
|
||||
return (Value*Progress);
|
||||
}
|
||||
@ -1150,7 +1153,12 @@ simulated function float ApplyEffect( name Type, float Value, float Progress )
|
||||
simulated function ModifyDamageGiven( out int InDamage, optional Actor DamageCauser, optional KFPawn_Monster MyKFPM, optional KFPlayerController DamageInstigator, optional class<KFDamageType> DamageType, optional int HitZoneIdx )
|
||||
{
|
||||
if( BasePerk==None || (DamageType!=None && DamageType.Default.ModifierPerkList.Find(BasePerk)>=0) || (KFWeapon(DamageCauser)!=None && IsWeaponOnPerk(KFWeapon(DamageCauser))) )
|
||||
InDamage *= Modifiers[1];
|
||||
{
|
||||
if(HitZoneIdx == 0)
|
||||
InDamage *= (Modifiers[1] + Modifiers[19]);
|
||||
else
|
||||
InDamage *= Modifiers[1];
|
||||
}
|
||||
else if( DamageType==None || DamageType.Name!='KFDT_SuicideExplosive' )
|
||||
InDamage *= Modifiers[12];
|
||||
}
|
||||
@ -1430,6 +1438,7 @@ defaultproperties
|
||||
DefPerkStats(16)=(MaxValue=1000,CostPerValue=1,StatType="SonicDmg",UIName="Sonic Resistance (+&%)",Progress=1.5,bHiddenConfig=true)
|
||||
DefPerkStats(17)=(MaxValue=1000,CostPerValue=1,StatType="FireDmg",UIName="Fire Resistance (+&%)",Progress=1.5,bHiddenConfig=true)
|
||||
DefPerkStats(18)=(MaxValue=500,CostPerValue=1,StatType="AllDmg",UIName="Zed Damage Reduction (+&%)",Progress=0.25)
|
||||
DefPerkStats(19)=(MaxValue=500,CostPerValue=1,StatType="HeadDamage",UIName="Perk Head Damage (+&%)",Progress=1,bHiddenConfig=true)
|
||||
|
||||
Modifiers.Add(1.f)
|
||||
Modifiers.Add(1.f)
|
||||
|
@ -114,8 +114,10 @@ simulated function float GetSnarePower( optional class<DamageType> DamageType, o
|
||||
|
||||
function AddDefaultInventory( KFPawn P )
|
||||
{
|
||||
P.DefaultInventory.RemoveItem(class'ExtWeap_Pistol_9mm');
|
||||
P.DefaultInventory.AddItem(class'ExtWeap_Pistol_MedicS');
|
||||
local int i;
|
||||
i = P.DefaultInventory.Find(class'ExtWeap_Pistol_9mm');
|
||||
if(i != -1)
|
||||
P.DefaultInventory[i] = class'ExtWeap_Pistol_MedicS';
|
||||
super.AddDefaultInventory(P);
|
||||
}
|
||||
|
||||
|
@ -28,11 +28,12 @@ defaultproperties
|
||||
PerkName="Sharpshooter"
|
||||
PerkIcon=Texture2D'UI_PerkIcons_TEX.UI_PerkIcon_Sharpshooter'
|
||||
DefTraitList.Add(class'Ext_TraitWPSharp')
|
||||
DefTraitList.Add(class'Ext_TraitRackEmUp')
|
||||
DefTraitList.Add(class'Ext_TraitRanger')
|
||||
DefTraitList.Add(class'Ext_TraitDireReload')
|
||||
DefTraitList.Add(class'Ext_TraitEliteReload')
|
||||
BasePerk=class'KFPerk_Sharpshooter'
|
||||
DefPerkStats(1)=(Progress=0.25)
|
||||
DefPerkStats(19)=(bHiddenConfig=false)
|
||||
|
||||
PrimaryMelee=class'KFWeap_Knife_Sharpshooter'
|
||||
PrimaryWeapon=class'KFWeap_Rifle_Winchester1894'
|
||||
|
@ -5,7 +5,7 @@ var KFGUI_NumericBox StatCountBox;
|
||||
var KFGUI_Button AddButton;
|
||||
|
||||
var Ext_PerkBase MyPerk;
|
||||
var int StatIndex,OldValue,CurrentCost;
|
||||
var int StatIndex,OldValue,CurrentCost,MaxStatValue;
|
||||
var string ProgressStr;
|
||||
var bool bCostDirty;
|
||||
|
||||
@ -42,7 +42,10 @@ function Timer()
|
||||
{
|
||||
bCostDirty = false;
|
||||
OldValue = MyPerk.PerkStats[StatIndex].CurrentValue;
|
||||
InfoText.SetText(MyPerk.GetStatUIStr(StatIndex)$" ["$OldValue$", Cost "$CurrentCost$", "$ProgressStr$"%]:");
|
||||
if(CurrentCost != 0)
|
||||
InfoText.SetText(MyPerk.GetStatUIStr(StatIndex)$" ["$OldValue$"/"$MaxStatValue$", Cost "$CurrentCost$", "$ProgressStr$"%]:");
|
||||
else
|
||||
InfoText.SetText(MyPerk.GetStatUIStr(StatIndex)$" ["$OldValue$"/"$MaxStatValue$", "$ProgressStr$"%]:");
|
||||
}
|
||||
}
|
||||
function BuyStatPoint( KFGUI_Button Sender )
|
||||
@ -51,8 +54,13 @@ function BuyStatPoint( KFGUI_Button Sender )
|
||||
}
|
||||
function EditBoxChange( KFGUI_EditBox Sender )
|
||||
{
|
||||
CurrentCost = StatCountBox.GetValueInt()*MyPerk.PerkStats[StatIndex].CostPerValue;
|
||||
if(MyPerk.PerkStats[StatIndex].CostPerValue > 1)
|
||||
CurrentCost = StatCountBox.GetValueInt()*MyPerk.PerkStats[StatIndex].CostPerValue;
|
||||
else
|
||||
CurrentCost = 0;
|
||||
MaxStatValue = MyPerk.PerkStats[StatIndex].MaxValue;
|
||||
ProgressStr = ChopExtraDigits(MyPerk.PerkStats[StatIndex].Progress * StatCountBox.GetValueInt());
|
||||
MaxStatValue = MyPerk.PerkStats[StatIndex].MaxValue;
|
||||
bCostDirty = true;
|
||||
Timer();
|
||||
}
|
||||
@ -68,8 +76,12 @@ final function CheckBuyLimit()
|
||||
|
||||
// Make the value clamped.
|
||||
StatCountBox.ChangeValue(StatCountBox.Value);
|
||||
CurrentCost = StatCountBox.GetValueInt()*MyPerk.PerkStats[StatIndex].CostPerValue;
|
||||
if(MyPerk.PerkStats[StatIndex].CostPerValue > 1)
|
||||
CurrentCost = StatCountBox.GetValueInt()*MyPerk.PerkStats[StatIndex].CostPerValue;
|
||||
else
|
||||
CurrentCost = 0;
|
||||
ProgressStr = ChopExtraDigits(MyPerk.PerkStats[StatIndex].Progress * StatCountBox.GetValueInt());
|
||||
MaxStatValue = MyPerk.PerkStats[StatIndex].MaxValue;
|
||||
|
||||
// Disable button if can not buy anymore.
|
||||
AddButton.SetDisabled(i==0);
|
||||
|
Loading…
Reference in New Issue
Block a user