More enemy balancing
This commit is contained in:
@@ -13,23 +13,16 @@ import io.anuke.mindustry.world.World;
|
||||
import io.anuke.mindustry.world.blocks.*;
|
||||
import io.anuke.ucore.core.Inputs;
|
||||
import io.anuke.ucore.core.Timers;
|
||||
import io.anuke.ucore.function.Callable;
|
||||
import io.anuke.ucore.modules.ModuleCore;
|
||||
import io.anuke.ucore.util.Profiler;
|
||||
|
||||
public class Mindustry extends ModuleCore {
|
||||
public static Callable donationsCallable;
|
||||
public static Array<String> args = new Array<>();
|
||||
public static Formatter formatter = new Formatter(){
|
||||
|
||||
@Override
|
||||
public String format(Date date){
|
||||
return "invalid date";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String format(int number){
|
||||
return number + "";
|
||||
}
|
||||
|
||||
@Override public String format(Date date){ return "invalid date"; }
|
||||
@Override public String format(int number){ return number + ""; }
|
||||
};
|
||||
|
||||
//always initialize blocks in this order, otherwise there are ID errors
|
||||
|
||||
@@ -180,11 +180,12 @@ public class Renderer extends RendererModule{
|
||||
Graphics.shader();
|
||||
|
||||
Entities.draw(Entities.defaultGroup());
|
||||
Entities.draw(control.bulletGroup);
|
||||
|
||||
Profiler.end("entityDraw");
|
||||
|
||||
if(!optimize) drawBlocks(true, false);
|
||||
|
||||
Entities.draw(control.bulletGroup);
|
||||
|
||||
drawShield();
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
||||
}
|
||||
}
|
||||
},
|
||||
emp = new BulletType(1.6f, 8){
|
||||
emp = new BulletType(1.6f, 6){
|
||||
{
|
||||
lifetime = 50f;
|
||||
hitsize = 6f;
|
||||
|
||||
@@ -149,8 +149,8 @@ public class WaveCreator{
|
||||
}},
|
||||
new EnemySpawn(FortressEnemy.class){{
|
||||
after = 12;
|
||||
spacing = 4;
|
||||
scaling = 6;
|
||||
spacing = 5;
|
||||
scaling = 7;
|
||||
}},
|
||||
new EnemySpawn(HealerEnemy.class){{
|
||||
scaling = 3;
|
||||
@@ -163,8 +163,8 @@ public class WaveCreator{
|
||||
}},
|
||||
new EnemySpawn(FlamerEnemy.class){{
|
||||
after = 14;
|
||||
spacing = 5;
|
||||
scaling = 2;
|
||||
spacing = 6;
|
||||
scaling = 3;
|
||||
}},
|
||||
new EnemySpawn(BlastEnemy.class){{
|
||||
after = 12;
|
||||
|
||||
@@ -53,7 +53,7 @@ public class EMP extends TimedEntity{
|
||||
if(tile != null && tile.block() instanceof PowerAcceptor){
|
||||
PowerAcceptor p = (PowerAcceptor)tile.block();
|
||||
p.setPower(tile, 0f);
|
||||
tile.entity.damage((int)(damage*1.6f)); //extra damage
|
||||
tile.entity.damage((int)(damage*1.5f)); //extra damage
|
||||
}
|
||||
|
||||
//entity may be null here, after the block is dead!
|
||||
|
||||
@@ -17,6 +17,7 @@ public class Enemy extends DestructibleEntity{
|
||||
public final static Color[] tierColors = { Color.valueOf("ffe451"), Color.valueOf("f48e20"), Color.valueOf("ff6757"), Color.valueOf("ff2d86") };
|
||||
public final static int maxtier = 4;
|
||||
public final static float maxIdle = 60*1.5f;
|
||||
public final static float maxIdleLife = 60f*15f; //15 seconds idle = death
|
||||
|
||||
protected int timeid;
|
||||
protected Timer timer = new Timer(5);
|
||||
@@ -64,6 +65,13 @@ public class Enemy extends DestructibleEntity{
|
||||
void move(){
|
||||
Tile core = Vars.control.getCore();
|
||||
|
||||
if(idletime > maxIdleLife){
|
||||
Effects.effect(Fx.shellsmoke, this);
|
||||
Effects.effect(Fx.explosion, this);
|
||||
remove();
|
||||
return;
|
||||
}
|
||||
|
||||
boolean nearCore = distanceTo(core.worldx(), core.worldy()) <= range - 18f && stopNearCore;
|
||||
Vector2 vec;
|
||||
|
||||
|
||||
@@ -19,12 +19,12 @@ public class ShieldBlock extends PowerBlock{
|
||||
public float powerDrain = 0.005f;
|
||||
public float powerPerDamage = 0.2f;
|
||||
public float maxRadius = 40f;
|
||||
public float radiusScale = 80f;
|
||||
public float radiusScale = 160f;
|
||||
|
||||
public ShieldBlock(String name) {
|
||||
super(name);
|
||||
voltage = powerDrain;
|
||||
powerCapacity = 30f;
|
||||
powerCapacity = 40f;
|
||||
health = 100;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user