From a06ab42a4a554c0fc1cbe8dfb4e5b4e86c4e0fe9 Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Fri, 11 Oct 2019 13:25:22 +0200 Subject: [PATCH] Release Candidate 3 Hotfix 2: - Corrections on Power Shield behaviour, added option to make it absorb damage normally like in Unreal instead of individual hits, although this will make it less viable as an Invulnerability replacement. --- ItemLore.md | 8 ++------ cvarinfo.txt | 11 +++++------ language.txt | 4 ++-- zscript/uarmoritems.zsc | 22 ++++++++++++++++++---- 4 files changed, 27 insertions(+), 18 deletions(-) diff --git a/ItemLore.md b/ItemLore.md index 835e231..833c287 100644 --- a/ItemLore.md +++ b/ItemLore.md @@ -143,12 +143,8 @@ Generates a protective barrier around you that can completely block out up to ## Power Shield -A much more potent version of the Shield Belt. This one, rather than degrade -with damage taken, wears down based on the NUMBER of hits it takes. So ideally -it can eat up 200 attacks from anywhere. - -By default, it also drains slowly over time for balance reasons, but this can -be disabled for the original behaviour. +A much more potent version of the Shield Belt, which can absorb up to 200 +individual hits, but loses charge over time. ## Dispersion Pistol Powerups diff --git a/cvarinfo.txt b/cvarinfo.txt index 14bb4cf..0e04d7c 100644 --- a/cvarinfo.txt +++ b/cvarinfo.txt @@ -51,12 +51,11 @@ server bool sting_dpistol = false; // d.pistol altfire always level 0 // the weapon, but it's very likely // that this was kept like this for // the sake of balance -server bool sting_pshield = false; // p.shield does not drain over time - // this is unbalanced as all hell and - // it's not recommended to enable the - // compatibility option unless you are - // a die-hard purist who despises the - // change +server bool sting_pshield = false; // p.shield absorbs damage instead of + // individual hits, like in vanilla. + // note that this will make it less + // useful as an invulnerability + // replacement server bool sting_nopstart = false; // players start only with the // dispersion pistol, otherwise they // also get an automag for the sake diff --git a/language.txt b/language.txt index d208a99..14f20f3 100644 --- a/language.txt +++ b/language.txt @@ -242,7 +242,7 @@ STING_AUTODUAL = "Automags"; STING_PROTODUAL = "Protomags"; STING_UOPTS = "Compatibility options"; STING_DPISTOL = "Dispersion Pistol altfire isn't upgraded"; -STING_PSHIELD = "Power Shield does not drain over time"; +STING_PSHIELD = "Power Shield works like in Unreal"; STING_NOPSTART = "Players don't start up with an Automag"; STING_OLSMP = "Enable SMP 7243 from Oldskool Amp'd"; STING_MSENTRY = "Enable new Minigun Sentry"; @@ -488,7 +488,7 @@ STING_AUTODUAL = "Autoarmas"; STING_PROTODUAL = "Protoarmas"; STING_UOPTS = "Opciones de compatibilidad"; STING_DPISTOL = "El fuego alternativo de la Pistola de Dispersión no es mejorado"; -STING_PSHIELD = "El Escudo de Fuerza no pierde carga con el tiempo"; +STING_PSHIELD = "El Escudo de Fuerza funciona como en Unreal"; STING_NOPSTART = "Los jugadores no empiezan la partida con un Automag"; STING_OLSMP = "Habilitar SMP 7243 de Oldskool Amp'd"; STING_MSENTRY = "Habilitar nueva Torreta"; diff --git a/zscript/uarmoritems.zsc b/zscript/uarmoritems.zsc index 79569bf..ae633e7 100644 --- a/zscript/uarmoritems.zsc +++ b/zscript/uarmoritems.zsc @@ -201,6 +201,7 @@ Class ShieldBelt : UnrealArmor Class PowerShield : UnrealArmor { bool gothit; + int draintimer; override void AbsorbDamage( int damage, Name damageType, out int newdamage ) { @@ -208,9 +209,17 @@ Class PowerShield : UnrealArmor { Owner.A_PlaySound("belt/absorb",CHAN_7); UTMainHandler.DoFlash(Owner,Color(80,224,0,255),5); - gothit = true; - damage = 0; - newdamage = 0; + if ( !sting_pshield ) + { + gothit = true; + damage = 0; + newdamage = 0; + } + } + if ( sting_pshield ) + { + Super.AbsorbDamage(damage,damageType,newdamage); + return; } if ( damage > 0 ) newdamage = ApplyDamageFactors(GetClass(),damageType,damage,damage); } @@ -229,7 +238,12 @@ Class PowerShield : UnrealArmor amount--; gothit = false; } - if ( !(level.maptime%15) && !sting_pshield ) amount--; + draintimer++; + if ( draintimer > 35 ) + { + amount--; + draintimer = 0; + } if ( amount <= 0 ) DepleteOrDestroy(); } Default