Divine Sprite fully implemented.

This commit is contained in:
Mari the Deer 2021-09-06 13:02:14 +02:00
commit b917ac95b1
19 changed files with 198 additions and 96 deletions

View file

@ -82,6 +82,17 @@ HardwareShader PostProcess scene
Uniform float xtrastr
}
HardwareShader PostProcess scene
{
Name "DivineShader"
Shader "shaders/pp/Diviscreen.fp" 330
Texture BumpTex "textures/frosttex.png"
Texture WarpTex "textures/smoketex.png"
Texture NoiseTex "textures/graynoise.png"
Uniform float timer
Uniform float str
}
HardwareShader PostProcess scene
{
Name "Glitch"

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.1pre r3 \cu(Sat 4 Sep 23:04:00 CEST 2021)\c-";
SWWM_SHORTVER="\cw1.1pre r3 \cu(2021-09-04 23:04:00)\c-";
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.1pre r4 \cu(Mon 6 Sep 13:02:14 CEST 2021)\c-";
SWWM_SHORTVER="\cw1.1pre r4 \cu(2021-09-06 13:02:14)\c-";

View file

@ -35,7 +35,7 @@ Key gestures:
# Post-release stuff
Extra items:
- Safety Tether
x Safety Tether
x Devastation Sigil
x Divine Sprite

37
shaders/pp/Diviscreen.fp Normal file
View file

@ -0,0 +1,37 @@
// the ultimate refreshment
void main()
{
vec2 uv = TexCoord;
vec2 bresl = textureSize(InputTexture,0);
vec2 sr = vec2(1.,bresl.y/bresl.x);
vec3 ice = texture(BumpTex,uv*sr*4.).xyz;
vec2 ofs = (ice.xy-.5)*2.;
ofs *= pow(length(ofs),.25)*.4*str;
float dist = distance(uv,vec2(.5))*2.;
float distfct = clamp(pow(dist,1.2)*.85-(.75+.5*(1.-str)),0.,1.);
ofs *= distfct;
vec3 col = texture(InputTexture,uv+ofs).rgb;
col += pow(max(0,ice.z),1.45)*.65*str*distfct;
float str2 = str*(.9+texture(NoiseTex,vec2(timer*.05)).x*.2);
float ang = timer*.05;
uv *= sr;
uv.x += 1.*sr.x;
vec2 uv2 = vec2(uv.x*cos(ang)-uv.y*sin(ang),uv.y*cos(ang)+uv.x*sin(ang))*1.3;
float smk = texture(WarpTex,uv2).x;
uv.y -= 2.*sr.y;
ang = timer*.03;
uv2 = vec2(uv.x*cos(ang)-uv.y*sin(ang),uv.y*cos(ang)+uv.x*sin(ang))*1.5;
smk += texture(WarpTex,uv2).x;
uv.x -= 3.*sr.x;
ang = timer*.04;
uv2 = vec2(uv.x*cos(ang)-uv.y*sin(ang),uv.y*cos(ang)+uv.x*sin(ang))*1.6;
smk += texture(WarpTex,uv2).x;
uv.y += 4.*sr.y;
ang = timer*.02;
uv2 = vec2(uv.x*cos(ang)-uv.y*sin(ang),uv.y*cos(ang)+uv.x*sin(ang))*1.2;
smk += texture(WarpTex,uv2).x;
smk = pow(max(0,smk*.25),4.);
col += vec3(.8,1.,1.2)*smk*2.*str2;
FragColor = vec4(col,1.);
}

View file

@ -6,17 +6,17 @@ void main()
{
vec2 uv = TexCoord;
vec3 col = texture(InputTexture,uv).rgb;
col *= vec3(.8)+texture(WarpTex,vec2(fract(uv.x+.1*sin(uv.y*TWOPI)),fract(uv.y-timer*.1))).rgb*xtrastr*.4;
col *= vec3(.8)+texture(WarpTex,2.*vec2(fract(uv.x+.1*cos(uv.y*TWOPI)),fract(uv.y-timer*.1))).rgb*xtrastr*.4;
for ( float i=0.; i<3.; i+=1. )
col *= vec3(.6)+texture(WarpTex,vec2(fract(uv.x+.1*sin(uv.y*TWOPI)),fract(uv.y-timer*.1))).rgb*xtrastr*.8;
col *= vec3(.6)+texture(WarpTex,2.*vec2(fract(uv.x+.1*cos(uv.y*TWOPI)),fract(uv.y-timer*.1))).rgb*xtrastr*.8;
for ( float i=0.; i<4.; i+=1. )
{
float str = texture(NoiseTex,vec2(fract(timer*.2),fract(timer*.02))).x*.007;
str *= pow(xtrastr,2.);
float str = texture(NoiseTex,vec2(fract(timer*.2),fract(timer*.02))).x*.01;
str *= pow(xtrastr,.75);
float p = distance(uv,vec2(.5));
vec2 suv = (uv-.5)*(1.-(str*i*p))+.5;
col += texture(InputTexture,suv).rgb+pow(p,5.)*vec3(.45,.05,0.)*xtrastr;
}
col /= 4.;
col *= vec3(1.1,.95,.85);
col /= 5.;
col *= vec3(1.2,.9,.7);
FragColor = vec4(col,1.0);
}

View file

@ -1036,6 +1036,16 @@ powerup/devastationend sounds/items/devaoff.ogg
powerup/divineuse sounds/items/divion.ogg
powerup/divineamb sounds/items/diviamb.ogg
powerup/divineact sounds/items/diviact.ogg
powerup/divinehit1 sounds/items/divihit1.ogg
powerup/divinehit2 sounds/items/divihit2.ogg
powerup/divinehit3 sounds/items/divihit3.ogg
powerup/divinehit4 sounds/items/divihit4.ogg
powerup/divinehit5 sounds/items/divihit5.ogg
powerup/divinehit6 sounds/items/divihit6.ogg
powerup/divinehit7 sounds/items/divihit7.ogg
powerup/divinehit8 sounds/items/divihit8.ogg
$random powerup/divinehit { powerup/divinehit1 powerup/divinehit2 powerup/divinehit3 powerup/divinehit4 powerup/divinehit5 powerup/divinehit6 powerup/divinehit7 powerup/divinehit8 }
$limit powerup/divinehit 16
powerup/divineend sounds/items/diviend.ogg
powerup/tetheruse sounds/items/tetheruse.ogg
powerup/tetherfail sounds/items/tetherfail.ogg

BIN
sounds/items/diviact.ogg Normal file

Binary file not shown.

BIN
sounds/items/diviend.ogg Normal file

Binary file not shown.

BIN
sounds/items/divihit1.ogg Normal file

Binary file not shown.

BIN
sounds/items/divihit2.ogg Normal file

Binary file not shown.

BIN
sounds/items/divihit3.ogg Normal file

Binary file not shown.

BIN
sounds/items/divihit4.ogg Normal file

Binary file not shown.

BIN
sounds/items/divihit5.ogg Normal file

Binary file not shown.

BIN
sounds/items/divihit6.ogg Normal file

Binary file not shown.

BIN
sounds/items/divihit7.ogg Normal file

Binary file not shown.

BIN
sounds/items/divihit8.ogg Normal file

Binary file not shown.

BIN
sounds/items/divion.ogg Normal file

Binary file not shown.

View file

@ -2,17 +2,19 @@
extend Class SWWMHandler
{
static clearscope void ClearAllShaders( PlayerInfo p )
static clearscope void ClearAllShaders( PlayerInfo p, bool noscope = false )
{
Shader.SetEnabled(p,"WaterWarp",false);
Shader.SetEnabled(p,"LavaWarp",false);
Shader.SetEnabled(p,"SlimeWarp",false);
Shader.SetEnabled(p,"ZoomBlur",false);
Shader.SetEnabled(p,"SilverScope",false);
if ( !noscope ) Shader.SetEnabled(p,"SilverScope",false);
Shader.SetEnabled(p,"BarrierShader",false);
Shader.SetEnabled(p,"GhostShader",false);
Shader.SetEnabled(p,"InvinciShader",false);
Shader.SetEnabled(p,"RagekitShader",false);
Shader.SetEnabled(p,"DevastationShader",false);
Shader.SetEnabled(p,"DivineShader",false);
Shader.SetEnabled(p,"Glitch",false);
Shader.SetEnabled(p,"Grain",false);
}
@ -21,10 +23,23 @@ extend Class SWWMHandler
{
PlayerInfo p = players[consoleplayer];
let mo = p.mo;
if ( !mo ) return;
bool pc = (p.camera == mo);
if ( !mo || !swwm_shaders || !pc )
{
if ( !swwm_shaders ) ClearAllShaders(p,true);
return;
}
let divi = DivineSpriteEffect(mo.FindInventory("DivineSpriteEffect"));
if ( divi )
{
Shader.SetEnabled(p,"DivineShader",true);
Shader.SetUniform1f(p,"DivineShader","timer",(gametic+e.FracTic)/GameTicRate);
double str = clamp((divi.AlphInter.GetValue()-1000.)/6000.,0.,1.)**2.;
Shader.SetUniform1f(p,"DivineShader","str",str);
}
else Shader.SetEnabled(p,"DevastationShader",false);
let deva = AngeryPower(mo.FindInventory("AngeryPower"));
if ( pc && deva && swwm_shaders )
if ( deva )
{
Shader.SetEnabled(p,"DevastationShader",true);
Shader.SetUniform1f(p,"DevastationShader","timer",(gametic+e.FracTic)/GameTicRate);
@ -33,7 +48,7 @@ extend Class SWWMHandler
}
else Shader.SetEnabled(p,"DevastationShader",false);
let rage = RagekitPower(mo.FindInventory("RagekitPower"));
if ( pc && rage && swwm_shaders )
if ( rage )
{
Shader.SetEnabled(p,"RagekitShader",true);
Shader.SetUniform1f(p,"RagekitShader","timer",(gametic+e.FracTic)/GameTicRate);
@ -42,10 +57,10 @@ extend Class SWWMHandler
}
else Shader.SetEnabled(p,"RagekitShader",false);
let ghost = GhostPower(mo.FindInventory("GhostPower"));
if ( pc && ghost && swwm_shaders ) Shader.SetEnabled(p,"GhostShader",true);
if ( ghost ) Shader.SetEnabled(p,"GhostShader",true);
else Shader.SetEnabled(p,"GhostShader",false);
let sunny = InvinciballPower(mo.FindInventory("InvinciballPower"));
if ( pc && sunny && swwm_shaders )
if ( sunny )
{
Shader.SetEnabled(p,"InvinciShader",true);
double str = max(0,sunny.lastpulse-(gametic+e.Fractic))/35.;
@ -53,82 +68,13 @@ extend Class SWWMHandler
}
else Shader.SetEnabled(p,"InvinciShader",false);
let coat = BarrierPower(mo.FindInventory("BarrierPower"));
if ( pc && coat && swwm_shaders )
if ( coat )
{
Shader.SetEnabled(p,"BarrierShader",true);
Shader.SetUniform1f(p,"BarrierShader","timer",(gametic+e.FracTic)/GameTicRate);
}
else Shader.SetEnabled(p,"BarrierShader",false);
if ( pc && (mo is 'Demolitionist') && swwm_shaders )
{
let demo = Demolitionist(mo);
if ( demo.lastunder == Demolitionist.UNDER_WATER )
{
Shader.SetEnabled(p,"WaterWarp",true);
Shader.SetUniform1f(p,"WaterWarp","timer",(gametic+e.FracTic)/GameTicRate);
Shader.SetUniform1f(p,"WaterWarp","dfact",coat?.25:1.);
Shader.SetUniform3f(p,"WaterWarp","lightcol",(demo.undercol.r/255.,demo.undercol.g/255.,demo.undercol.b/255.));
}
else Shader.SetEnabled(p,"WaterWarp",false);
if ( demo.lastunder == Demolitionist.UNDER_LAVA )
{
Shader.SetEnabled(p,"LavaWarp",true);
Shader.SetUniform1f(p,"LavaWarp","timer",(gametic+e.FracTic)/GameTicRate);
Shader.SetUniform1f(p,"LavaWarp","dfact",coat?.25:1.);
Shader.SetUniform3f(p,"LavaWarp","lightcol",(demo.undercol.r/255.,demo.undercol.g/255.,demo.undercol.b/255.));
}
else Shader.SetEnabled(p,"LavaWarp",false);
if ( demo.lastunder == Demolitionist.UNDER_SLIME )
{
Shader.SetEnabled(p,"SlimeWarp",true);
Shader.SetUniform1f(p,"SlimeWarp","timer",(gametic+e.FracTic)/GameTicRate);
Shader.SetUniform1f(p,"SlimeWarp","dfact",coat?.25:1.);
Shader.SetUniform3f(p,"SlimeWarp","lightcol",(demo.undercol.r/255.,demo.undercol.g/255.,demo.undercol.b/255.));
}
else Shader.SetEnabled(p,"SlimeWarp",false);
int lastdmg = (demo.Health>0)?demo.lastdamage:Random[Flicker](60,80);
int lastdmgtic = (demo.Health>0)?demo.lastdamagetic:(gametic+Random[Flicker](30,20));
double noiz = min(lastdmg*.09*max(0,(lastdmgtic-(gametic+e.Fractic))/35.),.5);
Shader.SetEnabled(p,"Glitch",noiz>0);
Shader.SetEnabled(p,"Grain",noiz>0);
if ( noiz > 0 )
{
Shader.SetUniform1f(p,"Glitch","Timer",(gametic+e.FracTic)/GameTicRate);
Shader.SetUniform1f(p,"Grain","Timer",(gametic+e.FracTic)/GameTicRate);
Shader.SetUniform1f(p,"Grain","ni",noiz);
noiz = min(lastdmg*.08*max(0,(lastdmgtic-(gametic+e.Fractic))/35.),.8);
Shader.SetUniform1f(p,"Glitch","str1",noiz);
noiz = min(lastdmg*.03*max(0,(lastdmgtic-(gametic+e.Fractic))/35.),3.5);
Shader.SetUniform1f(p,"Glitch","str2",noiz);
}
if ( !demo.InStateSequence(demo.CurState,demo.FindState("Dash")) )
{
Shader.SetEnabled(p,"ZoomBlur",false);
return;
}
Shader.SetEnabled(p,"ZoomBlur",true);
Vector3 vel = demo.vel+demo.dashdir*demo.dashboost;
double baumpu = max(0.,(demo.bumptic-(gametic+e.Fractic))/35.);
vel += demo.dashdir*baumpu;
double spd = vel.length();
Vector3 worlddir = vel/spd;
Shader.SetUniform1f(p,"ZoomBlur","Fade",clamp((spd-20.)/60.,0.,1.));
double str = min(spd/40.,15.);
Vector3 x, y, z;
[x, y, z] = swwm_CoordUtil.GetAxes(e.ViewPitch,e.ViewAngle,e.ViewRoll);
Vector3 reldir = (worlddir dot y, worlddir dot z, worlddir dot x);
Vector2 centerspot = (.5+reldir.x*.5,.5+reldir.y*.5);
if ( reldir.z < 0 )
{
centerspot.x = 1.-centerspot.x;
centerspot.y = 1.-centerspot.y;
str *= -1;
}
Shader.SetUniform1f(p,"ZoomBlur","Str",str);
Shader.SetUniform2f(p,"ZoomBlur","CenterSpot",centerspot);
}
else
if ( !(mo is 'Demolitionist') )
{
Shader.SetEnabled(p,"WaterWarp",false);
Shader.SetEnabled(p,"LavaWarp",false);
@ -136,6 +82,73 @@ extend Class SWWMHandler
Shader.SetEnabled(p,"Glitch",false);
Shader.SetEnabled(p,"Grain",false);
Shader.SetEnabled(p,"ZoomBlur",false);
return;
}
let demo = Demolitionist(mo);
if ( demo.lastunder == Demolitionist.UNDER_WATER )
{
Shader.SetEnabled(p,"WaterWarp",true);
Shader.SetUniform1f(p,"WaterWarp","timer",(gametic+e.FracTic)/GameTicRate);
Shader.SetUniform1f(p,"WaterWarp","dfact",coat?.25:1.);
Shader.SetUniform3f(p,"WaterWarp","lightcol",(demo.undercol.r/255.,demo.undercol.g/255.,demo.undercol.b/255.));
}
else Shader.SetEnabled(p,"WaterWarp",false);
if ( demo.lastunder == Demolitionist.UNDER_LAVA )
{
Shader.SetEnabled(p,"LavaWarp",true);
Shader.SetUniform1f(p,"LavaWarp","timer",(gametic+e.FracTic)/GameTicRate);
Shader.SetUniform1f(p,"LavaWarp","dfact",coat?.25:1.);
Shader.SetUniform3f(p,"LavaWarp","lightcol",(demo.undercol.r/255.,demo.undercol.g/255.,demo.undercol.b/255.));
}
else Shader.SetEnabled(p,"LavaWarp",false);
if ( demo.lastunder == Demolitionist.UNDER_SLIME )
{
Shader.SetEnabled(p,"SlimeWarp",true);
Shader.SetUniform1f(p,"SlimeWarp","timer",(gametic+e.FracTic)/GameTicRate);
Shader.SetUniform1f(p,"SlimeWarp","dfact",coat?.25:1.);
Shader.SetUniform3f(p,"SlimeWarp","lightcol",(demo.undercol.r/255.,demo.undercol.g/255.,demo.undercol.b/255.));
}
else Shader.SetEnabled(p,"SlimeWarp",false);
int lastdmg = (demo.Health>0)?demo.lastdamage:Random[Flicker](60,80);
int lastdmgtic = (demo.Health>0)?demo.lastdamagetic:(gametic+Random[Flicker](30,20));
double noiz = min(lastdmg*.09*max(0,(lastdmgtic-(gametic+e.Fractic))/35.),.5);
Shader.SetEnabled(p,"Glitch",noiz>0);
Shader.SetEnabled(p,"Grain",noiz>0);
if ( noiz > 0 )
{
Shader.SetUniform1f(p,"Glitch","Timer",(gametic+e.FracTic)/GameTicRate);
Shader.SetUniform1f(p,"Grain","Timer",(gametic+e.FracTic)/GameTicRate);
Shader.SetUniform1f(p,"Grain","ni",noiz);
noiz = min(lastdmg*.08*max(0,(lastdmgtic-(gametic+e.Fractic))/35.),.8);
Shader.SetUniform1f(p,"Glitch","str1",noiz);
noiz = min(lastdmg*.03*max(0,(lastdmgtic-(gametic+e.Fractic))/35.),3.5);
Shader.SetUniform1f(p,"Glitch","str2",noiz);
}
if ( !demo.InStateSequence(demo.CurState,demo.FindState("Dash")) )
{
Shader.SetEnabled(p,"ZoomBlur",false);
return;
}
Shader.SetEnabled(p,"ZoomBlur",true);
Vector3 vel = demo.vel+demo.dashdir*demo.dashboost;
double baumpu = max(0.,(demo.bumptic-(gametic+e.Fractic))/35.);
vel += demo.dashdir*baumpu;
double spd = vel.length();
Vector3 worlddir = vel/spd;
Shader.SetUniform1f(p,"ZoomBlur","Fade",clamp((spd-20.)/60.,0.,1.));
double str = min(spd/40.,15.);
Vector3 x, y, z;
[x, y, z] = swwm_CoordUtil.GetAxes(e.ViewPitch,e.ViewAngle,e.ViewRoll);
Vector3 reldir = (worlddir dot y, worlddir dot z, worlddir dot x);
Vector2 centerspot = (.5+reldir.x*.5,.5+reldir.y*.5);
if ( reldir.z < 0 )
{
centerspot.x = 1.-centerspot.x;
centerspot.y = 1.-centerspot.y;
str *= -1;
}
Shader.SetUniform1f(p,"ZoomBlur","Str",str);
Shader.SetUniform2f(p,"ZoomBlur","CenterSpot",centerspot);
}
}

View file

@ -241,6 +241,15 @@ Class GrilledCheeseSandwich : Inventory
}
}
Mixin Class SWWMShadedPowerup
{
override Color GetBlend()
{
if ( swwm_shaders ) return 0;
return Super.GetBlend();
}
}
Class GhostSnd : Actor
{
Default
@ -334,6 +343,8 @@ Class GhostTarget : Actor
Class GhostPower : PowerInvisibility
{
Mixin SWWMShadedPowerup;
Actor snd;
Default
@ -569,6 +580,8 @@ Class GravSnd : Actor
Class GravityPower : Powerup
{
Mixin SWWMShadedPowerup;
Actor snd;
Default
@ -765,6 +778,8 @@ Class InvinciSnd : Actor
Class InvinciballPower : Powerup
{
Mixin SWWMShadedPowerup;
Actor l, snd;
int lasteffect;
transient int lastpulse;
@ -1014,6 +1029,8 @@ Class RageSnd : Actor
Class RagekitPower : Powerup
{
Mixin SWWMShadedPowerup;
Actor l, snd;
int lasteffect;
transient int lastpulse, lastrage;
@ -1071,7 +1088,7 @@ Class RagekitPower : Powerup
lastrage = SWWMHandler.AddOneliner("ragekit",2,5)+40;
Owner.A_QuakeEx(2,2,2,Random[Rage](1,2),0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:.5);
lastpulse = max(lastpulse,gametic+10);
Demolitionist(Owner).lastbump *= .98;
Demolitionist(Owner).lastbump *= .995;
}
}
@ -2071,6 +2088,8 @@ Class BarrierSnd : Actor
Class BarrierPower : PowerIronFeet
{
Mixin SWWMShadedPowerup;
Actor snd, l;
Default
@ -3164,6 +3183,8 @@ Class AngerySnd : Actor
}
Class AngeryPower : Powerup
{
Mixin SWWMShadedPowerup;
Actor l, snd;
int lasteffect;
transient int lastpulse;
@ -3392,7 +3413,7 @@ Class DivineSpriteSnd : Actor
return;
}
SetOrigin(target.pos,true);
double vol = clamp((target.Health-1000)/6000.,0.,1.);
double vol = clamp((DivineSpriteEffect(master).AlphInter.GetValue()-1000.)/9000.,0.,1.);
if ( players[consoleplayer].Camera == target )
{
A_SoundVolume(CHAN_VOICE,0.);
@ -3407,9 +3428,8 @@ Class DivineSpriteSnd : Actor
override void PostBeginPlay()
{
Super.PostBeginPlay();
double vol = target?clamp((target.Health-1000)/9000.,0.,1.):.1;
A_StartSound("powerup/divineact",CHAN_VOICE,CHANF_LOOP,.4*vol,1.5);
A_StartSound("powerup/divineact",CHAN_7,CHANF_LOOP,.8*vol,ATTN_NONE);
A_StartSound("powerup/divineact",CHAN_VOICE,CHANF_LOOP,.4,1.5);
A_StartSound("powerup/divineact",CHAN_7,CHANF_LOOP,.8,ATTN_NONE);
}
override void OnDestroy()
{
@ -3424,6 +3444,7 @@ Class DivineSpriteEffect : Inventory
int healtim;
bool bHealDone;
Actor l, snd;
DynamicValueInterpolator AlphInter;
Property HealTimer : healtim;
@ -3440,6 +3461,14 @@ Class DivineSpriteEffect : Inventory
return ( (healtim <= BLINKTHRESHOLD) && (healtim&8) );
}
override Color GetBlend()
{
if ( swwm_shaders ) return 0;
if ( !AlphInter ) AlphInter = DynamicValueInterpolator.Create(Owner.Health,.1,1,100);
double alph = clamp((AlphInter.GetValue()-1000.)/6000.,0.,1.);
return Color(int(64*alph),255,255,255);
}
override void Travelled()
{
Super.Travelled();
@ -3456,8 +3485,10 @@ Class DivineSpriteEffect : Inventory
snd.target = Owner;
snd.master = self;
int numpt = Random[ExploS](5,10);
double alph = clamp((Owner.Health-1000.)/6000.,0.,1.);
double scl = clamp((Owner.Health-1000.)/6000.,2.,4.);
if ( !AlphInter ) AlphInter = DynamicValueInterpolator.Create(Owner.Health,.1,1,100);
AlphInter.Update(Owner.Health);
double alph = clamp((AlphInter.GetValue()-1000.)/6000.,0.,1.);
double scl = clamp((AlphInter.GetValue()-1000.)/6000.,2.,4.);
for ( int i=0; i<numpt; i++ )
{
double ang = FRandom[ExploS](0,360);
@ -3469,7 +3500,7 @@ Class DivineSpriteEffect : Inventory
}
if ( bHealDone || (Owner.Health <= 0) )
{
if ( Owner.Health <= 1000 ) DepleteOrDestroy();
if ( AlphInter.GetValue() <= 1000 ) DepleteOrDestroy();
return;
}
healcnt++;