diff --git a/core/assets/maps/impact0078.msav b/core/assets/maps/impact0078.msav index 44279fec16..08a71a5673 100644 Binary files a/core/assets/maps/impact0078.msav and b/core/assets/maps/impact0078.msav differ diff --git a/core/src/mindustry/Vars.java b/core/src/mindustry/Vars.java index 12819feff6..8b89e09732 100644 --- a/core/src/mindustry/Vars.java +++ b/core/src/mindustry/Vars.java @@ -88,7 +88,7 @@ public class Vars implements Loadable{ /** duration of time between turns in ticks */ public static final float turnDuration = 2 * Time.toMinutes; /** chance of an invasion per turn, 1 = 100% */ - public static final float baseInvasionChance = 1f / 85f; + public static final float baseInvasionChance = 1f / 90f; /** how many turns have to pass before invasions start */ public static final int invasionGracePeriod = 20; /** min armor fraction damage; e.g. 0.05 = at least 5% damage */ diff --git a/core/src/mindustry/ai/BaseAI.java b/core/src/mindustry/ai/BaseAI.java index 395493d57f..dd34626dcb 100644 --- a/core/src/mindustry/ai/BaseAI.java +++ b/core/src/mindustry/ai/BaseAI.java @@ -55,11 +55,12 @@ public class BaseAI{ public void update(){ if(data.team.rules().aiCoreSpawn && timer.get(timerSpawn, 60 * 2.5f) && data.hasCore()){ CoreBlock block = (CoreBlock)data.core().block; + int coreUnits = Groups.unit.count(u -> u.team == data.team && u.type == block.unitType); - //create AI core unit - if(!state.isEditor() && !Groups.unit.contains(u -> u.team() == data.team && u.type == block.unitType)){ + //create AI core unit(s) + if(!state.isEditor() && coreUnits < data.cores.size){ Unit unit = block.unitType.create(data.team); - unit.set(data.core()); + unit.set(data.cores.random()); unit.add(); Fx.spawn.at(unit); } diff --git a/core/src/mindustry/content/SectorPresets.java b/core/src/mindustry/content/SectorPresets.java index dbfddbc142..347aa05ca1 100644 --- a/core/src/mindustry/content/SectorPresets.java +++ b/core/src/mindustry/content/SectorPresets.java @@ -88,7 +88,7 @@ public class SectorPresets implements ContentList{ }}; nuclearComplex = new SectorPreset("nuclearComplex", serpulo, 130){{ - captureWave = 50; + captureWave = 45; difficulty = 7; }}; diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 3dd1d1f20f..7295f1dba3 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -620,7 +620,7 @@ public class UnitTypes implements ContentList{ drag = 0.4f; hitSize = 12f; rotateSpeed = 3f; - health = 800; + health = 900; immunities = ObjectSet.with(StatusEffects.burning, StatusEffects.melting); legCount = 6; legLength = 13f; @@ -651,7 +651,7 @@ public class UnitTypes implements ContentList{ bullet = new SapBulletType(){{ sapStrength = 0.4f; length = 75f; - damage = 18; + damage = 20; shootEffect = Fx.shootSmall; hitColor = color = Color.valueOf("bf92f9"); despawnEffect = Fx.none; @@ -671,7 +671,7 @@ public class UnitTypes implements ContentList{ bullet = new SapBulletType(){{ sapStrength = 0.8f; length = 40f; - damage = 15; + damage = 16; shootEffect = Fx.shootSmall; hitColor = color = Color.valueOf("bf92f9"); despawnEffect = Fx.none; diff --git a/core/src/mindustry/game/Universe.java b/core/src/mindustry/game/Universe.java index 9c3a614350..0aa1407879 100644 --- a/core/src/mindustry/game/Universe.java +++ b/core/src/mindustry/game/Universe.java @@ -6,6 +6,7 @@ import arc.struct.*; import arc.util.*; import mindustry.content.*; import mindustry.game.EventType.*; +import mindustry.game.SectorInfo.*; import mindustry.maps.*; import mindustry.type.*; import mindustry.world.blocks.storage.*; @@ -199,6 +200,13 @@ public class Universe{ } } + sector.info.export.each((item, amount) -> { + if(sector.info.items.get(item) <= 0 && sector.info.production.get(item, ExportStat::new).mean <= 0){ + //disable export when production is negative. + sector.info.export.get(item).mean = 0f; + } + }); + //add production, making sure that it's capped sector.info.production.each((item, stat) -> sector.info.items.add(item, Math.min((int)(stat.mean * newSecondsPassed * scl), sector.info.storageCapacity - sector.info.items.get(item)))); //prevent negative values with unloaders diff --git a/core/src/mindustry/type/Weather.java b/core/src/mindustry/type/Weather.java index a9741b5241..bb6b444746 100644 --- a/core/src/mindustry/type/Weather.java +++ b/core/src/mindustry/type/Weather.java @@ -262,7 +262,7 @@ public abstract class Weather extends UnlockableContent{ /** Creates a weather entry with some approximate weather values. */ public WeatherEntry(Weather weather){ - this(weather, weather.duration * 3f, weather.duration * 6f, weather.duration / 2f, weather.duration * 1.5f); + this(weather, weather.duration * 2f, weather.duration * 6f, weather.duration / 2f, weather.duration * 1.5f); } public WeatherEntry(Weather weather, float minFrequency, float maxFrequency, float minDuration, float maxDuration){ diff --git a/core/src/mindustry/world/blocks/storage/StorageBlock.java b/core/src/mindustry/world/blocks/storage/StorageBlock.java index b7581b4dfb..10b3cc4820 100644 --- a/core/src/mindustry/world/blocks/storage/StorageBlock.java +++ b/core/src/mindustry/world/blocks/storage/StorageBlock.java @@ -57,6 +57,13 @@ public class StorageBlock extends Block{ } } + @Override + public void itemTaken(Item item){ + if(linkedCore != null){ + linkedCore.itemTaken(item); + } + } + @Override public int getMaximumAccepted(Item item){ return itemCapacity;