More rebalancing.
Fix 'give keys' cheat.
This commit is contained in:
parent
687f1c534d
commit
681c7621ab
3 changed files with 22 additions and 35 deletions
|
|
@ -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)";
|
||||
|
|
|
|||
|
|
@ -251,17 +251,19 @@ Class Demolitionist : PlayerPawn
|
|||
{
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
{
|
||||
if ( !(AllActorClasses[i] is "Key") ) continue;
|
||||
// clean up redundant keys
|
||||
if ( !(gameinfo.gametype&GAME_Chex) && ((AllActorClasses[i] is 'ChexRedCard') || (AllActorClasses[i] is 'ChexBlueCard') || (AllActorClasses[i] is 'ChexYellowCard')) ) continue;
|
||||
else if ( (gameinfo.gametype&GAME_Chex) && !(AllActorClasses[i] is 'ChexRedCard') && !(AllActorClasses[i] is 'ChexBlueCard') && !(AllActorClasses[i] is 'ChexYellowCard') ) continue;
|
||||
// don't give heretic keys in doom
|
||||
if ( (gameinfo.gametype&GAME_DoomChex) && ((AllActorClasses[i] is 'KeyYellow') || (AllActorClasses[i] is 'KeyGreen') || (AllActorClasses[i] is 'KeyBlue')) ) continue;
|
||||
let rep = GetReplacement(AllActorClasses[i]); // handle replacements, just in case
|
||||
let keyitem = GetDefaultByType(rep);
|
||||
let type = (Class<Key>)(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();
|
||||
|
|
|
|||
|
|
@ -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<numpt; i++ )
|
||||
{
|
||||
let s = Spawn(justdied?"CorrodeSmoke":"CorrodeHalfSmoke",level.Vec3Offset(Owner.pos,(.8*FRandom[Corrode](-Owner.radius,Owner.radius),.8*FRandom[Corrode](-Owner.radius,Owner.radius),FRandom[Corrode](.1*Owner.Height,.9*Owner.Height))));
|
||||
let s = Spawn("CorrodeSmoke",level.Vec3Offset(Owner.pos,(.8*FRandom[Corrode](-Owner.radius,Owner.radius),.8*FRandom[Corrode](-Owner.radius,Owner.radius),FRandom[Corrode](.1*Owner.Height,.9*Owner.Height))));
|
||||
s.vel = Owner.vel*.5;
|
||||
if ( justdied ) s.vel += (FRandom[Corrode](-1,1),FRandom[Corrode](-1,1),FRandom[Corrode](-1,1))*FRandom[Corrode](2.,4.);
|
||||
else if ( !wasalive ) s.vel += (FRandom[Corrode](-1,1),FRandom[Corrode](-1,1),FRandom[Corrode](-1,1))*FRandom[Corrode](.2,2.);
|
||||
else s.vel += (FRandom[Corrode](-1,1),FRandom[Corrode](-1,1),FRandom[Corrode](-1,1))*FRandom[Corrode](.1,1.);
|
||||
s.scale *= FRandom[Corrode](2.,3.);
|
||||
s.alpha *= Clamp(Amount/10.,0.,.6);
|
||||
if ( justdied ) s.special1 = Random[Corrode](0,2);
|
||||
if ( justdied ) s.special1 = Random[Corrode](0,1);
|
||||
}
|
||||
}
|
||||
wasalive = (Owner && Owner.Health > 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue