From 687f1c534defc5e6e79db587065e531608a722fa Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Thu, 21 Jan 2021 10:57:49 +0100 Subject: [PATCH] Rebalance/fix Corrosion debuff. Parried lost souls get BLASTED flag. --- language.version | 2 +- zscript/swwm_armor.zsc | 2 +- zscript/swwm_inventory.zsc | 1 + zscript/swwm_player.zsc | 9 ++++ zscript/swwm_powerup.zsc | 2 +- zscript/swwm_shot.zsc | 91 ++++++++++++++++++++++++-------------- 6 files changed, 70 insertions(+), 37 deletions(-) diff --git a/language.version b/language.version index 8b5f2ef36..df509f0c0 100644 --- a/language.version +++ b/language.version @@ -1,2 +1,2 @@ [default] -SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r772 \cu(Thu 21 Jan 09:25:27 CET 2021)"; +SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r773 \cu(Thu 21 Jan 10:57:49 CET 2021)"; diff --git a/zscript/swwm_armor.zsc b/zscript/swwm_armor.zsc index e7b3eca57..a312980a5 100644 --- a/zscript/swwm_armor.zsc +++ b/zscript/swwm_armor.zsc @@ -117,7 +117,7 @@ Class WarArmor : SWWMArmor { double factor; // should be enough "elemental" damage types I guess - if ( (damageType == 'Fire') || (damageType == 'Ice') || (damageType == 'Slime') || (damageType == 'Electric') || (damageType == 'Wind') || (damageType == 'Water') ) factor = .8; + if ( (damageType == 'Fire') || (damageType == 'Ice') || (damageType == 'Slime') || (damageType == 'Electric') || (damageType == 'Wind') || (damageType == 'Water') || (damageType == 'Corroded') || (damageType == 'Lava') ) factor = .8; else factor = .5; if ( flags&DMG_EXPLOSION ) factor = 1.-(1.-factor)*.7; return int(ceil(damage*factor)); diff --git a/zscript/swwm_inventory.zsc b/zscript/swwm_inventory.zsc index 0cdf35bce..abbe8cd07 100644 --- a/zscript/swwm_inventory.zsc +++ b/zscript/swwm_inventory.zsc @@ -861,6 +861,7 @@ Class ParryField : Actor if ( a.bSEEKERMISSILE ) a.tracer = a.target; a.target = master; } + if ( a.bSKULLFLY ) a.bBLASTED = true; // blast lost souls a.GiveInventory("ParriedBuff",1); let buff = a.FindInventory("ParriedBuff"); double mvel = a.vel.length(); diff --git a/zscript/swwm_player.zsc b/zscript/swwm_player.zsc index 9ca3ff2c8..94235de6d 100644 --- a/zscript/swwm_player.zsc +++ b/zscript/swwm_player.zsc @@ -2538,6 +2538,8 @@ Class SayaCollar : Inventory // EXTRA THICC as Saya requested Class AlmasteelPlating : Inventory { + Inventory dbf; + Default { +INVENTORY.UNDROPPABLE; @@ -2545,8 +2547,15 @@ Class AlmasteelPlating : Inventory +INVENTORY.UNCLEARABLE; Inventory.RestrictedTo "Demolitionist"; } + override void DoEffect() + { + Super.DoEffect(); + if ( !dbf ) return; + dbf.Amount = int(dbf.Amount*.95-1); // rapidly dissipate Telubrium corrosion + } override void AbsorbDamage( int damage, Name damageType, out int newdamage, Actor inflictor, Actor source, int flags ) { + if ( inflictor && (inflictor is 'CorrodeDebuff') ) dbf = Inventory(inflictor); if ( (damage <= 0) || (flags&(DMG_FORCED|DMG_NO_ARMOR)) ) return; // 50% reduction for normal damage, 80% reduction for explosions if ( flags&DMG_EXPLOSION ) newdamage = max(1,damage/5); diff --git a/zscript/swwm_powerup.zsc b/zscript/swwm_powerup.zsc index 9b3488b31..0aedf803f 100644 --- a/zscript/swwm_powerup.zsc +++ b/zscript/swwm_powerup.zsc @@ -1882,7 +1882,7 @@ Class BarrierPower : PowerIronFeet override void AbsorbDamage( int damage, Name damageType, out int newdamage ) { // negate elemental damage - if ( (damageType == 'Fire') || (damageType == 'Ice') || (damageType == 'Slime') || (damageType == 'Electric') || (damageType == 'Wind') || (damageType == 'Water') ) + if ( (damageType == 'Fire') || (damageType == 'Ice') || (damageType == 'Slime') || (damageType == 'Electric') || (damageType == 'Wind') || (damageType == 'Water') || (damageType == 'Corroded') || (damageType == 'Lava') ) newdamage = 0; } diff --git a/zscript/swwm_shot.zsc b/zscript/swwm_shot.zsc index 229127399..1f0f9914e 100644 --- a/zscript/swwm_shot.zsc +++ b/zscript/swwm_shot.zsc @@ -836,7 +836,22 @@ Class BallImpact : Actor } } -Class CorrodeSmoke : SWWMHalfSmoke +Class CorrodeSmoke : SWWMSmoke +{ + Default + { + RenderStyle "Add"; + Alpha 0.25; + } + States + { + Spawn: + FRT1 ABCDEFGHIJKLMNOPQRSTUVWXYZ 1 Bright A_SetTics(1+special1); + FRT2 ABCDEFGHI 1 Bright A_SetTics(1+special1); + Stop; + } +} +Class CorrodeHalfSmoke : SWWMHalfSmoke { Default { @@ -854,7 +869,7 @@ Class CorrodeSmoke : SWWMHalfSmoke Class CorrodeDebuff : Inventory { - int cnt; + int cnt, cnt2; Actor instigator; bool wasalive; @@ -862,7 +877,7 @@ Class CorrodeDebuff : Inventory { Obituary "$O_SPREADGUN_BLACK_DEBUFF"; Inventory.Amount 1; - Inventory.MaxAmount 500; + Inventory.MaxAmount 1000; Inventory.InterHubAmount 0; +INVENTORY.UNDROPPABLE; +INVENTORY.UNTOSSABLE; @@ -879,9 +894,9 @@ Class CorrodeDebuff : Inventory c.AttachToOwner(target); c.cnt = 5; // slight delay c.A_StartSound("spreadgun/corrode",CHAN_VOICE,CHANF_DEFAULT); - c.Amount = clamp(c.Amount+Damage*5,0,int(Amount*.9)); // prevent "escalating" spread + c.Amount = clamp(c.Amount+Damage*8,0,int(Amount*.7)); // prevent "escalating" spread } - else c.Amount = clamp(c.Amount+Damage*5,0,int(Amount*.8)); // prevent "escalating" spread + else if ( c.Amount < int(Amount*.6) ) c.Amount = clamp(c.Amount+Damage*8,0,int(Amount*.6)); // prevent "escalating" spread c.instigator = instigator; return 0; // no direct damage } @@ -895,36 +910,44 @@ Class CorrodeDebuff : Inventory } SetOrigin(Owner.Vec3Offset(0,0,Owner.height/2),false); cnt--; - if ( cnt > 0 ) return; - cnt = clamp((100-Amount)/5,5,15); - if ( !Random[Corrode](0,3) ) Owner.Howl(); - double maxrad = max(Owner.radius,Owner.height); - Owner.DamageMobj(self,instigator?instigator:Actor(self),clamp(Amount/5,1,50),'Corroded',DMG_THRUSTLESS); - bool justdied = (wasalive && (!Owner || Owner.Health <= 0)); - if ( justdied ) + if ( cnt < 0 ) { - maxrad += 60; - Amount = max(100,Amount); - A_StartSound("spreadgun/corrode",CHAN_VOICE,CHANF_DEFAULT); + cnt = clamp((100-Amount)/10,5,15); + if ( !Random[Corrode](0,3) ) Owner.Howl(); + double maxrad = max(Owner.radius,Owner.height); + Owner.DamageMobj(self,instigator?instigator:Actor(self),clamp(Amount/8,1,50),'Corroded',DMG_THRUSTLESS); + bool justdied = (wasalive && (!Owner || Owner.Health <= 0)); + if ( justdied ) + { + maxrad += 50; + Amount = max(100,Amount+50); + A_StartSound("spreadgun/corrode",CHAN_VOICE,CHANF_DEFAULT); + } + if ( !wasalive ) maxrad += 50; + SWWMUtility.DoExplosion(self,clamp(Amount/8,1,50),0,maxrad*1.1,maxrad*.9,DE_NOBLEED|DE_NOSPLASH|DE_HOWL,'Corroded',Owner); + int numpt = Random[Corrode](-2,2); + if ( justdied ) numpt = Random[Corrode](8,12); + for ( int i=0; i 0); + cnt2++; + if ( cnt2 < 4 ) return; + cnt2 = 0; + Amount -= 1; + if ( Amount > 100 ) Amount -= max(0,Amount/50-1); + if ( !Owner ) return; + if ( Owner.Health > 0 ) Amount -= 1; + if ( Owner.bNOBLOOD ) Amount -= 2; } } @@ -997,7 +1020,7 @@ Class CorrosiveSplash : Actor override void PostBeginPlay() { Super.PostBeginPlay(); - SWWMUtility.DoExplosion(self,20,0,40,10,DE_NOBLEED|DE_NOSPLASH|DE_HOWL,'Corroded',tracer); + SWWMUtility.DoExplosion(self,20,0,50,15,DE_NOBLEED|DE_NOSPLASH|DE_HOWL,'Corroded',tracer); Destroy(); } } @@ -1092,7 +1115,7 @@ Class CorrosiveFlechette : Actor c = CorrodeDebuff(Spawn("CorrodeDebuff",a.pos)); c.AttachToOwner(a); } - c.Amount = clamp(c.Amount+20,100,c.MaxAmount); + c.Amount = clamp(c.Amount+25,100,c.MaxAmount); c.cnt = 0; c.instigator = target; c.A_StartSound("spreadgun/corrode",CHAN_VOICE,CHANF_DEFAULT);