From 51bb9add5b8e34c163b29cb5ca30be343809b408 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Sat, 18 Apr 2020 18:22:54 +0700 Subject: [PATCH] Apply dirty patch (messed up line endings) --- sources/GUI/NiceGUIPerkButton.uc | 226 ++++++++++----- sources/NiceHumanPawn.uc | 6 +- sources/NicePack.uc | 4 +- sources/Perks/Berserker/NiceVetBerserker.uc | 219 ++++++++------ sources/Perks/Commando/NiceVetCommando.uc | 111 ++++--- .../Skills/NiceSkillCommandoCriticalFocus.uc | 64 ++-- .../Skills/NiceSkillCommandoGiantSlayer.uc | 11 + .../Skills/NiceSkillCommandoThinOut.uc | 7 - .../Skills/NiceSkillCommandoTrashCleaner.uc | 15 +- .../NiceSkillCommandoZEDEvisceration.uc | 12 +- .../Perks/Demolitions/NiceVetDemolitions.uc | 180 +++++++----- sources/Perks/Enforcer/NiceVetEnforcer.uc | 273 ++++++++++-------- sources/Perks/FieldMedic/NiceVetFieldMedic.uc | 157 ++++++---- .../NiceSharpshooterAbilitiesAdapter.uc | 139 +++++---- .../FNFAL/NiceDamTypeFNFALAssaultRifle.uc | 21 +- .../SCAR/NiceDamTypeSCARMK17AssaultRifle.uc | 22 +- .../Pistols/Deagle/NiceDamTypeDeagle.uc | 25 +- .../Playable/Pistols/Deagle/NiceDeagleFire.uc | 33 ++- .../Pistols/Deagle/NiceDualDeagleFire.uc | 28 +- .../Pistols/MK32/NiceDamTypeMK23Pistol.uc | 26 +- .../Playable/Pistols/MK32/NiceDualMK23Fire.uc | 29 +- .../Playable/Pistols/MK32/NiceMK23Fire.uc | 29 +- .../Pistols/Magnum/NiceDamTypeMagnumPistol.uc | 17 +- .../Playable/Pistols/Magnum/NiceDualMagnum.uc | 42 ++- .../Playable/Pistols/Magnum/NiceMagnumFire.uc | 33 ++- .../Shotguns/Boomstick/NiceBoomStick.uc | 153 ++++++---- .../Shotguns/Boomstick/NiceBoomStickPickup.uc | 26 +- .../Playable/Shotguns/Spas/NiceSpas.uc | 56 +++- sources/Zeds/Mean/MeanPoisonInventory.uc | 42 +-- sources/Zeds/NiceMonster.uc | 62 ++-- 30 files changed, 1354 insertions(+), 714 deletions(-) create mode 100644 sources/Perks/Commando/Skills/NiceSkillCommandoGiantSlayer.uc delete mode 100644 sources/Perks/Commando/Skills/NiceSkillCommandoThinOut.uc diff --git a/sources/GUI/NiceGUIPerkButton.uc b/sources/GUI/NiceGUIPerkButton.uc index 497cee1..f398289 100644 --- a/sources/GUI/NiceGUIPerkButton.uc +++ b/sources/GUI/NiceGUIPerkButton.uc @@ -1,76 +1,152 @@ -class NiceGUIPerkButton extends GUIButton; -var bool isAltSkill; -var int skillPerkIndex, skillIndex; -var class associatedSkill; -function InitComponent(GUIController MyController, GUIComponent MyOwner) -{ - OnDraw = DrawSkillButton; - OnClick = SkillChange; - Super.InitComponent(MyController, MyOwner); -} -function bool SkillChange(GUIComponent Sender){ - local byte newSkillChoice; - local NicePlayerController skillOwner; - if(isAltSkill) newSkillChoice = 1; - else newSkillChoice = 0; - skillOwner = NicePlayerController(PlayerOwner()); - if(skillOwner != none){ skillOwner.ServerSetSkill(skillPerkIndex, skillIndex, newSkillChoice); skillOwner.SaveConfig(); - } - return true; -} -function bool DrawSkillButton(Canvas cnvs){ - // Variables that contain information about this button's skill - local NicePlayerController skillOwner; - local bool bAvailable, bSelected, bPending; - // Variables needed for text drawing - local int descLineOffset; // How much vertical space description took so far - local string skillEffects, line; // 'line' is next line from description to be drawn, 'skillEffects' is a not-yet drawn part of skill's effect description - local float textWidth, textHeight, nameHeight; // Variables for storing amount of space text uses - local int horizontalOffset, verticalOffset, smVerticalOffset; // Spaces between text and borders ('smVerticalOffset' is space between skill's name and description) - // Old values for font and it's scale - local Font oldFont; - local float oldFontScaleX, oldFontScaleY; - // Get skill parameters - skillOwner = NicePlayerController(PlayerOwner()); - bAvailable = class'NiceVeterancyTypes'.static.CanUseSkill(skillOwner, associatedSkill); - if(bAvailable) bSelected = class'NiceVeterancyTypes'.static.HasSkill(skillOwner, associatedSkill); - bPending = class'NiceVeterancyTypes'.static.IsSkillPending(skillOwner, associatedSkill); - if(skillOwner == none || associatedSkill == none) return true; - // Text offset parameters that seem to give a good result - horizontalOffset = 10; - verticalOffset = 5; - smVerticalOffset = 2; - // Backup old font values and set the new ones - oldFont = cnvs.Font; - oldFontScaleX = cnvs.FontScaleX; - oldFontScaleY = cnvs.FontScaleY; - cnvs.Font = class'ROHUD'.Static.LoadSmallFontStatic(3); - cnvs.FontScaleX = 1.0; - cnvs.FontScaleY = 1.0; - // Draw text - // - Name - cnvs.SetPos(ActualLeft() + horizontalOffset, ActualTop() + verticalOffset); - if(!bAvailable) cnvs.SetDrawColor(0, 0, 0); - else if(bSelected) cnvs.SetDrawColor(255, 255, 255); - else cnvs.SetDrawColor(128, 128, 128); - cnvs.DrawText(associatedSkill.default.skillName); - cnvs.TextSize(associatedSkill.default.skillName, textWidth, nameHeight); - // - Description - cnvs.Font = class'ROHUD'.Static.LoadSmallFontStatic(5); - if(!bAvailable) cnvs.SetDrawColor(0, 0, 0); - else if(bSelected) cnvs.SetDrawColor(220, 220, 220);//180 - else cnvs.SetDrawColor(140, 140, 140);//100 - skillEffects = associatedSkill.default.skillEffects; - while(Len(skillEffects) > 0){ cnvs.WrapText(skillEffects, line, ActualWidth() - horizontalOffset * 2, cnvs.Font, cnvs.FontScaleX); cnvs.SetPos(ActualLeft() + horizontalOffset, ActualTop() + verticalOffset + nameHeight + smVerticalOffset + descLineOffset); cnvs.DrawText(line); cnvs.TextSize(line, textWidth, textHeight); descLineOffset += textHeight; - } - // Draw border - if(bAvailable && bSelected || bPending){ if(bAvailable && bSelected) cnvs.SetDrawColor(255, 255, 255); else cnvs.SetDrawColor(64, 64, 64); cnvs.SetPos(ActualLeft(), ActualTop()); cnvs.DrawLine(3, ActualWidth()); cnvs.DrawLine(1, ActualHeight()); cnvs.SetPos(ActualLeft() + ActualWidth() + 2, ActualTop() + ActualHeight()); cnvs.DrawLine(2, ActualWidth() + 2); cnvs.SetPos(ActualLeft() + ActualWidth(), ActualTop() + ActualHeight() + 2); cnvs.DrawLine(0, ActualHeight() + 2); - } - cnvs.Font = oldFont; - cnvs.FontScaleX = oldFontScaleX; - cnvs.FontScaleY = oldFontScaleY; - return true; -} -defaultproperties -{ +class NiceGUIPerkButton extends GUIButton; +var bool isAltSkill; +var int skillPerkIndex, skillIndex; +var class associatedSkill; +function InitComponent(GUIController MyController, GUIComponent MyOwner) +{ + OnDraw = DrawSkillButton; + OnClick = SkillChange; + Super.InitComponent(MyController, MyOwner); +} +function bool SkillChange(GUIComponent Sender){ + local byte newSkillChoice; + local NicePlayerController skillOwner; + if(isAltSkill) + newSkillChoice = 1; + else + newSkillChoice = 0; + skillOwner = NicePlayerController(PlayerOwner()); + if(skillOwner != none){ + skillOwner.ServerSetSkill(skillPerkIndex, skillIndex, newSkillChoice); + skillOwner.SaveConfig(); + } + return true; +} +function bool DrawSkillButton(Canvas cnvs){ + // Variables that contain information about this button's skill + local NicePlayerController skillOwner; + local bool bAvailable, bSelected, bPending; + // Variables needed for text drawing + local int descLineOffset; // How much vertical space description took so far + local string skillEffects, line; // 'line' is next line from description to be drawn, 'skillEffects' is a not-yet drawn part of skill's effect description + local float textWidth, textHeight, nameHeight; // Variables for storing amount of space text uses + local int horizontalOffset, verticalOffset, smVerticalOffset; // Spaces between text and borders ('smVerticalOffset' is space between skill's name and description) + // Old values for font and it's scale + local Font oldFont; + local float oldFontScaleX, oldFontScaleY; + // Get skill parameters + skillOwner = NicePlayerController(PlayerOwner()); + bAvailable = class'NiceVeterancyTypes'.static.CanUseSkill(skillOwner, associatedSkill); + if(bAvailable) + bSelected = class'NiceVeterancyTypes'.static.HasSkill(skillOwner, associatedSkill); + bPending = class'NiceVeterancyTypes'.static.IsSkillPending(skillOwner, associatedSkill); + if(skillOwner == none || associatedSkill == none) + return true; + // Text offset parameters that seem to give a good result + verticalOffset = 5; + smVerticalOffset = 2; + if (ActualWidth() > 400) + { + horizontalOffset = 10; + } + else if (ActualWidth() > 320) + { + horizontalOffset = 5; + } + // Backup old font values and set the new ones + oldFont = cnvs.Font; + oldFontScaleX = cnvs.FontScaleX; + oldFontScaleY = cnvs.FontScaleY; + cnvs.FontScaleX = 1.0; + cnvs.FontScaleY = 1.0; + if (ActualWidth() > 700) + { + cnvs.Font = class'ROHUD'.Static.LoadSmallFontStatic(3); + } + else if (ActualWidth() > 500) + { + cnvs.Font = class'ROHUD'.Static.LoadSmallFontStatic(5); + } + else if (ActualWidth() > 400) + { + cnvs.Font = class'ROHUD'.Static.LoadSmallFontStatic(6); + } + else if (ActualWidth() > 320) + { + cnvs.Font = class'ROHUD'.Static.LoadSmallFontStatic(7); + } + else if (ActualWidth() > 250) + { + cnvs.Font = class'ROHUD'.Static.LoadSmallFontStatic(8); + } + else + { + cnvs.Font = class'ROHUD'.Static.LoadSmallFontStatic(8); + cnvs.FontScaleX = 0.9; + cnvs.FontScaleY = 0.9; + } + // Draw text + // - Name + cnvs.SetPos(ActualLeft() + horizontalOffset, ActualTop() + verticalOffset); + if(!bAvailable) + cnvs.SetDrawColor(0, 0, 0); + else if(bSelected) + cnvs.SetDrawColor(255, 255, 255); + else + cnvs.SetDrawColor(128, 128, 128); + //cnvs.DrawText(string(ActualWidth())); + cnvs.DrawText(associatedSkill.default.skillName); + cnvs.TextSize(associatedSkill.default.skillName, textWidth, nameHeight); + // - Description + if (ActualWidth() > 700) + { + cnvs.Font = class'ROHUD'.Static.LoadSmallFontStatic(5); + } + else if (ActualWidth() > 500) + { + cnvs.Font = class'ROHUD'.Static.LoadSmallFontStatic(6); + } + else if (ActualWidth() > 400) + { + cnvs.Font = class'ROHUD'.Static.LoadSmallFontStatic(7); + } + else + { + cnvs.Font = class'ROHUD'.Static.LoadSmallFontStatic(8); + } + if(!bAvailable) + cnvs.SetDrawColor(0, 0, 0); + else if(bSelected) + cnvs.SetDrawColor(220, 220, 220);//180 + else + cnvs.SetDrawColor(140, 140, 140);//100 + skillEffects = associatedSkill.default.skillEffects; + while(Len(skillEffects) > 0){ + cnvs.WrapText(skillEffects, line, ActualWidth() - horizontalOffset * 2, cnvs.Font, cnvs.FontScaleX); + cnvs.SetPos(ActualLeft() + horizontalOffset, ActualTop() + verticalOffset + nameHeight + smVerticalOffset + descLineOffset); + cnvs.DrawText(line); + cnvs.TextSize(line, textWidth, textHeight); + descLineOffset += textHeight; + } + // Draw border + if(bAvailable && bSelected || bPending){ + if(bAvailable && bSelected) + cnvs.SetDrawColor(255, 255, 255); + else + cnvs.SetDrawColor(64, 64, 64); + cnvs.SetPos(ActualLeft(), ActualTop()); + cnvs.DrawLine(3, ActualWidth()); + cnvs.DrawLine(1, ActualHeight()); + cnvs.SetPos(ActualLeft() + ActualWidth() + 2, ActualTop() + ActualHeight()); + cnvs.DrawLine(2, ActualWidth() + 2); + cnvs.SetPos(ActualLeft() + ActualWidth(), ActualTop() + ActualHeight() + 2); + cnvs.DrawLine(0, ActualHeight() + 2); + } + cnvs.Font = oldFont; + cnvs.FontScaleX = oldFontScaleX; + cnvs.FontScaleY = oldFontScaleY; + return true; +} +defaultproperties +{ } \ No newline at end of file diff --git a/sources/NiceHumanPawn.uc b/sources/NiceHumanPawn.uc index b91ccf3..8ec0c2b 100644 --- a/sources/NiceHumanPawn.uc +++ b/sources/NiceHumanPawn.uc @@ -71,12 +71,14 @@ function ReplaceRequiredEquipment(){ simulated function int CalculateCalibrationScore(){ local float accuracy; accuracy = (float(calibrationHits)) / (float(calibrationTotalShots)); + if(calibrationTotalShots <= 0) + return 3; // Very low accuracy (<60%) or not enough shots (<2) - 1 star - if(calibrationTotalShots < 2 || accuracy < 0.6) + if(accuracy < 0.6) return 1; // Here we definitely have at least 60% accuracy and 2 shots. // Low accuracy (<80%) or not enough shots (<5) - 2 stars. - if(calibrationTotalShots < 5 || accuracy < 0.8) + if(accuracy < 0.8) return 2; // Here we definitely have at least 80% accuracy and 5 shots. // If amount of shots is below 7 - it's 3 stars at most. diff --git a/sources/NicePack.uc b/sources/NicePack.uc index db6d78b..d7b5469 100644 --- a/sources/NicePack.uc +++ b/sources/NicePack.uc @@ -175,7 +175,7 @@ simulated function PostBeginPlay(){ super.PostBeginPlay(); class'NicePack'.default.Mut = self; // Gun skins - /*class'NicePack.NiceMaulerPickup'.default.VariantClasses[class'NicePack.NiceMaulerPickup'.default.VariantClasses.length] = class'ScrnBalanceSrv.ScrnSPSniperPickup'; + class'NicePack.NiceMaulerPickup'.default.VariantClasses[class'NicePack.NiceMaulerPickup'.default.VariantClasses.length] = class'ScrnBalanceSrv.ScrnSPSniperPickup'; class'NicePack.NiceDeaglePickup'.default.VariantClasses[class'NicePack.NiceDeaglePickup'.default.VariantClasses.length] = class'NicePack.SkinExecutionerPickup'; class'NicePack.NiceDualDeaglePickup'.default.VariantClasses[class'NicePack.NiceDualDeaglePickup'.default.VariantClasses.length] = class'NicePack.SkinDualExecutionerPickup'; class'NicePack.NiceMagnumPickup'.default.VariantClasses[class'NicePack.NiceMagnumPickup'.default.VariantClasses.length] = class'NicePack.SkinCowboyMagnumPickup'; @@ -183,7 +183,7 @@ simulated function PostBeginPlay(){ class'NicePack.NiceWinchesterPickup'.default.VariantClasses[class'NicePack.NiceWinchesterPickup'.default.VariantClasses.length] = class'NicePack.SkinRetroLARPickup'; class'NicePack.NiceM14EBRPickup'.default.VariantClasses[class'NicePack.NiceM14EBRPickup'.default.VariantClasses.length] = class'NicePack.SkinM14EBR2ProPickup'; class'ScrnBalanceSrv.ScrnKrissMPickup'.default.VariantClasses[class'ScrnBalanceSrv.ScrnKrissMPickup'.default.VariantClasses.length] = class'NicePack.SkinGoldenKrissPickup'; - class'NicePack.NiceSCARMK17Pickup'.default.VariantClasses[class'NicePack.NiceSCARMK17Pickup'.default.VariantClasses.length] = class'NicePack.SkinCamoSCARMK17Pickup';*/ + class'NicePack.NiceSCARMK17Pickup'.default.VariantClasses[class'NicePack.NiceSCARMK17Pickup'.default.VariantClasses.length] = class'NicePack.SkinCamoSCARMK17Pickup'; // Abilities class'NiceAbilityManager'.default.events.static.AddAdapter(class'NiceSharpshooterAbilitiesAdapter', level); SetTimer(0.25, true); diff --git a/sources/Perks/Berserker/NiceVetBerserker.uc b/sources/Perks/Berserker/NiceVetBerserker.uc index ad3bc96..70d37bb 100644 --- a/sources/Perks/Berserker/NiceVetBerserker.uc +++ b/sources/Perks/Berserker/NiceVetBerserker.uc @@ -1,88 +1,131 @@ -class NiceVetBerserker extends NiceVeterancyTypes - abstract; -static function AddCustomStats(ClientPerkRepLink Other){ - other.AddCustomValue(Class'NiceVetBerserkerExp'); -} -static function int GetStatValueInt(ClientPerkRepLink StatOther, byte ReqNum){ - return StatOther.GetCustomValueInt(Class'NiceVetBerserkerExp'); -} -static function array GetProgressArray(byte ReqNum, optional out int DoubleScalingBase){ - return default.progressArray0; -} -static function int AddDamage(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InDamage, class DmgType){ - local float perkDamage; - local class pickupClass; - pickupClass = GetPickupFromDamageType(DmgType); - perkDamage = float(InDamage); - if(IsPerkedPickup(pickupClass)) perkDamage *= 2; - return perkDamage; -} -static function float GetFireSpeedModStatic(KFPlayerReplicationInfo KFPRI, class other){ - local float bonus; - local class pickupClass; - local NiceHumanPawn nicePawn; - local NicePlayerController nicePlayer; - pickupClass = GetPickupFromWeapon(other); - bonus = 1.0; - nicePlayer = NicePlayerController(KFPRI.Owner); - if(IsPerkedPickup(pickupClass)) bonus *= 1.25; - nicePawn = NiceHumanPawn(nicePlayer.Pawn); - if(nicePlayer != none && nicePawn != none && HasSkill(nicePlayer, class'NiceSkillZerkFury') && IsPerkedPickup(pickupClass)){ if(nicePawn != none && nicePawn.invincibilityTimer > 0.0) bonus *= class'NiceSkillZerkFury'.default.attackSpeedBonus; - } - if(nicePlayer != none && nicePawn != none && nicePlayer.IsZedTimeActive() && IsPerkedPickup(pickupClass) && HasSkill(nicePlayer, class'NiceSkillZerkZEDAccelerate')) bonus /= (nicePawn.Level.TimeDilation / 1.1); - return bonus; -} -static function float GetMeleeMovementSpeedModifier(KFPlayerReplicationInfo KFPRI){ - return 0.2; -} -static function float GetMovementSpeedModifier(KFPlayerReplicationInfo KFPRI, KFGameReplicationInfo KFGRI) -{ - local NicePlayerController nicePlayer; - nicePlayer = NicePlayerController(KFPRI.Owner); - if(nicePlayer != none && nicePlayer.IsZedTimeActive() && HasSkill(nicePlayer, class'NiceSkillZerkZEDAccelerate')) return 1.0 / fmin(1.0, (KFGRI.Level.TimeDilation / 1.1)); - return 1.0; -} -static function float GetWeaponMovementSpeedBonus(KFPlayerReplicationInfo KFPRI, Weapon Weap){ - local float bonus; - local NicePlayerController nicePlayer; - local NiceHumanPawn nicePawn; - bonus = 0.0; - nicePlayer = NicePlayerController(KFPRI.Owner); - if(nicePlayer != none) nicePawn = NiceHumanPawn(nicePlayer.Pawn); - if(nicePlayer != none && nicePawn != none && HasSkill(nicePlayer, class'NiceSkillZerkWhirlwind')){ if(nicePawn != none && nicePawn.invincibilityTimer > 0.0) bonus = 1.0; - } - return bonus; -} -static function bool CanBeGrabbed(KFPlayerReplicationInfo KFPRI, KFMonster Other){ - return false; -} -// Set number times Zed Time can be extended -static function int ZedTimeExtensions(KFPlayerReplicationInfo KFPRI){ - return 4; -} -static function float SlowingModifier(KFPlayerReplicationInfo KFPRI){ - return 1.2; -} -static function int GetInvincibilityExtentions(KFPlayerReplicationInfo KFPRI){ - return 3; -} -static function int GetInvincibilityDuration(KFPlayerReplicationInfo KFPRI){ - local NicePlayerController nicePlayer; - nicePlayer = NicePlayerController(KFPRI.Owner); - if( nicePlayer != none && HasSkill(nicePlayer, class'NiceSkillZerkColossus')){ return 3.0 + class'NiceSkillZerkColossus'.default.timeBonus; - } - return 3.0; -} -static function int GetInvincibilitySafeMisses(KFPlayerReplicationInfo KFPRI){ - local NicePlayerController nicePlayer; - nicePlayer = NicePlayerController(KFPRI.Owner); - if( nicePlayer != none && HasSkill(nicePlayer, class'NiceSkillZerkUndead')){ return 1 + class'NiceSkillZerkUndead'.default.addedSafeMisses; - } - return 1; -} -static function string GetCustomLevelInfo(byte Level){ - return default.CustomLevelInfo; -} -defaultproperties -{ bNewTypePerk=True SkillGroupA(0)=Class'NicePack.NiceSkillZerkWindCutter' SkillGroupA(1)=Class'NicePack.NiceSkillZerkWhirlwind' SkillGroupA(2)=Class'NicePack.NiceSkillZerkColossus' SkillGroupA(3)=Class'NicePack.NiceSkillZerkUndead' SkillGroupA(4)=Class'NicePack.NiceSkillZerkZEDAccelerate' SkillGroupB(0)=Class'NicePack.NiceSkillZerkCleave' SkillGroupB(1)=Class'NicePack.NiceSkillZerkFury' SkillGroupB(2)=Class'NicePack.NiceSkillZerkGunzerker' SkillGroupB(3)=Class'NicePack.NiceSkillZerkVorpalBlade' SkillGroupB(4)=Class'NicePack.NiceSkillZerkZEDUnbreakable' progressArray0(0)=100 progressArray0(1)=1000 progressArray0(2)=3000 progressArray0(3)=10000 progressArray0(4)=30000 progressArray0(5)=100000 progressArray0(6)=200000 DefaultDamageType=Class'NicePack.NiceDamageTypeVetBerserker' OnHUDIcons(0)=(PerkIcon=Texture'KillingFloorHUD.Perks.Perk_Berserker',StarIcon=Texture'KillingFloorHUD.HUD.Hud_Perk_Star',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(1)=(PerkIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Berserker_Gold',StarIcon=Texture'KillingFloor2HUD.Perk_Icons.Hud_Perk_Star_Gold',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(2)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Berserker_Green',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Green',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(3)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Berserker_Blue',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Blue',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(4)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Berserker_Purple',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Purple',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(5)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Berserker_Orange',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Orange',DrawColor=(B=255,G=255,R=255,A=255)) CustomLevelInfo="Level up by doing damage with perked weapons|100% extra melee damage|25% faster melee attacks|20% faster melee movement|Melee invincibility lasts 3 seconds|Melee invincibility doesn't reset on your first miss|Up to 4 Zed-Time Extensions|Can't be grabbed by clots|Can activate melee-invincibility with non-decapitating head-shots up to 3 times" PerkIndex=4 OnHUDIcon=Texture'KillingFloorHUD.Perks.Perk_Berserker' OnHUDGoldIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Berserker_Gold' VeterancyName="Berserker" Requirements(0)="Required experience for the next level: %x" -} +class NiceVetBerserker extends NiceVeterancyTypes + abstract; +static function AddCustomStats(ClientPerkRepLink Other){ + other.AddCustomValue(Class'NiceVetBerserkerExp'); +} +static function int GetStatValueInt(ClientPerkRepLink StatOther, byte ReqNum){ + return StatOther.GetCustomValueInt(Class'NiceVetBerserkerExp'); +} +static function array GetProgressArray(byte ReqNum, optional out int DoubleScalingBase){ + return default.progressArray0; +} +static function int AddDamage(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InDamage, class DmgType){ + local float perkDamage; + local class pickupClass; + pickupClass = GetPickupFromDamageType(DmgType); + perkDamage = float(InDamage); + if(IsPerkedPickup(pickupClass)) + perkDamage *= 2; + return perkDamage; +} +static function float GetFireSpeedModStatic(KFPlayerReplicationInfo KFPRI, class other){ + local float bonus; + local class pickupClass; + local NiceHumanPawn nicePawn; + local NicePlayerController nicePlayer; + pickupClass = GetPickupFromWeapon(other); + bonus = 1.0; + nicePlayer = NicePlayerController(KFPRI.Owner); + if(IsPerkedPickup(pickupClass)) + bonus *= 1.25; + nicePawn = NiceHumanPawn(nicePlayer.Pawn); + if(nicePlayer != none && nicePawn != none && HasSkill(nicePlayer, class'NiceSkillZerkFury') && IsPerkedPickup(pickupClass)){ + if(nicePawn != none && nicePawn.invincibilityTimer > 0.0) + bonus *= class'NiceSkillZerkFury'.default.attackSpeedBonus; + } + if(nicePlayer != none && nicePawn != none && nicePlayer.IsZedTimeActive() && IsPerkedPickup(pickupClass) + && HasSkill(nicePlayer, class'NiceSkillZerkZEDAccelerate')) + bonus /= (nicePawn.Level.TimeDilation / 1.1); + return bonus; +} +static function float GetMeleeMovementSpeedModifier(KFPlayerReplicationInfo KFPRI){ + return 0.2; +} +static function float GetMovementSpeedModifier(KFPlayerReplicationInfo KFPRI, KFGameReplicationInfo KFGRI) +{ + local NicePlayerController nicePlayer; + nicePlayer = NicePlayerController(KFPRI.Owner); + if(nicePlayer != none && nicePlayer.IsZedTimeActive() + && HasSkill(nicePlayer, class'NiceSkillZerkZEDAccelerate')) + return 1.0 / fmin(1.0, (KFGRI.Level.TimeDilation / 1.1)); + return 1.0; +} +static function float GetWeaponMovementSpeedBonus(KFPlayerReplicationInfo KFPRI, Weapon Weap){ + local float bonus; + local NicePlayerController nicePlayer; + local NiceHumanPawn nicePawn; + bonus = 0.0; + nicePlayer = NicePlayerController(KFPRI.Owner); + if(nicePlayer != none) + nicePawn = NiceHumanPawn(nicePlayer.Pawn); + if(nicePlayer != none && nicePawn != none && HasSkill(nicePlayer, class'NiceSkillZerkWhirlwind')){ + if(nicePawn != none && nicePawn.invincibilityTimer > 0.0) + bonus = 1.0; + } + return bonus; +} +static function bool CanBeGrabbed(KFPlayerReplicationInfo KFPRI, KFMonster Other){ + return false; +} +// Set number times Zed Time can be extended +static function int ZedTimeExtensions(KFPlayerReplicationInfo KFPRI){ + return 4; +} +static function int GetInvincibilityExtentions(KFPlayerReplicationInfo KFPRI){ + return 3; +} +static function int GetInvincibilityDuration(KFPlayerReplicationInfo KFPRI){ + local NicePlayerController nicePlayer; + nicePlayer = NicePlayerController(KFPRI.Owner); + if( nicePlayer != none + && HasSkill(nicePlayer, class'NiceSkillZerkColossus')){ + return 3.0 + class'NiceSkillZerkColossus'.default.timeBonus; + } + return 3.0; +} +static function int GetInvincibilitySafeMisses(KFPlayerReplicationInfo KFPRI){ + local NicePlayerController nicePlayer; + nicePlayer = NicePlayerController(KFPRI.Owner); + if( nicePlayer != none + && HasSkill(nicePlayer, class'NiceSkillZerkUndead')){ + return 1 + class'NiceSkillZerkUndead'.default.addedSafeMisses; + } + return 1; +} +static function string GetCustomLevelInfo(byte Level){ + return default.CustomLevelInfo; +} +defaultproperties +{ + bNewTypePerk=True + SkillGroupA(0)=Class'NicePack.NiceSkillZerkWindCutter' + SkillGroupA(1)=Class'NicePack.NiceSkillZerkWhirlwind' + SkillGroupA(2)=Class'NicePack.NiceSkillZerkColossus' + SkillGroupA(3)=Class'NicePack.NiceSkillZerkUndead' + SkillGroupA(4)=Class'NicePack.NiceSkillZerkZEDAccelerate' + SkillGroupB(0)=Class'NicePack.NiceSkillZerkCleave' + SkillGroupB(1)=Class'NicePack.NiceSkillZerkFury' + SkillGroupB(2)=Class'NicePack.NiceSkillZerkGunzerker' + SkillGroupB(3)=Class'NicePack.NiceSkillZerkVorpalBlade' + SkillGroupB(4)=Class'NicePack.NiceSkillZerkZEDUnbreakable' + progressArray0(0)=100 + progressArray0(1)=1000 + progressArray0(2)=3000 + progressArray0(3)=10000 + progressArray0(4)=30000 + progressArray0(5)=100000 + progressArray0(6)=200000 + DefaultDamageType=Class'NicePack.NiceDamageTypeVetBerserker' + OnHUDIcons(0)=(PerkIcon=Texture'KillingFloorHUD.Perks.Perk_Berserker',StarIcon=Texture'KillingFloorHUD.HUD.Hud_Perk_Star',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(1)=(PerkIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Berserker_Gold',StarIcon=Texture'KillingFloor2HUD.Perk_Icons.Hud_Perk_Star_Gold',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(2)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Berserker_Green',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Green',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(3)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Berserker_Blue',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Blue',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(4)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Berserker_Purple',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Purple',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(5)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Berserker_Orange',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Orange',DrawColor=(B=255,G=255,R=255,A=255)) + CustomLevelInfo="Level up by doing damage with perked weapons|100% extra melee damage|25% faster melee attacks|20% faster melee movement|Melee invincibility lasts 3 seconds|Melee invincibility doesn't reset on your first miss|Up to 4 Zed-Time Extensions|Can't be grabbed by clots|Can activate melee-invincibility with non-decapitating head-shots up to 3 times" + PerkIndex=4 + OnHUDIcon=Texture'KillingFloorHUD.Perks.Perk_Berserker' + OnHUDGoldIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Berserker_Gold' + VeterancyName="Berserker" + Requirements(0)="Required experience for the next level: %x" +} diff --git a/sources/Perks/Commando/NiceVetCommando.uc b/sources/Perks/Commando/NiceVetCommando.uc index a2f964a..e9df60b 100644 --- a/sources/Perks/Commando/NiceVetCommando.uc +++ b/sources/Perks/Commando/NiceVetCommando.uc @@ -1,38 +1,73 @@ -class NiceVetCommando extends NiceVeterancyTypes - abstract; -static function AddCustomStats(ClientPerkRepLink Other){ - other.AddCustomValue(Class'NiceVetCommandoExp'); -} -static function int GetStatValueInt(ClientPerkRepLink StatOther, byte ReqNum){ - return StatOther.GetCustomValueInt(Class'NiceVetCommandoExp'); -} -static function array GetProgressArray(byte ReqNum, optional out int DoubleScalingBase){ - return default.progressArray0; -} -static function float GetHealthBarsDistanceMulti(KFPlayerReplicationInfo KFPRI){ - if(KFPRI != none && SomeoneHasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillCommandoStrategist')) return class'NiceSkillCommandoStrategist'.default.visionRadius; - return 0.0; -} -static function float GetStalkerViewDistanceMulti(KFPlayerReplicationInfo KFPRI){ - if(KFPRI != none && SomeoneHasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillCommandoStrategist')) return class'NiceSkillCommandoStrategist'.default.visionRadius; - return 0.0; -} -static function float GetMagCapacityMod(KFPlayerReplicationInfo KFPRI, KFWeapon Other){ - local class pickupClass; - pickupClass = GetPickupFromWeapon(other.class); - if(IsPerkedPickup(pickupClass) && HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillCommandoLargerMags')) return class'NiceSkillCommandoLargerMags'.default.sizeBonus; - return 1.0; -} -static function float GetReloadSpeedModifierStatic(KFPlayerReplicationInfo KFPRI, class Other){ - return 1.3; -} -static function int ZedTimeExtensions(KFPlayerReplicationInfo KFPRI){ - if(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillCommandoTactitian')) return class'NiceSkillCommandoTactitian'.default.bonusExt + 3; - return 3; -} -static function string GetCustomLevelInfo(byte Level){ - return default.CustomLevelInfo; -} -defaultproperties -{ bNewTypePerk=True SkillGroupA(0)=Class'NicePack.NiceSkillCommandoTactitian' SkillGroupA(1)=Class'NicePack.NiceSkillCommandoCriticalFocus' SkillGroupA(2)=Class'NicePack.NiceSkillCommandoLargerMags' SkillGroupA(3)=Class'NicePack.NiceSkillCommandoPerfectExecution' SkillGroupA(4)=Class'NicePack.NiceSkillCommandoZEDProfessional' SkillGroupB(0)=Class'NicePack.NiceSkillCommandoStrategist' SkillGroupB(1)=Class'NicePack.NiceSkillCommandoTrashCleaner' SkillGroupB(2)=Class'NicePack.NiceSkillCommandoExplosivePower' SkillGroupB(3)=Class'NicePack.NiceSkillCommandoThinOut' SkillGroupB(4)=Class'NicePack.NiceSkillCommandoZEDEvisceration' progressArray0(0)=100 progressArray0(1)=1000 progressArray0(2)=3000 progressArray0(3)=10000 progressArray0(4)=30000 progressArray0(5)=100000 progressArray0(6)=200000 DefaultDamageType=Class'NicePack.NiceDamageTypeVetCommando' OnHUDIcons(0)=(PerkIcon=Texture'KillingFloorHUD.Perks.Perk_Commando',StarIcon=Texture'KillingFloorHUD.HUD.Hud_Perk_Star',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(1)=(PerkIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Commando_Gold',StarIcon=Texture'KillingFloor2HUD.Perk_Icons.Hud_Perk_Star_Gold',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(2)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Commando_Green',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Green',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(3)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Commando_Blue',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Blue',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(4)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Commando_Purple',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Purple',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(5)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Commando_Orange',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Orange',DrawColor=(B=255,G=255,R=255,A=255)) CustomLevelInfo="Level up by doing damage with perked weapons|30% faster reload with all weapons|You get three additional Zed-Time Extensions" PerkIndex=3 OnHUDIcon=Texture'KillingFloorHUD.Perks.Perk_Commando' OnHUDGoldIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Commando_Gold' VeterancyName="Commando" Requirements(0)="Required experience for the next level: %x" -} +class NiceVetCommando extends NiceVeterancyTypes + abstract; +static function AddCustomStats(ClientPerkRepLink Other){ + other.AddCustomValue(Class'NiceVetCommandoExp'); +} +static function int GetStatValueInt(ClientPerkRepLink StatOther, byte ReqNum){ + return StatOther.GetCustomValueInt(Class'NiceVetCommandoExp'); +} +static function array GetProgressArray(byte ReqNum, optional out int DoubleScalingBase){ + return default.progressArray0; +} +static function float GetHealthBarsDistanceMulti(KFPlayerReplicationInfo KFPRI){ + if(KFPRI != none && SomeoneHasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillCommandoStrategist')) + return class'NiceSkillCommandoStrategist'.default.visionRadius; + return 0.0; +} +static function float GetStalkerViewDistanceMulti(KFPlayerReplicationInfo KFPRI){ + if(KFPRI != none && SomeoneHasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillCommandoStrategist')) + return class'NiceSkillCommandoStrategist'.default.visionRadius; + return 0.0; +} +static function float GetMagCapacityMod(KFPlayerReplicationInfo KFPRI, KFWeapon Other){ + local class pickupClass; + pickupClass = GetPickupFromWeapon(other.class); + if(IsPerkedPickup(pickupClass) && HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillCommandoLargerMags')) + return class'NiceSkillCommandoLargerMags'.default.sizeBonus; + return 1.0; +} +static function float GetReloadSpeedModifierStatic(KFPlayerReplicationInfo KFPRI, class Other){ + return 1.3; +} +static function int ZedTimeExtensions(KFPlayerReplicationInfo KFPRI){ + if(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillCommandoTactitian')) + return class'NiceSkillCommandoTactitian'.default.bonusExt + 3; + return 3; +} +static function string GetCustomLevelInfo(byte Level){ + return default.CustomLevelInfo; +} +defaultproperties +{ + bNewTypePerk=True + SkillGroupA(0)=Class'NicePack.NiceSkillCommandoTactitian' + SkillGroupA(1)=Class'NicePack.NiceSkillCommandoCriticalFocus' + SkillGroupA(2)=Class'NicePack.NiceSkillCommandoLargerMags' + SkillGroupA(3)=Class'NicePack.NiceSkillCommandoPerfectExecution' + SkillGroupA(4)=Class'NicePack.NiceSkillCommandoZEDProfessional' + SkillGroupB(0)=Class'NicePack.NiceSkillCommandoStrategist' + SkillGroupB(1)=Class'NicePack.NiceSkillCommandoTrashCleaner' + SkillGroupB(2)=Class'NicePack.NiceSkillCommandoExplosivePower' + SkillGroupB(3)=Class'NicePack.NiceSkillCommandoGiantSlayer' + SkillGroupB(4)=Class'NicePack.NiceSkillCommandoZEDEvisceration' + progressArray0(0)=100 + progressArray0(1)=1000 + progressArray0(2)=3000 + progressArray0(3)=10000 + progressArray0(4)=30000 + progressArray0(5)=100000 + progressArray0(6)=200000 + DefaultDamageType=Class'NicePack.NiceDamageTypeVetCommando' + OnHUDIcons(0)=(PerkIcon=Texture'KillingFloorHUD.Perks.Perk_Commando',StarIcon=Texture'KillingFloorHUD.HUD.Hud_Perk_Star',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(1)=(PerkIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Commando_Gold',StarIcon=Texture'KillingFloor2HUD.Perk_Icons.Hud_Perk_Star_Gold',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(2)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Commando_Green',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Green',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(3)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Commando_Blue',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Blue',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(4)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Commando_Purple',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Purple',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(5)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Commando_Orange',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Orange',DrawColor=(B=255,G=255,R=255,A=255)) + CustomLevelInfo="Level up by doing damage with perked weapons|30% faster reload with all weapons|You get three additional Zed-Time Extensions" + PerkIndex=3 + OnHUDIcon=Texture'KillingFloorHUD.Perks.Perk_Commando' + OnHUDGoldIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Commando_Gold' + VeterancyName="Commando" + Requirements(0)="Required experience for the next level: %x" +} diff --git a/sources/Perks/Commando/Skills/NiceSkillCommandoCriticalFocus.uc b/sources/Perks/Commando/Skills/NiceSkillCommandoCriticalFocus.uc index 579b7df..a95d754 100644 --- a/sources/Perks/Commando/Skills/NiceSkillCommandoCriticalFocus.uc +++ b/sources/Perks/Commando/Skills/NiceSkillCommandoCriticalFocus.uc @@ -1,28 +1,36 @@ -class NiceSkillCommandoCriticalFocus extends NiceSkill - abstract; -var float cooldown; -var float healthBoundary; -function static SkillSelected(NicePlayerController nicePlayer){ - local NicePack niceMutator; - super.SkillSelected(nicePlayer); - niceMutator = class'NicePack'.static.Myself(nicePlayer.Level); - if(niceMutator == none || niceMutator.Role == Role_AUTHORITY) return; - niceMutator.AddCounter("npCommandoCriticalFocus", Texture'NicePackT.HudCounter.commandoCounter', false, default.class); -} -function static SkillDeSelected(NicePlayerController nicePlayer){ - local NicePack niceMutator; - super.SkillDeSelected(nicePlayer); - niceMutator = class'NicePack'.static.Myself(nicePlayer.Level); - if(niceMutator == none || niceMutator.Role == Role_AUTHORITY) return; - niceMutator.RemoveCounter("npCommandoCriticalFocus"); -} -function static int UpdateCounterValue(string counterName, NicePlayerController nicePlayer){ - local NiceHumanPawn nicePawn; - if(nicePlayer == none || counterName != "npCommandoCriticalFocus") return 0; - nicePawn = NiceHumanPawn(nicePlayer.pawn); - if(nicePawn == none) return 0; - return Ceil(nicePawn.forcedZedTimeCountDown); -} -defaultproperties -{ cooldown=30.000000 healthBoundary=50.000000 SkillName="Critical focus" -} +class NiceSkillCommandoCriticalFocus extends NiceSkill + abstract; +var float cooldown; +var float healthBoundary; +function static SkillSelected(NicePlayerController nicePlayer){ + local NicePack niceMutator; + super.SkillSelected(nicePlayer); + niceMutator = class'NicePack'.static.Myself(nicePlayer.Level); + if(niceMutator == none || niceMutator.Role == Role_AUTHORITY) + return; + niceMutator.AddCounter("npCommandoCriticalFocus", Texture'NicePackT.HudCounter.commandoCounter', false, default.class); +} +function static SkillDeSelected(NicePlayerController nicePlayer){ + local NicePack niceMutator; + super.SkillDeSelected(nicePlayer); + niceMutator = class'NicePack'.static.Myself(nicePlayer.Level); + if(niceMutator == none || niceMutator.Role == Role_AUTHORITY) + return; + niceMutator.RemoveCounter("npCommandoCriticalFocus"); +} +function static int UpdateCounterValue(string counterName, NicePlayerController nicePlayer){ + local NiceHumanPawn nicePawn; + if(nicePlayer == none || counterName != "npCommandoCriticalFocus") + return 0; + nicePawn = NiceHumanPawn(nicePlayer.pawn); + if(nicePawn == none) + return 0; + return Ceil(nicePawn.forcedZedTimeCountDown); +} +defaultproperties +{ + cooldown=30.000000 + healthBoundary=50.000000 + SkillName="Critical focus" + SkillEffects="Activates zed time once you fall below 50% health. Has a cooldown of 30 seconds." +} diff --git a/sources/Perks/Commando/Skills/NiceSkillCommandoGiantSlayer.uc b/sources/Perks/Commando/Skills/NiceSkillCommandoGiantSlayer.uc new file mode 100644 index 0000000..eb06778 --- /dev/null +++ b/sources/Perks/Commando/Skills/NiceSkillCommandoGiantSlayer.uc @@ -0,0 +1,11 @@ +class NiceSkillCommandoGiantSlayer extends NiceSkill + abstract; +var float bonusDamageMult; +var float healthStep; +defaultproperties +{ + healthStep=1000.000000 + bonusDamageMult=0.05000 + SkillName="Giant slayer" + SkillEffects="For every 1000 of health zed currently has, you deal additional 5% damage." +} diff --git a/sources/Perks/Commando/Skills/NiceSkillCommandoThinOut.uc b/sources/Perks/Commando/Skills/NiceSkillCommandoThinOut.uc deleted file mode 100644 index 6cda205..0000000 --- a/sources/Perks/Commando/Skills/NiceSkillCommandoThinOut.uc +++ /dev/null @@ -1,7 +0,0 @@ -class NiceSkillCommandoThinOut extends NiceSkill - abstract; -var float damageMult; -var float maxDistance; -defaultproperties -{ damageMult=2.000000 MaxDistance=800.000000 SkillName="Thin out" SkillEffects="Deal double damage against non-trash zeds, when there's either a huge zed or another zed of the same type within 16 meters of you." -} diff --git a/sources/Perks/Commando/Skills/NiceSkillCommandoTrashCleaner.uc b/sources/Perks/Commando/Skills/NiceSkillCommandoTrashCleaner.uc index da7fa7f..8d82cdd 100644 --- a/sources/Perks/Commando/Skills/NiceSkillCommandoTrashCleaner.uc +++ b/sources/Perks/Commando/Skills/NiceSkillCommandoTrashCleaner.uc @@ -1,6 +1,9 @@ -class NiceSkillCommandoTrashCleaner extends NiceSkill - abstract; -var float decapitationMultiLimit; -defaultproperties -{ decapitationMultiLimit=0.600000 SkillName="Trash cleaner" SkillEffects="Get finisher property on your shots against low-health zeds, but your weapons leave more decapitated zeds behind." -} +class NiceSkillCommandoTrashCleaner extends NiceSkill + abstract; +var float decapitationMultiLimit; +defaultproperties +{ + decapitationMultiLimit=0.45 + SkillName="Trash cleaner" + SkillEffects="Get finisher property on your shots against low-health zeds, but your weapons leave more decapitated zeds behind." +} diff --git a/sources/Perks/Commando/Skills/NiceSkillCommandoZEDEvisceration.uc b/sources/Perks/Commando/Skills/NiceSkillCommandoZEDEvisceration.uc index 741714e..89f301a 100644 --- a/sources/Perks/Commando/Skills/NiceSkillCommandoZEDEvisceration.uc +++ b/sources/Perks/Commando/Skills/NiceSkillCommandoZEDEvisceration.uc @@ -1,5 +1,7 @@ -class NiceSkillCommandoZEDEvisceration extends NiceSkill - abstract; -defaultproperties -{ SkillName="Evisceration" SkillEffects="During zed-time both 'Trash cleaner' and 'Thin out' skills are active." -} +class NiceSkillCommandoZEDEvisceration extends NiceSkill + abstract; +defaultproperties +{ + SkillName="Evisceration" + SkillEffects="Does nothing." +} diff --git a/sources/Perks/Demolitions/NiceVetDemolitions.uc b/sources/Perks/Demolitions/NiceVetDemolitions.uc index 1fd7755..3193c17 100644 --- a/sources/Perks/Demolitions/NiceVetDemolitions.uc +++ b/sources/Perks/Demolitions/NiceVetDemolitions.uc @@ -1,66 +1,114 @@ -class NiceVetDemolitions extends NiceVeterancyTypes - abstract; -static function AddCustomStats(ClientPerkRepLink Other){ - other.AddCustomValue(Class'NiceVetDemolitionsExp'); -} -static function int GetStatValueInt(ClientPerkRepLink StatOther, byte ReqNum){ - return StatOther.GetCustomValueInt(Class'NiceVetDemolitionsExp'); -} -static function array GetProgressArray(byte ReqNum, optional out int DoubleScalingBase){ - return default.progressArray0; -} -static function int ReduceDamage(KFPlayerReplicationInfo KFPRI, KFPawn Injured, Pawn Instigator, int InDamage, class DmgType){ - local NicePlayerController nicePlayer; - if(class(DmgType) != none) return 0; - nicePlayer = NicePlayerController(KFPRI.Owner); - if(nicePlayer != none && Instigator == nicePlayer.pawn && nicePlayer.IsZedTimeActive() && HasSkill(nicePlayer, class'NiceSkillDemoZEDDuckAndCover')) return 0.0; - if((class(DmgType) != none && class(DmgType).default.bIsExplosive)) return float(InDamage) * 0.5; - return InDamage; -} -static function float AddExtraAmmoFor(KFPlayerReplicationInfo KFPRI, Class AmmoType){ - local float bonusNades, bonusPipes; - // Default bonus - bonusNades = 5; - bonusPipes = 6; - if(AmmoType == class'FragAmmo') return 1.0 + 0.2 * bonusNades; - if(ClassIsChildOf(AmmoType, class'PipeBombAmmo')) return 1.0 + 0.5 * bonusPipes; - return 1.0; -} -static function int AddDamage(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InDamage, class DmgType){ - local float perkDamage; - local class pickupClass; - pickupClass = GetPickupFromDamageType(DmgType); - perkDamage = float(InDamage); - if(DmgType == class'NicePack.NiceDamTypeDemoExplosion') return 1.6 * perkDamage; - if(IsPerkedPickup(pickupClass)) perkDamage *= 1.25; - else if( pickupClass != none && pickupClass.default.weight <= class'NiceSkillDemoOffperk'.default.weightBound && HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillDemoOffperk') ) perkDamage *= class'NiceSkillDemoOffperk'.default.damageBonus; - if( KFPRI != none && class(DmgType) != none && SomeoneHasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillDemoOnperk') ) perkDamage *= class'NiceSkillDemoOnperk'.default.damageBonus; - return perkDamage; -} -static function float GetReloadSpeedModifierStatic(KFPlayerReplicationInfo KFPRI, class other){ - local NiceHumanPawn nicePawn; - local class pickupClass; - // Pistols reload - if( other != none && other.default.weight <= class'NiceSkillDemoOffperk'.default.weightBound && HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillDemoOffperk') ) return class'NiceSkillDemoOffperk'.default.reloadBonus; - // Maniac reload - pickupClass = GetPickupFromWeapon(other); - if(KFPRI != none && PlayerController(KFPRI.Owner) != none) nicePawn = NiceHumanPawn(PlayerController(KFPRI.Owner).Pawn); - if(nicePawn != none && nicePawn.maniacTimeout >= 0.0 && IsPerkedPickup(pickupClass)) return class'NiceSkillDemoManiac'.default.reloadSpeedup; - return 1.0; -} -static function float stunDurationMult(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, class DmgType){ - if(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillDemoConcussion')) return class'NiceSkillDemoConcussion'.default.durationMult; - return 1.0; -} -static function int AddStunScore(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InStunScore, class DmgType){ - return int(float(InStunScore) * 1.5); -} -static function int AddFlinchScore(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InFlinchScore, class DmgType){ - return int(float(InFlinchScore) * 1.5); -} -static function string GetCustomLevelInfo(byte Level){ - return default.CustomLevelInfo; -} -defaultproperties -{ bNewTypePerk=True SkillGroupA(0)=Class'NicePack.NiceSkillDemoOnperk' SkillGroupA(1)=Class'NicePack.NiceSkillDemoDirectApproach' SkillGroupA(2)=Class'NicePack.NiceSkillDemoConcussion' SkillGroupA(3)=Class'NicePack.NiceSkillDemoAPShot' SkillGroupA(4)=Class'NicePack.NiceSkillDemoZEDDuckAndCover' SkillGroupB(0)=Class'NicePack.NiceSkillDemoOffperk' SkillGroupB(1)=Class'NicePack.NiceSkillDemoVolatile' SkillGroupB(2)=Class'NicePack.NiceSkillDemoReactiveArmor' SkillGroupB(3)=Class'NicePack.NiceSkillDemoManiac' SkillGroupB(4)=Class'NicePack.NiceSkillDemoZEDFullBlast' progressArray0(0)=100 progressArray0(1)=1000 progressArray0(2)=3000 progressArray0(3)=10000 progressArray0(4)=30000 progressArray0(5)=100000 progressArray0(6)=200000 DefaultDamageType=Class'NicePack.NiceDamageTypeVetDemolitions' OnHUDIcons(0)=(PerkIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Demolition',StarIcon=Texture'KillingFloorHUD.HUD.Hud_Perk_Star',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(1)=(PerkIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Demolition_Gold',StarIcon=Texture'KillingFloor2HUD.Perk_Icons.Hud_Perk_Star_Gold',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(2)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Demolition_Green',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Green',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(3)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Demolition_Blue',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Blue',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(4)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Demolition_Purple',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Purple',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(5)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Demolition_Orange',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Orange',DrawColor=(B=255,G=255,R=255,A=255)) CustomLevelInfo="Level up by doing damage with perked weapons|25% extra explosives damage|50% better stun and flinch ability for all weapons|50% resistance to explosives|+5 grenades|+6 pipe bombs" PerkIndex=6 OnHUDIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Demolition' OnHUDGoldIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Demolition_Gold' VeterancyName="Demolitions" Requirements(0)="Required experience for the next level: %x" -} +class NiceVetDemolitions extends NiceVeterancyTypes + abstract; +static function AddCustomStats(ClientPerkRepLink Other){ + other.AddCustomValue(Class'NiceVetDemolitionsExp'); +} +static function int GetStatValueInt(ClientPerkRepLink StatOther, byte ReqNum){ + return StatOther.GetCustomValueInt(Class'NiceVetDemolitionsExp'); +} +static function array GetProgressArray(byte ReqNum, optional out int DoubleScalingBase){ + return default.progressArray0; +} +static function int ReduceDamage(KFPlayerReplicationInfo KFPRI, KFPawn Injured, Pawn Instigator, int InDamage, class DmgType){ + local NicePlayerController nicePlayer; + if(class(DmgType) != none) + return 0; + nicePlayer = NicePlayerController(KFPRI.Owner); + if(nicePlayer != none && Instigator == nicePlayer.pawn && nicePlayer.IsZedTimeActive() + && HasSkill(nicePlayer, class'NiceSkillDemoZEDDuckAndCover')) + return 0.0; + if((class(DmgType) != none && class(DmgType).default.bIsExplosive)) + return float(InDamage) * 0.5; + return InDamage; +} +static function float AddExtraAmmoFor(KFPlayerReplicationInfo KFPRI, Class AmmoType){ + local float bonusNades, bonusPipes; + // Default bonus + bonusNades = 5; + bonusPipes = 6; + if(AmmoType == class'FragAmmo') + return 1.0 + 0.2 * bonusNades; + if(ClassIsChildOf(AmmoType, class'PipeBombAmmo')) + return 1.0 + 0.5 * bonusPipes; + return 1.0; +} +static function int AddDamage(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InDamage, class DmgType){ + local float perkDamage; + local class pickupClass; + pickupClass = GetPickupFromDamageType(DmgType); + perkDamage = float(InDamage); + if(DmgType == class'NicePack.NiceDamTypeDemoExplosion') + return 1.6 * perkDamage; + if(IsPerkedPickup(pickupClass)) + perkDamage *= 1.25; + else if( pickupClass != none && pickupClass.default.weight <= class'NiceSkillDemoOffperk'.default.weightBound + && HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillDemoOffperk') ) + perkDamage *= class'NiceSkillDemoOffperk'.default.damageBonus; + if( KFPRI != none && class(DmgType) != none + && SomeoneHasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillDemoOnperk') ) + perkDamage *= class'NiceSkillDemoOnperk'.default.damageBonus; + return perkDamage; +} +static function float GetReloadSpeedModifierStatic(KFPlayerReplicationInfo KFPRI, class other){ + local NiceHumanPawn nicePawn; + local class pickupClass; + // Pistols reload + if( other != none && other.default.weight <= class'NiceSkillDemoOffperk'.default.weightBound + && HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillDemoOffperk') ) + return class'NiceSkillDemoOffperk'.default.reloadBonus; + // Maniac reload + pickupClass = GetPickupFromWeapon(other); + if(KFPRI != none && PlayerController(KFPRI.Owner) != none) + nicePawn = NiceHumanPawn(PlayerController(KFPRI.Owner).Pawn); + if(nicePawn != none && nicePawn.maniacTimeout >= 0.0 && IsPerkedPickup(pickupClass)) + return class'NiceSkillDemoManiac'.default.reloadSpeedup; + return 1.0; +} +static function float stunDurationMult(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, class DmgType){ + if(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillDemoConcussion')) + return class'NiceSkillDemoConcussion'.default.durationMult; + return 1.0; +} +static function int AddStunScore(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InStunScore, class DmgType){ + return int(float(InStunScore) * 1.5); +} +static function int AddFlinchScore(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InFlinchScore, class DmgType){ + return int(float(InFlinchScore) * 1.5); +} +static function string GetCustomLevelInfo(byte Level){ + return default.CustomLevelInfo; +} +defaultproperties +{ + bNewTypePerk=True + SkillGroupA(0)=Class'NicePack.NiceSkillDemoOnperk' + SkillGroupA(1)=Class'NicePack.NiceSkillDemoDirectApproach' + SkillGroupA(2)=Class'NicePack.NiceSkillDemoConcussion' + SkillGroupA(3)=Class'NicePack.NiceSkillDemoAPShot' + SkillGroupA(4)=Class'NicePack.NiceSkillDemoZEDDuckAndCover' + SkillGroupB(0)=Class'NicePack.NiceSkillDemoOffperk' + SkillGroupB(1)=Class'NicePack.NiceSkillDemoVolatile' + SkillGroupB(2)=Class'NicePack.NiceSkillDemoReactiveArmor' + SkillGroupB(3)=Class'NicePack.NiceSkillDemoManiac' + SkillGroupB(4)=Class'NicePack.NiceSkillDemoZEDFullBlast' + progressArray0(0)=100 + progressArray0(1)=1000 + progressArray0(2)=3000 + progressArray0(3)=10000 + progressArray0(4)=30000 + progressArray0(5)=100000 + progressArray0(6)=200000 + DefaultDamageType=Class'NicePack.NiceDamageTypeVetDemolitions' + OnHUDIcons(0)=(PerkIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Demolition',StarIcon=Texture'KillingFloorHUD.HUD.Hud_Perk_Star',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(1)=(PerkIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Demolition_Gold',StarIcon=Texture'KillingFloor2HUD.Perk_Icons.Hud_Perk_Star_Gold',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(2)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Demolition_Green',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Green',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(3)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Demolition_Blue',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Blue',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(4)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Demolition_Purple',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Purple',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(5)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Demolition_Orange',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Orange',DrawColor=(B=255,G=255,R=255,A=255)) + CustomLevelInfo="Level up by doing damage with perked weapons|25% extra explosives damage|50% better stun and flinch ability for all weapons|50% resistance to explosives|+5 grenades|+6 pipe bombs" + PerkIndex=6 + OnHUDIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Demolition' + OnHUDGoldIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Demolition_Gold' + VeterancyName="Demolitions" + Requirements(0)="Required experience for the next level: %x" +} diff --git a/sources/Perks/Enforcer/NiceVetEnforcer.uc b/sources/Perks/Enforcer/NiceVetEnforcer.uc index 7c00d46..302ef3c 100644 --- a/sources/Perks/Enforcer/NiceVetEnforcer.uc +++ b/sources/Perks/Enforcer/NiceVetEnforcer.uc @@ -1,118 +1,157 @@ -class NiceVetEnforcer extends NiceVeterancyTypes - abstract; - -static function AddCustomStats(ClientPerkRepLink Other){ - Other.AddCustomValue(Class'NiceVetSupportExp'); -} - -static function int GetStatValueInt(ClientPerkRepLink StatOther, byte ReqNum){ - return StatOther.GetCustomValueInt(Class'NiceVetSupportExp'); -} - -static function array GetProgressArray(byte ReqNum, optional out int DoubleScalingBase){ - return default.progressArray0; -} - -// Other bonuses - -static function float GetPenetrationDamageMulti(KFPlayerReplicationInfo KFPRI, float DefaultPenDamageReduction, class fireIntance){ - local float bonusReduction; - local float PenDamageInverse; - bonusReduction = 0.0; - if(class(fireIntance) != none) - return DefaultPenDamageReduction; - if(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillSupportStubbornness')) bonusReduction = class'NiceSkillSupportStubbornness'.default.penLossRed; - PenDamageInverse = (1.0 - FMax(0, DefaultPenDamageReduction)); - return DefaultPenDamageReduction + PenDamageInverse * (0.6 + 0.4 * bonusReduction); // 60% better penetrations + bonus -} - -static function int AddStunScore(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InStunScore, class DmgType){ - local class pickupClass; - pickupClass = GetPickupFromDamageType(DmgType); - if(KFPRI != none && IsPerkedPickup(pickupClass) && HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillEnforcerBombard')) return InStunScore * class'NiceSkillEnforcerBombard'.default.stunMult; - return InStunScore; -} - -static function class GetNadeType(KFPlayerReplicationInfo KFPRI){ - /*if(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillSupportCautious')) return class'NicePack.NiceDelayedNade'; - return class'NicePack.NiceNailNade';*/ - return class'NicePack.NiceCryoNade'; -} - -static function int ReduceDamage(KFPlayerReplicationInfo KFPRI, KFPawn Injured, Pawn Instigator, int InDamage, class DmgType){ - if(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillEnforcerDetermination') && Injured.Health < class'NiceSkillEnforcerDetermination'.default.healthBound) - InDamage *= (1 - class'NiceSkillEnforcerDetermination'.default.addedResist); - if(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillEnforcerUnshakable')) - InDamage *= (1 - class'NiceSkillEnforcerUnshakable'.default.skillResist); - if(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillHeavyCoating') && Injured.ShieldStrength > 0){ - if( class(DmgType) != none - && ((class(DmgType).default.bDealBurningDamage && KFMonster(Instigator) != none) - || DmgType == class'NiceZombieTeslaHusk'.default.MyDamageType) ) - InDamage *= (1 - class'NiceSkillHeavyCoating'.default.huskResist); - } - return InDamage; -} - -static function float GetFireSpeedModStatic(KFPlayerReplicationInfo KFPRI, class other){ - local float fireSpeed; - local NicePlayerController nicePlayer; - local class pickupClass; - pickupClass = GetPickupFromWeapon(other); - if(KFPRI.Owner == none) - return 1.0; - if(IsPerkedPickup(pickupClass) && HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillHeavyOverclocking')) - fireSpeed = class'NiceSkillHeavyOverclocking'.default.fireSpeedMult; - else - fireSpeed = 1.0; - nicePlayer = NicePlayerController(KFPRI.Owner); - /*if(nicePlayer != none && HasSkill(nicePlayer, class'NiceSkillEnforcerZEDBarrage')) - fireSpeed /= (KFPRI.Owner.Level.TimeDilation / 1.1);*/ - return fireSpeed; -} - -static function float ModifyRecoilSpread(KFPlayerReplicationInfo KFPRI, WeaponFire other, out float Recoil){ - local class pickupClass; - pickupClass = GetPickupFromWeaponFire(other); - if(IsPerkedPickup(pickupClass) && HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillHeavyOverclocking')) - Recoil = class'NiceSkillHeavyOverclocking'.default.fireSpeedMult; - else - Recoil = 1.0; - return Recoil; -} - -/*static function float GetMagCapacityModStatic(KFPlayerReplicationInfo KFPRI, class other){ - local class niceWeap; - niceWeap = class(other); - if(niceWeap != none && niceWeap.default.reloadType == RTYPE_MAG) - return 1.5; - if(other == class'NicePack.NiceM41AAssaultRifle' || other == class'NicePack.NiceChainGun' || other == class'NicePack.NiceStinger' ) - return 1.5; - return 1.0; -}*/ - -static function float GetMovementSpeedModifier(KFPlayerReplicationInfo KFPRI, KFGameReplicationInfo KFGRI){ - if(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillEnforcerUnstoppable')) - return class'NiceSkillEnforcerUnstoppable'.default.speedMult; - return 1.0; -} - -static function bool CanBePulled(KFPlayerReplicationInfo KFPRI){ - if(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillEnforcerUnstoppable')) - return false; - return super.CanBePulled(KFPRI); -} - -static function float SlowingModifier(KFPlayerReplicationInfo KFPRI){ - if(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillEnforcerUnstoppable')) - return 0.0; - return 1.0; -} - -static function string GetCustomLevelInfo(byte Level){ - return default.CustomLevelInfo; -} -defaultproperties -{ bNewTypePerk=True - SkillGroupA(0)=Class'NicePack.NiceSkillEnforcerUnstoppable' SkillGroupA(1)=Class'NicePack.NiceSkillEnforcerBombard' SkillGroupA(2)=Class'NicePack.NiceSkillEnforcerFullCounter' SkillGroupA(4)=Class'NicePack.NiceSkillEnforcerZEDBarrage' - SkillGroupB(0)=Class'NicePack.NiceSkillEnforcerUnshakable' SkillGroupB(1)=Class'NicePack.NiceSkillEnforcerMultitasker' SkillGroupB(2)=Class'NicePack.NiceSkillEnforcerDetermination' SkillGroupB(4)=Class'NicePack.NiceSkillEnforcerZEDJuggernaut' progressArray0(0)=100 progressArray0(1)=1000 progressArray0(2)=3000 progressArray0(3)=10000 progressArray0(4)=30000 progressArray0(5)=100000 progressArray0(6)=200000 DefaultDamageType=Class'NicePack.NiceDamageTypeVetEnforcer' OnHUDIcons(0)=(PerkIcon=Texture'KillingFloorHUD.Perks.Perk_Support',StarIcon=Texture'KillingFloorHUD.HUD.Hud_Perk_Star',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(1)=(PerkIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Support_Gold',StarIcon=Texture'KillingFloor2HUD.Perk_Icons.Hud_Perk_Star_Gold',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(2)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Support_Green',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Green',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(3)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Support_Blue',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Blue',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(4)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Support_Purple',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Purple',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(5)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Support_Orange',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Orange',DrawColor=(B=255,G=255,R=255,A=255)) CustomLevelInfo="Level up by doing damage with perked weapons|60% better penetration with all weapons" PerkIndex=1 OnHUDIcon=Texture'KillingFloorHUD.Perks.Perk_Support' OnHUDGoldIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Support_Gold' VeterancyName="Enforcer" Requirements(0)="Required experience for the next level: %x" +class NiceVetEnforcer extends NiceVeterancyTypes + abstract; + +static function AddCustomStats(ClientPerkRepLink Other){ + Other.AddCustomValue(Class'NiceVetSupportExp'); +} + +static function int GetStatValueInt(ClientPerkRepLink StatOther, byte ReqNum){ + return StatOther.GetCustomValueInt(Class'NiceVetSupportExp'); +} + +static function array GetProgressArray(byte ReqNum, optional out int DoubleScalingBase){ + return default.progressArray0; +} + +// Other bonuses + +static function float GetPenetrationDamageMulti(KFPlayerReplicationInfo KFPRI, float DefaultPenDamageReduction, class fireIntance){ + local float bonusReduction; + local float PenDamageInverse; + bonusReduction = 0.0; + if(class(fireIntance) != none) + return DefaultPenDamageReduction; + if(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillSupportStubbornness')) + bonusReduction = class'NiceSkillSupportStubbornness'.default.penLossRed; + PenDamageInverse = (1.0 - FMax(0, DefaultPenDamageReduction)); + return DefaultPenDamageReduction + PenDamageInverse * (0.6 + 0.4 * bonusReduction); // 60% better penetrations + bonus +} + +static function int AddStunScore(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InStunScore, class DmgType){ + local class pickupClass; + pickupClass = GetPickupFromDamageType(DmgType); + if(KFPRI != none && IsPerkedPickup(pickupClass) && HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillEnforcerBombard')) + return InStunScore * class'NiceSkillEnforcerBombard'.default.stunMult; + return InStunScore; +} + +static function class GetNadeType(KFPlayerReplicationInfo KFPRI){ + /*if(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillSupportCautious')) + return class'NicePack.NiceDelayedNade'; + return class'NicePack.NiceNailNade';*/ + return class'NicePack.NiceCryoNade'; +} + +static function float AddExtraAmmoFor(KFPlayerReplicationInfo KFPRI, Class AmmoType){ + local float bonusNades; + // Default bonus + bonusNades = 2; + if(AmmoType == class'NicePack.NiceCryoNade' || AmmoType == class'NicePack.NiceNailNade') + return 1.0 + 0.2 * bonusNades; + return 1.0; +} + +static function int ReduceDamage(KFPlayerReplicationInfo KFPRI, KFPawn Injured, Pawn Instigator, int InDamage, class DmgType){ + if(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillEnforcerDetermination') && Injured.Health < class'NiceSkillEnforcerDetermination'.default.healthBound) + InDamage *= (1 - class'NiceSkillEnforcerDetermination'.default.addedResist); + if(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillEnforcerUnshakable')) + InDamage *= (1 - class'NiceSkillEnforcerUnshakable'.default.skillResist); + if(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillHeavyCoating') && Injured.ShieldStrength > 0){ + if( class(DmgType) != none + && ((class(DmgType).default.bDealBurningDamage && KFMonster(Instigator) != none) + || DmgType == class'NiceZombieTeslaHusk'.default.MyDamageType) ) + InDamage *= (1 - class'NiceSkillHeavyCoating'.default.huskResist); + } + return InDamage; +} + +static function float GetFireSpeedModStatic(KFPlayerReplicationInfo KFPRI, class other){ + local float fireSpeed; + local NicePlayerController nicePlayer; + local class pickupClass; + pickupClass = GetPickupFromWeapon(other); + if(KFPRI.Owner == none) + return 1.0; + if(IsPerkedPickup(pickupClass) && HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillHeavyOverclocking')) + fireSpeed = class'NiceSkillHeavyOverclocking'.default.fireSpeedMult; + else + fireSpeed = 1.0; + nicePlayer = NicePlayerController(KFPRI.Owner); + /*if(nicePlayer != none && HasSkill(nicePlayer, class'NiceSkillEnforcerZEDBarrage')) + fireSpeed /= (KFPRI.Owner.Level.TimeDilation / 1.1);*/ + return fireSpeed; +} + +static function float ModifyRecoilSpread(KFPlayerReplicationInfo KFPRI, WeaponFire other, out float Recoil){ + local class pickupClass; + pickupClass = GetPickupFromWeaponFire(other); + if(IsPerkedPickup(pickupClass) && HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillHeavyOverclocking')) + Recoil = class'NiceSkillHeavyOverclocking'.default.fireSpeedMult; + else + Recoil = 1.0; + return Recoil; +} + +/*static function float GetMagCapacityModStatic(KFPlayerReplicationInfo KFPRI, class other){ + local class niceWeap; + niceWeap = class(other); + if(niceWeap != none && niceWeap.default.reloadType == RTYPE_MAG) + return 1.5; + if(other == class'NicePack.NiceM41AAssaultRifle' || other == class'NicePack.NiceChainGun' || other == class'NicePack.NiceStinger' ) + return 1.5; + return 1.0; +}*/ + +static function float GetMovementSpeedModifier(KFPlayerReplicationInfo KFPRI, KFGameReplicationInfo KFGRI){ + if(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillEnforcerUnstoppable')) + return class'NiceSkillEnforcerUnstoppable'.default.speedMult; + return 1.0; +} + +static function bool CanBePulled(KFPlayerReplicationInfo KFPRI){ + if(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillEnforcerUnstoppable')) + return false; + return super.CanBePulled(KFPRI); +} + +static function float SlowingModifier(KFPlayerReplicationInfo KFPRI){ + if(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillEnforcerUnstoppable')) + return 0.0; + return 1.0; +} + +static function string GetCustomLevelInfo(byte Level){ + return default.CustomLevelInfo; +} +defaultproperties +{ + bNewTypePerk=True + SkillGroupA(0)=Class'NicePack.NiceSkillEnforcerUnstoppable' + SkillGroupA(1)=Class'NicePack.NiceSkillEnforcerBombard' + SkillGroupA(2)=Class'NicePack.NiceSkillEnforcerFullCounter' + SkillGroupA(4)=Class'NicePack.NiceSkillEnforcerZEDBarrage' + SkillGroupB(0)=Class'NicePack.NiceSkillEnforcerUnshakable' + SkillGroupB(1)=Class'NicePack.NiceSkillEnforcerMultitasker' + SkillGroupB(2)=Class'NicePack.NiceSkillEnforcerDetermination' + SkillGroupB(4)=Class'NicePack.NiceSkillEnforcerZEDJuggernaut' + progressArray0(0)=100 + progressArray0(1)=1000 + progressArray0(2)=3000 + progressArray0(3)=10000 + progressArray0(4)=30000 + progressArray0(5)=100000 + progressArray0(6)=200000 + DefaultDamageType=Class'NicePack.NiceDamageTypeVetEnforcer' + OnHUDIcons(0)=(PerkIcon=Texture'KillingFloorHUD.Perks.Perk_Support',StarIcon=Texture'KillingFloorHUD.HUD.Hud_Perk_Star',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(1)=(PerkIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Support_Gold',StarIcon=Texture'KillingFloor2HUD.Perk_Icons.Hud_Perk_Star_Gold',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(2)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Support_Green',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Green',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(3)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Support_Blue',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Blue',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(4)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Support_Purple',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Purple',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(5)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Support_Orange',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Orange',DrawColor=(B=255,G=255,R=255,A=255)) + CustomLevelInfo="Level up by doing damage with perked weapons|60% better penetration with all weapons|+2 grenades" + PerkIndex=1 + OnHUDIcon=Texture'KillingFloorHUD.Perks.Perk_Support' + OnHUDGoldIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Support_Gold' + VeterancyName="Enforcer" + Requirements(0)="Required experience for the next level: %x" } \ No newline at end of file diff --git a/sources/Perks/FieldMedic/NiceVetFieldMedic.uc b/sources/Perks/FieldMedic/NiceVetFieldMedic.uc index 7e2e581..5e75f67 100644 --- a/sources/Perks/FieldMedic/NiceVetFieldMedic.uc +++ b/sources/Perks/FieldMedic/NiceVetFieldMedic.uc @@ -1,62 +1,95 @@ -class NiceVetFieldMedic extends NiceVeterancyTypes - abstract; -static function AddCustomStats(ClientPerkRepLink Other){ - Other.AddCustomValue(Class'NiceVetFieldMedicExp'); -} -static function int GetStatValueInt(ClientPerkRepLink StatOther, byte ReqNum){ - return StatOther.GetCustomValueInt(Class'NiceVetFieldMedicExp'); -} -static function array GetProgressArray(byte ReqNum, optional out int DoubleScalingBase){ - return default.progressArray0; -} -// Allows to increase head-shot check scale for some weapons. -static function float GetHeadshotCheckMultiplier(KFPlayerReplicationInfo KFPRI, class DmgType){ - if(KFPRI != none && class'NiceVetFieldMedic'.static.hasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillMedicAimAssistance')) return class'NiceSkillMedicAimAssistance'.default.headIncrease; - return 1.0; -} -// Give Medic normal hand nades again - he should buy medic nade lauchers for healing nades -static function class GetNadeType(KFPlayerReplicationInfo KFPRI){ - if(KFPRI != none && class'NiceVetFieldMedic'.static.hasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillMedicArmament')) return class'NicePack.NiceMedicNade'; - return class'NiceMedicNadePoison'; -} -static function float GetAmmoPickupMod(KFPlayerReplicationInfo KFPRI, KFAmmunition Other){ - if(other != none && other.class == class'FragAmmo' && KFPRI != none && class'NiceVetFieldMedic'.static.hasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillMedicArmament')) return 0.0; - return 1.0; -} -//can't cook medic nades -static function bool CanCookNade(KFPlayerReplicationInfo KFPRI, Weapon Weap){ - return GetNadeType(KFPRI) != class'NicePack.NiceMedicNade'; -} -static function float GetSyringeChargeRate(KFPlayerReplicationInfo KFPRI){ - return 3.0; -} -static function float GetHealPotency(KFPlayerReplicationInfo KFPRI){ - local float potency, debuff; - potency = 2.0; - debuff = 0.0; - if(KFPRI != none && class'NiceVetFieldMedic'.static.hasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillMedicTranquilizer')) debuff += class'NiceSkillMedicTranquilizer'.default.healingDebuff; - potency *= (1.0 - debuff); - return potency; -} -static function float GetFireSpeedModStatic(KFPlayerReplicationInfo KFPRI, class Other){ - if(ClassIsChildOf(Other, class'Syringe')) return 1.6; - return 1.0; -} -static function float GetMovementSpeedModifier(KFPlayerReplicationInfo KFPRI, KFGameReplicationInfo KFGRI){ - return 1.2; -} -static function float SlowingModifier(KFPlayerReplicationInfo KFPRI){ - return 1.5; -} -static function float GetCostScaling(KFPlayerReplicationInfo KFPRI, class Item){ - local class pickupClass; - pickupClass = class(Item); - if(IsPerkedPickup(class(Item))) return 0.5; - return 1.0; -} -static function string GetCustomLevelInfo(byte Level){ - return default.CustomLevelInfo; -} -defaultproperties -{ SkillGroupA(0)=Class'NicePack.NiceSkillMedicSymbioticHealth' SkillGroupA(1)=Class'NicePack.NiceSkillMedicArmament' SkillGroupA(2)=Class'NicePack.NiceSkillMedicAdrenalineShot' SkillGroupA(3)=Class'NicePack.NiceSkillMedicInjection' SkillGroupA(4)=Class'NicePack.NiceSkillMedicZEDHeavenCanceller' SkillGroupB(0)=Class'NicePack.NiceSkillMedicAimAssistance' SkillGroupB(1)=Class'NicePack.NiceSkillMedicPesticide' SkillGroupB(2)=Class'NicePack.NiceSkillMedicRegeneration' SkillGroupB(3)=Class'NicePack.NiceSkillMedicTranquilizer' SkillGroupB(4)=Class'NicePack.NiceSkillMedicZEDFrenzy' progressArray0(0)=100 progressArray0(1)=1000 progressArray0(2)=3000 progressArray0(3)=10000 progressArray0(4)=30000 progressArray0(5)=100000 progressArray0(6)=200000 OnHUDIcons(0)=(PerkIcon=Texture'KillingFloorHUD.Perks.Perk_Medic',StarIcon=Texture'KillingFloorHUD.HUD.Hud_Perk_Star',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(1)=(PerkIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Medic_Gold',StarIcon=Texture'KillingFloor2HUD.Perk_Icons.Hud_Perk_Star_Gold',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(2)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Medic_Green',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Green',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(3)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Medic_Blue',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Blue',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(4)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Medic_Purple',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Purple',DrawColor=(B=255,G=255,R=255,A=255)) OnHUDIcons(5)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Medic_Orange',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Orange',DrawColor=(B=255,G=255,R=255,A=255)) CustomLevelInfo="Level up by doing damage with perked weapons|50% discount on everything|100% more potent medical injections|20% faster movement speed|Better Syringe handling" PerkIndex=0 OnHUDIcon=Texture'KillingFloorHUD.Perks.Perk_Medic' OnHUDGoldIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Medic_Gold' VeterancyName="Field Medic" Requirements(0)="Required experience for the next level: %x" -} +class NiceVetFieldMedic extends NiceVeterancyTypes + abstract; +static function AddCustomStats(ClientPerkRepLink Other){ + Other.AddCustomValue(Class'NiceVetFieldMedicExp'); +} +static function int GetStatValueInt(ClientPerkRepLink StatOther, byte ReqNum){ + return StatOther.GetCustomValueInt(Class'NiceVetFieldMedicExp'); +} +static function array GetProgressArray(byte ReqNum, optional out int DoubleScalingBase){ + return default.progressArray0; +} +// Allows to increase head-shot check scale for some weapons. +static function float GetHeadshotCheckMultiplier(KFPlayerReplicationInfo KFPRI, class DmgType){ + if(KFPRI != none && class'NiceVetFieldMedic'.static.hasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillMedicAimAssistance')) + return class'NiceSkillMedicAimAssistance'.default.headIncrease; + return 1.0; +} +// Give Medic normal hand nades again - he should buy medic nade lauchers for healing nades +static function class GetNadeType(KFPlayerReplicationInfo KFPRI){ + if(KFPRI != none && class'NiceVetFieldMedic'.static.hasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillMedicArmament')) + return class'NicePack.NiceMedicNade'; + return class'NiceMedicNadePoison'; +} +static function float GetAmmoPickupMod(KFPlayerReplicationInfo KFPRI, KFAmmunition Other){ + if(other != none && other.class == class'FragAmmo' + && KFPRI != none && class'NiceVetFieldMedic'.static.hasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillMedicArmament')) + return 0.0; + return 1.0; +} +//can't cook medic nades +static function bool CanCookNade(KFPlayerReplicationInfo KFPRI, Weapon Weap){ + return GetNadeType(KFPRI) != class'NicePack.NiceMedicNade'; +} +static function float GetSyringeChargeRate(KFPlayerReplicationInfo KFPRI){ + return 3.0; +} +static function float GetHealPotency(KFPlayerReplicationInfo KFPRI){ + local float potency, debuff; + potency = 2.0; + debuff = 0.0; + if(KFPRI != none && class'NiceVetFieldMedic'.static.hasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillMedicTranquilizer')) + debuff += class'NiceSkillMedicTranquilizer'.default.healingDebuff; + potency *= (1.0 - debuff); + return potency; +} +static function float GetFireSpeedModStatic(KFPlayerReplicationInfo KFPRI, class Other){ + if(ClassIsChildOf(Other, class'Syringe')) + return 1.6; + return 1.0; +} +static function float GetMovementSpeedModifier(KFPlayerReplicationInfo KFPRI, KFGameReplicationInfo KFGRI){ + return 1.2; +} +static function float GetCostScaling(KFPlayerReplicationInfo KFPRI, class Item){ + local class pickupClass; + pickupClass = class(Item); + if(IsPerkedPickup(class(Item))) + return 0.5; + return 1.0; +} +static function string GetCustomLevelInfo(byte Level){ + return default.CustomLevelInfo; +} +defaultproperties +{ + SkillGroupA(0)=Class'NicePack.NiceSkillMedicSymbioticHealth' + SkillGroupA(1)=Class'NicePack.NiceSkillMedicArmament' + SkillGroupA(2)=Class'NicePack.NiceSkillMedicAdrenalineShot' + SkillGroupA(3)=Class'NicePack.NiceSkillMedicInjection' + SkillGroupA(4)=Class'NicePack.NiceSkillMedicZEDHeavenCanceller' + SkillGroupB(0)=Class'NicePack.NiceSkillMedicAimAssistance' + SkillGroupB(1)=Class'NicePack.NiceSkillMedicPesticide' + SkillGroupB(2)=Class'NicePack.NiceSkillMedicRegeneration' + SkillGroupB(3)=Class'NicePack.NiceSkillMedicTranquilizer' + SkillGroupB(4)=Class'NicePack.NiceSkillMedicZEDFrenzy' + progressArray0(0)=100 + progressArray0(1)=1000 + progressArray0(2)=3000 + progressArray0(3)=10000 + progressArray0(4)=30000 + progressArray0(5)=100000 + progressArray0(6)=200000 + OnHUDIcons(0)=(PerkIcon=Texture'KillingFloorHUD.Perks.Perk_Medic',StarIcon=Texture'KillingFloorHUD.HUD.Hud_Perk_Star',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(1)=(PerkIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Medic_Gold',StarIcon=Texture'KillingFloor2HUD.Perk_Icons.Hud_Perk_Star_Gold',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(2)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Medic_Green',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Green',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(3)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Medic_Blue',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Blue',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(4)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Medic_Purple',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Purple',DrawColor=(B=255,G=255,R=255,A=255)) + OnHUDIcons(5)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Medic_Orange',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Orange',DrawColor=(B=255,G=255,R=255,A=255)) + CustomLevelInfo="Level up by doing damage with perked weapons|50% discount on everything|100% more potent medical injections|20% faster movement speed|Better Syringe handling" + PerkIndex=0 + OnHUDIcon=Texture'KillingFloorHUD.Perks.Perk_Medic' + OnHUDGoldIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Medic_Gold' + VeterancyName="Field Medic" + Requirements(0)="Required experience for the next level: %x" +} diff --git a/sources/Perks/Sharpshooter/NiceSharpshooterAbilitiesAdapter.uc b/sources/Perks/Sharpshooter/NiceSharpshooterAbilitiesAdapter.uc index c3c3f3a..5f8fe4a 100644 --- a/sources/Perks/Sharpshooter/NiceSharpshooterAbilitiesAdapter.uc +++ b/sources/Perks/Sharpshooter/NiceSharpshooterAbilitiesAdapter.uc @@ -1,52 +1,87 @@ -//============================================================================== -// NicePack / NiceSharpshooterAbilitiesAdapter -//============================================================================== -// Temporary stand-in for future functionality. -// Use this class to catch events from sharpshooter players' abilities. -//============================================================================== -// 'Nice pack' source -// Do whatever the fuck you want with it -// Author: dkanus -// E-mail: dkanus@gmail.com -//============================================================================== -class NiceSharpshooterAbilitiesAdapter extends NiceAbilitiesAdapter; -static function AbilityActivated( string abilityID, NicePlayerController relatedPlayer){ - local NiceHumanPawn nicePawn; - if(relatedPlayer == none) return; - nicePawn = NiceHumanPawn(relatedPlayer.pawn); - if(nicePawn == none) return; - if(abilityID == "Calibration"){ nicePawn.currentCalibrationState = CALSTATE_ACTIVE; nicePawn.calibrateUsedZeds.length = 0; nicePawn.calibrationScore = 1; nicePawn.calibrationRemainingTime = 7.0; nicePawn.calibrationHits = 0; nicePawn.calibrationTotalShots = 0; - } - if(abilityID == class'NiceSkillSharpshooterGunslingerA'.default.abilityID){ nicePawn.gunslingerTimer = class'NiceSkillSharpshooterGunslingerA'.default.duration; - } -} -static function AbilityAdded( string abilityID, NicePlayerController relatedPlayer){ - local NiceHumanPawn nicePawn; - if(relatedPlayer == none) return; - nicePawn = NiceHumanPawn(relatedPlayer.pawn); - if(nicePawn == none) return; - if(abilityID == "Calibration"){ nicePawn.currentCalibrationState = CALSTATE_FINISHED; nicePawn.calibrationScore = 1; - } -} -static function AbilityRemoved( string abilityID, NicePlayerController relatedPlayer){ - local NiceHumanPawn nicePawn; - if(relatedPlayer == none) return; - nicePawn = NiceHumanPawn(relatedPlayer.pawn); - if(nicePawn == none) return; - if(abilityID == "Calibration") nicePawn.currentCalibrationState = CALSTATE_NOABILITY; - if(abilityID == class'NiceSkillSharpshooterGunslingerA'.default.abilityID){ nicePawn.gunslingerTimer = 0.0; - } -} -static function ModAbilityCooldown( string abilityID, NicePlayerController relatedPlayer, out float cooldown){ - local NiceHumanPawn nicePawn; - if(relatedPlayer == none) return; - nicePawn = NiceHumanPawn(relatedPlayer.pawn); - if( abilityID != class'NiceSkillSharpshooterGunslingerA'.default.abilityID && abilityID != class'NiceSkillSharpshooterReaperA'.default.abilityID) return; - switch(nicePawn.calibrationScore){ case 2: cooldown *= 0.85; break; case 3: cooldown *= 0.7; break; case 4: cooldown *= 0.5; break; case 5: cooldown *= 0.25; break; - } - // Reduce calibration score - if(nicePawn.calibrationScore > 1) nicePawn.calibrationScore -= 1; -} -defaultproperties -{ -} +//============================================================================== +// NicePack / NiceSharpshooterAbilitiesAdapter +//============================================================================== +// Temporary stand-in for future functionality. +// Use this class to catch events from sharpshooter players' abilities. +//============================================================================== +// 'Nice pack' source +// Do whatever the fuck you want with it +// Author: dkanus +// E-mail: dkanus@gmail.com +//============================================================================== +class NiceSharpshooterAbilitiesAdapter extends NiceAbilitiesAdapter; +static function AbilityActivated( string abilityID, + NicePlayerController relatedPlayer){ + local NiceHumanPawn nicePawn; + if(relatedPlayer == none) return; + nicePawn = NiceHumanPawn(relatedPlayer.pawn); + if(nicePawn == none) + return; + if(abilityID == "Calibration"){ + nicePawn.currentCalibrationState = CALSTATE_ACTIVE; + nicePawn.calibrateUsedZeds.length = 0; + nicePawn.calibrationScore = 1; + nicePawn.calibrationRemainingTime = 7.0; + nicePawn.calibrationHits = 0; + nicePawn.calibrationTotalShots = 0; + } + if(abilityID == class'NiceSkillSharpshooterGunslingerA'.default.abilityID){ + nicePawn.gunslingerTimer = + class'NiceSkillSharpshooterGunslingerA'.default.duration; + } +} +static function AbilityAdded( string abilityID, + NicePlayerController relatedPlayer){ + local NiceHumanPawn nicePawn; + if(relatedPlayer == none) return; + nicePawn = NiceHumanPawn(relatedPlayer.pawn); + if(nicePawn == none) + return; + if(abilityID == "Calibration"){ + nicePawn.currentCalibrationState = CALSTATE_FINISHED; + nicePawn.calibrationScore = 3; + } +} +static function AbilityRemoved( string abilityID, + NicePlayerController relatedPlayer){ + local NiceHumanPawn nicePawn; + if(relatedPlayer == none) return; + nicePawn = NiceHumanPawn(relatedPlayer.pawn); + if(nicePawn == none) + return; + if(abilityID == "Calibration") + nicePawn.currentCalibrationState = CALSTATE_NOABILITY; + if(abilityID == class'NiceSkillSharpshooterGunslingerA'.default.abilityID){ + nicePawn.gunslingerTimer = 0.0; + } +} +static function ModAbilityCooldown( string abilityID, + NicePlayerController relatedPlayer, + out float cooldown){ + local NiceHumanPawn nicePawn; + if(relatedPlayer == none) return; + nicePawn = NiceHumanPawn(relatedPlayer.pawn); + if( abilityID != class'NiceSkillSharpshooterGunslingerA'.default.abilityID + && abilityID != class'NiceSkillSharpshooterReaperA'.default.abilityID) + return; + switch(nicePawn.calibrationScore){ + case 2: + cooldown *= 0.85; + break; + case 3: + cooldown *= 0.7; + break; + case 4: + cooldown *= 0.5; + break; + case 5: + cooldown *= 0.25; + break; + } + // Reduce calibration score + if(nicePawn.calibrationScore > 3) + nicePawn.calibrationScore -= 1; +} +defaultproperties +{ +} diff --git a/sources/Weapons/Playable/AssaultRifles/FNFAL/NiceDamTypeFNFALAssaultRifle.uc b/sources/Weapons/Playable/AssaultRifles/FNFAL/NiceDamTypeFNFALAssaultRifle.uc index 271ed35..0821c8f 100644 --- a/sources/Weapons/Playable/AssaultRifles/FNFAL/NiceDamTypeFNFALAssaultRifle.uc +++ b/sources/Weapons/Playable/AssaultRifles/FNFAL/NiceDamTypeFNFALAssaultRifle.uc @@ -1,5 +1,16 @@ -class NiceDamTypeFNFALAssaultRifle extends NiceDamageTypeVetCommando - abstract; -defaultproperties -{ MaxPenetrations=3 HeadShotDamageMult=2.250000 WeaponClass=Class'NicePack.NiceFNFAL_ACOG_AssaultRifle' DeathString="%k killed %o (FNFAL ACOG)." FemaleSuicide="%o shot herself in the foot." MaleSuicide="%o shot himself in the foot." bRagdollBullet=True KDamageImpulse=6500.000000 KDeathVel=175.000000 KDeathUpKick=20.000000 -} +class NiceDamTypeFNFALAssaultRifle extends NiceDamageTypeVetCommando + abstract; +defaultproperties +{ + MaxPenetrations=3 + flinchMultiplier=0.800000 + HeadShotDamageMult=2.250000 + WeaponClass=Class'NicePack.NiceFNFAL_ACOG_AssaultRifle' + DeathString="%k killed %o (FNFAL ACOG)." + FemaleSuicide="%o shot herself in the foot." + MaleSuicide="%o shot himself in the foot." + bRagdollBullet=True + KDamageImpulse=6500.000000 + KDeathVel=175.000000 + KDeathUpKick=20.000000 +} diff --git a/sources/Weapons/Playable/AssaultRifles/SCAR/NiceDamTypeSCARMK17AssaultRifle.uc b/sources/Weapons/Playable/AssaultRifles/SCAR/NiceDamTypeSCARMK17AssaultRifle.uc index db2db49..afd692b 100644 --- a/sources/Weapons/Playable/AssaultRifles/SCAR/NiceDamTypeSCARMK17AssaultRifle.uc +++ b/sources/Weapons/Playable/AssaultRifles/SCAR/NiceDamTypeSCARMK17AssaultRifle.uc @@ -1,5 +1,17 @@ -class NiceDamTypeSCARMK17AssaultRifle extends NiceDamageTypeVetCommando - abstract; -defaultproperties -{ bPenetrationHSOnly=True MaxPenetrations=1 HeadShotDamageMult=2.000000 WeaponClass=Class'NicePack.NiceSCARMK17AssaultRifle' DeathString="%k killed %o (SCAR MK17)." FemaleSuicide="%o shot herself in the foot." MaleSuicide="%o shot himself in the foot." bRagdollBullet=True KDamageImpulse=6500.000000 KDeathVel=175.000000 KDeathUpKick=20.000000 -} +class NiceDamTypeSCARMK17AssaultRifle extends NiceDamageTypeVetCommando + abstract; +defaultproperties +{ + bPenetrationHSOnly=True + MaxPenetrations=1 + flinchMultiplier=0.800000 + HeadShotDamageMult=2.000000 + WeaponClass=Class'NicePack.NiceSCARMK17AssaultRifle' + DeathString="%k killed %o (SCAR MK17)." + FemaleSuicide="%o shot herself in the foot." + MaleSuicide="%o shot himself in the foot." + bRagdollBullet=True + KDamageImpulse=6500.000000 + KDeathVel=175.000000 + KDeathUpKick=20.000000 +} diff --git a/sources/Weapons/Playable/Pistols/Deagle/NiceDamTypeDeagle.uc b/sources/Weapons/Playable/Pistols/Deagle/NiceDamTypeDeagle.uc index 2b7dfeb..f720ed9 100644 --- a/sources/Weapons/Playable/Pistols/Deagle/NiceDamTypeDeagle.uc +++ b/sources/Weapons/Playable/Pistols/Deagle/NiceDamTypeDeagle.uc @@ -1,6 +1,19 @@ -class NiceDamTypeDeagle extends NiceDamageTypeVetSharpshooter - abstract; -defaultproperties -{ - goodDecapMod=0.750000 MaxPenetrations=4 WeaponClass=Class'NicePack.NiceDeagle' DeathString="%k killed %o (Deagle)." FemaleSuicide="%o shot herself in the foot." MaleSuicide="%o shot himself in the foot." bRagdollBullet=True bBulletHit=True FlashFog=(X=600.000000) KDamageImpulse=6500.000000 KDeathVel=400.000000 KDeathUpKick=80.000000 VehicleDamageScaling=0.800000 -} +class NiceDamTypeDeagle extends NiceDamageTypeVetSharpshooter + abstract; +defaultproperties +{ + goodDecapMod=0.750000 + MaxPenetrations=4 + HeadShotDamageMult=1.35 + WeaponClass=Class'NicePack.NiceDeagle' + DeathString="%k killed %o (Deagle)." + FemaleSuicide="%o shot herself in the foot." + MaleSuicide="%o shot himself in the foot." + bRagdollBullet=True + bBulletHit=True + FlashFog=(X=600.000000) + KDamageImpulse=6500.000000 + KDeathVel=400.000000 + KDeathUpKick=80.000000 + VehicleDamageScaling=0.800000 +} diff --git a/sources/Weapons/Playable/Pistols/Deagle/NiceDeagleFire.uc b/sources/Weapons/Playable/Pistols/Deagle/NiceDeagleFire.uc index 2adb18c..ac25b5a 100644 --- a/sources/Weapons/Playable/Pistols/Deagle/NiceDeagleFire.uc +++ b/sources/Weapons/Playable/Pistols/Deagle/NiceDeagleFire.uc @@ -1,4 +1,29 @@ -class NiceDeagleFire extends NiceSingleFire; -defaultproperties -{ ProjectileSpeed=23500.000000 FireAimedAnim="Iron_Fire" maxVerticalRecoilAngle=600 maxHorizontalRecoilAngle=300 ShellEjectClass=Class'ROEffects.KFShellEjectHandCannon' FireSoundRef="KF_HandcannonSnd.50AE_Fire" StereoFireSoundRef="KF_HandcannonSnd.50AE_FireST" NoAmmoSoundRef="KF_HandcannonSnd.50AE_DryFire" DamageType=Class'NicePack.NiceDamTypeDeagle' DamageMin=105 DamageMax=105 Momentum=20000.000000 FireLoopAnim= FireEndAnim= FireAnimRate=1.000000 FireRate=0.500000 AmmoClass=Class'NicePack.NiceDeagleAmmo' ShakeRotMag=(Z=400.000000) ShakeRotRate=(X=12500.000000,Y=12500.000000) ShakeRotTime=3.500000 ShakeOffsetMag=(Y=1.000000,Z=8.000000) ShakeOffsetTime=2.500000 BotRefireRate=0.650000 FlashEmitterClass=Class'ROEffects.MuzzleFlash1stKar' aimerror=40.000000 -} +class NiceDeagleFire extends NiceSingleFire; +defaultproperties +{ + ProjectileSpeed=23500.000000 + FireAimedAnim="Iron_Fire" + maxVerticalRecoilAngle=600 + maxHorizontalRecoilAngle=300 + ShellEjectClass=Class'ROEffects.KFShellEjectHandCannon' + FireSoundRef="KF_HandcannonSnd.50AE_Fire" + StereoFireSoundRef="KF_HandcannonSnd.50AE_FireST" + NoAmmoSoundRef="KF_HandcannonSnd.50AE_DryFire" + DamageType=Class'NicePack.NiceDamTypeDeagle' + DamageMin=120 + DamageMax=120 + Momentum=20000.000000 + FireLoopAnim= + FireEndAnim= + FireAnimRate=1.000000 + FireRate=0.500000 + AmmoClass=Class'NicePack.NiceDeagleAmmo' + ShakeRotMag=(Z=400.000000) + ShakeRotRate=(X=12500.000000,Y=12500.000000) + ShakeRotTime=3.500000 + ShakeOffsetMag=(Y=1.000000,Z=8.000000) + ShakeOffsetTime=2.500000 + BotRefireRate=0.650000 + FlashEmitterClass=Class'ROEffects.MuzzleFlash1stKar' + aimerror=40.000000 +} diff --git a/sources/Weapons/Playable/Pistols/Deagle/NiceDualDeagleFire.uc b/sources/Weapons/Playable/Pistols/Deagle/NiceDualDeagleFire.uc index 6c0cfa7..a1ec19a 100644 --- a/sources/Weapons/Playable/Pistols/Deagle/NiceDualDeagleFire.uc +++ b/sources/Weapons/Playable/Pistols/Deagle/NiceDualDeagleFire.uc @@ -1,4 +1,24 @@ -class NiceDualDeagleFire extends NiceDualiesFire; -defaultproperties -{ ProjectileSpeed=23500.000000 maxVerticalRecoilAngle=600 maxHorizontalRecoilAngle=300 ShellEjectClass=Class'ROEffects.KFShellEjectHandCannon' FireSoundRef="KF_HandcannonSnd.50AE_Fire" StereoFireSoundRef="KF_HandcannonSnd.50AE_FireST" NoAmmoSoundRef="KF_HandcannonSnd.50AE_DryFire" DamageType=Class'NicePack.NiceDamTypeDeagle' DamageMin=120 DamageMax=120 Momentum=20000.000000 FireRate=0.250000 AmmoClass=Class'NicePack.NiceDualDeagleAmmo' ShakeRotMag=(Z=400.000000) ShakeRotRate=(X=12500.000000,Y=12500.000000) ShakeRotTime=3.500000 ShakeOffsetMag=(Y=1.000000,Z=8.000000) ShakeOffsetTime=2.500000 FlashEmitterClass=Class'ROEffects.MuzzleFlash1stKar' aimerror=40.000000 -} +class NiceDualDeagleFire extends NiceDualiesFire; +defaultproperties +{ + ProjectileSpeed=23500.000000 + maxVerticalRecoilAngle=600 + maxHorizontalRecoilAngle=300 + ShellEjectClass=Class'ROEffects.KFShellEjectHandCannon' + FireSoundRef="KF_HandcannonSnd.50AE_Fire" + StereoFireSoundRef="KF_HandcannonSnd.50AE_FireST" + NoAmmoSoundRef="KF_HandcannonSnd.50AE_DryFire" + DamageType=Class'NicePack.NiceDamTypeDeagle' + DamageMin=120 + DamageMax=120 + Momentum=20000.000000 + FireRate=0.250000 + AmmoClass=Class'NicePack.NiceDualDeagleAmmo' + ShakeRotMag=(Z=400.000000) + ShakeRotRate=(X=12500.000000,Y=12500.000000) + ShakeRotTime=3.500000 + ShakeOffsetMag=(Y=1.000000,Z=8.000000) + ShakeOffsetTime=2.500000 + FlashEmitterClass=Class'ROEffects.MuzzleFlash1stKar' + aimerror=40.000000 +} diff --git a/sources/Weapons/Playable/Pistols/MK32/NiceDamTypeMK23Pistol.uc b/sources/Weapons/Playable/Pistols/MK32/NiceDamTypeMK23Pistol.uc index 2f29728..1d4bc4d 100644 --- a/sources/Weapons/Playable/Pistols/MK32/NiceDamTypeMK23Pistol.uc +++ b/sources/Weapons/Playable/Pistols/MK32/NiceDamTypeMK23Pistol.uc @@ -1,6 +1,20 @@ -class NiceDamTypeMK23Pistol extends NiceDamageTypeVetSharpshooter - abstract; -defaultproperties -{ decapType=DB_DROP badDecapMod=0.900000 - flinchMultiplier=2 HeadShotDamageMult=1.5//2.250000 WeaponClass=Class'NicePack.NiceMK23Pistol' DeathString="%k killed %o with MK23." FemaleSuicide="%o shot herself in the foot." MaleSuicide="%o shot himself in the foot." bRagdollBullet=True bBulletHit=True FlashFog=(X=600.000000) KDamageImpulse=1850.000000 KDeathVel=150.000000 KDeathUpKick=5.000000 VehicleDamageScaling=0.800000 -} +class NiceDamTypeMK23Pistol extends NiceDamageTypeVetSharpshooter + abstract; +defaultproperties +{ + decapType=DB_DROP + badDecapMod=0.900000 + flinchMultiplier=2 + HeadShotDamageMult=2.0//2.250000 + WeaponClass=Class'NicePack.NiceMK23Pistol' + DeathString="%k killed %o with MK23." + FemaleSuicide="%o shot herself in the foot." + MaleSuicide="%o shot himself in the foot." + bRagdollBullet=True + bBulletHit=True + FlashFog=(X=600.000000) + KDamageImpulse=1850.000000 + KDeathVel=150.000000 + KDeathUpKick=5.000000 + VehicleDamageScaling=0.800000 +} diff --git a/sources/Weapons/Playable/Pistols/MK32/NiceDualMK23Fire.uc b/sources/Weapons/Playable/Pistols/MK32/NiceDualMK23Fire.uc index e27bc38..05c5ac9 100644 --- a/sources/Weapons/Playable/Pistols/MK32/NiceDualMK23Fire.uc +++ b/sources/Weapons/Playable/Pistols/MK32/NiceDualMK23Fire.uc @@ -1,4 +1,25 @@ -class NiceDualMK23Fire extends NiceDualiesFire; -defaultproperties -{ ProjectileSpeed=13000.000000 maxVerticalRecoilAngle=400 maxHorizontalRecoilAngle=200 ShellEjectClass=Class'KFMod.MK23Shell' FireSoundRef="KF_MK23Snd.MK23_Fire_M" StereoFireSoundRef="KF_MK23Snd.MK23_Fire_S" NoAmmoSoundRef="KF_HandcannonSnd.50AE_DryFire" DamageType=Class'NicePack.NiceDamTypeMK23Pistol' DamageMin=55 DamageMax=55 Momentum=18000.000000 NoAmmoSound=None FireRate=0.175000 AmmoClass=Class'NicePack.NiceDualMK23Ammo' ShakeRotMag=(Z=290.000000) ShakeRotRate=(X=10080.000000,Y=10080.000000) ShakeRotTime=3.500000 ShakeOffsetMag=(Y=1.000000,Z=8.000000) ShakeOffsetTime=2.500000 FlashEmitterClass=Class'KFMod.MuzzleFlashMK' aimerror=40.000000 -} +class NiceDualMK23Fire extends NiceDualiesFire; +defaultproperties +{ + ProjectileSpeed=13000.000000 + maxVerticalRecoilAngle=400 + maxHorizontalRecoilAngle=200 + ShellEjectClass=Class'KFMod.MK23Shell' + FireSoundRef="KF_MK23Snd.MK23_Fire_M" + StereoFireSoundRef="KF_MK23Snd.MK23_Fire_S" + NoAmmoSoundRef="KF_HandcannonSnd.50AE_DryFire" + DamageType=Class'NicePack.NiceDamTypeMK23Pistol' + DamageMin=55 + DamageMax=55 + Momentum=18000.000000 + NoAmmoSound=None + FireRate=0.175000 + AmmoClass=Class'NicePack.NiceDualMK23Ammo' + ShakeRotMag=(Z=290.000000) + ShakeRotRate=(X=10080.000000,Y=10080.000000) + ShakeRotTime=3.500000 + ShakeOffsetMag=(Y=1.000000,Z=8.000000) + ShakeOffsetTime=2.500000 + FlashEmitterClass=Class'KFMod.MuzzleFlashMK' + aimerror=40.000000 +} diff --git a/sources/Weapons/Playable/Pistols/MK32/NiceMK23Fire.uc b/sources/Weapons/Playable/Pistols/MK32/NiceMK23Fire.uc index ab96d2e..7365159 100644 --- a/sources/Weapons/Playable/Pistols/MK32/NiceMK23Fire.uc +++ b/sources/Weapons/Playable/Pistols/MK32/NiceMK23Fire.uc @@ -1,4 +1,25 @@ -class NiceMK23Fire extends NiceSingleFire; -defaultproperties -{ ProjectileSpeed=13000.000000 maxVerticalRecoilAngle=400 maxHorizontalRecoilAngle=200 FireSoundRef="KF_MK23Snd.MK23_Fire_M" StereoFireSoundRef="KF_MK23Snd.MK23_Fire_S" NoAmmoSoundRef="KF_HandcannonSnd.50AE_DryFire" DamageType=Class'NicePack.NiceDamTypeMK23Pistol' DamageMin=55 DamageMax=55 Momentum=18000.000000 FireLoopAnim= FireEndAnim= FireRate=0.350000 AmmoClass=Class'NicePack.NiceMK23Ammo' ShakeRotMag=(Z=290.000000) ShakeRotRate=(X=10080.000000,Y=10080.000000) ShakeRotTime=3.500000 ShakeOffsetMag=(Y=1.000000,Z=8.000000) ShakeOffsetTime=2.500000 BotRefireRate=0.650000 FlashEmitterClass=Class'KFMod.MuzzleFlashMK' -} +class NiceMK23Fire extends NiceSingleFire; +defaultproperties +{ + ProjectileSpeed=13000.000000 + maxVerticalRecoilAngle=400 + maxHorizontalRecoilAngle=200 + FireSoundRef="KF_MK23Snd.MK23_Fire_M" + StereoFireSoundRef="KF_MK23Snd.MK23_Fire_S" + NoAmmoSoundRef="KF_HandcannonSnd.50AE_DryFire" + DamageType=Class'NicePack.NiceDamTypeMK23Pistol' + DamageMin=55 + DamageMax=55 + Momentum=18000.000000 + FireLoopAnim= + FireEndAnim= + FireRate=0.350000 + AmmoClass=Class'NicePack.NiceMK23Ammo' + ShakeRotMag=(Z=290.000000) + ShakeRotRate=(X=10080.000000,Y=10080.000000) + ShakeRotTime=3.500000 + ShakeOffsetMag=(Y=1.000000,Z=8.000000) + ShakeOffsetTime=2.500000 + BotRefireRate=0.650000 + FlashEmitterClass=Class'KFMod.MuzzleFlashMK' +} diff --git a/sources/Weapons/Playable/Pistols/Magnum/NiceDamTypeMagnumPistol.uc b/sources/Weapons/Playable/Pistols/Magnum/NiceDamTypeMagnumPistol.uc index 81aec9e..eb90ac6 100644 --- a/sources/Weapons/Playable/Pistols/Magnum/NiceDamTypeMagnumPistol.uc +++ b/sources/Weapons/Playable/Pistols/Magnum/NiceDamTypeMagnumPistol.uc @@ -1,4 +1,13 @@ -class NiceDamTypeMagnumPistol extends NiceDamageTypeVetSharpshooter; -defaultproperties -{ flinchMultiplier=2.5 stunMultiplier=6.0 MaxPenetrations=2 PenDmgReduction=0.990000 HeadShotDamageMult=1.1 WeaponClass=Class'NicePack.NiceMagnumPistol' KDamageImpulse=3250.000000 KDeathVel=200.000000 KDeathUpKick=40.000000 -} +class NiceDamTypeMagnumPistol extends NiceDamageTypeVetSharpshooter; +defaultproperties +{ + flinchMultiplier=2.5 + stunMultiplier=6.0 + MaxPenetrations=2 + PenDmgReduction=0.990000 + HeadShotDamageMult=1.35 + WeaponClass=Class'NicePack.NiceMagnumPistol' + KDamageImpulse=3250.000000 + KDeathVel=200.000000 + KDeathUpKick=40.000000 +} diff --git a/sources/Weapons/Playable/Pistols/Magnum/NiceDualMagnum.uc b/sources/Weapons/Playable/Pistols/Magnum/NiceDualMagnum.uc index a1a45b3..33dbdab 100644 --- a/sources/Weapons/Playable/Pistols/Magnum/NiceDualMagnum.uc +++ b/sources/Weapons/Playable/Pistols/Magnum/NiceDualMagnum.uc @@ -1,5 +1,37 @@ -class NiceDualMagnum extends NiceDualies; -defaultproperties -{ SingleClass=Class'NicePack.NiceMagnumPistol' leftEject=0.660000 rightEject=0.115000 leftInsert=0.800000 rightInsert=0.375000 MagCapacity=12 - Weight=2.000000 ReloadRate=2.23125//3.570000 ReloadAnimRate=2//1.250000 WeaponReloadAnim="Reload_DualRevolver" StandardDisplayFOV=60.000000 TraderInfoTexture=Texture'KillingFloor2HUD.Trader_Weapon_Icons.Trader_DualRevolver' bIsTier2Weapon=True MeshRef="KF_Wep_DualRevolver.DualRevolver_Trip" SkinRefs(0)="KF_Weapons4_Trip_T.Weapons.Revolver_cmb" SelectSoundRef="KF_RevolverSnd.WEP_Revolver_Foley_Select" HudImageRef="KillingFloor2HUD.WeaponSelect.DualRevolver_unselected" SelectedHudImageRef="KillingFloor2HUD.WeaponSelect.DualRevolver" ZoomedDisplayFOV=50.000000 FireModeClass(0)=Class'NicePack.NiceDualMagnumFire' AIRating=0.450000 CurrentRating=0.450000 Description="Dual 44 Magnum Pistols. Make my day!" DisplayFOV=60.000000 Priority=120 GroupOffset=8 PickupClass=Class'NicePack.NiceDualMagnumPickup' PlayerViewOffset=(X=25.000000) BobDamping=6.000000 AttachmentClass=Class'NicePack.NiceDualMagnumAttachment' IconCoords=(X1=250,Y1=110,X2=330,Y2=145) ItemName="Dual 44 Magnums" DrawScale=1.000000 -} +class NiceDualMagnum extends NiceDualies; +defaultproperties +{ + SingleClass=Class'NicePack.NiceMagnumPistol' + leftEject=0.660000 + rightEject=0.115000 + leftInsert=0.800000 + rightInsert=0.375000 + MagCapacity=12 + Weight=2.000000 + ReloadRate=2.23125//3.570000 + ReloadAnimRate=2//1.250000 + WeaponReloadAnim="Reload_DualRevolver" + StandardDisplayFOV=60.000000 + TraderInfoTexture=Texture'KillingFloor2HUD.Trader_Weapon_Icons.Trader_DualRevolver' + bIsTier2Weapon=True + MeshRef="KF_Wep_DualRevolver.DualRevolver_Trip" + SkinRefs(0)="KF_Weapons4_Trip_T.Weapons.Revolver_cmb" + SelectSoundRef="KF_RevolverSnd.WEP_Revolver_Foley_Select" + HudImageRef="KillingFloor2HUD.WeaponSelect.DualRevolver_unselected" + SelectedHudImageRef="KillingFloor2HUD.WeaponSelect.DualRevolver" + ZoomedDisplayFOV=50.000000 + FireModeClass(0)=Class'NicePack.NiceDualMagnumFire' + AIRating=0.450000 + CurrentRating=0.450000 + Description="Dual 44 Magnum Pistols. Make my day!" + DisplayFOV=60.000000 + Priority=120 + GroupOffset=8 + PickupClass=Class'NicePack.NiceDualMagnumPickup' + PlayerViewOffset=(X=25.000000) + BobDamping=6.000000 + AttachmentClass=Class'NicePack.NiceDualMagnumAttachment' + IconCoords=(X1=250,Y1=110,X2=330,Y2=145) + ItemName="Dual 44 Magnums" + DrawScale=1.000000 +} diff --git a/sources/Weapons/Playable/Pistols/Magnum/NiceMagnumFire.uc b/sources/Weapons/Playable/Pistols/Magnum/NiceMagnumFire.uc index db4dc68..aca4c22 100644 --- a/sources/Weapons/Playable/Pistols/Magnum/NiceMagnumFire.uc +++ b/sources/Weapons/Playable/Pistols/Magnum/NiceMagnumFire.uc @@ -1,4 +1,29 @@ -class NiceMagnumFire extends NiceSingleFire; -defaultproperties -{ ProjectileSpeed=22500.000000 FireAimedAnim="Iron_Fire" maxHorizontalRecoilAngle=150 ShellEjectClass=None FireSoundRef="KF_RevolverSnd.Revolver_Fire_M" StereoFireSoundRef="KF_RevolverSnd.Revolver_Fire_S" NoAmmoSoundRef="KF_HandcannonSnd.50AE_DryFire" DamageType=Class'NicePack.NiceDamTypeMagnumPistol' DamageMin=61 DamageMax=61 Momentum=15000.000000 bPawnRapidFireAnim=False FireLoopAnim= FireEndAnim= FireAnimRate=1.000000 FireRate=0.250000//0.3 AmmoClass=Class'NicePack.NiceMagnumAmmo' ShakeRotMag=(Z=400.000000) ShakeRotRate=(X=12500.000000,Y=12500.000000) ShakeRotTime=3.500000 ShakeOffsetMag=(Y=1.000000,Z=8.000000) ShakeOffsetTime=2.500000 BotRefireRate=0.650000 FlashEmitterClass=Class'ROEffects.MuzzleFlash1stKar' aimerror=40.000000 -} +class NiceMagnumFire extends NiceSingleFire; +defaultproperties +{ + ProjectileSpeed=22500.000000 + FireAimedAnim="Iron_Fire" + maxHorizontalRecoilAngle=150 + ShellEjectClass=None + FireSoundRef="KF_RevolverSnd.Revolver_Fire_M" + StereoFireSoundRef="KF_RevolverSnd.Revolver_Fire_S" + NoAmmoSoundRef="KF_HandcannonSnd.50AE_DryFire" + DamageType=Class'NicePack.NiceDamTypeMagnumPistol' + DamageMin=61 + DamageMax=61 + Momentum=15000.000000 + bPawnRapidFireAnim=False + FireLoopAnim= + FireEndAnim= + FireAnimRate=1.000000 + FireRate=0.250000//0.3 + AmmoClass=Class'NicePack.NiceMagnumAmmo' + ShakeRotMag=(Z=400.000000) + ShakeRotRate=(X=12500.000000,Y=12500.000000) + ShakeRotTime=3.500000 + ShakeOffsetMag=(Y=1.000000,Z=8.000000) + ShakeOffsetTime=2.500000 + BotRefireRate=0.650000 + FlashEmitterClass=Class'ROEffects.MuzzleFlash1stKar' + aimerror=40.000000 +} diff --git a/sources/Weapons/Playable/Shotguns/Boomstick/NiceBoomStick.uc b/sources/Weapons/Playable/Shotguns/Boomstick/NiceBoomStick.uc index 29eb1b6..a8ddc99 100644 --- a/sources/Weapons/Playable/Shotguns/Boomstick/NiceBoomStick.uc +++ b/sources/Weapons/Playable/Shotguns/Boomstick/NiceBoomStick.uc @@ -1,52 +1,103 @@ -class NiceBoomStick extends NiceWeapon; -#EXEC OBJ LOAD FILE=KillingFloorHUD.utx -var float glueTiming; -var float firstShellTiming, secondShellTiming, jumpTiming; -var const string firstShellStr, secondShellStr, jumpStr; -simulated function PostBeginPlay(){ - local EventRecord record; - local AutoReloadAnimDesc reloadDesc; - // Setup animation timings - autoReloadsDescriptions.Length = 0; - reloadDesc.canInterruptFrame = 0.056; - reloadDesc.trashStartFrame = secondShellTiming; - reloadDesc.resumeFrame = 0.056; - reloadDesc.speedFrame = 0.056; - // Setup all possible fire animations - reloadDesc.animName = 'Fire_Both'; - autoReloadsDescriptions[0] = reloadDesc; - reloadDesc.animName = 'Fire_Both_Iron'; - autoReloadsDescriptions[1] = reloadDesc; - reloadDesc.animName = 'Fire_Last'; - autoReloadsDescriptions[2] = reloadDesc; - reloadDesc.animName = 'Fire_Last_Iron'; - autoReloadsDescriptions[3] = reloadDesc; - // Setup reload events - record.eventName = jumpStr; - record.eventFrame = jumpTiming; - relEvents[relEvents.Length] = record; - record.eventName = firstShellStr; - record.eventFrame = firstShellTiming; - relEvents[relEvents.Length] = record; - record.eventName = secondShellStr; - record.eventFrame = secondShellTiming; - relEvents[relEvents.Length] = record; - super.PostBeginPlay(); -} -simulated function ReloadEvent(string eventName){ - if(eventName ~= jumpStr && GetMagazineAmmo() > 0) SetAnimFrame(glueTiming); - if(eventName ~= firstShellStr) MagAmmoRemainingClient = Min(1, AmmoAmount(0)); - else if(eventName ~= secondShellStr) MagAmmoRemainingClient = Min(2, AmmoAmount(0)); - ServerSetMagSize(MagAmmoRemainingClient, bRoundInChamber, Level.TimeSeconds); -} -simulated function AddAutoReloadedAmmo(){ - MagAmmoRemainingClient = Min(2, AmmoAmount(0)); - ServerSetMagSize(MagAmmoRemainingClient, bRoundInChamber, Level.TimeSeconds); -} -simulated function bool AltFireCanForceInterruptReload(){ - return (GetMagazineAmmo() > 0); -} -defaultproperties -{ glueTiming=0.633330 firstShellTiming=0.555550 secondShellTiming=0.733330 jumpTiming=0.388880 firstShellStr="firstShell" secondShellStr="secondShellStr" jumpStr="jumpStr" bChangeClipIcon=True hudClipTexture=Texture'KillingFloorHUD.HUD.Hud_Single_Bullet' reloadType=RTYPE_AUTO ForceZoomOutOnFireTime=0.010000 ForceZoomOutOnAltFireTime=0.010000 MagCapacity=2 - Weight=6.000000 ReloadRate=2.250000 ReloadAnim="Reload" ReloadAnimRate=1.100000 bHoldToReload=True WeaponReloadAnim="Reload_HuntingShotgun" bHasAimingMode=True IdleAimAnim="Idle_Iron" StandardDisplayFOV=55.000000 TraderInfoTexture=Texture'KillingFloorHUD.Trader_Weapon_Images.Trader_Hunting_Shotgun' bIsTier2Weapon=True MeshRef="KF_Weapons_Trip.BoomStick_Trip" SkinRefs(0)="KF_Weapons_Trip_T.Shotguns.boomstick_cmb" SelectSoundRef="KF_DoubleSGSnd.2Barrel_Select" HudImageRef="KillingFloorHUD.WeaponSelect.BoomStic_unselected" SelectedHudImageRef="KillingFloorHUD.WeaponSelect.BoomStick" PlayerIronSightFOV=70.000000 ZoomedDisplayFOV=40.000000 FireModeClass(0)=Class'NicePack.NiceBoomStickAltFire' FireModeClass(1)=Class'NicePack.NiceBoomStickFire' PutDownAnim="PutDown" AIRating=0.900000 CurrentRating=0.900000 bSniping=False Description="A double barreled shotgun used by big game hunters. It fires two slugs simultaneously and can bring down even the largest targets, quickly." DisplayFOV=55.000000 Priority=160 InventoryGroup=4 GroupOffset=2 PickupClass=Class'NicePack.NiceBoomStickPickup' PlayerViewOffset=(X=8.000000,Y=14.000000,Z=-8.000000) BobDamping=6.000000 AttachmentClass=Class'NicePack.NiceBoomStickAttachment' ItemName="Hunting Shotgun" bUseDynamicLights=True TransientSoundVolume=1.000000 +class NiceBoomStick extends NiceWeapon; +#EXEC OBJ LOAD FILE=KillingFloorHUD.utx +var float glueTiming; +var float firstShellTiming, secondShellTiming, jumpTiming; +var const string firstShellStr, secondShellStr, jumpStr; +simulated function PostBeginPlay(){ + local EventRecord record; + local AutoReloadAnimDesc reloadDesc; + // Setup animation timings + autoReloadsDescriptions.Length = 0; + reloadDesc.canInterruptFrame = 0.056; + reloadDesc.trashStartFrame = secondShellTiming; + reloadDesc.resumeFrame = 0.056; + reloadDesc.speedFrame = 0.056; + // Setup all possible fire animations + reloadDesc.animName = 'Fire_Both'; + autoReloadsDescriptions[0] = reloadDesc; + reloadDesc.animName = 'Fire_Both_Iron'; + autoReloadsDescriptions[1] = reloadDesc; + reloadDesc.animName = 'Fire_Last'; + autoReloadsDescriptions[2] = reloadDesc; + reloadDesc.animName = 'Fire_Last_Iron'; + autoReloadsDescriptions[3] = reloadDesc; + // Setup reload events + record.eventName = jumpStr; + record.eventFrame = jumpTiming; + relEvents[relEvents.Length] = record; + record.eventName = firstShellStr; + record.eventFrame = firstShellTiming; + relEvents[relEvents.Length] = record; + record.eventName = secondShellStr; + record.eventFrame = secondShellTiming; + relEvents[relEvents.Length] = record; + super.PostBeginPlay(); +} +simulated function ReloadEvent(string eventName){ + if(eventName ~= jumpStr && GetMagazineAmmo() > 0) + SetAnimFrame(glueTiming); + if(eventName ~= firstShellStr) + MagAmmoRemainingClient = Min(1, AmmoAmount(0)); + else if(eventName ~= secondShellStr) + MagAmmoRemainingClient = Min(2, AmmoAmount(0)); + ServerSetMagSize(MagAmmoRemainingClient, bRoundInChamber, Level.TimeSeconds); +} +simulated function AddAutoReloadedAmmo(){ + MagAmmoRemainingClient = Min(2, AmmoAmount(0)); + ServerSetMagSize(MagAmmoRemainingClient, bRoundInChamber, Level.TimeSeconds); +} +simulated function bool AltFireCanForceInterruptReload(){ + return (GetMagazineAmmo() > 0); +} +defaultproperties +{ + glueTiming=0.633330 + firstShellTiming=0.555550 + secondShellTiming=0.733330 + jumpTiming=0.388880 + firstShellStr="firstShell" + secondShellStr="secondShellStr" + jumpStr="jumpStr" + bChangeClipIcon=True + hudClipTexture=Texture'KillingFloorHUD.HUD.Hud_Single_Bullet' + reloadType=RTYPE_AUTO + ForceZoomOutOnFireTime=0.010000 + ForceZoomOutOnAltFireTime=0.010000 + MagCapacity=2 + Weight=5.000000 + ReloadRate=2.250000 + ReloadAnim="Reload" + ReloadAnimRate=1.100000 + bHoldToReload=True + WeaponReloadAnim="Reload_HuntingShotgun" + bHasAimingMode=True + IdleAimAnim="Idle_Iron" + StandardDisplayFOV=55.000000 + TraderInfoTexture=Texture'KillingFloorHUD.Trader_Weapon_Images.Trader_Hunting_Shotgun' + bIsTier2Weapon=True + MeshRef="KF_Weapons_Trip.BoomStick_Trip" + SkinRefs(0)="KF_Weapons_Trip_T.Shotguns.boomstick_cmb" + SelectSoundRef="KF_DoubleSGSnd.2Barrel_Select" + HudImageRef="KillingFloorHUD.WeaponSelect.BoomStic_unselected" + SelectedHudImageRef="KillingFloorHUD.WeaponSelect.BoomStick" + PlayerIronSightFOV=70.000000 + ZoomedDisplayFOV=40.000000 + FireModeClass(0)=Class'NicePack.NiceBoomStickAltFire' + FireModeClass(1)=Class'NicePack.NiceBoomStickFire' + PutDownAnim="PutDown" + AIRating=0.900000 + CurrentRating=0.900000 + bSniping=False + Description="A double barreled shotgun used by big game hunters. It fires two slugs simultaneously and can bring down even the largest targets, quickly." + DisplayFOV=55.000000 + Priority=160 + InventoryGroup=4 + GroupOffset=2 + PickupClass=Class'NicePack.NiceBoomStickPickup' + PlayerViewOffset=(X=8.000000,Y=14.000000,Z=-8.000000) + BobDamping=6.000000 + AttachmentClass=Class'NicePack.NiceBoomStickAttachment' + ItemName="Hunting Shotgun" + bUseDynamicLights=True + TransientSoundVolume=1.000000 } \ No newline at end of file diff --git a/sources/Weapons/Playable/Shotguns/Boomstick/NiceBoomStickPickup.uc b/sources/Weapons/Playable/Shotguns/Boomstick/NiceBoomStickPickup.uc index 541f908..6ad9841 100644 --- a/sources/Weapons/Playable/Shotguns/Boomstick/NiceBoomStickPickup.uc +++ b/sources/Weapons/Playable/Shotguns/Boomstick/NiceBoomStickPickup.uc @@ -1,5 +1,23 @@ -class NiceBoomStickPickup extends NiceWeaponPickup; -var int SingleShotCount; -defaultproperties -{ cost=500 BuyClipSize=2 PowerValue=90 SpeedValue=30 RangeValue=12 Description="A double barreled shotgun used by big game hunters." ItemName="Hunting Shotgun" ItemShortName="Hunting Shotgun" AmmoItemName="12-gauge Hunting shells" CorrespondingPerkIndex=1 EquipmentCategoryID=3 InventoryType=Class'NicePack.NiceBoomStick' PickupMessage="You got the Hunting Shotgun" PickupSound=Sound'KF_DoubleSGSnd.2Barrel_Pickup' PickupForce="AssaultRiflePickup" StaticMesh=StaticMesh'KF_pickups_Trip.Shotgun.boomstick_pickup' CollisionRadius=35.000000 CollisionHeight=5.000000 +class NiceBoomStickPickup extends NiceWeaponPickup; +var int SingleShotCount; +defaultproperties +{ + cost=500 + BuyClipSize=2 + PowerValue=90 + SpeedValue=30 + RangeValue=12 + Description="A double barreled shotgun used by big game hunters." + ItemName="Hunting Shotgun" + ItemShortName="Hunting Shotgun" + AmmoItemName="12-gauge Hunting shells" + CorrespondingPerkIndex=1 + EquipmentCategoryID=3 + InventoryType=Class'NicePack.NiceBoomStick' + PickupMessage="You got the Hunting Shotgun" + PickupSound=Sound'KF_DoubleSGSnd.2Barrel_Pickup' + PickupForce="AssaultRiflePickup" + StaticMesh=StaticMesh'KF_pickups_Trip.Shotgun.boomstick_pickup' + CollisionRadius=35.000000 + CollisionHeight=5.000000 } \ No newline at end of file diff --git a/sources/Weapons/Playable/Shotguns/Spas/NiceSpas.uc b/sources/Weapons/Playable/Shotguns/Spas/NiceSpas.uc index 71d68f4..16591f5 100644 --- a/sources/Weapons/Playable/Shotguns/Spas/NiceSpas.uc +++ b/sources/Weapons/Playable/Shotguns/Spas/NiceSpas.uc @@ -1,10 +1,48 @@ -class NiceSpas extends NiceWeapon; - -simulated function fillSubReloadStages(){ - // Loading 8 shells during 173 frames tops, with first shell loaded at frame 17, with 18 frames between load moments - generateReloadStages(8, 173, 17, 18); -} - -defaultproperties -{ bChangeClipIcon=True hudClipTexture=Texture'KillingFloorHUD.HUD.Hud_Single_Bullet' reloadType=RTYPE_SINGLE ForceZoomOutOnFireTime=0.010000 MagCapacity=5 ReloadRate=0.666667 ReloadAnim="Reload" ReloadAnimRate=1.000000 bHoldToReload=True Weight=8.000000 bHasAimingMode=True IdleAimAnim="Idle_Iron" StandardDisplayFOV=65.000000 TraderInfoTexture=Texture'ScrnWeaponPack_T.Spas.Spas_Unselected' MeshRef="ScrnWeaponPack_A.spas12_1st" SkinRefs(0)="ScrnWeaponPack_T.SPAS.shotgun_cmb" SelectSoundRef="KF_PumpSGSnd.SG_Select" HudImageRef="ScrnWeaponPack_T.SPAS.Spas_Unselected" SelectedHudImageRef="ScrnWeaponPack_T.SPAS.Spas_Selected" PlayerIronSightFOV=70.000000 ZoomedDisplayFOV=40.000000 FireModeClass(0)=Class'NicePack.NiceSpasFire' FireModeClass(1)=Class'NicePack.NiceSpasAltFire' PutDownAnim="PutDown" AIRating=0.600000 CurrentRating=0.600000 Description="The SPAS12 is a dual-mode shotgun, that can also be used for firing slugs." DisplayFOV=65.000000 Priority=135 InventoryGroup=3 GroupOffset=2 PickupClass=Class'NicePack.NiceSpasPickup' PlayerViewOffset=(X=20.000000,Y=18.750000,Z=-7.500000) BobDamping=7.000000 AttachmentClass=Class'NicePack.NiceSpasAttachment' IconCoords=(X1=169,Y1=172,X2=245,Y2=208) ItemName="SPAS-12" TransientSoundVolume=1.000000 +class NiceSpas extends NiceWeapon; + +simulated function fillSubReloadStages(){ + // Loading 8 shells during 173 frames tops, with first shell loaded at frame 17, with 18 frames between load moments + generateReloadStages(8, 173, 17, 18); +} + +defaultproperties +{ + bChangeClipIcon=True + hudClipTexture=Texture'KillingFloorHUD.HUD.Hud_Single_Bullet' + reloadType=RTYPE_SINGLE + ForceZoomOutOnFireTime=0.010000 + MagCapacity=5 + ReloadRate=0.666667 + ReloadAnim="Reload" + ReloadAnimRate=1.000000 + bHoldToReload=True + Weight=6.000000 + bHasAimingMode=True + IdleAimAnim="Idle_Iron" + StandardDisplayFOV=65.000000 + TraderInfoTexture=Texture'ScrnWeaponPack_T.Spas.Spas_Unselected' + MeshRef="ScrnWeaponPack_A.spas12_1st" + SkinRefs(0)="ScrnWeaponPack_T.SPAS.shotgun_cmb" + SelectSoundRef="KF_PumpSGSnd.SG_Select" + HudImageRef="ScrnWeaponPack_T.SPAS.Spas_Unselected" + SelectedHudImageRef="ScrnWeaponPack_T.SPAS.Spas_Selected" + PlayerIronSightFOV=70.000000 + ZoomedDisplayFOV=40.000000 + FireModeClass(0)=Class'NicePack.NiceSpasFire' + FireModeClass(1)=Class'NicePack.NiceSpasAltFire' + PutDownAnim="PutDown" + AIRating=0.600000 + CurrentRating=0.600000 + Description="The SPAS12 is a dual-mode shotgun, that can also be used for firing slugs." + DisplayFOV=65.000000 + Priority=135 + InventoryGroup=3 + GroupOffset=2 + PickupClass=Class'NicePack.NiceSpasPickup' + PlayerViewOffset=(X=20.000000,Y=18.750000,Z=-7.500000) + BobDamping=7.000000 + AttachmentClass=Class'NicePack.NiceSpasAttachment' + IconCoords=(X1=169,Y1=172,X2=245,Y2=208) + ItemName="SPAS-12" + TransientSoundVolume=1.000000 } \ No newline at end of file diff --git a/sources/Zeds/Mean/MeanPoisonInventory.uc b/sources/Zeds/Mean/MeanPoisonInventory.uc index 7896e61..42cb2a9 100644 --- a/sources/Zeds/Mean/MeanPoisonInventory.uc +++ b/sources/Zeds/Mean/MeanPoisonInventory.uc @@ -1,18 +1,24 @@ -class MeanPoisonInventory extends Inventory; -var float poisonStartTime, maxSpeedPenaltyTime, poisonSpeedDown; -simulated function Tick(float DeltaTime) { - if(Level.TimeSeconds - poisonStartTime > maxSpeedPenaltyTime) Destroy(); -} -simulated function float GetMovementModifierFor(Pawn InPawn){ - local float actualSpeedDown; - local class niceVet; - - niceVet = class'NiceVeterancyTypes'.static.GetVeterancy(InPawn.PlayerReplicationInfo); - if(niceVet != none){ actualSpeedDown = 1.0 - (1.0 - poisonSpeedDown) * niceVet.static.SlowingModifier(KFPlayerReplicationInfo(InPawn.PlayerReplicationInfo)); actualSpeedDown = FMax(0.0, FMin(1.0, actualSpeedDown)); return actualSpeedDown; - } - // If something went wrong - ignore slowdown altogether - return 1.0; -} -defaultproperties -{ maxSpeedPenaltyTime=5.000000 poisonSpeedDown=0.600000 -} +class MeanPoisonInventory extends Inventory; +var float poisonStartTime, maxSpeedPenaltyTime, poisonSpeedDown; +simulated function Tick(float DeltaTime) { + if(Level.TimeSeconds - poisonStartTime > maxSpeedPenaltyTime) + Destroy(); +} +simulated function float GetMovementModifierFor(Pawn InPawn){ + local float actualSpeedDown; + local class niceVet; + + niceVet = class'NiceVeterancyTypes'.static.GetVeterancy(InPawn.PlayerReplicationInfo); + if(niceVet != none){ + actualSpeedDown = 1.0 - (1.0 - poisonSpeedDown) * niceVet.static.SlowingModifier(KFPlayerReplicationInfo(InPawn.PlayerReplicationInfo)); + actualSpeedDown = FMax(0.0, FMin(1.0, actualSpeedDown)); + return actualSpeedDown; + } + // If something went wrong - ignore slowdown altogether + return 1.0; +} +defaultproperties +{ + maxSpeedPenaltyTime=5.000000 + poisonSpeedDown=0.800000 +} diff --git a/sources/Zeds/NiceMonster.uc b/sources/Zeds/NiceMonster.uc index d4737fb..8d2d255 100644 --- a/sources/Zeds/NiceMonster.uc +++ b/sources/Zeds/NiceMonster.uc @@ -668,36 +668,28 @@ function ModDamage( out int damage, float headshotLevel, KFPlayerReplicationInfo KFPRI, optional float lockonTime){ - local NicePlayerController nicePlayer; - local NiceMonster niceZed; - local bool hasThinOut; - local bool isRelated; - local float maxDistance; - if(KFPRI == none || KFPRI.ClientVeteranSkill == none) return; - // Add perked damage - damage = KFPRI.ClientVeteranSkill.Static.AddDamage( KFPRI, self, - KFPawn(instigatedBy), - damage, damageType); - // Skill bonuses - if(nicePlayer == none || instigatedBy == none) - return; - hasThinOut = class'NiceVeterancyTypes'.static.hasSkill(nicePlayer, - class'NiceSkillCommandoThinOut'); - if(!hasThinOut) - return; - maxDistance = class'NiceSkillCommandoThinOut'.default.maxDistance; - foreach instigatedBy.RadiusActors(class'NiceMonster', niceZed, maxDistance){ - if(!nicePlayer.CanSee(niceZed)) continue; - if(niceZed == none || niceZed == self) continue; - if(niceZed.health <= 0) continue; - if(default.health < 500) continue; - isRelated = ClassIsChildOf(niceZed.class, class) - || ClassIsChildOf(class, niceZed.class); - if(niceZed.default.health >= 1000 || isRelated){ - damage *= class'NiceSkillCommandoThinOut'.default.damageMult; - break; - } - } + local NicePlayerController nicePlayer; + local bool hasGiantSlayer; + local int bonusDamageStacks; + if(KFPRI == none || KFPRI.ClientVeteranSkill == none) return; + // Add perked damage + damage = KFPRI.ClientVeteranSkill.Static.AddDamage( KFPRI, self, + KFPawn(instigatedBy), + damage, damageType); + // Skill bonuses + if(instigatedBy == none) + return; + nicePlayer = NicePlayerController(instigatedBy.controller); + if(nicePlayer == none) + return; + hasGiantSlayer = class'NiceVeterancyTypes'.static.hasSkill(nicePlayer, + class'NiceSkillCommandoGiantSlayer'); + if(!hasGiantSlayer) + return; + bonusDamageStacks = + int(health / class'NiceSkillCommandoGiantSlayer'.default.healthStep); + damage *= 1.0f + bonusDamageStacks * + class'NiceSkillCommandoGiantSlayer'.default.bonusDamageMult; } function ModRegularDamage( out int damage, Pawn instigatedBy, @@ -945,8 +937,10 @@ function DealDecapDamage( int damage, damageType, headshotLevel, KFPRI, lockonTime); } else - decapDmg = HealthMax * GetDecapDamageModifier( damageType, nicePlayer, - KFPRI); + { + decapDmg = Ceil(HealthMax * GetDecapDamageModifier( damageType, + nicePlayer, KFPRI)); + } DealBodyDamage( decapDmg, instigatedBy, hitLocation, momentum, damageType, headshotLevel, KFPRI, lockonTime); if(class'NiceVeterancyTypes'.static. @@ -1057,7 +1051,9 @@ function DealBodyDamage(int damage, // Reduce health Health -= actualDamage; if(IsFinisher(damage, damageType, nicePlayer)) + { Health -= actualDamage; + } // Update location if(hitLocation == vect(0,0,0)) hitLocation = Location; @@ -1771,7 +1767,7 @@ simulated function RemoveHead(){ // No more raspy breathin'...cuz he has no throat or mouth :S AmbientSound = MiscSound; if(Health > 0) - BleedOutTime = Level.TimeSeconds + BleedOutDuration; + BleedOutTime = Level.TimeSeconds + BleedOutDuration; if(MeleeAnims[1] == 'Claw3') MeleeAnims[1] = 'Claw1'; if(MeleeAnims[2] == 'Claw3')