Sheen rebalancing.
This commit is contained in:
parent
57253d5434
commit
d64e487231
5 changed files with 46 additions and 41 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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. )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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<dist; i+=25 )
|
||||
for ( int i=0; i<dist; i+=50 )
|
||||
{
|
||||
SetOrigin(level.Vec3Offset(pos,tdir*i),true);
|
||||
SWWMUtility.DoExplosion(self,min(5*special1,30),2000,50,damagetype:'Fire',ignoreme:target);
|
||||
SetOrigin(level.Vec3Offset(oldpos,tdir*i),true);
|
||||
SWWMUtility.DoExplosion(self,min(4*special1+i/50,10)+int(specialf2/10),2000,50,ignoreme:target);
|
||||
}
|
||||
prev = oldpos; // interpolation
|
||||
SetOrigin(newpos,true);
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ Class SpreadgunTracer : LineTracer
|
|||
Class SpreadSlugTracer : SpreadgunTracer
|
||||
{
|
||||
double penetration; // please don't laugh
|
||||
double resist; // resistance against penetration loss (1.0 = don't lose)
|
||||
|
||||
override ETraceStatus TraceCallback()
|
||||
{
|
||||
|
|
@ -88,7 +89,7 @@ Class SpreadSlugTracer : SpreadgunTracer
|
|||
ent.hitactor = Results.HitActor;
|
||||
ent.hitlocation = Results.HitPos;
|
||||
ent.x = Results.HitVector;
|
||||
if ( (Results.HitActor.Health >= 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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue