From 681c7621abe00449861e8fb60d6f7518458187a6 Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Thu, 21 Jan 2021 13:13:14 +0100 Subject: [PATCH] More rebalancing. Fix 'give keys' cheat. --- language.version | 2 +- zscript/swwm_player.zsc | 20 +++++++++++--------- zscript/swwm_shot.zsc | 35 ++++++++++------------------------- 3 files changed, 22 insertions(+), 35 deletions(-) diff --git a/language.version b/language.version index df509f0c0..30578b3dd 100644 --- a/language.version +++ b/language.version @@ -1,2 +1,2 @@ [default] -SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r773 \cu(Thu 21 Jan 10:57:49 CET 2021)"; +SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r774 \cu(Thu 21 Jan 13:13:14 CET 2021)"; diff --git a/zscript/swwm_player.zsc b/zscript/swwm_player.zsc index 94235de6d..4f13a3e7c 100644 --- a/zscript/swwm_player.zsc +++ b/zscript/swwm_player.zsc @@ -251,17 +251,19 @@ Class Demolitionist : PlayerPawn { for ( int i=0; i)(AllActorClasses[i]); + if ( !type ) continue; + let keyitem = GetDefaultByType(type); if ( keyitem.special1 ) { - let item = Inventory(Spawn(AllActorClasses[i])); + let rep = GetReplacement(type); // handle replaced keys + if ( !(rep is 'Key') ) continue; + // iwad restrictions (vanilla doesn't care, but here they'll show in the inventory) + if ( !(gameinfo.gametype&GAME_HERETIC) && ((rep is 'SWWMKeyGreen') || (rep is 'SWWMKeyBlue') || (rep is 'SWWMKeyYellow')) ) + continue; + if ( !(gameinfo.gametype&GAME_DOOMCHEX) && ((rep is 'SWWMRedCard') || (rep is 'SWWMBlueCard') || (rep is 'SWWMYellowCard')) ) + continue; + let item = Inventory(Spawn(rep)); SWWMHandler.KeyTagFix(item); if ( item is 'SWWMKey' ) SWWMKey(item).propagated = true; // no anim if ( !item.CallTryPickup(self) ) item.Destroy(); diff --git a/zscript/swwm_shot.zsc b/zscript/swwm_shot.zsc index 1f0f9914e..ab77f8a7a 100644 --- a/zscript/swwm_shot.zsc +++ b/zscript/swwm_shot.zsc @@ -836,22 +836,7 @@ Class BallImpact : Actor } } -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 +Class CorrodeSmoke : SWWMHalfSmoke { Default { @@ -894,9 +879,8 @@ 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*8,0,int(Amount*.7)); // prevent "escalating" spread } - else if ( c.Amount < int(Amount*.6) ) c.Amount = clamp(c.Amount+Damage*8,0,int(Amount*.6)); // prevent "escalating" spread + 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 } @@ -920,23 +904,24 @@ Class CorrodeDebuff : Inventory if ( justdied ) { maxrad += 50; - Amount = max(100,Amount+50); + Amount = max(100,Amount); 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); + if ( !wasalive ) maxrad += 20; + SWWMUtility.DoExplosion(self,clamp(Amount/8,1,50),0,maxrad*1.2,maxrad*.9,DE_NOBLEED|DE_NOSPLASH|DE_HOWL,'Corroded',Owner); + int smokefact = int(clamp(maxrad/32.,1,8)); + int numpt = Random[Corrode](-1,1*smokefact); + if ( justdied ) numpt = Random[Corrode](4,6)*smokefact; for ( int i=0; i 0);