Change Enforcer's skills for patch 0.2.70
This commit is contained in:
parent
5ceb49b2c3
commit
e7d1c539e8
19 changed files with 303 additions and 115 deletions
17
sources/Perks/Enforcer/NiceAvoidMarkerCarnage.uc
Normal file
17
sources/Perks/Enforcer/NiceAvoidMarkerCarnage.uc
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
class NiceAvoidMarkerCarnage extends NiceAvoidMarker;
|
||||
|
||||
var float healthLevel;
|
||||
|
||||
function bool RelevantTo(Pawn P){
|
||||
local NiceMonster niceZed;
|
||||
niceZed = NiceMonster(P);
|
||||
if (niceZed != none && niceZed.default.health <= healthLevel)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
defaultproperties
|
||||
{
|
||||
lifespan = 2.5
|
||||
}
|
||||
93
sources/Perks/Enforcer/NiceEnforcerAbilitiesAdapter.uc
Normal file
93
sources/Perks/Enforcer/NiceEnforcerAbilitiesAdapter.uc
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
//==============================================================================
|
||||
// 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 NiceEnforcerAbilitiesAdapter extends NiceAbilitiesAdapter;
|
||||
static function AbilityActivated( string abilityID,
|
||||
NicePlayerController relatedPlayer){
|
||||
local NiceHumanPawn nicePawn;
|
||||
local NiceMonster victim;
|
||||
if(relatedPlayer == none) return;
|
||||
nicePawn = NiceHumanPawn(relatedPlayer.pawn);
|
||||
if(nicePawn == none)
|
||||
return;
|
||||
if(abilityID == "fullcounter"){
|
||||
nicePawn.remainingFCArmor = 100.0;
|
||||
nicePawn.remainingFCTime = 1.0;
|
||||
}
|
||||
if(abilityID == "carnage"){
|
||||
nicePawn.brutalCranageTimer = 10.0;
|
||||
}
|
||||
if(abilityID == class'NiceSkillEnforcerStuporA'.default.abilityID){
|
||||
relatedPlayer.abilityManager.SetAbilityState(1, ASTATE_COOLDOWN);
|
||||
foreach relatedPlayer.CollidingActors(class'NiceMonster', victim, class'NicePack.NiceSkillEnforcerStuporA'.default.radius, relatedPlayer.pawn.location)
|
||||
{
|
||||
if (victim == none) continue;
|
||||
victim.DoRightPainReaction(class'NicePack.NiceSkillEnforcerStuporA'.default.painScore,
|
||||
relatedPlayer.pawn, victim.location, Vect(0,0,0), none, 0.0,
|
||||
KFPlayerReplicationInfo(relatedPlayer.PlayerReplicationInfo));
|
||||
}
|
||||
}
|
||||
}/*
|
||||
static function AbilityAdded( string abilityID,
|
||||
NicePlayerController relatedPlayer){
|
||||
local NiceHumanPawn nicePawn;
|
||||
if(relatedPlayer == none) return;
|
||||
nicePawn = NiceHumanPawn(relatedPlayer.pawn);
|
||||
if(nicePawn == none)
|
||||
return;
|
||||
if(abilityID == "Calibration"){
|
||||
nicePawn.currentCalibrationState = CALSTATE_FINISHED;
|
||||
nicePawn.calibrationScore = 3;
|
||||
}
|
||||
}
|
||||
static function AbilityRemoved( string abilityID,
|
||||
NicePlayerController relatedPlayer){
|
||||
local NiceHumanPawn nicePawn;
|
||||
if(relatedPlayer == none) return;
|
||||
nicePawn = NiceHumanPawn(relatedPlayer.pawn);
|
||||
if(nicePawn == none)
|
||||
return;
|
||||
if(abilityID == "Calibration")
|
||||
nicePawn.currentCalibrationState = CALSTATE_NOABILITY;
|
||||
if(abilityID == class'NiceSkillSharpshooterGunslingerA'.default.abilityID){
|
||||
nicePawn.gunslingerTimer = 0.0;
|
||||
}
|
||||
}
|
||||
static function ModAbilityCooldown( string abilityID,
|
||||
NicePlayerController relatedPlayer,
|
||||
out float cooldown){
|
||||
local NiceHumanPawn nicePawn;
|
||||
if(relatedPlayer == none) return;
|
||||
nicePawn = NiceHumanPawn(relatedPlayer.pawn);
|
||||
if( abilityID != class'NiceSkillSharpshooterGunslingerA'.default.abilityID
|
||||
&& abilityID != class'NiceSkillSharpshooterReaperA'.default.abilityID)
|
||||
return;
|
||||
switch(nicePawn.calibrationScore){
|
||||
case 2:
|
||||
cooldown *= 0.85;
|
||||
break;
|
||||
case 3:
|
||||
cooldown *= 0.7;
|
||||
break;
|
||||
case 4:
|
||||
cooldown *= 0.5;
|
||||
break;
|
||||
case 5:
|
||||
cooldown *= 0.25;
|
||||
break;
|
||||
}
|
||||
// Reduce calibration score
|
||||
if(nicePawn.calibrationScore > 3)
|
||||
nicePawn.calibrationScore -= 1;
|
||||
}*/
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
|
|
@ -46,7 +46,7 @@ static function float AddExtraAmmoFor(KFPlayerReplicationInfo KFPRI, Class<Ammun
|
|||
local float bonusNades;
|
||||
// Default bonus
|
||||
bonusNades = 2;
|
||||
if(AmmoType == class'NicePack.NiceCryoNade' || AmmoType == class'NicePack.NiceNailNade')
|
||||
if(AmmoType == class'FragAmmo')
|
||||
return 1.0 + 0.2 * bonusNades;
|
||||
return 1.0;
|
||||
}
|
||||
|
|
@ -56,11 +56,11 @@ static function int ReduceDamage(KFPlayerReplicationInfo KFPRI, KFPawn Injured,
|
|||
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(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillEnforcerCoating') && 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);
|
||||
InDamage *= (1 - class'NiceSkillEnforcerCoating'.default.huskResist);
|
||||
}
|
||||
return InDamage;
|
||||
}
|
||||
|
|
@ -123,16 +123,32 @@ static function float SlowingModifier(KFPlayerReplicationInfo KFPRI){
|
|||
static function string GetCustomLevelInfo(byte Level){
|
||||
return default.CustomLevelInfo;
|
||||
}
|
||||
static function SetupAbilities(KFPlayerReplicationInfo KFPRI){
|
||||
local NicePlayerController nicePlayer;
|
||||
local NiceAbilityManager.NiceAbilityDescription fullcounter;
|
||||
if(KFPRI != none)
|
||||
nicePlayer = NicePlayerController(KFPRI.Owner);
|
||||
if(nicePlayer == none || nicePlayer.abilityManager == none)
|
||||
return;
|
||||
fullcounter.ID = "fullcounter";
|
||||
fullcounter.icon = Texture'NicePackT.HudCounter.fullCounter';
|
||||
fullcounter.cooldownLength = 30.0;
|
||||
fullcounter.canBeCancelled = false;
|
||||
nicePlayer.abilityManager.AddAbility(fullcounter);
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bNewTypePerk=True
|
||||
SkillGroupA(0)=Class'NicePack.NiceSkillEnforcerUnstoppable'
|
||||
SkillGroupA(1)=Class'NicePack.NiceSkillEnforcerBombard'
|
||||
SkillGroupA(2)=Class'NicePack.NiceSkillEnforcerFullCounter'
|
||||
SkillGroupA(2)=Class'NicePack.NiceSkillEnforcerCoating'
|
||||
SkillGroupA(3)=Class'NicePack.NiceSkillEnforcerStuporA'
|
||||
SkillGroupA(4)=Class'NicePack.NiceSkillEnforcerZEDBarrage'
|
||||
SkillGroupB(0)=Class'NicePack.NiceSkillEnforcerUnshakable'
|
||||
SkillGroupB(1)=Class'NicePack.NiceSkillEnforcerMultitasker'
|
||||
SkillGroupB(2)=Class'NicePack.NiceSkillEnforcerDetermination'
|
||||
SkillGroupB(3)=Class'NicePack.NiceSkillEnforcerBrutalCarnageA'
|
||||
SkillGroupB(4)=Class'NicePack.NiceSkillEnforcerZEDJuggernaut'
|
||||
progressArray0(0)=100
|
||||
progressArray0(1)=1000
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
class NiceSkillEnforcerBrutalCarnageA extends NiceSkill
|
||||
abstract;
|
||||
var string abilityID;
|
||||
var float coolDown;
|
||||
var float avoidRadius;
|
||||
|
||||
function static SkillSelected(NicePlayerController nicePlayer){
|
||||
local NiceAbilityManager.NiceAbilityDescription carnage;
|
||||
if(nicePlayer == none) return;
|
||||
if(nicePlayer.abilityManager == none) return;
|
||||
carnage.ID = default.abilityID;
|
||||
carnage.icon = Texture'NicePackT.HudCounter.demo';
|
||||
carnage.cooldownLength = default.cooldown;
|
||||
carnage.canBeCancelled = false;
|
||||
nicePlayer.abilityManager.AddAbility(carnage);
|
||||
}
|
||||
function static SkillDeSelected(NicePlayerController nicePlayer){
|
||||
if(nicePlayer == none) return;
|
||||
if(nicePlayer.abilityManager == none) return;
|
||||
nicePlayer.abilityManager.RemoveAbility(default.abilityID);
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
abilityID="carnage"
|
||||
cooldown=60.000000
|
||||
avoidRadius=600.0
|
||||
SkillName="Brutal carnage"
|
||||
SkillEffects="Every zed killed withing next 10 seconds will cause other zeds to fear the killspot for 2.5 seconds."
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
class NiceSkillEnforcerCoating extends NiceSkill
|
||||
abstract;
|
||||
var float huskResist;
|
||||
defaultproperties
|
||||
{
|
||||
huskResist=1.000000
|
||||
SkillName="Coating"
|
||||
SkillEffects="You get resistance against fire damage when you wear armor. Strength of resistance is proportional to the amount of armor, up to a full immunity."
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
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."
|
||||
}
|
||||
32
sources/Perks/Enforcer/Skills/NiceSkillEnforcerStuporA.uc
Normal file
32
sources/Perks/Enforcer/Skills/NiceSkillEnforcerStuporA.uc
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
class NiceSkillEnforcerStuporA extends NiceSkill
|
||||
abstract;
|
||||
var string abilityID;
|
||||
var float coolDown;
|
||||
var float radius;
|
||||
var float painScore;
|
||||
|
||||
function static SkillSelected(NicePlayerController nicePlayer){
|
||||
local NiceAbilityManager.NiceAbilityDescription stupor;
|
||||
if(nicePlayer == none) return;
|
||||
if(nicePlayer.abilityManager == none) return;
|
||||
stupor.ID = default.abilityID;
|
||||
stupor.icon = Texture'NicePackT.HudCounter.demo';
|
||||
stupor.cooldownLength = default.cooldown;
|
||||
stupor.canBeCancelled = false;
|
||||
nicePlayer.abilityManager.AddAbility(stupor);
|
||||
}
|
||||
function static SkillDeSelected(NicePlayerController nicePlayer){
|
||||
if(nicePlayer == none) return;
|
||||
if(nicePlayer.abilityManager == none) return;
|
||||
nicePlayer.abilityManager.RemoveAbility(default.abilityID);
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
abilityID="stupor"
|
||||
cooldown=30.000000
|
||||
radius=800.000000 // ~16 meters, I think
|
||||
painScore=600.0
|
||||
SkillName="Stupor"
|
||||
SkillEffects="Stun or flinch small zeds in 16 meter radius around you."
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
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,9 @@
|
|||
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,7 @@
|
|||
class NiceSkillEnforcerZEDBarrage extends NiceSkill
|
||||
abstract;
|
||||
defaultproperties
|
||||
{
|
||||
SkillName="Barrage"
|
||||
SkillEffects="Shoot without any recoil during zed-time."
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
class NiceSkillEnforcerZEDJuggernaut extends NiceSkill
|
||||
abstract;
|
||||
var float distance;
|
||||
defaultproperties
|
||||
{
|
||||
Distance=800.000000
|
||||
SkillName="Juggernaut"
|
||||
SkillEffects="You startle zeds around you upon entering zed-time."
|
||||
}
|
||||
9
sources/Perks/Enforcer/Skills/NiceSkillHeavyCoating.uc
Normal file
9
sources/Perks/Enforcer/Skills/NiceSkillHeavyCoating.uc
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
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,9 @@
|
|||
class NiceSkillHeavyOverclocking extends NiceSkill
|
||||
abstract;
|
||||
var float fireSpeedMult;
|
||||
defaultproperties
|
||||
{
|
||||
fireSpeedMult=1.300000
|
||||
SkillName="Overclocking"
|
||||
SkillEffects="+30% fire speed with perked weapons."
|
||||
}
|
||||
9
sources/Perks/Enforcer/Skills/NiceSkillHeavySafeguard.uc
Normal file
9
sources/Perks/Enforcer/Skills/NiceSkillHeavySafeguard.uc
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
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,34 @@
|
|||
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."
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue