Buff enforcer

This commit is contained in:
Anton Tarasenko 2023-01-23 02:03:36 +07:00
parent 4f4455f9b1
commit 2135c0b46b
20 changed files with 289 additions and 157 deletions

View File

@ -240,18 +240,19 @@ function PostRender(Canvas C)
x = center - (barWidth / 2);
C.SetPos(x, y);
C.DrawTile(barTexture, barWidth, 32, 0, 0, barTexture.MaterialUSize(), barTexture.MaterialVSize());
if (nicePawn.safeMeleeMisses <= 0)
return;
missesSpace = 10; // 64x64 => 16x16
missesHeight = 16;
missesWidth = nicePawn.safeMeleeMisses * 16 + (nicePawn.safeMeleeMisses - 1) * missesSpace;
missesX = center - (missesWidth / 2);
missesY = y + (32 - missesHeight) * 0.5;
for (i = 0; i < nicePawn.safeMeleeMisses; i++)
if (nicePawn.safeMeleeMisses > 0)
{
C.SetPos(missesX + i * (16 + missesSpace), missesY);
C.DrawTile(shield, 16, 16, 0, 0, shield.MaterialUSize(), shield.MaterialVSize());
missesSpace = 10; // 64x64 => 16x16
missesHeight = 16;
missesWidth = nicePawn.safeMeleeMisses * 16 + (nicePawn.safeMeleeMisses - 1) * missesSpace;
missesX = center - (missesWidth / 2);
missesY = y + (32 - missesHeight) * 0.5;
for (i = 0; i < nicePawn.safeMeleeMisses; i++)
{
C.SetPos(missesX + i * (16 + missesSpace), missesY);
C.DrawTile(shield, 16, 16, 0, 0, shield.MaterialUSize(), shield.MaterialVSize());
}
}
}

View File

@ -16,6 +16,7 @@ var float ffScale;
var float medicAdrenaliteTime;
var float regenTime;
var bool bZedTimeInvincible;
var float nextFreezeTime;
enum ECalibrationState{
// Calibration isn't available due to lack of ability
CALSTATE_NOABILITY,
@ -44,9 +45,7 @@ struct InvincExtentions{
};
var array<InvincExtentions> zedInvExtList;
var int headshotStack;
var float remainingFCArmor;
var float remainingFCTime;
var float brutalCranageTimer;
var float bruteTimer;
replication{
reliable if(Role == ROLE_Authority)
headshotStack, hmgShieldLevel, forcedZedTimeCountDown, maniacTimeout, invincibilityTimer, safeMeleeMisses, ffScale,
@ -141,6 +140,8 @@ simulated function bool TryExtendingInv(NiceMonster niceZed,
GetVeterancy(PlayerReplicationInfo);
if(niceVet == none)
return false;
if (niceVet == class'NiceVetEnforcer')
return false;
zedExtIndex = GetZedExtentionsIndex(niceZed);
if(zedExtIndex >= 0 && !wasHeadshot)
zedInvExtList[zedExtIndex].hadMiss = true;
@ -226,6 +227,7 @@ simulated function Tick(float deltaTime)
{
local int index;
local Inventory Item;
local NiceMonster niceZed;
local NiceWeapon niceWeap;
local WeaponTimePair newPair;
local array<WeaponTimePair> newWTPList;
@ -236,10 +238,10 @@ simulated function Tick(float deltaTime)
if (Role == Role_AUTHORITY)
{
// Brutal carnage
if (brutalCranageTimer > 0)
if (bruteTimer > 0)
{
brutalCranageTimer -= deltaTime;
if (brutalCranageTimer <= 0)
bruteTimer -= deltaTime;
if (bruteTimer <= 0)
{
if(nicePlayer != none && nicePlayer.abilityManager != none)
{
@ -247,17 +249,28 @@ simulated function Tick(float deltaTime)
}
}
}
// Full counter remainingFCTime
if (remainingFCTime > 0)
// Ice giant NiceSkillEnforcerZEDIceGiant
if( nicePlayer != none && nicePlayer.IsZedTimeActive()
&& nextFreezeTime < level.timeSeconds
&& class'NiceVeterancyTypes'.static.hasSkill(
nicePlayer, class'NiceSkillEnforcerZEDIceGiant'))
{
remainingFCTime -= deltaTime;
if (remainingFCTime <= 0)
nextFreezeTime =
level.timeSeconds + class'NiceCryoNade'.default.freezeRate;
foreach CollidingActors(
class 'NiceMonster', niceZed,
class'NiceCryoNade'.default.damageRadius,
location)
{
remainingFCArmor = 0;
if(nicePlayer != none && nicePlayer.abilityManager != none)
{
nicePlayer.abilityManager.SetAbilityState(0, ASTATE_COOLDOWN);
if(niceZed.Health <= 0) {
continue;
}
niceZed.TakeDamage(
class'NiceCryoNade'.default.damage,
self,
niceZed.location,
vect(0,0,0),
class'NiceCryoNade'.default.myDamageType);
}
}
// Calibration
@ -595,7 +608,7 @@ simulated function HandleNadeThrowAnim()
function bool ShouldBlur(){
local class<NiceVeterancyTypes> niceVet;
niceVet = class'NiceVeterancyTypes'.static.GetVeterancy(PlayerReplicationInfo);
if(niceVet != none && niceVet.static.hasSkill(NicePlayerController(Controller), class'NiceSkillEnforcerUnshakable'))
if(niceVet != none && niceVet.static.hasSkill(NicePlayerController(Controller), class'NiceSkillEnforcerUnstoppable'))
return false;
return true;
}
@ -718,7 +731,6 @@ function getFreeJacket(){
}
}
simulated function TakeDamage(int Damage, Pawn InstigatedBy, Vector Hitlocation, Vector Momentum, class<DamageType> damageType, optional int HitIndex){
local float FCArmorAbsorb;
local int needArmor;
local int healAmount;
local float healPotency;
@ -754,16 +766,6 @@ simulated function TakeDamage(int Damage, Pawn InstigatedBy, Vector Hitlocation,
damageType.default.bArmorStops = true;
}
lastExplosionDistance = 0.0; // hack, but scrn fucks with usotherwise
if (remainingFCArmor > 0 && remainingFCTime > 0)
{
FCArmorAbsorb = FMin(Damage, remainingFCArmor);
Damage -= FCArmorAbsorb;
remainingFCArmor -= FCArmorAbsorb;
if(remainingFCArmor <= 0 && nicePlayer != none && nicePlayer.abilityManager != none)
{
nicePlayer.abilityManager.SetAbilityState(0, ASTATE_COOLDOWN);
}
}
super.TakeDamage(Damage, InstigatedBy, hitLocation, Momentum, damageType, HitIndex);
// Commando's zed time
if( forcedZedTimeCountDown <= 0.0

View File

@ -378,7 +378,7 @@ simulated function ClientSetKey(int key){
function bool ShouldShake(){
local class<NiceVeterancyTypes> niceVet;
niceVet = class'NiceVeterancyTypes'.static.GetVeterancy(PlayerReplicationInfo);
if(niceVet != none && niceVet.static.hasSkill(self, class'NiceSkillEnforcerUnshakable'))
if(niceVet != none && niceVet.static.hasSkill(self, class'NiceSkillEnforcerUnstoppable'))
return false;
return true;
}
@ -575,7 +575,7 @@ function BecomeActivePlayer(){
if(NicePackMutator != none)
NicePackMutator.GiveProgressiveDosh(self);
}
function ServerStartleZeds(float dist){
function ServerStartleZeds(float dist, float duration){
local Vector pawnLoc;
local Controller contr;
local NiceMonsterController niceZed;
@ -586,14 +586,10 @@ function ServerStartleZeds(float dist){
for(contr = Level.ControllerList; contr != none; contr = contr.nextController){
niceZed = NiceMonsterController(contr);
if(niceZed != none && niceZed.Pawn != none && VSize(pawnLoc - niceZed.Pawn.Location) <= dist)
niceZed.Startle(Pawn);
niceZed.StartleFor(Pawn, duration);
}
}
simulated function ClientEnterZedTime(){
super.ClientEnterZedTime();
if(IsZedTimeActive() && class'NiceVeterancyTypes'.static.HasSkill(self, class'NiceSkillEnforcerZEDJuggernaut'))
ServerStartleZeds(class'NiceSkillEnforcerZEDJuggernaut'.default.distance);
}
/*simulated function ClientExitZedTime(){
super.ClientExitZedTime();
}*/

View File

@ -10,84 +10,36 @@
// 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'NiceSkillEnforcerStuporA'.default.radius, relatedPlayer.pawn.location)
{
if (victim == none) continue;
victim.DoRightPainReaction(class'NiceSkillEnforcerStuporA'.default.painScore,
relatedPlayer.pawn, victim.location, Vect(0,0,0), none, 0.0,
KFPlayerReplicationInfo(relatedPlayer.PlayerReplicationInfo));
}
}
}/*
static function AbilityAdded( string abilityID,
NicePlayerController relatedPlayer){
static function AbilityActivated(
string abilityID,
NicePlayerController relatedPlayer)
{
local NiceHumanPawn nicePawn;
if(relatedPlayer == none) return;
local NiceMonster victim;
if (relatedPlayer == none) return;
nicePawn = NiceHumanPawn(relatedPlayer.pawn);
if(nicePawn == none)
return;
if(abilityID == "Calibration"){
nicePawn.currentCalibrationState = CALSTATE_FINISHED;
nicePawn.calibrationScore = 3;
if (nicePawn == none) return;
if (abilityID == "fullcounter")
{
nicePawn.invincibilityTimer += 2.0;
relatedPlayer.abilityManager.SetAbilityState(0, ASTATE_COOLDOWN);
}
if (abilityID == "juggernaut")
{
relatedPlayer.abilityManager.SetAbilityState(1, ASTATE_COOLDOWN);
relatedPlayer.ServerStartleZeds(
class'NiceSkillEnforcerJuggernautA'.default.distance,
class'NiceSkillEnforcerJuggernautA'.default.duration);
}
if (abilityID == "brute")
{
nicePawn.bruteTimer =
class'NiceSkillEnforcerBruteA'.default.abilityDuration;
}
}
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
{
}
}

View File

@ -14,7 +14,29 @@ static function array<int> GetProgressArray(byte ReqNum, optional out int Double
}
// Other bonuses
static function int AddDamage(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InDamage, class<DamageType> DmgType)
{
local float fDamage;
local NicePlayerController nicePlayer;
local NiceMonster niceTarget;
fDamage = float(InDamage);
nicePlayer = NicePlayerController(KFPRI.Owner);
niceTarget = NiceMonster(injured);
if ( niceTarget != none
&& niceTarget.bFrozenZed
&& HasSkill(nicePlayer, class'NiceSkillEnforcerFinisherRounds'))
{
fDamage *=
(1 + class'NiceSkillEnforcerFinisherRounds'.default.damageBonus);
}
if( nicePlayer != none && nicePlayer.abilityManager != none
&& nicePlayer.abilityManager.IsAbilityActive(class'NiceSkillEnforcerBruteA'.default.abilityID))
{
fDamage *= class'NiceSkillEnforcerBruteA'.default.damageMult;
}
return int(fDamage);
}
static function float GetPenetrationDamageMulti(KFPlayerReplicationInfo KFPRI, float DefaultPenDamageReduction, class<NiceWeaponDamageType> fireIntance){
local float bonusReduction;
local float PenDamageInverse;
@ -52,17 +74,24 @@ static function float AddExtraAmmoFor(KFPlayerReplicationInfo KFPRI, Class<Ammun
}
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);
local float fDamage;
fDamage = float(inDamage);
if(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillEnforcerUnkillable') && Injured.Health < class'NiceSkillEnforcerUnkillable'.default.healthBound)
fDamage *= (1 - class'NiceSkillEnforcerUnkillable'.default.addedResist);
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'NiceSkillEnforcerCoating'.default.huskResist);
{
if (Injured.ShieldStrength >= 100) {
fDamage *= (1 - class'NiceSkillEnforcerCoating'.default.huskResist);
}
else {
fDamage *= (1 - class'NiceSkillEnforcerCoating'.default.huskResist * (Injured.ShieldStrength / 100));
}
}
}
return InDamage;
return int(fDamage);
}
static function float GetFireSpeedModStatic(KFPlayerReplicationInfo KFPRI, class<Weapon> other){
@ -92,6 +121,10 @@ static function float ModifyRecoilSpread(KFPlayerReplicationInfo KFPRI, WeaponFi
return Recoil;
}
static function int GetInvincibilityDuration(KFPlayerReplicationInfo KFPRI){
return 10.0;
}
/*static function float GetMagCapacityModStatic(KFPlayerReplicationInfo KFPRI, class<KFWeapon> other){
local class<NiceWeapon> niceWeap;
niceWeap = class<NiceWeapon>(other);
@ -143,13 +176,13 @@ defaultproperties
SkillGroupA(0)=class'NiceSkillEnforcerUnstoppable'
SkillGroupA(1)=class'NiceSkillEnforcerBombard'
SkillGroupA(2)=class'NiceSkillEnforcerCoating'
SkillGroupA(3)=class'NiceSkillEnforcerStuporA'
SkillGroupA(3)=class'NiceSkillEnforcerJuggernautA'
SkillGroupA(4)=class'NiceSkillEnforcerZEDBarrage'
SkillGroupB(0)=class'NiceSkillEnforcerUnshakable'
SkillGroupB(0)=class'NiceSkillEnforcerUnkillable'
SkillGroupB(1)=class'NiceSkillEnforcerMultitasker'
SkillGroupB(2)=class'NiceSkillEnforcerDetermination'
SkillGroupB(3)=class'NiceSkillEnforcerBrutalCarnageA'
SkillGroupB(4)=class'NiceSkillEnforcerZEDJuggernaut'
SkillGroupB(2)=class'NiceSkillEnforcerFinisherRounds'
SkillGroupB(3)=class'NiceSkillEnforcerBruteA'
SkillGroupB(4)=class'NiceSkillEnforcerZEDIceGiant'
progressArray0(0)=100
progressArray0(1)=1000
progressArray0(2)=3000
@ -164,7 +197,7 @@ defaultproperties
OnHUDIcons(3)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Support_Blue',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Blue',DrawColor=(B=255,G=255,R=255,A=255))
OnHUDIcons(4)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Support_Purple',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Purple',DrawColor=(B=255,G=255,R=255,A=255))
OnHUDIcons(5)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Support_Orange',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Orange',DrawColor=(B=255,G=255,R=255,A=255))
CustomLevelInfo="Level up by doing damage with perked weapons|60% better penetration with all weapons|+2 grenades"
CustomLevelInfo="Level up by doing damage with perked weapons|60% better penetration with all weapons|+2 grenades|Cannot gain melee invincibility"
PerkIndex=1
OnHUDIcon=Texture'KillingFloorHUD.Perks.Perk_Support'
OnHUDGoldIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Support_Gold'

View File

@ -0,0 +1,38 @@
class NiceSkillEnforcerBruteA extends NiceSkill
abstract;
var string abilityID;
var float coolDown;
var float abilityDuration;
var float damageMult;
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="brute"
cooldown=60.000000
abilityDuration=5.0
damageMult=4.0
SkillName="Brute"
SkillEffects="Temporarily lose ability to do headshots in exchange for quad damage."
}

View File

@ -0,0 +1,10 @@
class NiceSkillEnforcerFinisherRounds extends NiceSkill
abstract;
var float damageBonus;
defaultproperties
{
damageBonus=0.500000
SkillName="Finisher rounds"
SkillEffects="Deal 50% more damage to frozen targets."
}

View File

@ -0,0 +1,38 @@
class NiceSkillEnforcerJuggernautA extends NiceSkill
abstract;
var string abilityID;
var float distance;
var float cooldown;
var float duration;
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="juggernaut"
Distance=800.000000
cooldown=30
SkillName="Juggernaut"
SkillEffects="Startle zeds around you for three seconds."
}

View File

@ -1,11 +1,12 @@
class NiceSkillEnforcerDetermination extends NiceSkill
class NiceSkillEnforcerUnkillable extends NiceSkill
abstract;
var int healthBound;
var float addedResist;
defaultproperties
{
healthBound=50
addedResist=0.500000
SkillName="Determination"
SkillName="Unkillable"
SkillEffects="Receive 50% less damage when your health falls below 50 mark."
}

View File

@ -3,7 +3,7 @@ class NiceSkillEnforcerUnstoppable extends NiceSkill
var float speedMult;
defaultproperties
{
speedMult=0.750000
speedMult=1.000000
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."
SkillEffects="Your speed doesn't decrease from additional weight, low health, poison or siren's pull and your screen doesn't shake or blur."
}

View File

@ -3,5 +3,5 @@ class NiceSkillEnforcerZEDBarrage extends NiceSkill
defaultproperties
{
SkillName="Barrage"
SkillEffects="Shoot without any recoil during zed-time."
SkillEffects="Shoot without any recoil during zed-time at twice the speed."
}

View File

@ -0,0 +1,7 @@
class NiceSkillEnforcerZEDIceGiant extends NiceSkill
abstract;
defaultproperties
{
SkillName="Ice giant"
SkillEffects="Freeze zeds around you during zed time."
}

View File

@ -1,9 +0,0 @@
class NiceSkillEnforcerZEDJuggernaut extends NiceSkill
abstract;
var float distance;
defaultproperties
{
Distance=800.000000
SkillName="Juggernaut"
SkillEffects="You startle zeds around you upon entering zed-time."
}

View File

@ -68,14 +68,17 @@ static function HitZed(NiceBullet bullet, NiceReplicationInfo niceRI, KFMonster
local NiceHumanPawn nicePawn;
local NicePlayerController nicePlayer;
local class<NiceVeterancyTypes> niceVet;
nicePlayer = NicePlayerController(bullet.Instigator.Controller);
if ( nicePlayer != none && nicePlayer.abilityManager != none
&& nicePlayer.abilityManager.IsAbilityActive(class'NiceSkillEnforcerBruteA'.default.abilityID)) {
headshotLevel = 0.0;
}
bIsHeadshot = (headshotLevel > 0.0);
bIsPreciseHeadshot = (headshotLevel > bullet.charDamageType.default.prReqPrecise);
if(!bullet.bAlreadyHitZed || bIsHeadshot)
HandleCalibration(bIsHeadshot, NiceHumanPawn(bullet.Instigator), NiceMonster(kfZed));
if(bIsHeadshot && bullet.sourceWeapon != none)
bullet.sourceWeapon.lastHeadshotTime = bullet.Level.TimeSeconds;
// Try to get necessary variables and bail in case they're unaccessible
nicePlayer = NicePlayerController(bullet.Instigator.Controller);
if(nicePlayer == none)
return;
nicePawn = NiceHumanPawn(bullet.instigator);

View File

@ -662,10 +662,17 @@ simulated function AccuracyUpdate(float Velocity){}
// This function is called when 'FireRate', 'FireAnimRate' or 'ReloadAnimRate' need to be updated
simulated function UpdateFireSpeed(){
local float fireSpeedMod;
local NicePlayerController nicePlayer;
fireSpeedMod = GetFireSpeed();
if (instigator != none) {
nicePlayer = NicePlayerController(instigator.controller);
}
if(NiceSingle(Weapon) != none || NiceDualies(Weapon) != none)
fireSpeedMod /= (Level.TimeDilation / 1.1);
fireSpeedMod *= 1.0 + 1.1 * (zedTimeFireSpeedUp - 1.0) * (1.1 - Level.TimeDilation);
if(nicePlayer != none && nicePlayer.IsZedTimeActive() && class'NiceVeterancyTypes'.static.HasSkill(nicePlayer, class'NiceSkillEnforcerZEDBarrage')) {
fireSpeedMod *= 2.0;
}
FireRate = default.FireRate / fireSpeedMod;
FireAnimRate = default.FireAnimRate * fireSpeedMod;
ReloadAnimRate = default.ReloadAnimRate * fireSpeedMod;

View File

@ -246,7 +246,7 @@ simulated function PostBeginPlay(){
function bool ShouldLeaveIronsight(){
local class<NiceVeterancyTypes> niceVet;
niceVet = class'NiceVeterancyTypes'.static.GetVeterancy(Instigator.PlayerReplicationInfo);
if(niceVet != none && niceVet.static.hasSkill(NicePlayerController(Instigator.Controller), class'NiceSkillEnforcerUnshakable'))
if(niceVet != none && niceVet.static.hasSkill(NicePlayerController(Instigator.Controller), class'NiceSkillEnforcerUnstoppable'))
return false;
return true;
}

View File

@ -9,5 +9,6 @@ defaultproperties
FireRate=0.200000
DamageMax=63
AmmoClass=class'NiceBenelliAmmo'
Spread=1125.000000
BotRefireRate=0.200000
}

View File

@ -3,4 +3,8 @@ defaultproperties
{
DamageType=class'NiceDamTypeSpas'
AmmoClass=class'NiceSpasAmmo'
FireAnimRate=1.000000
FireRate=0.300000
Spread=625.000000
DamageMax=63
}

View File

@ -1098,21 +1098,35 @@ function DealBodyDamage(int damage,
MakeNoise(1.0);
}
function Died( Controller killer,
function Died( Controller killer,
class<DamageType> damageType,
vector HitLocation)
{
local bool bHasManiac;
local NiceHumanPawn nicePawn;
local bool bHasManiac;
local NiceHumanPawn nicePawn;
local class<NiceVeterancyTypes> niceVet;
if (killer != none || (Controller != none && killer != Controller))
{
// Maniac stuff
bHasManiac = class'NiceVeterancyTypes'.static.
HasSkill(NicePlayerController(killer), class'NiceSkillDemoManiac');
nicePawn = NiceHumanPawn(killer.pawn);
if (bHasManiac && nicePawn != none)
nicePawn.maniacTimeout =
class'NiceSkillDemoManiac'.default.reloadBoostTime;
// Enforcer's invincibility
if (nicePawn != none)
{
niceVet = class'NiceVeterancyTypes'.static.
GetVeterancy(nicePawn.playerReplicationInfo);
}
if ( niceVet != none
&& niceVet == class'NiceVetEnforcer'
&& nicePawn.invincibilityTimer > 0)
{
nicePawn.invincibilityTimer += default.healthMax / 500.0;
}
}
super.Died(killer, damageType, HitLocation);

View File

@ -14,6 +14,9 @@
// E-mail: dkanus@gmail.com
//==============================================================================
class NiceMonsterController extends KFMonsterController;
var float startleTimeLeft;
// Just reset threat assesment flag, since it's not used in NicePack
function PostBeginPlay(){
super.PostBeginPlay();
@ -34,12 +37,35 @@ event bool NotifyBump(Actor other){
CancelCampFor(otherPawn.controller);
return false;
}
function Startle(Actor Feared)
{
if ( Monster(Pawn) != none)
{
GoalString = "STARTLED!";
StartleActor = Feared;
GotoState('Startled');
}
}
function StartleFor(Actor feared, float startleDuration)
{
startleTimeLeft = startleDuration;
Startle(feared);
}
state Startled{
ignores EnemyNotVisible,SeePlayer,HearNoise;
function Startle(Actor Feared){
goalString = "STARTLED!";
startleActor = feared;
BeginState();
function Startle(Actor feared)
{
goalString = "STARTLED!";
startleActor = feared;
BeginState();
}
function StartleFor(Actor feared, float startleDuration)
{
startleTimeLeft = startleDuration;
Startle(feared);
}
function BeginState(){
if(startleActor == none){
@ -55,7 +81,7 @@ state Startled{
pawn.acceleration = pawn.accelRate * Normal(pawn.acceleration);
}
Begin:
if( NiceHumanPawn(StartleActor) == none
/*if( NiceHumanPawn(StartleActor) == none
|| KFGameType(Level.Game) == none
|| KFGameType(Level.Game).bZEDTimeActive ){
Sleep(0.5);
@ -64,6 +90,14 @@ Begin:
else{
Sleep(0.25);
Goto('Begin');
}*/
startleTimeLeft -= 0.5;
if (startleTimeLeft <= 0) {
WhatToDoNext(11);
}
else {
Sleep(0.5);
Goto('Begin');
}
}
function bool IsMonsterDecapitated(){