CREATORJD commited on
Commit
88bc9d6
·
verified ·
1 Parent(s): 99a7d29

1.33.17 burn FX + asphalt

Browse files
Files changed (1) hide show
  1. src/game/sim.js +18 -0
src/game/sim.js CHANGED
@@ -3196,6 +3196,20 @@ function depositAt(x,y,rad){
3196
  const craters=[], wrecks=[], rocks=[], trees=[], crystals=[], rubbles=[];
3197
  function addRubble(x,y,s){ rubbles.push({x,y,s,a:Math.random()*TAU,ts:stats.t}); if(rubbles.length>90) rubbles.shift(); }
3198
  function addCrater(x,y,s){ craters.push({x,y,s,a:Math.random()*TAU}); if(craters.length>220) craters.shift(); }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3199
  /* ================= RECLAMATION =============================================
3200
  Nothing on this battlefield is ever fully destroyed — it is DEMOTED into raw
3201
  material. Your tanks, their tanks, your own factory, a derelict apartment
@@ -3830,6 +3844,10 @@ function addParticle(type,x,y,vx,vy,life,size,r,g,b){
3830
  fcr[i]=r; fcg[i]=g; fcb[i]=b;
3831
  }
3832
  function spawnExplosion(x,y,size,victimTeam){
 
 
 
 
3833
  addParticle(0,x,y,0,0,.2,size*2.6, 255,240,200); // flash
3834
  addParticle(6,x,y,rr(-4,4),rr(-8,-2),.5+size*0.014,size*2.6, 255,255,255); // 3D flipbook fireball
3835
  addParticle(3,x,y,0,0,.42,size*1.2, 255,180,90); // shock ring
 
3196
  const craters=[], wrecks=[], rocks=[], trees=[], crystals=[], rubbles=[];
3197
  function addRubble(x,y,s){ rubbles.push({x,y,s,a:Math.random()*TAU,ts:stats.t}); if(rubbles.length>90) rubbles.shift(); }
3198
  function addCrater(x,y,s){ craters.push({x,y,s,a:Math.random()*TAU}); if(craters.length>220) craters.shift(); }
3199
+ /* ---------------------------------------------------------------------------
3200
+ GROUND BURNS — the impact's thermal story, told by the terrain itself.
3201
+ An explosive strike leaves ground that GLOWS: embers in the crack network,
3202
+ cooling through red into char, then fading to ash. A kinetic strike tells a
3203
+ different story — no heat, just violently disturbed pale earth that settles.
3204
+ These are temporary by design; the painted scorch pass remains the
3205
+ permanent record underneath.
3206
+ kind: 1 = explosive/thermal, 0 = kinetic.
3207
+ --------------------------------------------------------------------------- */
3208
+ const groundBurns=[];
3209
+ function addGroundBurn(x,y,r,kind){
3210
+ groundBurns.push({x,y,r,kind:kind?1:0,t0:stats.t});
3211
+ if(groundBurns.length>64) groundBurns.shift();
3212
+ }
3213
  /* ================= RECLAMATION =============================================
3214
  Nothing on this battlefield is ever fully destroyed — it is DEMOTED into raw
3215
  material. Your tanks, their tanks, your own factory, a derelict apartment
 
3844
  fcr[i]=r; fcg[i]=g; fcb[i]=b;
3845
  }
3846
  function spawnExplosion(x,y,size,victimTeam){
3847
+ /* Powerful detonations cook the ground; light kinetic strikes only chew it.
3848
+ The threshold keeps small-arms chatter from carpeting the field. */
3849
+ if(size>=16) addGroundBurn(x,y,size*2.1,1);
3850
+ else if(size>=9) addGroundBurn(x,y,size*1.7,0);
3851
  addParticle(0,x,y,0,0,.2,size*2.6, 255,240,200); // flash
3852
  addParticle(6,x,y,rr(-4,4),rr(-8,-2),.5+size*0.014,size*2.6, 255,255,255); // 3D flipbook fireball
3853
  addParticle(3,x,y,0,0,.42,size*1.2, 255,180,90); // shock ring