diff --git a/core/assets/maps/extractionOutpost.msav b/core/assets/maps/extractionOutpost.msav index dfffe54043..7ce6a6904e 100644 Binary files a/core/assets/maps/extractionOutpost.msav and b/core/assets/maps/extractionOutpost.msav differ diff --git a/core/src/mindustry/entities/Damage.java b/core/src/mindustry/entities/Damage.java index a3dd3913f1..9614f895a6 100644 --- a/core/src/mindustry/entities/Damage.java +++ b/core/src/mindustry/entities/Damage.java @@ -2,7 +2,6 @@ package mindustry.entities; import arc.*; import arc.func.*; -import arc.graphics.*; import arc.math.*; import arc.math.geom.*; import arc.struct.*; @@ -33,15 +32,22 @@ public class Damage{ private static Unit tmpUnit; /** Creates a dynamic explosion based on specified parameters. */ - public static void dynamicExplosion(float x, float y, float flammability, float explosiveness, float power, float radius, Color color, boolean damage){ + public static void dynamicExplosion(float x, float y, float flammability, float explosiveness, float power, float radius, boolean damage){ + dynamicExplosion(x, y, flammability, explosiveness, power, radius, damage, true); + } + + /** Creates a dynamic explosion based on specified parameters. */ + public static void dynamicExplosion(float x, float y, float flammability, float explosiveness, float power, float radius, boolean damage, boolean fire){ if(damage){ for(int i = 0; i < Mathf.clamp(power / 20, 0, 6); i++){ int branches = 5 + Mathf.clamp((int)(power / 30), 1, 20); Time.run(i * 2f + Mathf.random(4f), () -> Lightning.create(Team.derelict, Pal.power, 3, x, y, Mathf.random(360f), branches + Mathf.range(2))); } - for(int i = 0; i < Mathf.clamp(flammability / 4, 0, 30); i++){ - Time.run(i / 2f, () -> Call.createBullet(Bullets.fireball, Team.derelict, x, y, Mathf.random(360f), Bullets.fireball.damage, 1, 1)); + if(fire){ + for(int i = 0; i < Mathf.clamp(flammability / 4, 0, 30); i++){ + Time.run(i / 2f, () -> Call.createBullet(Bullets.fireball, Team.derelict, x, y, Mathf.random(360f), Bullets.fireball.damage, 1, 1)); + } } int waves = Mathf.clamp((int)(explosiveness / 4), 0, 30); diff --git a/core/src/mindustry/entities/comp/BuildingComp.java b/core/src/mindustry/entities/comp/BuildingComp.java index 533e99b24b..9c971c3272 100644 --- a/core/src/mindustry/entities/comp/BuildingComp.java +++ b/core/src/mindustry/entities/comp/BuildingComp.java @@ -970,7 +970,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, }); } - Damage.dynamicExplosion(x, y, flammability, explosiveness * 3.5f, power, tilesize * block.size / 2f, Pal.darkFlame, state.rules.damageExplosions); + Damage.dynamicExplosion(x, y, flammability, explosiveness * 3.5f, power, tilesize * block.size / 2f, state.rules.damageExplosions); if(!floor().solid && !floor().isLiquid){ Effect.rubble(x, y, block.size); diff --git a/core/src/mindustry/entities/comp/UnitComp.java b/core/src/mindustry/entities/comp/UnitComp.java index f80a092417..7834898598 100644 --- a/core/src/mindustry/entities/comp/UnitComp.java +++ b/core/src/mindustry/entities/comp/UnitComp.java @@ -397,10 +397,11 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I /** Actually destroys the unit, removing it and creating explosions. **/ public void destroy(){ - float explosiveness = 2f + item().explosiveness * stack().amount / 3f; - float flammability = item().flammability * stack().amount / 3f; + float explosiveness = 2f + item().explosiveness * stack().amount * 1.4f; + float flammability = item().flammability * stack().amount / 1.9f; + if(!spawnedByCore){ - Damage.dynamicExplosion(x, y, flammability, explosiveness, 0f, bounds() / 2f, Pal.darkFlame, state.rules.damageExplosions); + Damage.dynamicExplosion(x, y, flammability, explosiveness, 0f, bounds() / 2f, state.rules.damageExplosions, item().flammability > 1); } float shake = hitSize / 3f;