diff --git a/core/src/io/anuke/mindustry/Vars.java b/core/src/io/anuke/mindustry/Vars.java index fecf0ba143..1ac28ece7a 100644 --- a/core/src/io/anuke/mindustry/Vars.java +++ b/core/src/io/anuke/mindustry/Vars.java @@ -90,7 +90,7 @@ public class Vars{ //whether turrets have infinite ammo (only with debug) public static boolean infiniteAmmo = true; //whether to show paths of enemies - public static boolean showPaths = true; + public static boolean showPaths = false; //if false, player is always hidden public static boolean showPlayer = true; //whether to hide ui, only on debug diff --git a/core/src/io/anuke/mindustry/game/Difficulty.java b/core/src/io/anuke/mindustry/game/Difficulty.java index 7c86e5685e..afa18b4204 100644 --- a/core/src/io/anuke/mindustry/game/Difficulty.java +++ b/core/src/io/anuke/mindustry/game/Difficulty.java @@ -3,34 +3,21 @@ package io.anuke.mindustry.game; import io.anuke.ucore.util.Bundles; public enum Difficulty{ - easy(4f, 2f, 1f), - normal(2f, 1f, 1f), - hard(1.5f, 0.5f, 0.75f), - insane(0.5f, 0.25f, 0.5f); - //purge removed due to new wave system - /*purge(0.25f, 0.01f, 0.25f)*/; + easy(2f, 1.5f), + normal(1f, 1f), + hard(0.5f, 0.75f), + insane(0.25f, 0.5f); - /** - * The scaling of how many waves it takes for one more enemy of a type to appear. - * For example: with enemeyScaling = 2 and the default scaling being 2, it would take 4 waves for - * an enemy spawn to go from 1->2 enemies. - */ - public final float enemyScaling; - /** - * Multiplier of the time between waves. - */ + /**Multiplier of the time between waves.*/ public final float timeScaling; - /** - * Scaling of max time between waves. Default time is 4 minutes. - */ - public final float maxTimeScaling; + /**Multiplier of spawner grace period.*/ + public final float spawnerScaling; private String value; - Difficulty(float enemyScaling, float timeScaling, float maxTimeScaling){ - this.enemyScaling = enemyScaling; + Difficulty(float timeScaling, float spawnerScaling){ this.timeScaling = timeScaling; - this.maxTimeScaling = maxTimeScaling; + this.spawnerScaling = spawnerScaling; } @Override diff --git a/core/src/io/anuke/mindustry/world/blocks/units/UnitPad.java b/core/src/io/anuke/mindustry/world/blocks/units/UnitPad.java index f7d32306d4..76f7f80a36 100644 --- a/core/src/io/anuke/mindustry/world/blocks/units/UnitPad.java +++ b/core/src/io/anuke/mindustry/world/blocks/units/UnitPad.java @@ -38,7 +38,7 @@ import java.io.DataOutputStream; import java.io.IOException; public class UnitPad extends Block{ - protected float gracePeriodMultiplier = 15f; + protected float gracePeriodMultiplier = 20f; protected float speedupTime = 60f * 60f * 16; protected UnitType type; @@ -164,8 +164,8 @@ public class UnitPad extends Block{ entity.speedScl = Mathf.lerpDelta(entity.speedScl, 0f, 0.05f); } //check if grace period had passed - }else if(entity.warmup > produceTime*gracePeriodMultiplier){ - float speedMultiplier = Math.min(0.1f + (entity.warmup - produceTime * gracePeriodMultiplier) / speedupTime, 4f); + }else if(entity.warmup > produceTime*gracePeriodMultiplier * Vars.state.difficulty.spawnerScaling){ + float speedMultiplier = Math.min(0.1f + (entity.warmup - produceTime * gracePeriodMultiplier * Vars.state.difficulty.spawnerScaling) / speedupTime, 4f); //otherwise, it's an enemy, cheat by not requiring resources entity.buildTime += Timers.delta() * speedMultiplier; entity.speedScl = Mathf.lerpDelta(entity.speedScl, 1f, 0.05f);