From d64e4872311988fa7542e329af0f34952e6675d2 Mon Sep 17 00:00:00 2001 From: Marisa the Magician Date: Fri, 22 Jul 2022 22:34:08 +0200 Subject: [PATCH] Sheen rebalancing. --- language.version | 4 +- zscript/dlc1/swwm_ammoitems_dlc.zsc | 4 +- zscript/dlc1/swwm_heavymahsheengun.zsc | 57 ++++++++++++----------- zscript/dlc1/swwm_heavymahsheengun_fx.zsc | 13 +++--- zscript/weapons/swwm_shot.zsc | 5 +- 5 files changed, 44 insertions(+), 39 deletions(-) diff --git a/language.version b/language.version index 9d6ff6520..d4a79d523 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r197 \cu(Fri 22 Jul 20:20:58 CEST 2022)\c-"; -SWWM_SHORTVER="\cw1.3pre r197 \cu(2022-07-22 20:20:58)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r197 \cu(Fri 22 Jul 22:34:08 CEST 2022)\c-"; +SWWM_SHORTVER="\cw1.3pre r197 \cu(2022-07-22 22:34:08)\c-"; diff --git a/zscript/dlc1/swwm_ammoitems_dlc.zsc b/zscript/dlc1/swwm_ammoitems_dlc.zsc index 37e4f4558..976cbb2a5 100644 --- a/zscript/dlc1/swwm_ammoitems_dlc.zsc +++ b/zscript/dlc1/swwm_ammoitems_dlc.zsc @@ -58,10 +58,10 @@ Class SheenAmmo : SWWMAmmo { Tag "$T_SHEENBULLET"; SWWMAmmo.PickupTag "SHEENBULLET"; - Stamina 400; + Stamina 600; Inventory.Amount 1; Inventory.MaxAmount 300; - Ammo.BackpackAmount 60; + Ammo.BackpackAmount 20; Ammo.BackpackMaxAmount 900; Ammo.DropAmount 10; +FLOATBOB; diff --git a/zscript/dlc1/swwm_heavymahsheengun.zsc b/zscript/dlc1/swwm_heavymahsheengun.zsc index 404cb9a03..fec7b53b8 100644 --- a/zscript/dlc1/swwm_heavymahsheengun.zsc +++ b/zscript/dlc1/swwm_heavymahsheengun.zsc @@ -31,6 +31,11 @@ Class HeavyMahSheenGun : SWWMWeapon c.vel += vel*.5; } + override Vector3 GetTraceOffset() + { + return (10,0,-4); + } + action void A_SheenFire() { double spreadfct = (1.+invoker.aimerror+(invoker.barrelheat/50.)+invoker.firespeed**2.); @@ -89,7 +94,8 @@ Class HeavyMahSheenGun : SWWMWeapon if ( !invoker.st ) invoker.st = new("SpreadSlugTracer"); let st = invoker.st; // thanks zscript st.ignoreme = self; - st.penetration = 80.; + st.penetration = 60.+invoker.barrelheat/5.; + st.resist = .6+invoker.barrelheat/500.; st.hitlist.Clear(); st.shootthroughlist.Clear(); st.waterhitlist.Clear(); @@ -166,32 +172,30 @@ Class HeavyMahSheenGun : SWWMWeapon s.speed *= .7; s.vel += vel*.5+x*FRandom[Sheen](1.,3.); } - if ( st.Results.Distance > 200. ) + int trail = CVar.GetCVar('swwm_funtrails',player).GetInt(); + if ( trail == 8 ) trail = Random[Sheen](1,7); + else if ( trail == 9 ) trail = 2+(invoker.shotcnt%6); + else if ( trail == 10 ) switch ( invoker.shotcnt%5 ) { - int trail = CVar.GetCVar('swwm_funtrails',player).GetInt(); - if ( trail == 8 ) trail = Random[Sheen](1,7); - else if ( trail == 9 ) trail = 2+(invoker.shotcnt%6); - else if ( trail == 10 ) switch ( invoker.shotcnt%5 ) - { - case 0: - case 3: - trail = 8; - break; - case 1: - case 4: - trail = 9; - break; - case 2: - trail = 1; - break; - } - let t = Spawn("SheenTrail",origin); - t.target = self; - t.angle = atan2(dir.y,dir.x); - t.pitch = asin(-dir.z); - t.specialf1 = st.Results.Distance; - t.frame = trail; + case 0: + case 3: + trail = 8; + break; + case 1: + case 4: + trail = 9; + break; + case 2: + trail = 1; + break; } + let t = Spawn("SheenTrail",origin); + t.target = self; + t.angle = atan2(dir.y,dir.x); + t.pitch = asin(-dir.z); + t.specialf1 = st.Results.Distance; + t.specialf2 = invoker.barrelheat; + t.frame = trail; invoker.shotcnt++; } action void A_CheckContinueFire() @@ -214,8 +218,7 @@ Class HeavyMahSheenGun : SWWMWeapon override void DoEffect() { Super.DoEffect(); - if ( incooldown ) barrelheat = max(0.,barrelheat*.995-.1); - else barrelheat = max(0.,barrelheat*.99-.15); + barrelheat = max(0.,barrelheat*.99-.15); bool hascooled = false; if ( barrelheat <= 0. ) { diff --git a/zscript/dlc1/swwm_heavymahsheengun_fx.zsc b/zscript/dlc1/swwm_heavymahsheengun_fx.zsc index f8cff7533..6d2a7248d 100644 --- a/zscript/dlc1/swwm_heavymahsheengun_fx.zsc +++ b/zscript/dlc1/swwm_heavymahsheengun_fx.zsc @@ -41,6 +41,7 @@ Class SheenTrail : Actor Default { Obituary "$O_SHEENHMG"; + DamageType "Fire"; +NOBLOCKMAP; +NOGRAVITY; +DONTSPLASH; @@ -62,24 +63,24 @@ Class SheenTrail : Actor if ( CurState == SpawnState ) { Vector3 dir = (cos(angle)*cos(pitch),sin(angle)*cos(pitch),-sin(pitch)); - Vector3 newpos = level.Vec3Offset(pos,dir*min(speed,specialf1)); + Vector3 newpos = level.Vec3Offset(oldpos,dir*min(speed,specialf1)); special1++; for ( int i=0; i<4; i++ ) { - let p = Spawn("SheenPhantom",level.Vec3Offset(pos,dir*(i+1)*50.)); + let p = Spawn("SheenPhantom",level.Vec3Offset(oldpos,dir*(i+1)*50.)); p.angle = angle; p.pitch = pitch; p.frame = frame; p.alpha *= clamp((special1+i*.25)/2.,.25,1.); } // burn the air throughout - Vector3 tdir = level.Vec3Diff(pos,newpos); + Vector3 tdir = level.Vec3Diff(oldpos,newpos); double dist = tdir.length(); tdir /= dist; - for ( int i=0; i= int(penetration)) || Results.HitActor.bNODAMAGE ) + if ( ((Results.HitActor.Health*(1.-resist)) >= penetration) || Results.HitActor.bNODAMAGE ) { ent.hitdamage = int(penetration); penetration = 0; @@ -97,7 +98,7 @@ Class SpreadSlugTracer : SpreadgunTracer { int gibh = (Results.HitActor.GibHealth!=int.min)?-abs(Results.HitActor.GibHealth):-int(Results.HitActor.GetSpawnHealth()*gameinfo.gibfactor); ent.hitdamage = min(Results.HitActor.health+abs(gibh),int(penetration)); - penetration = max(0,penetration-ent.hitdamage); + penetration = max(0,penetration-(ent.hitdamage*(1.-resist))); } hitlist.Push(ent); if ( penetration <= 0 ) return TRACE_Stop;