First commit
This commit is contained in:
commit
5b48414900
263 changed files with 24830 additions and 0 deletions
20
sources/Perks/Abilities/NiceAbilitiesAdapter.uc
Normal file
20
sources/Perks/Abilities/NiceAbilitiesAdapter.uc
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
//==============================================================================
|
||||
// NicePack / NiceAbilitiesAdapter
|
||||
//==============================================================================
|
||||
// Temporary stand-in for future functionality.
|
||||
// Use this class to catch events from players' abilities.
|
||||
//==============================================================================
|
||||
// 'Nice pack' source
|
||||
// Do whatever the fuck you want with it
|
||||
// Author: dkanus
|
||||
// E-mail: dkanus@gmail.com
|
||||
//==============================================================================
|
||||
class NiceAbilitiesAdapter extends Object;
|
||||
var LevelInfo level;
|
||||
static function AbilityActivated( string abilityID,
NicePlayerController relatedPlayer);
|
||||
static function AbilityAdded( string abilityID,
NicePlayerController relatedPlayer);
|
||||
static function AbilityRemoved( string abilityID,
NicePlayerController relatedPlayer);
|
||||
static function ModAbilityCooldown( string abilityID,
NicePlayerController relatedPlayer,
out float cooldown);
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
57
sources/Perks/Abilities/NiceAbilitiesEvents.uc
Normal file
57
sources/Perks/Abilities/NiceAbilitiesEvents.uc
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
//==============================================================================
|
||||
// NicePack / NiceAbilitiesEvents
|
||||
//==============================================================================
|
||||
// Temporary stand-in for future functionality.
|
||||
//==============================================================================
|
||||
// 'Nice pack' source
|
||||
// Do whatever the fuck you want with it
|
||||
// Author: dkanus
|
||||
// E-mail: dkanus@gmail.com
|
||||
//==============================================================================
|
||||
class NiceAbilitiesEvents extends Object;
|
||||
var array< class<NiceAbilitiesAdapter> > adapters;
|
||||
// If adapter was already added also returns 'false'.
|
||||
static function bool AddAdapter(class<NiceAbilitiesAdapter> newAdapter,
optional LevelInfo level){
|
||||
local int i;
|
||||
if(newAdapter == none) return false;
|
||||
for(i = 0;i < default.adapters.length;i ++)
if(default.adapters[i] == newAdapter)
return false;
|
||||
newAdapter.default.level = level;
|
||||
default.adapters[default.adapters.length] = newAdapter;
|
||||
return true;
|
||||
}
|
||||
// If adapter wasn't even present also returns 'false'.
|
||||
static function bool RemoveAdapter(class<NiceAbilitiesAdapter> adapter){
|
||||
local int i;
|
||||
if(adapter == none) return false;
|
||||
for(i = 0;i < default.adapters.length;i ++){
if(default.adapters[i] == adapter){
default.adapters.Remove(i, 1);
return true;
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
static function CallAbilityActivated
|
||||
(
string abilityID,
NicePlayerController relatedPlayer
|
||||
){
|
||||
local int i;
|
||||
for(i = 0;i < default.adapters.length;i ++)
default.adapters[i].static.AbilityActivated(abilityID, relatedPlayer);
|
||||
}
|
||||
static function CallAbilityAdded
|
||||
(
string abilityID,
NicePlayerController relatedPlayer
|
||||
){
|
||||
local int i;
|
||||
for(i = 0;i < default.adapters.length;i ++)
default.adapters[i].static.AbilityAdded(abilityID, relatedPlayer);
|
||||
}
|
||||
static function CallAbilityRemoved
|
||||
(
string abilityID,
NicePlayerController relatedPlayer
|
||||
){
|
||||
local int i;
|
||||
for(i = 0;i < default.adapters.length;i ++)
default.adapters[i].static.AbilityRemoved(abilityID, relatedPlayer);
|
||||
}
|
||||
static function CallModAbilityCooldown
|
||||
(
string abilityID,
NicePlayerController relatedPlayer,
out float cooldown
|
||||
){
|
||||
local int i;
|
||||
for(i = 0;i < default.adapters.length;i ++){
default.adapters[i].static.ModAbilityCooldown( abilityID,
relatedPlayer,
cooldown);
|
||||
}
|
||||
}
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
137
sources/Perks/Abilities/NiceAbilityManager.uc
Normal file
137
sources/Perks/Abilities/NiceAbilityManager.uc
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
//==============================================================================
|
||||
// NicePack / NiceAbilityManager
|
||||
//==============================================================================
|
||||
// Class that manager active abilities, introduced along with a NicePack.
|
||||
// Can support at most 5 ('maxAbilitiesAmount') different abilities at once.
|
||||
// NICETODO: refactor later
|
||||
//==============================================================================
|
||||
// 'Nice pack' source
|
||||
// Do whatever the fuck you want with it
|
||||
// Author: dkanus
|
||||
// E-mail: dkanus@gmail.com
|
||||
//==============================================================================
|
||||
class NiceAbilityManager extends Actor;
|
||||
var const int maxAbilitiesAmount;
|
||||
// Defines a list of all possible ability's states
|
||||
enum EAbilityState{
|
||||
// Ability is ready to use
|
||||
ASTATE_READY,
|
||||
// Ability is being used
|
||||
ASTATE_ACTIVE,
|
||||
// Ability is on cooldown
|
||||
ASTATE_COOLDOWN
|
||||
};
|
||||
// Describes all the necessary information about an ability
|
||||
struct NiceAbilityDescription{
|
||||
// Ability's ID, supposed to be unique per ability,
|
||||
// but no checks are enforced yet
|
||||
var string ID;
|
||||
// Image to be used as an ability's icon
|
||||
var Texture icon;
|
||||
// Default cooldown duration
|
||||
var float cooldownLength;
|
||||
// Can ability be canceled once activated?
|
||||
var bool canBeCancelled;
|
||||
};
|
||||
// Complete description of current status of an ability,
|
||||
// including it's complete description.
|
||||
struct NiceAbilityStatus{
|
||||
// Complete description of ability in question
|
||||
var NiceAbilityDescription description;
|
||||
// Current cooldown value
|
||||
var float cooldown;
|
||||
// Current state of an ability
|
||||
var EAbilityState myState;
|
||||
};
|
||||
var NiceAbilityStatus currentAbilities[5];
|
||||
var int currentAbilitiesAmount;
|
||||
// Refers to the player whose abilities we manage
|
||||
var NicePlayerController relatedPlayer;
|
||||
var const class<NiceAbilitiesEvents> events;
|
||||
// Unfortunately this hackk is required to force replication of structure array
|
||||
var int hackCounter;
|
||||
replication{
|
||||
reliable if(Role == ROLE_Authority)
currentAbilities, currentAbilitiesAmount, hackCounter;
|
||||
}
|
||||
simulated function PostBeginPlay(){
|
||||
relatedPlayer = NicePlayerController(owner);
|
||||
}
|
||||
function AddAbility(NiceAbilityDescription description){
|
||||
local int i;
|
||||
local NiceAbilityStatus newRecord;
|
||||
if(currentAbilitiesAmount >= maxAbilitiesAmount) return;
|
||||
for(i = 0;i < currentAbilitiesAmount;i ++)
if(currentAbilities[i].description.ID ~= description.ID)
return;
|
||||
newRecord.description = description;
|
||||
newRecord.cooldown = 0.0;
|
||||
newRecord.myState = ASTATE_READY;
|
||||
currentAbilities[currentAbilitiesAmount] = newRecord;
|
||||
currentAbilitiesAmount += 1;
|
||||
events.static.CallAbilityAdded(description.ID, relatedPlayer);
|
||||
netUpdateTime = level.timeSeconds - 1;
|
||||
}
|
||||
function RemoveAbility(string abilityID){
|
||||
local int i, j;
|
||||
local bool wasRemoved;
|
||||
j = 0;
|
||||
for(i = 0;i < currentAbilitiesAmount;i ++){
if(currentAbilities[i].description.ID ~= abilityID){
wasRemoved = true;
continue;
}
currentAbilities[j] = currentAbilities[i];
j += 1;
|
||||
}
|
||||
currentAbilitiesAmount = j;
|
||||
if(wasRemoved)
events.static.CallAbilityRemoved(abilityID, relatedPlayer);
|
||||
netUpdateTime = level.timeSeconds - 1;
|
||||
}
|
||||
function ClearAbilities(){
|
||||
currentAbilitiesAmount = 0;
|
||||
netUpdateTime = level.timeSeconds - 1;
|
||||
}
|
||||
// Returns index of the ability with a given name.
|
||||
// Returns '-1' if such ability doesn't exist.
|
||||
simulated function int GetAbilityIndex(string abilityID){
|
||||
local int i;
|
||||
for(i = 0;i < currentAbilitiesAmount;i ++)
if(currentAbilities[i].description.ID ~= abilityID)
return i;
|
||||
return -1;
|
||||
}
|
||||
simulated function bool IsAbilityActive(string abilityID){
|
||||
local int index;
|
||||
index = GetAbilityIndex(abilityID);
|
||||
if(index < 0)
return false;
|
||||
return (currentAbilities[index].myState == ASTATE_ACTIVE);
|
||||
}
|
||||
// Sets ability to a proper state.
|
||||
// Does nothing if ability is already in a specified state.
|
||||
// Setting active ability to a ready state is only allowed
|
||||
// if ability can be canceled.
|
||||
// Updates cooldown to full length if new state is 'ASTATE_COOLDOWN'.
|
||||
function SetAbilityState(int abilityIndex, EAbilityState newState){
|
||||
local float cooldown;
|
||||
local EAbilityState currentState;
|
||||
if(abilityIndex < 0 || abilityIndex >= currentAbilitiesAmount) return;
|
||||
currentState = currentAbilities[abilityIndex].myState;
|
||||
if(currentState == newState)
return;
|
||||
if( currentState == ASTATE_ACTIVE && newState == ASTATE_READY
&& !currentAbilities[abilityIndex].description.canBeCancelled)
return;
|
||||
currentAbilities[abilityIndex].myState = newState;
|
||||
if(newState == ASTATE_COOLDOWN){
cooldown = currentAbilities[abilityIndex].description.cooldownLength;
events.static.CallModAbilityCooldown(
currentAbilities[abilityIndex].description.ID,
relatedPlayer,
cooldown
);
currentAbilities[abilityIndex].cooldown = cooldown;
|
||||
}
|
||||
hackCounter ++;
|
||||
netUpdateTime = level.timeSeconds - 1;
|
||||
// Fire off events
|
||||
if(newState == ASTATE_ACTIVE){
events.static.CallAbilityActivated(
currentAbilities[abilityIndex].description.ID,
relatedPlayer
);
|
||||
}
|
||||
}
|
||||
// Changes ability's cooldown by a given amount.
|
||||
// If this brings cooldown to zero or below -
|
||||
// resets current ability to a 'ready' (ASTATE_READY) state.
|
||||
function AddToCooldown(int abilityIndex, float delta){
|
||||
if(abilityIndex < 0 || abilityIndex >= currentAbilitiesAmount) return;
|
||||
if(currentAbilities[abilityIndex].myState != ASTATE_COOLDOWN) return;
|
||||
currentAbilities[abilityIndex].cooldown += delta;
|
||||
if(currentAbilities[abilityIndex].cooldown <= 0)
SetAbilityState(abilityIndex, ASTATE_READY);
|
||||
hackCounter ++;
|
||||
}
|
||||
function Tick(float deltaTime){
|
||||
local int i;
|
||||
if(Role != Role_AUTHORITY) return;
|
||||
for(i = 0;i < currentAbilitiesAmount;i ++)
AddToCooldown(i, -deltaTime);
|
||||
}
|
||||
defaultproperties
|
||||
{
maxAbilitiesAmount=5
Events=Class'NicePack.NiceAbilitiesEvents'
DrawType=DT_None
|
||||
}
|
||||
8
sources/Perks/Berserker/NiceDamageTypeVetBerserker.uc
Normal file
8
sources/Perks/Berserker/NiceDamageTypeVetBerserker.uc
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
class NiceDamageTypeVetBerserker extends NiceWeaponDamageType
|
||||
abstract;
|
||||
static function AwardNiceDamage(KFSteamStatsAndAchievements KFStatsAndAchievements, int Amount, int HL){
|
||||
if(SRStatsBase(KFStatsAndAchievements) != none && SRStatsBase(KFStatsAndAchievements).Rep != none)
SRStatsBase(KFStatsAndAchievements).Rep.ProgressCustomValue(Class'NiceVetBerserkerExp', Int(Float(Amount) * class'NicePack'.default.vetZerkDamageExpCost * getScale(HL)));
|
||||
}
|
||||
defaultproperties
|
||||
{
HeadShotDamageMult=1.250000
bIsMeleeDamage=True
DeathString="%o was beat down by %k."
FemaleSuicide="%o beat herself down."
MaleSuicide="%o beat himself down."
bRagdollBullet=True
bBulletHit=True
PawnDamageEmitter=Class'ROEffects.ROBloodPuff'
LowGoreDamageEmitter=Class'ROEffects.ROBloodPuffNoGore'
LowDetailEmitter=Class'ROEffects.ROBloodPuffSmall'
FlashFog=(X=600.000000)
KDamageImpulse=2000.000000
KDeathVel=100.000000
KDeathUpKick=25.000000
VehicleDamageScaling=0.600000
|
||||
}
|
||||
88
sources/Perks/Berserker/NiceVetBerserker.uc
Normal file
88
sources/Perks/Berserker/NiceVetBerserker.uc
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
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<int> GetProgressArray(byte ReqNum, optional out int DoubleScalingBase){
|
||||
return default.progressArray0;
|
||||
}
|
||||
static function int AddDamage(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InDamage, class<DamageType> DmgType){
|
||||
local float perkDamage;
|
||||
local class<NiceWeaponPickup> pickupClass;
|
||||
pickupClass = GetPickupFromDamageType(DmgType);
|
||||
perkDamage = float(InDamage);
|
||||
if(IsPerkedPickup(pickupClass))
perkDamage *= 2;
|
||||
return perkDamage;
|
||||
}
|
||||
static function float GetFireSpeedModStatic(KFPlayerReplicationInfo KFPRI, class<Weapon> other){
|
||||
local float bonus;
|
||||
local class<NiceWeaponPickup> 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"
|
||||
}
|
||||
4
sources/Perks/Berserker/NiceVetBerserkerExp.uc
Normal file
4
sources/Perks/Berserker/NiceVetBerserkerExp.uc
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
class NiceVetBerserkerExp extends SRCustomProgressInt;
|
||||
defaultproperties
|
||||
{
ProgressName="Berserker exp."
|
||||
}
|
||||
5
sources/Perks/Berserker/Skills/NiceSkillZerkBrawler.uc
Normal file
5
sources/Perks/Berserker/Skills/NiceSkillZerkBrawler.uc
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class NiceSkillZerkBrawler extends NiceSkill
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
SkillName="Brawler"
SkillEffects="Clots can't grab you."
|
||||
}
|
||||
6
sources/Perks/Berserker/Skills/NiceSkillZerkCleave.uc
Normal file
6
sources/Perks/Berserker/Skills/NiceSkillZerkCleave.uc
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillZerkCleave extends NiceSkill
|
||||
abstract;
|
||||
var float bonusDegrees;
|
||||
defaultproperties
|
||||
{
bonusDegrees=0.523599
SkillName="Cleave"
SkillEffects="Add 30 degrees to wide attacks with melee weapons."
|
||||
}
|
||||
6
sources/Perks/Berserker/Skills/NiceSkillZerkColossus.uc
Normal file
6
sources/Perks/Berserker/Skills/NiceSkillZerkColossus.uc
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillZerkColossus extends NiceSkill
|
||||
abstract;
|
||||
var float timeBonus;
|
||||
defaultproperties
|
||||
{
timeBonus=1.000000
SkillName="Colossus"
SkillEffects="Invincibility period lasts 1 second longer."
|
||||
}
|
||||
6
sources/Perks/Berserker/Skills/NiceSkillZerkFury.uc
Normal file
6
sources/Perks/Berserker/Skills/NiceSkillZerkFury.uc
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillZerkFury extends NiceSkill
|
||||
abstract;
|
||||
var float attackSpeedBonus;
|
||||
defaultproperties
|
||||
{
attackSpeedBonus=1.500000
SkillName="Fury"
SkillEffects="Attack 50% faster during invincibility."
|
||||
}
|
||||
6
sources/Perks/Berserker/Skills/NiceSkillZerkGunzerker.uc
Normal file
6
sources/Perks/Berserker/Skills/NiceSkillZerkGunzerker.uc
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillZerkGunzerker extends NiceSkill
|
||||
abstract;
|
||||
var float cooldown;
|
||||
defaultproperties
|
||||
{
cooldown=-2.000000
SkillName="Gunzerker"
SkillEffects="You're able to activate melee-invincibility with non-melee headshots, but your misses are punished by a 2 second cooldown, during which you cannot activate invincibility."
|
||||
}
|
||||
6
sources/Perks/Berserker/Skills/NiceSkillZerkUndead.uc
Normal file
6
sources/Perks/Berserker/Skills/NiceSkillZerkUndead.uc
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillZerkUndead extends NiceSkill
|
||||
abstract;
|
||||
var int addedSafeMisses;
|
||||
defaultproperties
|
||||
{
addedSafeMisses=1
SkillName="Undead"
SkillEffects="Get additional safe melee-miss during invincibility period."
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillZerkVorpalBlade extends NiceSkill
|
||||
abstract;
|
||||
var float damageBonus;
|
||||
defaultproperties
|
||||
{
damageBonus=2.000000
SkillName="Vorpal blade"
SkillEffects="Your head-shot deals double damage on your first invincibility extension against the zed."
|
||||
}
|
||||
5
sources/Perks/Berserker/Skills/NiceSkillZerkWhirlwind.uc
Normal file
5
sources/Perks/Berserker/Skills/NiceSkillZerkWhirlwind.uc
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class NiceSkillZerkWhirlwind extends NiceSkill
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
SkillName="Whirlwind"
SkillEffects="Move twice as fast during invincibility."
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillZerkWindCutter extends NiceSkill
|
||||
abstract;
|
||||
var float rangeBonus;
|
||||
defaultproperties
|
||||
{
rangeBonus=1.500000
SkillName="Wind cutter"
SkillEffects="Increase your reach with melee-weapons by 50%."
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
class NiceSkillZerkZEDAccelerate extends NiceSkill
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
SkillName="Accelerate"
SkillEffects="Move and attack at the same speed during zed-time."
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
class NiceSkillZerkZEDUnbreakable extends NiceSkill
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
SkillName="Unbreakable"
SkillEffects="You resist all damage during zed time."
|
||||
}
|
||||
14
sources/Perks/Commando/NiceDamageTypeVetCommando.uc
Normal file
14
sources/Perks/Commando/NiceDamageTypeVetCommando.uc
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
class NiceDamageTypeVetCommando extends NiceWeaponDamageType
|
||||
abstract;
|
||||
static function AwardKill(KFSteamStatsAndAchievements KFStatsAndAchievements, KFPlayerController Killer, KFMonster Killed ){
|
||||
if(Killed.IsA('ZombieStalker'))
KFStatsAndAchievements.AddStalkerKill();
|
||||
}
|
||||
static function AwardDamage(KFSteamStatsAndAchievements KFStatsAndAchievements, int Amount){
|
||||
KFStatsAndAchievements.AddBullpupDamage(Amount);
|
||||
}
|
||||
static function AwardNiceDamage(KFSteamStatsAndAchievements KFStatsAndAchievements, int Amount, int HL){
|
||||
if(SRStatsBase(KFStatsAndAchievements) != none && SRStatsBase(KFStatsAndAchievements).Rep != none)
SRStatsBase(KFStatsAndAchievements).Rep.ProgressCustomValue(Class'NiceVetCommandoExp', Int(Float(Amount) * class'NicePack'.default.vetCommandoDamageExpCost * getScale(HL)));
|
||||
}
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
38
sources/Perks/Commando/NiceVetCommando.uc
Normal file
38
sources/Perks/Commando/NiceVetCommando.uc
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
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<int> 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<NiceWeaponPickup> 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<KFWeapon> 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"
|
||||
}
|
||||
4
sources/Perks/Commando/NiceVetCommandoExp.uc
Normal file
4
sources/Perks/Commando/NiceVetCommandoExp.uc
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
class NiceVetCommandoExp extends SRCustomProgressInt;
|
||||
defaultproperties
|
||||
{
ProgressName="Commando exp."
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
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"
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillCommandoExplosivePower extends NiceSkill
|
||||
abstract;
|
||||
var float dmgMod;
|
||||
defaultproperties
|
||||
{
dmgMod=1.200000
SkillName="Explosive power"
SkillEffects="Burst fire deals 20% more damage and has reduced delay between shots."
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillCommandoLargerMags extends NiceSkill
|
||||
abstract;
|
||||
var float sizeBonus;
|
||||
defaultproperties
|
||||
{
sizeBonus=1.500000
SkillName="Larger mags"
SkillEffects="50% larger assault rifles' magazines."
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
class NiceSkillCommandoPerfectExecution extends NiceSkill
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
SkillName="Perfect execution"
SkillEffects="Raging scrake or fleshpound activates zed-time."
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillCommandoStrategist extends NiceSkill
|
||||
abstract;
|
||||
var float visionRadius; // 1.0 ~ 16m
|
||||
defaultproperties
|
||||
{
visionRadius=1.000000
bBroadcast=True
SkillName="Strategist"
SkillEffects="You and your teammates can see enemies' health and invisible zeds from 16 meters."
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillCommandoTactitian extends NiceSkill
|
||||
abstract;
|
||||
var int bonusExt;
|
||||
defaultproperties
|
||||
{
bonusExt=2
SkillName="Tactician"
SkillEffects="Gain two additional zed-time extensions."
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
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."
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
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."
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
class NiceSkillCommandoZEDEvisceration extends NiceSkill
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
SkillName="Evisceration"
SkillEffects="During zed-time both 'Trash cleaner' and 'Thin out' skills are active."
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
class NiceSkillCommandoZEDProfessional extends NiceSkill
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
SkillName="Professionalism"
SkillEffects="Your reloads aren't slowed down during zed-time."
|
||||
}
|
||||
5
sources/Perks/Demolitions/NiceDamTypeDemoBlunt.uc
Normal file
5
sources/Perks/Demolitions/NiceDamTypeDemoBlunt.uc
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class NiceDamTypeDemoBlunt extends NiceDamageTypeVetDemolitions
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
HeadShotDamageMult=2.000000
bSniperWeapon=True
DeathString="%k killed %o (LAW Impact)."
FemaleSuicide="%o shot herself in the foot."
MaleSuicide="%o shot himself in the foot."
bRagdollBullet=True
bBulletHit=True
FlashFog=(X=600.000000)
KDamageImpulse=5000.000000
KDeathVel=200.000000
KDeathUpKick=50.000000
VehicleDamageScaling=0.700000
|
||||
}
|
||||
9
sources/Perks/Demolitions/NiceDamTypeDemoExplosion.uc
Normal file
9
sources/Perks/Demolitions/NiceDamTypeDemoExplosion.uc
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
class NiceDamTypeDemoExplosion extends NiceDamageTypeVetDemolitions;
|
||||
static function GetHitEffects(out class<xEmitter> HitEffects[4], int VictimHealth){
|
||||
HitEffects[0] = class'HitSmoke';
|
||||
if(VictimHealth <= 0)
HitEffects[1] = class'KFHitFlame';
|
||||
else if(FRand() < 0.8)
HitEffects[1] = class'KFHitFlame';
|
||||
}
|
||||
defaultproperties
|
||||
{
stunMultiplier=0.600000
bIsExplosive=True
DeathString="%o filled %k's body with shrapnel."
FemaleSuicide="%o blew up."
MaleSuicide="%o blew up."
bLocationalHit=False
bThrowRagdoll=True
bExtraMomentumZ=True
DamageThreshold=1
DeathOverlayMaterial=Combiner'Effects_Tex.GoreDecals.PlayerDeathOverlay'
DeathOverlayTime=999.000000
KDamageImpulse=3000.000000
KDeathVel=300.000000
KDeathUpKick=250.000000
HumanObliterationThreshhold=150
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
class NiceDamTypeDemoSafeExplosion extends NiceDamTypeDemoExplosion;
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
class NiceDamageTypeVetDemolitions extends NiceWeaponDamageType
|
||||
abstract;
|
||||
static function AwardNiceDamage(KFSteamStatsAndAchievements KFStatsAndAchievements, int Amount, int HL){
|
||||
if(SRStatsBase(KFStatsAndAchievements) != none && SRStatsBase(KFStatsAndAchievements).Rep != none)
SRStatsBase(KFStatsAndAchievements).Rep.ProgressCustomValue(Class'NiceVetDemolitionsExp', Int(Float(Amount) * class'NicePack'.default.vetDemoDamageExpCost * getScale(HL)));
|
||||
}
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
66
sources/Perks/Demolitions/NiceVetDemolitions.uc
Normal file
66
sources/Perks/Demolitions/NiceVetDemolitions.uc
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
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<int> GetProgressArray(byte ReqNum, optional out int DoubleScalingBase){
|
||||
return default.progressArray0;
|
||||
}
|
||||
static function int ReduceDamage(KFPlayerReplicationInfo KFPRI, KFPawn Injured, Pawn Instigator, int InDamage, class<DamageType> DmgType){
|
||||
local NicePlayerController nicePlayer;
|
||||
if(class<NiceDamTypeDemoSafeExplosion>(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<KFWeaponDamageType>(DmgType) != none && class<KFWeaponDamageType>(DmgType).default.bIsExplosive))
return float(InDamage) * 0.5;
|
||||
return InDamage;
|
||||
}
|
||||
static function float AddExtraAmmoFor(KFPlayerReplicationInfo KFPRI, Class<Ammunition> 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<DamageType> DmgType){
|
||||
local float perkDamage;
|
||||
local class<NiceWeaponPickup> 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<NiceDamTypeDemoBlunt>(DmgType) != none
&& SomeoneHasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillDemoOnperk') )
perkDamage *= class'NiceSkillDemoOnperk'.default.damageBonus;
|
||||
return perkDamage;
|
||||
}
|
||||
static function float GetReloadSpeedModifierStatic(KFPlayerReplicationInfo KFPRI, class<KFWeapon> other){
|
||||
local NiceHumanPawn nicePawn;
|
||||
local class<NiceWeaponPickup> 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<NiceWeaponDamageType> 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<NiceWeaponDamageType> DmgType){
|
||||
return int(float(InStunScore) * 1.5);
|
||||
}
|
||||
static function int AddFlinchScore(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InFlinchScore, class<NiceWeaponDamageType> 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"
|
||||
}
|
||||
4
sources/Perks/Demolitions/NiceVetDemolitionsExp.uc
Normal file
4
sources/Perks/Demolitions/NiceVetDemolitionsExp.uc
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
class NiceVetDemolitionsExp extends SRCustomProgressInt;
|
||||
defaultproperties
|
||||
{
ProgressName="Demolitions exp."
|
||||
}
|
||||
7
sources/Perks/Demolitions/Skills/NiceSkillDemoAPShot.uc
Normal file
7
sources/Perks/Demolitions/Skills/NiceSkillDemoAPShot.uc
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
class NiceSkillDemoAPShot extends NiceSkill
|
||||
abstract;
|
||||
var float minCos;
|
||||
var float damageRatio;
|
||||
defaultproperties
|
||||
{
minCos=0.707000
damageRatio=1.000000
SkillName="AP shot"
SkillEffects="Deal full blast damage behind the target you've hit."
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillDemoConcussion extends NiceSkill
|
||||
abstract;
|
||||
var float durationMult;
|
||||
defaultproperties
|
||||
{
durationMult=2.000000
SkillName="Concussion"
SkillEffects="You stun zeds for twice longer time than usual."
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
class NiceSkillDemoDirectApproach extends NiceSkill
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
SkillName="Direct approach"
SkillEffects="Your explosives will first hit target zed as a blunt before exploding."
|
||||
}
|
||||
28
sources/Perks/Demolitions/Skills/NiceSkillDemoManiac.uc
Normal file
28
sources/Perks/Demolitions/Skills/NiceSkillDemoManiac.uc
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
class NiceSkillDemoManiac extends NiceSkill
|
||||
abstract;
|
||||
var float reloadBoostTime;
|
||||
var float reloadSpeedup;
|
||||
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("npDemoManiac", Texture'NicePackT.HudCounter.demo', 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("npDemoManiac");
|
||||
}
|
||||
function static int UpdateCounterValue(string counterName, NicePlayerController nicePlayer){
|
||||
local NiceHumanPawn nicePawn;
|
||||
if(nicePlayer == none || counterName != "npDemoManiac")
return 0;
|
||||
nicePawn = NiceHumanPawn(nicePlayer.pawn);
|
||||
if(nicePawn == none || nicePawn.maniacTimeout <= 0.0)
return 0;
|
||||
return Ceil(nicePawn.maniacTimeout);
|
||||
}
|
||||
defaultproperties
|
||||
{
reloadBoostTime=5.000000
reloadSpeedup=1.500000
SkillName="Maniac"
SkillEffects="Reload 50% faster for 5 seconds after killing something."
|
||||
}
|
||||
8
sources/Perks/Demolitions/Skills/NiceSkillDemoOffperk.uc
Normal file
8
sources/Perks/Demolitions/Skills/NiceSkillDemoOffperk.uc
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
class NiceSkillDemoOffperk extends NiceSkill
|
||||
abstract;
|
||||
var float damageBonus;
|
||||
var float reloadBonus;
|
||||
var int weightBound;
|
||||
defaultproperties
|
||||
{
damageBonus=1.250000
ReloadBonus=1.250000
weightBound=4
SkillName="Offperk"
SkillEffects="Reload light weapons (less than 5 pounds) 25% faster and do 25% more damage with them."
|
||||
}
|
||||
7
sources/Perks/Demolitions/Skills/NiceSkillDemoOnperk.uc
Normal file
7
sources/Perks/Demolitions/Skills/NiceSkillDemoOnperk.uc
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
class NiceSkillDemoOnperk extends NiceSkill
|
||||
abstract;
|
||||
var float damageBonus;
|
||||
var float speedBonus;
|
||||
defaultproperties
|
||||
{
damageBonus=1.200000
speedBonus=1.500000
bBroadcast=True
SkillName="Onperk"
SkillEffects="Deal 20% more damage with your blunts and make your perk weapon's projectiles fly 50% faster."
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
class NiceSkillDemoReactiveArmor extends NiceSkill
|
||||
abstract;
|
||||
var float baseDamage;
|
||||
var float perNadeDamage;
|
||||
var float explRadius;
|
||||
var float explExponent;
|
||||
var float explMomentum;
|
||||
defaultproperties
|
||||
{
BaseDamage=3000.000000
explRadius=1000.000000
explExponent=1.000000
explMomentum=150000.000000
SkillName="Reactive armor"
SkillEffects="Once per wave your death will be prevented, while zeds all around you will be blown to bits."
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
class NiceSkillDemoVolatile extends NiceSkill
|
||||
abstract;
|
||||
var float safeDistanceMult;
|
||||
var float explRangeMult;
|
||||
var float falloffMult;
|
||||
defaultproperties
|
||||
{
safeDistanceMult=0.500000
explRangeMult=1.000000
falloffMult=0.500000
SkillName="Volatile"
SkillEffects="Safe range for your explosives is halved and explosion damage experiences smaller fall off."
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
class NiceSkillDemoZEDDuckAndCover extends NiceSkill
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
SkillName="Duck and cover"
SkillEffects="During zed time you can't deal yourself any damage."
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillDemoZEDFullBlast extends NiceSkill
|
||||
abstract;
|
||||
var float explRadiusMult;
|
||||
defaultproperties
|
||||
{
explRadiusMult=1.350000
SkillName="Full blast"
SkillEffects="During zed time your explosions have 35% larger radius and their damage doesn't suffer from a fall off."
|
||||
}
|
||||
10
sources/Perks/Enforcer/NiceDamageTypeVetEnforcer.uc
Normal file
10
sources/Perks/Enforcer/NiceDamageTypeVetEnforcer.uc
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
class NiceDamageTypeVetEnforcer extends NiceWeaponDamageType
|
||||
abstract;
|
||||
|
||||
static function AwardNiceDamage(KFSteamStatsAndAchievements KFStatsAndAchievements, int Amount, int HL){
|
||||
if(SRStatsBase(KFStatsAndAchievements) != none && SRStatsBase(KFStatsAndAchievements).Rep != none)
SRStatsBase(KFStatsAndAchievements).Rep.ProgressCustomValue(Class'NiceVetSupportExp', Int(Float(Amount) * class'NicePack'.default.vetSupportDamageExpCost * getScale(HL)));
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
badDecapMod=1.000000
bIsProjectile=True
HeadShotDamageMult=1.500000
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
class NiceDamageTypeVetEnforcerBullets extends NiceDamageTypeVetEnforcer
|
||||
abstract;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
badDecapMod=0.2500000
goodDecapMod=0.500000
bodyDestructionMult=1.000000
HeadShotDamageMult=1.000000
|
||||
}
|
||||
118
sources/Perks/Enforcer/NiceVetEnforcer.uc
Normal file
118
sources/Perks/Enforcer/NiceVetEnforcer.uc
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
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<int> GetProgressArray(byte ReqNum, optional out int DoubleScalingBase){
|
||||
return default.progressArray0;
|
||||
}
|
||||
|
||||
// Other bonuses
|
||||
|
||||
static function float GetPenetrationDamageMulti(KFPlayerReplicationInfo KFPRI, float DefaultPenDamageReduction, class<NiceWeaponDamageType> fireIntance){
|
||||
local float bonusReduction;
|
||||
local float PenDamageInverse;
|
||||
bonusReduction = 0.0;
|
||||
if(class<NiceDamageTypeVetEnforcerBullets>(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<NiceWeaponDamageType> DmgType){
|
||||
local class<NiceWeaponPickup> 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<Grenade> 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<DamageType> 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<KFWeaponDamageType>(DmgType) != none
|
||||
&& ((class<KFWeaponDamageType>(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<Weapon> other){
|
||||
local float fireSpeed;
|
||||
local NicePlayerController nicePlayer;
|
||||
local class<NiceWeaponPickup> 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<NiceWeaponPickup> 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<KFWeapon> other){
|
||||
local class<NiceWeapon> niceWeap;
|
||||
niceWeap = class<NiceWeapon>(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"
|
||||
}
|
||||
4
sources/Perks/Enforcer/NiceVetSupportExp.uc
Normal file
4
sources/Perks/Enforcer/NiceVetSupportExp.uc
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
class NiceVetSupportExp extends SRCustomProgressInt;
|
||||
defaultproperties
|
||||
{
ProgressName="Enforcer exp."
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
class NiceSkillEnforcerBombard extends NiceSkill
|
||||
abstract;
|
||||
var float stunMult;
|
||||
var float spreadMult;
|
||||
defaultproperties
|
||||
{
stunMult=3.000000
spreadMult=0.500000
SkillName="Bombard"
SkillEffects="Your perked weapons are 3 times as good at stunning."
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillEnforcerMultitasker extends NiceSkill
|
||||
abstract;
|
||||
var float reloadSlowDown;
|
||||
defaultproperties
|
||||
{
reloadSlowDown=5.000000
SkillName="Multitasker"
SkillEffects="Reload holstered weapons at five times as much time."
|
||||
}
|
||||
5
sources/Perks/Enforcer/Skills/NiceSkillSupportAntiZed.uc
Normal file
5
sources/Perks/Enforcer/Skills/NiceSkillSupportAntiZed.uc
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class NiceSkillSupportAntiZed extends NiceSkill
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
SkillName="Anti-zed rounds"
SkillEffects="When shotgun pellets pass screaming siren, they gain x4 damage boost."
|
||||
}
|
||||
5
sources/Perks/Enforcer/Skills/NiceSkillSupportArmory.uc
Normal file
5
sources/Perks/Enforcer/Skills/NiceSkillSupportArmory.uc
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class NiceSkillSupportArmory extends NiceSkill
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
bBroadcast=True
SkillName="Armory"
SkillEffects="Once per wave your team-mates will receive armored jacket when they run out of armor."
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillSupportBigGameHunter extends NiceSkillGenAmmo
|
||||
abstract;
|
||||
var float damageBonus;
|
||||
defaultproperties
|
||||
{
damageBonus=1.600000
SkillName="Big-game hunter"
SkillEffects="Gain 60% damage bonus with grenades, but carry 5 grenades less."
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
class NiceSkillSupportCautious extends NiceSkill
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
SkillName="Cautious"
SkillEffects="Your grenades won't explode if you're too close to them."
|
||||
}
|
||||
18
sources/Perks/Enforcer/Skills/NiceSkillSupportDiversity.uc
Normal file
18
sources/Perks/Enforcer/Skills/NiceSkillSupportDiversity.uc
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
class NiceSkillSupportDiversity extends NiceSkill
|
||||
abstract;
|
||||
var int bonusWeight;
|
||||
static function UpdateWeight(NicePlayerController nicePlayer){
|
||||
local NiceHumanPawn nicePawn;
|
||||
if(nicePawn == none || nicePawn.KFPRI == none) return;
|
||||
nicePawn.maxCarryWeight = nicePawn.default.maxCarryWeight;
|
||||
if(nicePawn.KFPRI.clientVeteranSkill != none)
nicePawn.maxCarryWeight += nicePawn.KFPRI.clientVeteranSkill.static.AddCarryMaxWeight(nicePawn.KFPRI);
|
||||
}
|
||||
function static SkillSelected(NicePlayerController nicePlayer){
|
||||
UpdateWeight(nicePlayer);
|
||||
}
|
||||
function static SkillDeSelected(NicePlayerController nicePlayer){
|
||||
UpdateWeight(nicePlayer);
|
||||
}
|
||||
defaultproperties
|
||||
{
bonusWeight=5
SkillName="Diversity"
SkillEffects="Gain +5 weight slots."
|
||||
}
|
||||
7
sources/Perks/Enforcer/Skills/NiceSkillSupportGraze.uc
Normal file
7
sources/Perks/Enforcer/Skills/NiceSkillSupportGraze.uc
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
class NiceSkillSupportGraze extends NiceSkill
|
||||
abstract;
|
||||
var float hsBonusZoneMult;
|
||||
var float grazeDamageMult;
|
||||
defaultproperties
|
||||
{
hsBonusZoneMult=1.500000
grazeDamageMult=0.750000
SkillName="Graze"
SkillEffects="Your perked projectile can hit zeds' extended head zone for 75% of damage even if they miss the normal one."
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
class NiceSkillSupportObsessive extends NiceSkill
|
||||
abstract;
|
||||
var float reloadLevel;
|
||||
var float reloadBonus;
|
||||
defaultproperties
|
||||
{
reloadLevel=0.650000
ReloadBonus=1.500000
SkillName="Obsessive"
SkillEffects="Reload 50% faster when you lack at most 35% of bullets in the magazine."
|
||||
}
|
||||
5
sources/Perks/Enforcer/Skills/NiceSkillSupportSlugs.uc
Normal file
5
sources/Perks/Enforcer/Skills/NiceSkillSupportSlugs.uc
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class NiceSkillSupportSlugs extends NiceSkill
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
SkillName="Slugs"
SkillEffects="Pellets shots replaced by slugs on shotguns."
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillSupportStubbornness extends NiceSkillGenAmmo
|
||||
abstract;
|
||||
var float penLossRed;
|
||||
defaultproperties
|
||||
{
penLossRed=0.500000
SkillName="Stubbornness"
SkillEffects="50% better penetration."
|
||||
}
|
||||
6
sources/Perks/Enforcer/Skills/NiceSkillSupportZEDBore.uc
Normal file
6
sources/Perks/Enforcer/Skills/NiceSkillSupportZEDBore.uc
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillSupportZEDBore extends NiceSkill
|
||||
abstract;
|
||||
var float minHeadshotPrecision;
|
||||
defaultproperties
|
||||
{
minHeadshotPrecision=0.100000
SkillName="Bore"
SkillEffects="During zed time your bullets' bounce between a zed's body and head 2 times before leaving it."
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
class NiceSkillSupportZEDBulletStorm extends NiceSkill
|
||||
abstract;
|
||||
var float damageCut;
|
||||
var float projCountMult;
|
||||
defaultproperties
|
||||
{
damageCut=0.500000
projCountMult=7.000000
SkillName="Bullet storm"
SkillEffects="During zed time you fire seven times as much projectiles, that deal half as much damage."
|
||||
}
|
||||
5
sources/Perks/FieldMedic/NiceDamTypeMedicBullet.uc
Normal file
5
sources/Perks/FieldMedic/NiceDamTypeMedicBullet.uc
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class NiceDamTypeMedicBullet extends NiceDamageTypeVetMedic
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
5
sources/Perks/FieldMedic/NiceDamTypeMedicDart.uc
Normal file
5
sources/Perks/FieldMedic/NiceDamTypeMedicDart.uc
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class NiceDamTypeMedicDart extends NiceDamageTypeVetMedic
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
8
sources/Perks/FieldMedic/NiceDamageTypeVetMedic.uc
Normal file
8
sources/Perks/FieldMedic/NiceDamageTypeVetMedic.uc
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
class NiceDamageTypeVetMedic extends NiceWeaponDamageType
|
||||
abstract;
|
||||
static function AwardNiceDamage(KFSteamStatsAndAchievements KFStatsAndAchievements, int Amount, int HL){
|
||||
if(SRStatsBase(KFStatsAndAchievements) != none && SRStatsBase(KFStatsAndAchievements).Rep != none)
SRStatsBase(KFStatsAndAchievements).Rep.ProgressCustomValue(Class'NiceVetFieldMedicExp', Int(Float(Amount) * class'NicePack'.default.vetFieldMedicDmgExpCost * getScale(HL)));
|
||||
}
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
62
sources/Perks/FieldMedic/NiceVetFieldMedic.uc
Normal file
62
sources/Perks/FieldMedic/NiceVetFieldMedic.uc
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
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<int> 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<DamageType> 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<Grenade> 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<Weapon> 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<Pickup> Item){
|
||||
local class<NiceWeaponPickup> pickupClass;
|
||||
pickupClass = class<NiceWeaponPickup>(Item);
|
||||
if(IsPerkedPickup(class<NiceWeaponPickup>(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"
|
||||
}
|
||||
4
sources/Perks/FieldMedic/NiceVetFieldMedicExp.uc
Normal file
4
sources/Perks/FieldMedic/NiceVetFieldMedicExp.uc
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
class NiceVetFieldMedicExp extends SRCustomProgressInt;
|
||||
defaultproperties
|
||||
{
ProgressName="Field Medic exp."
|
||||
}
|
||||
5
sources/Perks/FieldMedic/Skills/NiceDamTypeDrug.uc
Normal file
5
sources/Perks/FieldMedic/Skills/NiceDamTypeDrug.uc
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class NiceDamTypeDrug extends NiceWeaponDamageType
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
FemaleSuicide="%o overdosed."
MaleSuicide="%o overdosed."
bArmorStops=False
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
class NiceSkillMedicAdrenalineShot extends NiceSkill
|
||||
abstract;
|
||||
var float boostTime;
|
||||
var float minHealth;
|
||||
var float speedBoost, resistBoost;
|
||||
defaultproperties
|
||||
{
boostTime=1.000000
minHealth=50.000000
speedBoost=2.000000
resistBoost=1.500000
SkillName="Adrenaline shot"
SkillEffects="Wounded players healed by you gain boost in speed (up to 100%) and damage resistance (up to 50%) for one second."
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillMedicAimAssistance extends NiceSkill
|
||||
abstract;
|
||||
var float headIncrease;
|
||||
defaultproperties
|
||||
{
headIncrease=1.500000
SkillName="Aim assistance"
SkillEffects="Zeds' critical points are 50% bigger for you."
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
class NiceSkillMedicArmament extends NiceSkill
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
SkillName="Armament"
SkillEffects="Your grenades restore armor of the other players, but you can't refill them with ammoboxes."
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
class NiceSkillMedicInjection extends NiceSkill
|
||||
abstract;
|
||||
var float boostTime, painTime;
|
||||
var float withdrawalDamage, healthBoost;
|
||||
var float bonusAccuracy, bonusMeleeDmg, bonusSpeed, bonusReload;
|
||||
defaultproperties
|
||||
{
boostTime=30.000000
painTime=60.000000
withdrawalDamage=5.000000
bonusAccuracy=3.000000
bonusMeleeDmg=2.000000
bonusSpeed=2.000000
bonusReload=2.000000
SkillName="Injection"
SkillEffects="Once a wave your teammates can pickup a drug from you that will greatly boost their performance for 30 seconds, but suffer from withdrawal afterwards."
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
class NiceSkillMedicPesticide extends NiceSkill
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
SkillName="Pesticide"
SkillEffects="Your grenades effect lasts only half the original time, but they drive small zeds to fight each other."
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillMedicRegeneration extends NiceSkill
|
||||
abstract;
|
||||
var float regenFrequency;
|
||||
defaultproperties
|
||||
{
regenFrequency=0.500000
SkillName="Regeneration"
SkillEffects="You regenerate 2 hp per second."
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillMedicSymbioticHealth extends NiceSkill
|
||||
abstract;
|
||||
var float selfBoost;
|
||||
defaultproperties
|
||||
{
selfBoost=0.250000
SkillName="Symbiotic health"
SkillEffects="Healing teammates will heal you 25% of your total health."
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillMedicTranquilizer extends NiceSkill
|
||||
abstract;
|
||||
var float healingDebuff;
|
||||
defaultproperties
|
||||
{
SkillName="Tranquilizer"
SkillEffects="Zeds hit by your darts can be stunned by head-damage, but your darts lose 25% of their healing efficiency."
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillMedicZEDFrenzy extends NiceSkill
|
||||
abstract;
|
||||
var float madnessTime;
|
||||
defaultproperties
|
||||
{
madnessTime=30.000000
SkillName="Frenzy"
SkillEffects="Zeds hit by your darts during zed time will become rabid and attack anything indiscriminately for 30 seconds."
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
class NiceSkillMedicZEDHeavenCanceller extends NiceSkill
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
SkillName="Heaven canceller"
SkillEffects="During zed-time your darts instantlyrestore health of your teammates and make them invincible for the duration."
|
||||
}
|
||||
184
sources/Perks/Firebug/NiceVetFirebug.uc
Normal file
184
sources/Perks/Firebug/NiceVetFirebug.uc
Normal file
|
|
@ -0,0 +1,184 @@
|
|||
class NiceVetFirebug extends NiceVeterancyTypes
|
||||
abstract;
|
||||
static function int GetStatValueInt(ClientPerkRepLink StatOther, byte ReqNum)
|
||||
{
|
||||
return StatOther.RFlameThrowerDamageStat;
|
||||
}
|
||||
/*
|
||||
static function int AddFireDamage(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InDamage, class<NiceWeaponDamageType> DmgType){
|
||||
if(class<NiceDamTypeFire>(DmgType) != none){
|
||||
if(GetClientVeteranSkillLevel(KFPRI) == 0)
|
||||
return float(InDamage) * 1.2;
|
||||
if(GetClientVeteranSkillLevel(KFPRI) <= 6)
|
||||
return float(InDamage) * (1.2 + (0.2 * float(GetClientVeteranSkillLevel(KFPRI)))); // Up to 140% extra damage
|
||||
return float(InDamage) * 2.4;
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
static function float GetMagCapacityModStatic(KFPlayerReplicationInfo KFPRI, class<KFWeapon> Other)
|
||||
{
|
||||
if ( GetClientVeteranSkillLevel(KFPRI) > 0 ) {
|
||||
if ( ClassIsChildOf(Other, class'NiceMAC10Z')
|
||||
|| ClassIsChildOf(Other, class'NiceThompsonInc')
|
||||
|| ClassIsChildOf(Other, class'NiceProtecta')
|
||||
|| ClassIsChildOf(Other, class'NiceHFR')
|
||||
|| ClassIsChildOf(Other, class'NiceFlameThrower')
|
||||
|| ClassIsChildOf(Other, class'NiceHuskGun')
|
||||
|| ClassIsInArray(default.PerkedAmmo, Other.default.FiremodeClass[0].default.AmmoClass) //v3 - custom weapon support
|
||||
)
|
||||
return 1.0 + (0.10 * fmin(6, GetClientVeteranSkillLevel(KFPRI))); // Up to 60% larger fuel canister
|
||||
}
|
||||
return 1.0;
|
||||
}
|
||||
// more ammo from ammo boxes
|
||||
static function float GetAmmoPickupMod(KFPlayerReplicationInfo KFPRI, KFAmmunition Other)
|
||||
{
|
||||
return AddExtraAmmoFor(KFPRI, Other.class);
|
||||
}
|
||||
static function float AddExtraAmmoFor(KFPlayerReplicationInfo KFPRI, Class<Ammunition> AmmoType)
|
||||
{
|
||||
if ( GetClientVeteranSkillLevel(KFPRI) > 0 ) {
|
||||
if ( ClassIsChildOf(AmmoType, class'NiceMAC10Ammo')
|
||||
|| ClassIsChildOf(AmmoType, class'NiceThompsonIncAmmo')
|
||||
|| ClassIsChildOf(AmmoType, class'NiceFlareRevolverAmmo')
|
||||
|| ClassIsChildOf(AmmoType, class'NiceDualFlareRevolverAmmo')
|
||||
|| ClassIsChildOf(AmmoType, class'TrenchgunAmmo')
|
||||
|| ClassIsChildOf(AmmoType, class'NiceProtectaAmmo')
|
||||
|| ClassIsChildOf(AmmoType, class'NiceHFRAmmo')
|
||||
|| ClassIsChildOf(AmmoType, class'NiceFlameAmmo')
|
||||
|| ClassIsChildOf(AmmoType, class'NiceHuskGunAmmo')
|
||||
|| ClassIsInArray(default.PerkedAmmo, AmmoType) //v3 - custom weapon support
|
||||
) {
|
||||
if ( GetClientVeteranSkillLevel(KFPRI) <= 6 )
|
||||
return 1.0 + (0.10 * float(GetClientVeteranSkillLevel(KFPRI))); // Up to 60% larger fuel canister
|
||||
return 1.6 + (0.05 * float(GetClientVeteranSkillLevel(KFPRI)-6)); // 5% more total fuel per each perk level above 6
|
||||
}
|
||||
else if ( GetClientVeteranSkillLevel(KFPRI) >= 4
|
||||
&& AmmoType == class'FragAmmo' ) {
|
||||
return 1.0 + (0.20 * float(GetClientVeteranSkillLevel(KFPRI) - 3)); // 1 extra nade per level starting with level 4
|
||||
}
|
||||
else if ( GetClientVeteranSkillLevel(KFPRI) > 6 && ClassIsChildOf(AmmoType, class'ScrnM79IncAmmo') ) {
|
||||
return 1.0 + (0.083334 * float(GetClientVeteranSkillLevel(KFPRI)-6)); //+2 M79Inc nades post level 6
|
||||
}
|
||||
} return 1.0;
|
||||
}
|
||||
static function int AddDamage(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InDamage, class<DamageType> DmgType)
|
||||
{
|
||||
return InDamage;
|
||||
}
|
||||
// Change effective range on FlameThrower
|
||||
static function int ExtraRange(KFPlayerReplicationInfo KFPRI)
|
||||
{
|
||||
if ( GetClientVeteranSkillLevel(KFPRI) <= 2 )
|
||||
return 0;
|
||||
else if ( GetClientVeteranSkillLevel(KFPRI) <= 4 )
|
||||
return 1; // 50% Longer Range
|
||||
return 2; // 100% Longer Range
|
||||
}
|
||||
static function int ReduceDamage(KFPlayerReplicationInfo KFPRI, KFPawn Injured, Pawn Instigator, int InDamage, class<DamageType> DmgType)
|
||||
{
|
||||
if ( class<KFWeaponDamageType>(DmgType) != none && class<KFWeaponDamageType>(DmgType).default.bDealBurningDamage )
|
||||
{
|
||||
if ( GetClientVeteranSkillLevel(KFPRI) <= 4 )
|
||||
return max(1, float(InDamage) * (0.50 - (0.10 * float(GetClientVeteranSkillLevel(KFPRI)))));
|
||||
|
||||
return 0; // 100% reduction in damage from fire
|
||||
}
|
||||
return InDamage;
|
||||
}
|
||||
static function class<Grenade> GetNadeType(KFPlayerReplicationInfo KFPRI)
|
||||
{
|
||||
if ( GetClientVeteranSkillLevel(KFPRI) >= 3 ) {
|
||||
return class'NicePack.NiceFlameNade';
|
||||
}
|
||||
return super.GetNadeType(KFPRI);
|
||||
}
|
||||
//can't cook fire nades
|
||||
static function bool CanCookNade(KFPlayerReplicationInfo KFPRI, Weapon Weap)
|
||||
{
|
||||
return GetNadeType(KFPRI) != class'ScrnBalanceSrv.ScrnFlameNade';
|
||||
}
|
||||
//v2.60: +60% faster charge with Husk Gun
|
||||
static function float GetReloadSpeedModifierStatic(KFPlayerReplicationInfo KFPRI, class<KFWeapon> Other)
|
||||
{
|
||||
if ( GetClientVeteranSkillLevel(KFPRI) > 0 ) {
|
||||
if ( ClassIsChildOf(Other, class'NiceMAC10Z')
|
||||
|| ClassIsChildOf(Other, class'NiceThompsonInc')
|
||||
|| ClassIsChildOf(Other, class'NiceFlareRevolver')
|
||||
|| ClassIsChildOf(Other, class'NiceDualFlareRevolver')
|
||||
|| ClassIsChildOf(Other, class'NiceM79Inc')
|
||||
|| ClassIsChildOf(Other, class'NiceTrenchgun')
|
||||
|| ClassIsChildOf(Other, class'NiceProtecta')
|
||||
|| ClassIsChildOf(Other, class'NiceHFR')
|
||||
|| ClassIsChildOf(Other, class'NiceFlameThrower')
|
||||
|| ClassIsChildOf(Other, class'NiceHuskGun')
|
||||
|| ClassIsChildOf(Other, class'HuskGun')
|
||||
|| ClassIsChildOf(Other, class'HuskGun')
|
||||
|| ClassIsChildOf(Other, class'HuskGun')
|
||||
|| ClassIsInArray(default.PerkedWeapons, Other) //v3 - custom weapon support
|
||||
)
|
||||
return 1.0 + (0.10 * fmin(6, GetClientVeteranSkillLevel(KFPRI))); // Up to 60% faster reload with Flame weapons / Husk Gun charging
|
||||
}
|
||||
return 1.0;
|
||||
}
|
||||
// Change the cost of particular items
|
||||
static function float GetCostScaling(KFPlayerReplicationInfo KFPRI, class<Pickup> Item)
|
||||
{
|
||||
//add discount on class descenders as well, e.g. ScrnHuskGun
|
||||
if ( ClassIsChildOf(Item, class'NiceThompsonIncPickup')
|
||||
|| ClassIsChildOf(Item, class'NiceFlareRevolverPickup')
|
||||
|| ClassIsChildOf(Item, class'NiceDualFlareRevolverPickup')
|
||||
|| ClassIsChildOf(Item, class'NiceM79IncPickup')
|
||||
|| ClassIsChildOf(Item, class'NiceTrenchgunPickup')
|
||||
|| ClassIsChildOf(Item, class'NiceProtectaPickup')
|
||||
|| ClassIsChildOf(Item, class'NiceHFRPickup')
|
||||
|| ClassIsChildOf(Item, class'NiceFlameThrowerPickup')
|
||||
|| ClassIsChildOf(Item, class'NiceHuskGunPickup')
|
||||
|| ClassIsInArray(default.PerkedPickups, Item) ) //v3 - custom weapon support
|
||||
{
|
||||
if ( GetClientVeteranSkillLevel(KFPRI) <= 6 )
|
||||
return 0.9 - 0.10 * float(GetClientVeteranSkillLevel(KFPRI)); // 10% perk level up to 6
|
||||
else
|
||||
return FMax(0.1, 0.3 - (0.05 * float(GetClientVeteranSkillLevel(KFPRI)-6))); // 5% post level 6
|
||||
}
|
||||
return 1.0;
|
||||
}
|
||||
static function class<DamageType> GetMAC10DamageType(KFPlayerReplicationInfo KFPRI)
|
||||
{
|
||||
return class'DamTypeMAC10MPInc';
|
||||
}
|
||||
static function string GetCustomLevelInfo( byte Level )
|
||||
{
|
||||
local string S;
|
||||
local byte BonusLevel;
|
||||
S = Default.CustomLevelInfo;
|
||||
BonusLevel = GetBonusLevel(Level)-6;
|
||||
ReplaceText(S,"%L",string(BonusLevel+6));
|
||||
ReplaceText(S,"%m",GetPercentStr(0.6 + 0.10*BonusLevel));
|
||||
ReplaceText(S,"%d",GetPercentStr(0.7 + fmin(0.2, 0.05*BonusLevel)));
|
||||
return S;
|
||||
}*/
|
||||
defaultproperties
|
||||
{
|
||||
DefaultDamageType=Class'NicePack.NiceDamTypeFire'
|
||||
DefaultDamageTypeNoBonus=Class'KFMod.DamTypeMAC10MPInc'
|
||||
OnHUDIcons(0)=(PerkIcon=Texture'KillingFloorHUD.Perks.Perk_Firebug',StarIcon=Texture'KillingFloorHUD.HUD.Hud_Perk_Star',DrawColor=(B=255,G=255,R=255,A=255))
|
||||
OnHUDIcons(1)=(PerkIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Firebug_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_Firebug_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_Firebug_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_Firebug_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_Firebug_Orange',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Orange',DrawColor=(B=255,G=255,R=255,A=255))
|
||||
CustomLevelInfo="*** BONUS LEVEL %L|140% extra flame weapon damage|%m faster fire weapon reload|%m faster Husk Gun charging|%s more flame weapon ammo|100% resistance to fire|100% extra Flamethrower range|Grenades set enemies on fire|%d discount on flame weapons|Spawn with an Incendiary Thompson"
|
||||
SRLevelEffects(0)="*** BONUS LEVEL 0|20% extra flame weapon damage|50% resistance to fire|10% discount on the flame weapons"
|
||||
SRLevelEffects(1)="*** BONUS LEVEL 1|40% extra flame weapon damage|10% faster fire weapon reload|10% faster Husk Gun charging|10% more flame weapon ammo|60% resistance to fire|20% discount on flame weapons"
|
||||
SRLevelEffects(2)="*** BONUS LEVEL 2|60% extra flame weapon damage|20% faster fire weapon reload|20% faster Husk Gun charging|20% more flame weapon ammo|70% resistance to fire|30% discount on flame weapons"
|
||||
SRLevelEffects(3)="*** BONUS LEVEL 3|80% extra flame weapon damage|30% faster fire weapon reload|30% faster Husk Gun charging|30% more flame weapon ammo|80% resistance to fire|50% extra Flamethrower range|Grenades set enemies on fire|40% discount on flame weapons"
|
||||
SRLevelEffects(4)="*** BONUS LEVEL 4|100% extra flame weapon damage|40% faster fire weapon reload|40% faster Husk Gun charging|40% more flame weapon ammo|90% resistance to fire|50% extra Flamethrower range|Grenades set enemies on fire|50% discount on flame weapons"
|
||||
SRLevelEffects(5)="*** BONUS LEVEL 5|120% extra flame weapon damage|50% faster fire weapon reload|50% faster Husk Gun charging|50% more flame weapon ammo|100% resistance to fire|100% extra Flamethrower range|Grenades set enemies on fire|60% discount on flame weapons|Spawn with a MAC10"
|
||||
SRLevelEffects(6)="*** BONUS LEVEL 6|140% extra flame weapon damage|60% faster fire weapon reload|60% faster Husk Gun charging|60% more flame weapon ammo|100% resistance to fire|100% extra Flamethrower range|Grenades set enemies on fire|70% discount on flame weapons|Spawn with an Incendiary Thompson"
|
||||
PerkIndex=5
|
||||
OnHUDIcon=Texture'KillingFloorHUD.Perks.Perk_Firebug'
|
||||
OnHUDGoldIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Firebug_Gold'
|
||||
VeterancyName="[Legacy]Firebug"
|
||||
Requirements(0)="Deal %x damage with the Flamethrower"
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
class NiceSkillEnforcerDetermination extends NiceSkill
|
||||
abstract;
|
||||
var int healthBound;
|
||||
var float addedResist;
|
||||
defaultproperties
|
||||
{
healthBound=50
addedResist=0.500000
SkillName="Determination"
SkillEffects="Receive 50% less damage when your health falls below 50 mark."
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
class NiceSkillEnforcerFullCounter extends NiceSkill
|
||||
abstract;
|
||||
var int layersAmount;
|
||||
var float coolDown;
|
||||
var float damageReduction;
|
||||
var float damageReductionWeak;
|
||||
function static SkillSelected(NicePlayerController nicePlayer){
|
||||
local NicePack niceMutator;
|
||||
local NiceHumanPawn nicePawn;
|
||||
super.SkillSelected(nicePlayer);
|
||||
niceMutator = class'NicePack'.static.Myself(nicePlayer.Level);
|
||||
if(nicePlayer != none)
nicePawn = NiceHumanPawn(nicePlayer.pawn);
|
||||
if(nicePawn != none)
nicePawn.hmgShieldLevel = default.layersAmount;
|
||||
if(niceMutator == none || niceMutator.Role == Role_AUTHORITY)
return;
|
||||
niceMutator.AddCounter("npHMGFullCounter", Texture'NicePackT.HudCounter.fullCounter', true, 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("npHMGFullCounter");
|
||||
}
|
||||
function static int UpdateCounterValue(string counterName, NicePlayerController nicePlayer){
|
||||
local NiceHumanPawn nicePawn;
|
||||
if(nicePlayer == none || counterName != "npHMGFullCounter")
return 0;
|
||||
nicePawn = NiceHumanPawn(nicePlayer.pawn);
|
||||
if(nicePawn == none)
return 0;
|
||||
return nicePawn.hmgShieldLevel;
|
||||
}
|
||||
defaultproperties
|
||||
{
layersAmount=5
cooldown=15.000000
SkillName="Full counter"
SkillEffects="Gives you 5 protection layers, each of which can block a weak hit. One layer restores 15 seconds after you've been hit. Can't withstand strong attacks or attacks of huge enough zeds."
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillEnforcerUnshakable extends NiceSkill
|
||||
abstract;
|
||||
var float skillResist;
|
||||
defaultproperties
|
||||
{
skillResist=0.150000
SkillName="Unshakable"
SkillEffects="Your screen doesn't shake or blur, and you gain 15% resistance to all damage."
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillEnforcerUnstoppable extends NiceSkill
|
||||
abstract;
|
||||
var float speedMult;
|
||||
defaultproperties
|
||||
{
speedMult=0.750000
SkillName="Unstoppable"
SkillEffects="Your speed doesn't decrease from additional weight, low health, poison or siren's pull, but you also receive -25% speed penalty."
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
class NiceSkillEnforcerZEDBarrage extends NiceSkill
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
SkillName="Barrage"
SkillEffects="Shoot without any recoil during zed-time."
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillEnforcerZEDJuggernaut extends NiceSkill
|
||||
abstract;
|
||||
var float distance;
|
||||
defaultproperties
|
||||
{
Distance=800.000000
SkillName="Juggernaut"
SkillEffects="You startle zeds around you upon entering zed-time."
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillHeavyCoating extends NiceSkill
|
||||
abstract;
|
||||
var float huskResist;
|
||||
defaultproperties
|
||||
{
huskResist=1.000000
SkillName="Coating"
SkillEffects="You get immunity from fire and electricity for as long as you wear armor, and your armor can absorb damage from every source."
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillHeavyOverclocking extends NiceSkill
|
||||
abstract;
|
||||
var float fireSpeedMult;
|
||||
defaultproperties
|
||||
{
fireSpeedMult=1.300000
SkillName="Overclocking"
SkillEffects="+30% fire speed with perked weapons."
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class NiceSkillHeavySafeguard extends NiceSkill
|
||||
abstract;
|
||||
var float healingCost;
|
||||
defaultproperties
|
||||
{
healingCost=0.250000
SkillName="Safeguard"
SkillEffects="Your armor no longer protects you, but it heals you when your health falls too low."
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
class NiceSkillHeavyStablePosition extends NiceSkill
|
||||
abstract;
|
||||
var float recoilDampeningBonus;
|
||||
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("npHMGStablePosition", Texture'NicePackT.HudCounter.stability', 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("npHMGStablePosition");
|
||||
}
|
||||
function static int UpdateCounterValue(string counterName, NicePlayerController nicePlayer){
|
||||
local NiceHumanPawn nicePawn;
|
||||
if(nicePlayer == none || counterName != "npHMGStablePosition")
return 0;
|
||||
nicePawn = NiceHumanPawn(nicePlayer.pawn);
|
||||
if(nicePawn == none || nicePawn.stationaryTime <= 0.0)
return 0;
|
||||
return Min(10, Ceil(2 * nicePawn.stationaryTime) - 1);
|
||||
}
|
||||
defaultproperties
|
||||
{
recoilDampeningBonus=0.100000
SkillName="Stable position"
SkillEffects="Each half-second you're crouching and now moving - you gain 10% recoil dampening bonus."
|
||||
}
|
||||
23
sources/Perks/NiceSkill.uc
Normal file
23
sources/Perks/NiceSkill.uc
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
class NiceSkill extends ReplicationInfo
|
||||
abstract;
|
||||
var bool bBroadcast; // Should we broadcast to clients that someone has this skill?
|
||||
var string SkillName, SkillEffects;
|
||||
// Functions that are called when skills becomes active / deactivated
|
||||
function static SkillSelected(NicePlayerController nicePlayer){
|
||||
local NiceHumanPawn nicePawn;
|
||||
nicePawn = NiceHumanPawn(nicePlayer.Pawn);
|
||||
if(nicePawn != none){
nicePawn.RecalcAmmo();
if(nicePawn.Role < Role_AUTHORITY)
nicePawn.ApplyWeaponStats(nicePawn.weapon);
|
||||
}
|
||||
}
|
||||
function static SkillDeSelected(NicePlayerController nicePlayer){
|
||||
local NiceHumanPawn nicePawn;
|
||||
nicePawn = NiceHumanPawn(nicePlayer.Pawn);
|
||||
if(nicePawn != none){
nicePawn.RecalcAmmo();
if(nicePawn.Role < Role_AUTHORITY)
nicePawn.ApplyWeaponStats(nicePawn.weapon);
|
||||
}
|
||||
}
|
||||
function static int UpdateCounterValue(string counterName, NicePlayerController nicePlayer){
|
||||
return 0;
|
||||
}
|
||||
defaultproperties
|
||||
{
SkillName="All Fiction"
SkillEffects="Does nothing!"
|
||||
}
|
||||
16
sources/Perks/NiceSkillAbility.uc
Normal file
16
sources/Perks/NiceSkillAbility.uc
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
class NiceSkillAbility extends NiceSkill
|
||||
dependson(NiceAbilityManager)
|
||||
abstract;
|
||||
var NiceAbilityManager.NiceAbilityDescription skillAbility;
|
||||
// Functions that are called when skills becomes active / deactivated
|
||||
function static SkillSelected(NicePlayerController nicePlayer){
|
||||
if(nicePlayer != none && nicePlayer.abilityManager != none)
nicePlayer.abilityManager.AddAbility(default.skillAbility);
|
||||
super.SkillSelected(nicePlayer);
|
||||
}
|
||||
function static SkillDeSelected(NicePlayerController nicePlayer){
|
||||
if(nicePlayer != none && nicePlayer.abilityManager != none)
nicePlayer.abilityManager.RemoveAbility(default.skillAbility.ID);
|
||||
super.SkillDeSelected(nicePlayer);
|
||||
}
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
20
sources/Perks/NiceSkillGenAmmo.uc
Normal file
20
sources/Perks/NiceSkillGenAmmo.uc
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
class NiceSkillGenAmmo extends NiceSkill
|
||||
abstract;
|
||||
function static UpdateWeapons(NicePlayerController nicePlayer){
|
||||
local Inventory I;
|
||||
local NiceHumanPawn nicePawn;
|
||||
nicePawn = NiceHumanPawn(nicePlayer.Pawn);
|
||||
if(nicePawn != none){
for(I = nicePawn.Inventory; I != none; I = I.Inventory)
if(NiceWeapon(I) != none){
NiceWeapon(I).UpdateWeaponAmmunition();
NiceWeapon(I).ClientUpdateWeaponMag();
}
else if(FragAmmo(I) != none){
FragAmmo(I).MaxAmmo = FragAmmo(I).default.MaxAmmo;
if(KFPlayerReplicationInfo(nicePawn.PlayerReplicationInfo) != none && KFPlayerReplicationInfo(nicePawn.PlayerReplicationInfo).ClientVeteranSkill != none)
FragAmmo(I).MaxAmmo = float(FragAmmo(I).MaxAmmo)
* KFPlayerReplicationInfo(nicePawn.PlayerReplicationInfo).ClientVeteranSkill.static.AddExtraAmmoFor(KFPlayerReplicationInfo(nicePawn.PlayerReplicationInfo), class'FragAmmo');
FragAmmo(I).AmmoAmount = Min(FragAmmo(I).AmmoAmount, FragAmmo(I).MaxAmmo);
}
|
||||
}
|
||||
}
|
||||
function static SkillSelected(NicePlayerController nicePlayer){
|
||||
super.SkillSelected(nicePlayer);
|
||||
UpdateWeapons(nicePlayer);
|
||||
}
|
||||
function static SkillDeSelected(NicePlayerController nicePlayer){
|
||||
super.SkillDeSelected(nicePlayer);
|
||||
UpdateWeapons(nicePlayer);
|
||||
}
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
252
sources/Perks/NiceVeterancyTypes.uc
Normal file
252
sources/Perks/NiceVeterancyTypes.uc
Normal file
|
|
@ -0,0 +1,252 @@
|
|||
class NiceVeterancyTypes extends ScrnVeterancyTypes
|
||||
dependson(NicePlayerController)
|
||||
abstract;
|
||||
// Temporarily needed variable to distinguish between new and old type perks
|
||||
var bool bNewTypePerk;
|
||||
// Skills
|
||||
var class<NiceSkill> SkillGroupA[5];
|
||||
var class<NiceSkill> SkillGroupB[5];
|
||||
// Checks if player is can use given skill
|
||||
static function bool CanUseSkill(NicePlayerController nicePlayer, class<NiceSkill> skill){
|
||||
local int i;
|
||||
local int currentLevel;
|
||||
local KFPlayerReplicationInfo KFPRI;
|
||||
local class<NiceVeterancyTypes> niceVet;
|
||||
// Get necessary variables
|
||||
KFPRI = KFPlayerReplicationInfo(nicePlayer.PlayerReplicationInfo);
|
||||
if(KFPRI == none)
return false;
|
||||
niceVet = GetVeterancy(nicePlayer.PlayerReplicationInfo);
|
||||
currentLevel = GetClientVeteranSkillLevel(KFPRI);
|
||||
// Check if we have that skill at appropriate level
|
||||
for(i = 0;i < 5 && i < currentLevel;i ++)
if(niceVet.default.SkillGroupA[i] == skill || niceVet.default.SkillGroupB[i] == skill)
return true;
|
||||
return false;
|
||||
}
|
||||
// Checks if player is using given skill
|
||||
static function bool HasSkill(NicePlayerController nicePlayer, class<NiceSkill> skill){
|
||||
local int i;
|
||||
local int currentLevel;
|
||||
local KFPlayerReplicationInfo KFPRI;
|
||||
local class<NiceVeterancyTypes> niceVet;
|
||||
local NicePlayerController.SkillChoices choices;
|
||||
// Get necessary variables
|
||||
if(nicePlayer == none || skill == none || !CanUseSkill(nicePlayer, skill))
return false;
|
||||
KFPRI = KFPlayerReplicationInfo(nicePlayer.PlayerReplicationInfo);
|
||||
if(KFPRI == none)
return false;
|
||||
currentLevel = GetClientVeteranSkillLevel(KFPRI);
|
||||
niceVet = GetVeterancy(nicePlayer.PlayerReplicationInfo);
|
||||
choices = nicePlayer.currentSkills[niceVet.default.PerkIndex];
|
||||
// Check our skill is chosen at some level; (since there shouldn't be any duplicates and it can be chosen at some level -> it's active)
|
||||
for(i = 0;i < 5 && i < currentLevel;i ++)
if((niceVet.default.SkillGroupA[i] == skill && choices.isAltChoice[i] == 0)
|| (niceVet.default.SkillGroupB[i] == skill && choices.isAltChoice[i] > 0))
return true;
|
||||
return false;
|
||||
}
|
||||
static function bool SomeoneHasSkill(NicePlayerController player, class<NiceSkill> skill){
|
||||
local int i;
|
||||
local Controller P;
|
||||
local NicePlayerController nicePlayer;
|
||||
if(player == none)
return false;
|
||||
if(player.Pawn.Role == ROLE_Authority)
for(P = player.Level.ControllerList; P != none; P = P.nextController){
nicePlayer = NicePlayerController(P);
if(nicePlayer != none && HasSkill(nicePlayer, skill) && nicePlayer.Pawn.Health > 0 && !nicePlayer.Pawn.bPendingDelete
&& nicePlayer.PlayerReplicationInfo.Team == player.PlayerReplicationInfo.Team)
return true;
}
|
||||
else for(i = 0;i < player.broadcastedSkills.Length;i ++)
if(player.broadcastedSkills[i] == skill)
return true;
|
||||
return false;
|
||||
}
|
||||
// Checks if player will automatically chose given skill at the next opportunity
|
||||
static function bool IsSkillPending(NicePlayerController nicePlayer, class<NiceSkill> skill){
|
||||
local int i;
|
||||
local int currentLevel;
|
||||
local KFPlayerReplicationInfo KFPRI;
|
||||
local class<NiceVeterancyTypes> niceVet;
|
||||
local NicePlayerController.SkillChoices choices;
|
||||
// Get necessary variables
|
||||
if(nicePlayer == none || skill == none || !CanUseSkill(nicePlayer, skill))
return false;
|
||||
KFPRI = KFPlayerReplicationInfo(nicePlayer.PlayerReplicationInfo);
|
||||
if(KFPRI == none)
return false;
|
||||
currentLevel = GetClientVeteranSkillLevel(KFPRI);
|
||||
niceVet = GetVeterancy(nicePlayer.PlayerReplicationInfo);
|
||||
choices = nicePlayer.pendingSkills[niceVet.default.PerkIndex];
|
||||
// Check our skill is chosen at some level; (since there shouldn't be any duplicates and it can be chosen at some level -> it's active)
|
||||
for(i = 0;i < 5;i ++)
if((niceVet.default.SkillGroupA[i] == skill && choices.isAltChoice[i] == 0)
|| (niceVet.default.SkillGroupB[i] == skill && choices.isAltChoice[i] > 0))
return true;
|
||||
return false;
|
||||
}
|
||||
// Function that checks if given pickup class is marked as perked for current veterancy
|
||||
static function bool IsPerkedPickup(class<NiceWeaponPickup> pickup){
|
||||
local int i;
|
||||
if(pickup == none)
return false;
|
||||
if(pickup.default.CorrespondingPerkIndex == default.PerkIndex)
return true;
|
||||
else for(i = 0;i < pickup.default.crossPerkIndecies.Length;i ++)
if(pickup.default.crossPerkIndecies[i] == default.PerkIndex)
return true;
|
||||
return false;
|
||||
}
|
||||
static function bool IsPickupLight(class<NiceWeaponPickup> pickup){
|
||||
if(pickup != none && pickup.default.Weight <= 8)
return true;
|
||||
return false;
|
||||
}
|
||||
static function bool IsPickupBackup(class<NiceWeaponPickup> pickup){
|
||||
if(pickup != none && pickup.default.bBackupWeapon)
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set of functions for obtaining a pickup class from various other classes, connected with it
|
||||
static function class<NiceWeaponPickup> GetPickupFromWeapon(class<Weapon> inputClass){
|
||||
local class<NiceWeapon> niceWeaponClass;
|
||||
niceWeaponClass = class<NiceWeapon>(inputClass);
|
||||
if(niceWeaponClass == none)
return none;
|
||||
return class<NiceWeaponPickup>(niceWeaponClass.default.PickupClass);
|
||||
}
|
||||
static function class<NiceWeaponPickup> GetPickupFromAmmo(Class<Ammunition> inputClass){
|
||||
local class<NiceAmmo> niceAmmoClass;
|
||||
niceAmmoClass = class<NiceAmmo>(inputClass);
|
||||
if(niceAmmoClass == none)
return none;
|
||||
return niceAmmoClass.default.WeaponPickupClass;
|
||||
}
|
||||
static function class<NiceWeapon> GetWeaponFromAmmo(Class<Ammunition> inputClass){
|
||||
local class<NiceWeaponPickup> nicePickupClass;
|
||||
nicePickupClass = GetPickupFromAmmo(inputClass);
|
||||
if(nicePickupClass == none)
return none;
|
||||
return class<NiceWeapon>(nicePickupClass.default.InventoryType);
|
||||
}
|
||||
static function class<NiceWeaponPickup> GetPickupFromDamageType(class<DamageType> inputClass){
|
||||
local class<NiceWeaponDamageType> niceDmgTypeClass;
|
||||
niceDmgTypeClass = class<NiceWeaponDamageType>(inputClass);
|
||||
if(niceDmgTypeClass == none)
return none;
|
||||
return GetPickupFromWeapon(class<NiceWeapon>(niceDmgTypeClass.default.WeaponClass));
|
||||
}
|
||||
static function class<NiceWeaponPickup> GetPickupFromWeaponFire(WeaponFire fireInstance){
|
||||
local NiceFire niceFire;
|
||||
niceFire = NiceFire(fireInstance);
|
||||
if(niceFire == none)
return none;
|
||||
return GetPickupFromAmmo(class<NiceAmmo>(niceFire.AmmoClass));
|
||||
}
|
||||
// Finds correct veterancy for a player
|
||||
static function class<NiceVeterancyTypes> GetVeterancy(PlayerReplicationInfo PRI){
|
||||
local KFPlayerReplicationInfo KFPRI;
|
||||
KFPRI = KFPlayerReplicationInfo(PRI);
|
||||
if(KFPRI == none || KFPRI.ClientVeteranSkill == none)
return none;
|
||||
return class<NiceVeterancyTypes>(KFPRI.ClientVeteranSkill);
|
||||
}
|
||||
// New perk progress function
|
||||
static function int GetPerkProgressInt(ClientPerkRepLink StatOther, out int FinalInt, byte CurLevel, byte ReqNum) {
|
||||
local int delta, highestFilled;
|
||||
local int filledLevels;
|
||||
local array<int> ProgressArray;
|
||||
local int DoubleScalingBase;
|
||||
if(!default.bNewTypePerk)
return Super.GetPerkProgressInt(StatOther, FinalInt, CurLevel, ReqNum);
|
||||
else{
ProgressArray = GetProgressArray(ReqNum, DoubleScalingBase);
filledLevels = ProgressArray.Length;
if(filledLevels > 1)
delta = ProgressArray[filledLevels - 1] - ProgressArray[filledLevels - 2];
else if(filledLevels == 1)
delta = ProgressArray[0];
else
delta = 10;
if(filledLevels > 0)
highestFilled = ProgressArray[filledLevels - 1];
else
highestFilled = 10;
if(CurLevel < filledLevels)
FinalInt = ProgressArray[CurLevel];
else
FinalInt = highestFilled + (CurLevel - filledLevels) * delta;
|
||||
}
|
||||
return Min(GetStatValueInt(StatOther, ReqNum), FinalInt);
|
||||
}
|
||||
// Get head-shot multiplier function that passes zed as a parameter
|
||||
static function float GetNiceHeadShotDamMulti(KFPlayerReplicationInfo KFPRI, NiceMonster zed, class<DamageType> DmgType){
|
||||
return 1.0;
|
||||
}
|
||||
// From which distance can we see enemy's health at given level?
|
||||
static function float GetMaxHealthDistanceByLevel(int level){
|
||||
return 0;
|
||||
}
|
||||
// From which distance can we see enemy's health?
|
||||
static function float GetMaxHealthDistance(KFPlayerReplicationInfo KFPRI){
|
||||
return GetMaxHealthDistanceByLevel(GetClientVeteranSkillLevel(KFPRI));
|
||||
}
|
||||
// Allows to increase head-shot check scale for some weapons.
|
||||
static function float GetHeadshotCheckMultiplier(KFPlayerReplicationInfo KFPRI, class<DamageType> DmgType){
|
||||
return 1.0;
|
||||
}
|
||||
// Allows to buff only regular component of damage.
|
||||
static function int AddRegDamage(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InDamage, class<NiceWeaponDamageType> DmgType){
|
||||
return InDamage;
|
||||
}
|
||||
// Allows to buff only fire component of damage.
|
||||
static function int AddFireDamage(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InDamage, class<NiceWeaponDamageType> DmgType){
|
||||
if(DmgType != none)
return InDamage * DmgType.default.heatPart;
|
||||
return InDamage;
|
||||
}
|
||||
static function float stunDurationMult(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, class<NiceWeaponDamageType> DmgType){
|
||||
return 1.0;
|
||||
}
|
||||
static function int AddStunScore(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InStunScore, class<NiceWeaponDamageType> DmgType){
|
||||
return InStunScore;
|
||||
}
|
||||
static function int AddFlinchScore(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InFlinchScore, class<NiceWeaponDamageType> DmgType){
|
||||
return InFlinchScore;
|
||||
}
|
||||
// If pawn suffers from slow down effect, how much should we boost/lower it?
|
||||
// 1.0 = leave the same, >1.0 = boost, <1.0 = lower.
|
||||
static function float SlowingModifier(KFPlayerReplicationInfo KFPRI){
|
||||
return 1.0;
|
||||
}
|
||||
// Can player with this perk be pulled by a siren?
|
||||
static function bool CanBePulled(KFPlayerReplicationInfo KFPRI){
|
||||
return true;
|
||||
}
|
||||
// What weight value should be used when calculation Pawn's speed?
|
||||
static function float GetPerceivedWeight(KFPlayerReplicationInfo KFPRI, KFWeapon other){
|
||||
if(other != none)
return other.weight;
|
||||
return 0;
|
||||
}
|
||||
// A new, universal, penetration reduction function that is used by all 'NiceWeapon' subclasses
|
||||
static function float GetPenetrationDamageMulti(KFPlayerReplicationInfo KFPRI, float DefaultPenDamageReduction, class<NiceWeaponDamageType> fireIntance){
|
||||
return DefaultPenDamageReduction;
|
||||
}
|
||||
// Universal cost scaling for all perks
|
||||
static function float GetCostScaling(KFPlayerReplicationInfo KFPRI, class<Pickup> Item){
|
||||
/*local class<NiceWeaponPickup> pickupClass;
|
||||
pickupClass = class<NiceWeaponPickup>(Item);
|
||||
if(IsPerkedPickup(pickupClass))
return 0.5;*/
|
||||
return 1.0;
|
||||
}
|
||||
static function bool ShowStalkers(KFPlayerReplicationInfo KFPRI){
|
||||
return GetStalkerViewDistanceMulti(KFPRI) > 0;
|
||||
}
|
||||
static function float GetStalkerViewDistanceMulti(KFPlayerReplicationInfo KFPRI){
|
||||
if(SomeoneHasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillCommandoStrategist'))
return class'NiceSkillCommandoStrategist'.default.visionRadius;
|
||||
return 0.0;
|
||||
}
|
||||
// Modify distance at which health bars can be seen; 1.0 = 800 units, max = 2000 units = 2.5
|
||||
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 int GetAdditionalPenetrationAmount(KFPlayerReplicationInfo KFPRI){
|
||||
return 0;
|
||||
}
|
||||
static function int GetInvincibilityExtentions(KFPlayerReplicationInfo KFPRI){
|
||||
return 0;
|
||||
}
|
||||
static function int GetInvincibilityDuration(KFPlayerReplicationInfo KFPRI){
|
||||
return 2.0;
|
||||
}
|
||||
static function int GetInvincibilitySafeMisses(KFPlayerReplicationInfo KFPRI){
|
||||
return 0;
|
||||
}
|
||||
static function SpecialHUDInfo(KFPlayerReplicationInfo KFPRI, Canvas C){
|
||||
local KFMonster KFEnemy;
|
||||
local HUDKillingFloor HKF;
|
||||
local float MaxDistanceSquared;
|
||||
MaxDistanceSquared = 640000;
|
||||
MaxDistanceSquared *= GetHealthBarsDistanceMulti(KFPRI)**2;
|
||||
HKF = HUDKillingFloor(C.ViewPort.Actor.myHUD);
|
||||
if(HKF == none || C.ViewPort.Actor.Pawn == none || MaxDistanceSquared <= 0)
return;
|
||||
foreach C.ViewPort.Actor.DynamicActors(class'KFMonster', KFEnemy){
if(KFEnemy.Health > 0 && (!KFEnemy.Cloaked() || KFEnemy.bZapped || KFEnemy.bSpotted) && VSizeSquared(KFEnemy.Location - C.ViewPort.Actor.Pawn.Location) < MaxDistanceSquared)
HKF.DrawHealthBar(C, KFEnemy, KFEnemy.Health, KFEnemy.HealthMax , 50.0);
|
||||
}
|
||||
}
|
||||
// Is player standing still?
|
||||
static function bool IsStandingStill(KFPlayerReplicationInfo KFPRI){
|
||||
if(KFPRI != none && PlayerController(KFPRI.Owner) != none && PlayerController(KFPRI.Owner).Pawn != none && VSize(PlayerController(KFPRI.Owner).Pawn.Velocity) > 0.0)
return false;
|
||||
return true;
|
||||
}
|
||||
// Is player aiming?
|
||||
static function bool IsAiming(KFPlayerReplicationInfo KFPRI){
|
||||
local KFWeapon kfWeap;
|
||||
if(KFPRI != none && PlayerController(KFPRI.Owner) != none && PlayerController(KFPRI.Owner).Pawn != none)
kfWeap = KFWeapon(PlayerController(KFPRI.Owner).Pawn.weapon);
|
||||
if(kfWeap == none)
return false;
|
||||
return kfWeap.bAimingRifle;
|
||||
}
|
||||
// Just display the same fixed bonuses for the new type perks
|
||||
static function string GetVetInfoText(byte Level, byte Type, optional byte RequirementNum){
|
||||
if(Type == 1 && default.bNewTypePerk)
return default.CustomLevelInfo;
|
||||
return Super.GetVetInfoText(Level, Type, RequirementNum);
|
||||
}
|
||||
static function class<Grenade> GetNadeType(KFPlayerReplicationInfo KFPRI){
|
||||
return class'NicePack.NiceNade';
|
||||
}
|
||||
static function SetupAbilities(KFPlayerReplicationInfo KFPRI){}
|
||||
defaultproperties
|
||||
{
SkillGroupA(0)=Class'NicePack.NiceSkill'
SkillGroupA(1)=Class'NicePack.NiceSkill'
SkillGroupA(2)=Class'NicePack.NiceSkill'
SkillGroupA(3)=Class'NicePack.NiceSkill'
SkillGroupA(4)=Class'NicePack.NiceSkill'
SkillGroupB(0)=Class'NicePack.NiceSkill'
SkillGroupB(1)=Class'NicePack.NiceSkill'
SkillGroupB(2)=Class'NicePack.NiceSkill'
SkillGroupB(3)=Class'NicePack.NiceSkill'
SkillGroupB(4)=Class'NicePack.NiceSkill'
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
class NiceDamageTypeVetSharpshooter extends NiceWeaponDamageType
|
||||
abstract;
|
||||
static function ScoredNiceHeadshot(KFSteamStatsAndAchievements KFStatsAndAchievements, class<KFMonster> monsterClass, int HL){
|
||||
if(SRStatsBase(KFStatsAndAchievements) != none && SRStatsBase(KFStatsAndAchievements).Rep != none)
SRStatsBase(KFStatsAndAchievements).Rep.ProgressCustomValue(Class'NiceVetSharpshooterExp', Int(class'NicePack'.default.vetSharpHeadshotExpCost * getScale(HL)));
|
||||
super.ScoredNiceHeadshot(KFStatsAndAchievements, monsterClass, HL);
|
||||
}
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
//==============================================================================
|
||||
// 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
|
||||
{
|
||||
}
|
||||
163
sources/Perks/Sharpshooter/NiceVetSharpshooter.uc
Normal file
163
sources/Perks/Sharpshooter/NiceVetSharpshooter.uc
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
class NiceVetSharpshooter extends NiceVeterancyTypes
|
||||
dependson(NiceAbilityManager)
|
||||
abstract;
|
||||
static function AddCustomStats(ClientPerkRepLink Other){
|
||||
Other.AddCustomValue(Class'NiceVetSharpshooterExp');
|
||||
}
|
||||
static function int GetStatValueInt(ClientPerkRepLink StatOther, byte ReqNum){
|
||||
return StatOther.GetCustomValueInt(Class'NiceVetSharpshooterExp');
|
||||
}
|
||||
static function array<int> GetProgressArray(byte ReqNum, optional out int DoubleScalingBase){
|
||||
return default.progressArray0;
|
||||
}
|
||||
static function float GetNiceHeadShotDamMulti(KFPlayerReplicationInfo KFPRI, NiceMonster zed, class<DamageType> DmgType){
|
||||
local float ret;
|
||||
local NicePlayerController nicePlayer;
|
||||
local NiceHumanPawn nicePawn;
|
||||
local float calibratedTalentBonus;
|
||||
local class<NiceWeaponPickup> pickupClass;
|
||||
if(class<DamTypeMelee>(DmgType) != none || class<NiceDamageTypeVetBerserker>(DmgType) != none)
|
||||
return 1.0;
|
||||
ret = 1.0;
|
||||
if(KFPRI != none)
|
||||
nicePlayer = NicePlayerController(KFPRI.Owner);
|
||||
pickupClass = GetPickupFromDamageType(DmgType);
|
||||
if(nicePlayer != none)
|
||||
nicePawn = NiceHumanPawn(nicePlayer.pawn);
|
||||
//if(IsPerkedPickup(pickupClass)){
|
||||
ret += 0.25;
|
||||
if(nicePawn != none && class'NiceVetSharpshooter'.static.hasSkill(nicePlayer, class'NiceSkillSharpshooterTalent')){
|
||||
calibratedTalentBonus = 0.1f * Min(nicePawn.calibrationScore, 3);
|
||||
ret *= (1.0 + calibratedTalentBonus);
|
||||
}
|
||||
//}
|
||||
return ret;
|
||||
}
|
||||
static function float GetReloadSpeedModifierStatic(KFPlayerReplicationInfo KFPRI, class<KFWeapon> Other){
|
||||
local float reloadMult;
|
||||
//local float reloadScale;
|
||||
local NicePlayerController nicePlayer;
|
||||
local NiceHumanPawn nicePawn;
|
||||
local float calibratedReloadBonus;
|
||||
local class<NiceWeaponPickup> pickupClass;
|
||||
pickupClass = GetPickupFromWeapon(Other);
|
||||
if(KFPRI != none)
|
||||
nicePlayer = NicePlayerController(KFPRI.Owner);
|
||||
reloadMult = 1.0;
|
||||
if(nicePlayer != none)
|
||||
nicePawn = NiceHumanPawn(nicePlayer.pawn);
|
||||
if(nicePlayer != none && nicePawn != none && class'NiceVetSharpshooter'.static.hasSkill(nicePlayer, class'NiceSkillSharpshooterHardWork')){
|
||||
//reloadScale = VSize(nicePlayer.pawn.velocity) / nicePlayer.pawn.groundSpeed;
|
||||
//reloadScale = 1.0 - reloadScale;
|
||||
if(nicePawn.calibrationScore >= 3)
|
||||
calibratedReloadBonus = class'NiceSkillSharpshooterHardWork'.default.reloadBonus;
|
||||
else if(nicePawn.calibrationScore == 2)
|
||||
calibratedReloadBonus = 0.5f * class'NiceSkillSharpshooterHardWork'.default.reloadBonus;
|
||||
else
|
||||
calibratedReloadBonus = 0.25f * class'NiceSkillSharpshooterHardWork'.default.reloadBonus;
|
||||
reloadMult *= 1.0 + calibratedReloadBonus;
|
||||
}
|
||||
if( nicePlayer != none && nicePlayer.abilityManager != none
|
||||
&& nicePlayer.abilityManager.IsAbilityActive(class'NiceSkillSharpshooterGunslingerA'.default.abilityID)){
|
||||
reloadMult *= class'NiceSkillSharpshooterGunslingerA'.default.reloadMult;
|
||||
}
|
||||
return reloadMult;
|
||||
}
|
||||
static function float GetFireSpeedModStatic(KFPlayerReplicationInfo KFPRI, class<Weapon> other){
|
||||
local float fireRateMult;
|
||||
local NicePlayerController nicePlayer;
|
||||
local NiceHumanPawn nicePawn;
|
||||
local float calibratedFireSpeedBonus;
|
||||
if(KFPRI != none)
|
||||
nicePlayer = NicePlayerController(KFPRI.Owner);
|
||||
fireRateMult = 1.0;
|
||||
if(nicePlayer != none)
|
||||
nicePawn = NiceHumanPawn(nicePlayer.pawn);
|
||||
if(nicePawn != none && class'NiceVetSharpshooter'.static.hasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillSharpshooterHardWork')){
|
||||
if(nicePawn.calibrationScore >= 3)
|
||||
calibratedFireSpeedBonus = class'NiceSkillSharpshooterHardWork'.default.fireRateBonus;
|
||||
else if(nicePawn.calibrationScore == 2)
|
||||
calibratedFireSpeedBonus = (2.0f/3.0f) * class'NiceSkillSharpshooterHardWork'.default.fireRateBonus;
|
||||
else
|
||||
calibratedFireSpeedBonus = (1.0f/3.0f) * class'NiceSkillSharpshooterHardWork'.default.fireRateBonus;
|
||||
fireRateMult *= 1.0f + calibratedFireSpeedBonus;
|
||||
}
|
||||
if( nicePlayer != none && nicePlayer.abilityManager != none
|
||||
&& nicePlayer.abilityManager.IsAbilityActive(class'NiceSkillSharpshooterGunslingerA'.default.abilityID)){
|
||||
fireRateMult *= class'NiceSkillSharpshooterGunslingerA'.default.fireRateMult;
|
||||
}
|
||||
return fireRateMult;
|
||||
}
|
||||
static function float ModifyRecoilSpread(KFPlayerReplicationInfo KFPRI, WeaponFire Other, out float Recoil){
|
||||
local NicePlayerController nicePlayer;
|
||||
if(KFPRI != none)
|
||||
nicePlayer = NicePlayerController(KFPRI.Owner);
|
||||
Recoil = 1.0;
|
||||
if(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillSharpshooterHardWork'))
|
||||
Recoil = class'NiceSkillSharpshooterHardWork'.default.recoilMult;
|
||||
if( nicePlayer != none && nicePlayer.abilityManager != none
|
||||
&& nicePlayer.abilityManager.IsAbilityActive(class'NiceSkillSharpshooterGunslingerA'.default.abilityID))
|
||||
Recoil = 0;
|
||||
return Recoil;
|
||||
}
|
||||
static function float GetMovementSpeedModifier(KFPlayerReplicationInfo KFPRI, KFGameReplicationInfo KFGRI)
|
||||
{
|
||||
local NicePlayerController nicePlayer;
|
||||
if(KFPRI != none)
|
||||
nicePlayer = NicePlayerController(KFPRI.Owner);
|
||||
if( nicePlayer != none && nicePlayer.abilityManager != none
|
||||
&& nicePlayer.abilityManager.IsAbilityActive(class'NiceSkillSharpshooterGunslingerA'.default.abilityID))
|
||||
return class'NiceSkillSharpshooterGunslingerA'.default.movementMult;
|
||||
return 1.0;
|
||||
}
|
||||
static function string GetCustomLevelInfo(byte Level){
|
||||
return default.CustomLevelInfo;
|
||||
}
|
||||
static function SetupAbilities(KFPlayerReplicationInfo KFPRI){
|
||||
local NicePlayerController nicePlayer;
|
||||
local NiceAbilityManager.NiceAbilityDescription calibration;
|
||||
if(KFPRI != none)
|
||||
nicePlayer = NicePlayerController(KFPRI.Owner);
|
||||
if(nicePlayer == none || nicePlayer.abilityManager == none)
|
||||
return;
|
||||
calibration.ID = "Calibration";
|
||||
//gigaSlayer.icon = Texture'NicePackT.HudCounter.t4th';
|
||||
calibration.icon = Texture'NicePackT.HudCounter.zedHeadStreak';
|
||||
calibration.cooldownLength = 30.0;
|
||||
calibration.canBeCancelled = false;
|
||||
nicePlayer.abilityManager.AddAbility(calibration);
|
||||
}
|
||||
defaultproperties
|
||||
{
|
||||
bNewTypePerk=True
|
||||
SkillGroupA(0)=Class'NicePack.NiceSkillSharpshooterKillConfirmed'
|
||||
SkillGroupA(1)=Class'NicePack.NiceSkillSharpshooterTalent'
|
||||
SkillGroupA(2)=Class'NicePack.NiceSkillSharpshooterDieAlready'
|
||||
SkillGroupA(3)=Class'NicePack.NiceSkillSharpshooterReaperA'
|
||||
SkillGroupA(4)=Class'NicePack.NiceSkillSharpshooterZEDAdrenaline'
|
||||
SkillGroupB(0)=Class'NicePack.NiceSkillSharpshooterSurgical'
|
||||
SkillGroupB(1)=Class'NicePack.NiceSkillSharpshooterHardWork'
|
||||
SkillGroupB(2)=Class'NicePack.NiceSkillSharpshooterArdour'
|
||||
SkillGroupB(3)=Class'NicePack.NiceSkillSharpshooterGunslingerA'
|
||||
SkillGroupB(4)=Class'NicePack.NiceSkillSharpshooterZEDHundredGauntlets'
|
||||
progressArray0(0)=100
|
||||
progressArray0(1)=1000
|
||||
progressArray0(2)=3000
|
||||
progressArray0(3)=10000
|
||||
progressArray0(4)=30000
|
||||
progressArray0(5)=100000
|
||||
progressArray0(6)=200000
|
||||
DefaultDamageType=Class'NicePack.NiceDamageTypeVetSharpshooter'
|
||||
OnHUDIcons(0)=(PerkIcon=Texture'KillingFloorHUD.Perks.Perk_SharpShooter',StarIcon=Texture'KillingFloorHUD.HUD.Hud_Perk_Star',DrawColor=(B=255,G=255,R=255,A=255))
|
||||
OnHUDIcons(1)=(PerkIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_SharpShooter_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_SharpShooter_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_SharpShooter_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_SharpShooter_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_SharpShooter_Orange',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Orange',DrawColor=(B=255,G=255,R=255,A=255))
|
||||
CustomLevelInfo="Level up by doing headshots with perked weapons|+25% headshot damage"
|
||||
PerkIndex=2
|
||||
OnHUDIcon=Texture'KillingFloorHUD.Perks.Perk_SharpShooter'
|
||||
OnHUDGoldIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_SharpShooter_Gold'
|
||||
VeterancyName="Sharpshooter"
|
||||
Requirements(0)="Required experience for the next level: %x"
|
||||
}
|
||||
4
sources/Perks/Sharpshooter/NiceVetSharpshooterExp.uc
Normal file
4
sources/Perks/Sharpshooter/NiceVetSharpshooterExp.uc
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
class NiceVetSharpshooterExp extends SRCustomProgressInt;
|
||||
defaultproperties
|
||||
{
ProgressName="Sharpshooter exp."
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
class NiceSkillSharpshooterArdour extends NiceSkill
|
||||
abstract;
|
||||
|
||||
var float headshotKillReduction[5];
|
||||
var float justHeadshotReduction;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
justHeadshotReduction=0.250000
|
||||
headshotKillReduction(0)=0.5f
|
||||
headshotKillReduction(1)=1.0f
|
||||
headshotKillReduction(2)=1.25f
|
||||
headshotKillReduction(3)=1.5f
|
||||
headshotKillReduction(4)=2.0f
|
||||
SkillName="Ardour"
|
||||
SkillEffects="Head-shotting enemies reduces your cooldowns."
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
class NiceSkillSharpshooterDieAlready extends NiceSkill
|
||||
abstract;
|
||||
var float bleedOutTime[5];
|
||||
defaultproperties
|
||||
{
|
||||
BleedOutTime(0)=2.0f
|
||||
BleedOutTime(1)=1.5f
|
||||
BleedOutTime(2)=1.25f
|
||||
BleedOutTime(3)=1.0f
|
||||
BleedOutTime(4)=0.25f
|
||||
SkillName="Die already"
|
||||
SkillEffects="All zeds decapitated by you drop faster."
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue