diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index a71af9f728..e44236ac92 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -695,6 +695,7 @@ stat.lightningchance = Lightning Chance stat.lightningdamage = Lightning Damage stat.flammability = Flammability stat.radioactivity = Radioactivity +stat.charge = Charge stat.heatcapacity = Heat Capacity stat.viscosity = Viscosity stat.temperature = Temperature diff --git a/core/src/mindustry/content/Items.java b/core/src/mindustry/content/Items.java index 65c464a249..bd883c3ce9 100644 --- a/core/src/mindustry/content/Items.java +++ b/core/src/mindustry/content/Items.java @@ -74,6 +74,7 @@ public class Items implements ContentList{ surgeAlloy = new Item("surge-alloy", Color.valueOf("f3e979")){{ cost = 1.2f; + charge = 0.75f; }}; sporePod = new Item("spore-pod", Color.valueOf("7457ce")){{ diff --git a/core/src/mindustry/entities/comp/BuildingComp.java b/core/src/mindustry/entities/comp/BuildingComp.java index 769530ce94..c2bb86dea9 100644 --- a/core/src/mindustry/entities/comp/BuildingComp.java +++ b/core/src/mindustry/entities/comp/BuildingComp.java @@ -983,6 +983,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, int amount = items.get(item); explosiveness += item.explosiveness * amount; flammability += item.flammability * amount; + power += item.charge * amount * 100f; } } diff --git a/core/src/mindustry/entities/comp/UnitComp.java b/core/src/mindustry/entities/comp/UnitComp.java index 753b03f248..69ffc86426 100644 --- a/core/src/mindustry/entities/comp/UnitComp.java +++ b/core/src/mindustry/entities/comp/UnitComp.java @@ -411,9 +411,10 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I float explosiveness = 2f + item().explosiveness * stack().amount * 1.53f; float flammability = item().flammability * stack().amount / 1.9f; + float power = item().charge * stack().amount * 160f; if(!spawnedByCore){ - Damage.dynamicExplosion(x, y, flammability, explosiveness, 0f, bounds() / 2f, state.rules.damageExplosions, item().flammability > 1, team); + Damage.dynamicExplosion(x, y, flammability, explosiveness, power, bounds() / 2f, state.rules.damageExplosions, item().flammability > 1, team); } float shake = hitSize / 3f; diff --git a/core/src/mindustry/type/Item.java b/core/src/mindustry/type/Item.java index 18cbdff886..24dd790d37 100644 --- a/core/src/mindustry/type/Item.java +++ b/core/src/mindustry/type/Item.java @@ -17,6 +17,8 @@ public class Item extends UnlockableContent{ public float flammability = 0f; /** how radioactive this item is. 0=none, 1=chernobyl ground zero */ public float radioactivity; + /** how electrically potent this item is. */ + public float charge = 0f; /** drill hardness of the item */ public int hardness = 0; /** @@ -41,6 +43,7 @@ public class Item extends UnlockableContent{ stats.addPercent(Stat.explosiveness, explosiveness); stats.addPercent(Stat.flammability, flammability); stats.addPercent(Stat.radioactivity, radioactivity); + stats.addPercent(Stat.charge, charge); } @Override diff --git a/core/src/mindustry/world/meta/Stat.java b/core/src/mindustry/world/meta/Stat.java index 1f9d1d0022..2a1b864c7c 100644 --- a/core/src/mindustry/world/meta/Stat.java +++ b/core/src/mindustry/world/meta/Stat.java @@ -15,6 +15,7 @@ public enum Stat{ explosiveness, flammability, radioactivity, + charge, heatCapacity, viscosity, temperature,