Different block explosion damage formula
This commit is contained in:
@@ -94,11 +94,12 @@ public class Damage{
|
||||
}
|
||||
|
||||
int waves = explosiveness <= 2 ? 0 : Mathf.clamp((int)(explosiveness / 11), 1, 25);
|
||||
float damagePerWave = Mathf.pow(explosiveness / 2f, 0.8f);
|
||||
|
||||
for(int i = 0; i < waves; i++){
|
||||
int f = i;
|
||||
Time.run(i * 2f, () -> {
|
||||
damage(ignoreTeam, x, y, Mathf.clamp(radius + explosiveness, 0, 50f) * ((f + 1f) / waves), explosiveness / 2f, false);
|
||||
damage(ignoreTeam, x, y, Mathf.clamp(radius + explosiveness, 0, 50f) * ((f + 1f) / waves), damagePerWave, false);
|
||||
Fx.blockExplosionSmoke.at(x + Mathf.range(radius), y + Mathf.range(radius));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1374,7 +1374,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
}
|
||||
|
||||
//cap explosiveness so fluid tanks/vaults don't instakill units
|
||||
Damage.dynamicExplosion(x, y, flammability, Math.min(explosiveness * 3.5f, 1000), power, tilesize * block.size / 2f, state.rules.damageExplosions, block.destroyEffect);
|
||||
Damage.dynamicExplosion(x, y, flammability, explosiveness * 3.5f, power, tilesize * block.size / 2f, state.rules.damageExplosions, block.destroyEffect);
|
||||
|
||||
if(block.createRubble && !floor().solid && !floor().isLiquid){
|
||||
Effect.rubble(x, y, block.size);
|
||||
|
||||
@@ -415,7 +415,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
|
||||
//draw last placed plan
|
||||
if(!plan.breaking && plan == lastPlaced && plan.block != null){
|
||||
int rot = plan.block.planRotation(rotation);
|
||||
int rot = plan.block.planRotation(plan.rotation);
|
||||
boolean valid = validPlace(tile.x, tile.y, plan.block, rot);
|
||||
Draw.mixcol();
|
||||
plan.block.drawPlace(tile.x, tile.y, rot, valid);
|
||||
|
||||
Reference in New Issue
Block a user