Deep Impact buff.

Track parrying kills separately.
This commit is contained in:
Mari the Deer 2021-03-20 23:20:19 +01:00
commit 186f949859
6 changed files with 24 additions and 14 deletions

View file

@ -608,6 +608,7 @@ SWWM_UNIT_LITER = "l";
SWWM_YOURSELF = "Yourself";
SWWM_DOKIDOKI = "The Power of Love™";
SWWM_GRAVKILL = "Gravity";
SWWM_PARRYKILL = "Deflected Projectiles";
SWWM_SETSLOTSTRICT = "\cg!!!WARNING!!!\c-\n\cj\"setslotstrict\" is enabled. This will cause SWWM GZ weapons to not have slots assigned. Please go into Miscellaneous Options and toggle the \"Strict KEYCONF Weapons/Players\" setting.\c-";
SWWM_FCBSEL = "1.150 FCB";
SWWM_XSBSEL = "1.150 XSB";

View file

@ -531,6 +531,7 @@ SWWM_TITLESCROLL = "SWWM GZ ~ Cute Robutt Whomst Love To Explode Demons\n"
SWWM_YOURSELF = "Tú";
SWWM_DOKIDOKI = "El Poder del Amor™";
SWWM_GRAVKILL = "Gravedad";
SWWM_PARRYKILL = "Proyectiles Devueltos";
SWWM_SETSLOTSTRICT = "\cg!!!ADVERTENCIA!!!\c-\n\cj\"setslotstrict\" está activado. Esto causará que las armas de SWWM GZ no tengan ranuras asignadas. Por favor, ve a Opciones Misceláneas y cambia la opción de \"KEYCONF de Armas/Jugadores estricto\".\c-";
SWWM_WIDESPREAD = "Modo Amplio";
SWWM_TIGHTSPREAD = "Modo Concentrado";

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r382 \cu(Sat 20 Mar 22:50:48 CET 2021)\c-";
SWWM_SHORTVER="\cw0.9.11b-pre r382 \cu(2021-03-20 22:50:48)\c-";
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r383 \cu(Sat 20 Mar 23:20:19 CET 2021)\c-";
SWWM_SHORTVER="\cw0.9.11b-pre r383 \cu(2021-03-20 23:20:19)\c-";

View file

@ -2563,6 +2563,7 @@ Class DemolitionistMenu : GenericMenu
else if ( stats.wstats[stats.favweapon].w == 'SWWMGesture' ) str = str..StringTable.Localize("$SWWM_DOKIDOKI");
else if ( stats.wstats[stats.favweapon].w == 'SWWMItemGesture' ) str = str..StringTable.Localize("$T_FROGGY");
else if ( stats.wstats[stats.favweapon].w == 'Weapon' ) str = str..StringTable.Localize("$SWWM_GRAVKILL");
else if ( stats.wstats[stats.favweapon].w == 'DoomWeapon' ) str = str..StringTable.Localize("$SWWM_PARRYKILL");
else
{
let def = GetDefaultByType(stats.wstats[stats.favweapon].w);

View file

@ -64,8 +64,9 @@ Class SWWMStats : Thinker
Class<Weapon> which = myplayer.ReadyWeapon?myplayer.ReadyWeapon.GetClass():null;
if ( inflictor is 'Weapon' ) which = Weapon(inflictor).GetClass();
if ( which is 'DualExplodiumGun' ) which = 'ExplodiumGun'; // don't credit sister weapon
if ( inflictor.FindInventory("ParriedBuff") ) which = 'DoomWeapon'; // gross hack
// properly credit some projectiles to their respective gun
if ( inflictor is 'AirBullet' ) which = 'DeepImpact';
else if ( inflictor is 'AirBullet' ) which = 'DeepImpact';
else if ( inflictor is 'PusherProjectile' ) which = 'PusherWeapon';
else if ( (inflictor is 'ExplodiumMagArm') || (inflictor is 'ExplodiumMagProj') || (inflictor is 'ExplodiumBulletImpact') ) which = 'ExplodiumGun';
else if ( (inflictor is 'DragonBreathArm') || ((inflictor is 'SaltImpact') && !inflictor.Args[0]) || ((inflictor is 'SaltBeam') && !inflictor.Args[1]) || (inflictor is 'CorrodeDebuff') || (inflictor is 'CorrosiveFlechette') || ((inflictor is 'TheBall') && !inflictor.special1) || (inflictor is 'GoldenImpact') || (inflictor is 'GoldenSubImpact') || (inflictor is 'GoldenSubSubImpact') ) which = 'Spreadgun';

View file

@ -147,8 +147,8 @@ Class DeepImpact : SWWMWeapon
dir = (x+y*cos(j)*i+z*sin(j)*i).unit();
t.hitlist.Clear();
t.hitdist.Clear();
t.Trace(origin,level.PointInSector(origin.xy),dir,150-i*120,0);
SWWMBulletTrail.DoTrail(self,origin,dir,150-i*120,0);
t.Trace(origin,level.PointInSector(origin.xy),dir,250-i*150,0);
SWWMBulletTrail.DoTrail(self,origin,dir,250-i*150,0);
for ( int i=0; i<t.hitlist.Size(); i++ )
{
int inl = -1;
@ -191,7 +191,7 @@ Class DeepImpact : SWWMWeapon
else hitnormal = t.Results.HitSector.ceilingplane.Normal;
wnorm += (hitnormal*.2-dir)/max(50.,t.Results.Distance);
}
if ( swwm_omnibust ) BusterWall.Bust(t.Results,int(5*(1.-clamp(t.Results.Distance/150.,0.,1.))),self,t.Results.HitVector,t.Results.HitPos.z);
if ( swwm_omnibust ) BusterWall.Bust(t.Results,int(5*(1.-clamp(t.Results.Distance/250.,0.,1.))),self,t.Results.HitVector,t.Results.HitPos.z);
}
rings += 5;
}
@ -205,7 +205,7 @@ Class DeepImpact : SWWMWeapon
{
Vector3 avgdir = list[i].avgdir/list[i].nhits;
double avgdist = list[i].avgdist/list[i].nhits;
double dmg = 5000.*(1.-clamp(avgdist/200.,0.,1.));
double dmg = 5000.*(1.-clamp(avgdist/250.,0.,1.));
SWWMUtility.DoKnockback(list[i].a,avgdir,dmg*35.);
list[i].a.DamageMobj(invoker,self,int(dmg/350.),'Push',DMG_THRUSTLESS);
}
@ -213,18 +213,24 @@ Class DeepImpact : SWWMWeapon
Actor m;
while ( m = Actor(ti.Next()) )
{
if ( !m.bMISSILE ) continue;
double rdist = level.Vec3Diff(origin,m.pos).length();
Vector3 rdir = level.Vec3Diff(origin,m.pos).unit();
if ( LineTrace(atan2(rdir.y,rdir.x),rdist,asin(-rdir.z),TRF_THRUACTORS|TRF_ABSPOSITION,origin.z,origin.x,origin.y) || (rdist > 150) || (rdir dot x < .35) ) continue;
if ( !(m.bMISSILE && !m.IsZeroDamage() && (m.target != self)) ) continue;
Vector3 rdir = level.Vec3Diff(origin,m.pos);
double rdist = rdir.length();
if ( rdist <= 0. ) continue;
rdir /= rdist;
if ( LineTrace(atan2(rdir.y,rdir.x),rdist,asin(-rdir.z),TRF_THRUACTORS|TRF_ABSPOSITION,origin.z,origin.x,origin.y) || (rdist > 250) || (rdir dot x < .75) ) continue;
m.speed = m.vel.length();
m.vel = m.speed*1.5*(-m.vel.unit()*.4+rdir).unit();
Vector3 ndir = m.vel.unit();
m.angle = atan2(ndir.y,ndir.x);
m.pitch = asin(-ndir.z);
if ( m.target == self ) continue;
if ( m.bSEEKERMISSILE ) m.tracer = m.target;
m.target = self;
if ( !m.FindInventory("ParriedBuff") )
{
let pb = Inventory(Spawn("ParriedBuff"));
pb.AttachToOwner(m);
}
}
int numpt = Random[Impact](7,12);
for ( int i=0; i<numpt; i++ )
@ -320,13 +326,13 @@ Class DeepImpact : SWWMWeapon
XZW2 A 1 A_DryFire();
XZW2 QR 2;
XZW2 TU 3;
XZW2 A 4;
XZW2 A 2;
Goto Ready;
Fire:
XZW2 A 0 A_JumpIf(invoker.ClipCount<=0,"DryFire");
XZW2 A 1 A_Air();
XZW2 QR 2;
XZW2 STUA 3;
XZW2 STU 3;
Goto Ready;
AltFire:
XZW2 A 0 A_JumpIf(invoker.ClipCount<100,"Reload");