More difficulty tweaks, made sandbox work properly
This commit is contained in:
@@ -132,10 +132,10 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
||||
DamageArea.damage(!(b.owner instanceof Enemy), b.x, b.y, 25f, (int)(damage * 2f/3f));
|
||||
}
|
||||
},
|
||||
titanshell = new BulletType(1.8f, 60){
|
||||
titanshell = new BulletType(1.8f, 40){
|
||||
{
|
||||
lifetime = 70f;
|
||||
hitsize = 11f;
|
||||
hitsize = 15f;
|
||||
}
|
||||
|
||||
public void draw(Bullet b){
|
||||
|
||||
@@ -13,9 +13,11 @@ public class EnemySpawn{
|
||||
/**The spacing, in waves, of spawns. 2 = spawns every other wave*/
|
||||
protected int spacing = 1;
|
||||
/**How many waves need to pass after the start of this spawn for the tier to increase by one*/
|
||||
protected int tierscale = 15;
|
||||
protected int tierscale = 14;
|
||||
/**How many less enemies there are, every time the tier increases*/
|
||||
protected int tierscaleback = 1;
|
||||
/**The tier this spawn starts at.*/
|
||||
protected int tier = 1;
|
||||
/**Maximum amount of enemies that spawn*/
|
||||
protected int max = 17;
|
||||
/**How many waves need to pass before the amount of enemies increases by 1*/
|
||||
@@ -35,6 +37,6 @@ public class EnemySpawn{
|
||||
}
|
||||
|
||||
public int tier(int wave, int lane){
|
||||
return Mathf.clamp(1 + (wave-after)/tierscale, 1, Enemy.maxtier);
|
||||
return Mathf.clamp(tier + (wave-after)/tierscale, 1, Enemy.maxtier);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.badlogic.gdx.math.Vector2;
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.entities.effect.Fx;
|
||||
import io.anuke.mindustry.input.Input;
|
||||
import io.anuke.mindustry.resource.Mech;
|
||||
import io.anuke.mindustry.resource.Recipe;
|
||||
import io.anuke.mindustry.resource.Weapon;
|
||||
import io.anuke.ucore.core.*;
|
||||
@@ -18,6 +19,7 @@ import io.anuke.ucore.util.Angles;
|
||||
|
||||
public class Player extends DestructibleEntity{
|
||||
public Weapon weapon;
|
||||
public Mech mech = Mech.standard;
|
||||
public float breaktime = 0;
|
||||
|
||||
public Recipe recipe;
|
||||
@@ -50,9 +52,9 @@ public class Player extends DestructibleEntity{
|
||||
@Override
|
||||
public void draw(){
|
||||
if(Vars.snapCamera && Settings.getBool("smoothcam") && Settings.getBool("pixelate")){
|
||||
Draw.rect("player", (int)x, (int)y, direction.angle()-90);
|
||||
Draw.rect("mech-"+mech.name(), (int)x, (int)y, direction.angle()-90);
|
||||
}else{
|
||||
Draw.rect("player", x, y, direction.angle()-90);
|
||||
Draw.rect("mech-"+mech.name(), x, y, direction.angle()-90);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public class TileEntity extends Entity{
|
||||
}
|
||||
|
||||
public boolean collide(Bullet other){
|
||||
return other.owner instanceof Enemy;
|
||||
return other.owner instanceof Enemy; //TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -53,11 +53,18 @@ public class WaveCreator{
|
||||
amount = 1;
|
||||
}},
|
||||
|
||||
new EnemySpawn(Enemy.class){{
|
||||
scaling = 3;
|
||||
after = 8;
|
||||
spacing = 4;
|
||||
tier = 2;
|
||||
}},
|
||||
|
||||
new EnemySpawn(TitanEnemy.class){{
|
||||
after = 6;
|
||||
amount = 2;
|
||||
spacing = 5;
|
||||
scaling = 3;
|
||||
scaling = 2;
|
||||
}},
|
||||
|
||||
new EnemySpawn(FlamerEnemy.class){{
|
||||
@@ -67,6 +74,13 @@ public class WaveCreator{
|
||||
scaling = 2;
|
||||
}},
|
||||
|
||||
new EnemySpawn(EmpEnemy.class){{
|
||||
after = 15;
|
||||
amount = 1;
|
||||
spacing = 5;
|
||||
scaling = 1;
|
||||
}},
|
||||
|
||||
new EnemySpawn(BlastEnemy.class){{
|
||||
after = 4 + 5 + 5;
|
||||
amount = 3;
|
||||
|
||||
@@ -27,10 +27,20 @@ public class BlastEnemy extends Enemy{
|
||||
}
|
||||
|
||||
if(target != null && target.distanceTo(this) < range){
|
||||
Bullet b = new Bullet(BulletType.blast, this, x, y, 0).add();
|
||||
b.damage = BulletType.blast.damage + (tier-1) * 40;
|
||||
damage(999);
|
||||
explode();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeath(){
|
||||
super.onDeath();
|
||||
explode();
|
||||
}
|
||||
|
||||
void explode(){
|
||||
Bullet b = new Bullet(BulletType.blast, this, x, y, 0).add();
|
||||
b.damage = BulletType.blast.damage + (tier-1) * 40;
|
||||
damage(999);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ public class EmpEnemy extends Enemy{
|
||||
|
||||
public EmpEnemy() {
|
||||
|
||||
speed = 0.27f;
|
||||
reload = 70;
|
||||
speed = 0.3f;
|
||||
reload = 60;
|
||||
maxhealth = 210;
|
||||
range = 80f;
|
||||
bullet = BulletType.emp;
|
||||
|
||||
@@ -175,7 +175,7 @@ public class Enemy extends DestructibleEntity{
|
||||
}
|
||||
|
||||
maxhealth *= tier;
|
||||
speed += 0.04f * tier + Mathf.range(0.1f);
|
||||
speed += 0.04f * tier /*+ Mathf.range(0.1f)*/;
|
||||
reload /= Math.max(tier / 1.5f, 1f);
|
||||
range += tier * 5;
|
||||
speed = Math.max(speed, 0.07f);
|
||||
|
||||
@@ -15,9 +15,9 @@ public class FortressEnemy extends Enemy{
|
||||
|
||||
public FortressEnemy() {
|
||||
|
||||
speed = 0.2f;
|
||||
speed = 0.25f;
|
||||
reload = 90;
|
||||
maxhealth = 700;
|
||||
maxhealth = 800;
|
||||
range = 70f;
|
||||
bullet = BulletType.yellowshell;
|
||||
hitbox.setSize(10f);
|
||||
|
||||
@@ -15,9 +15,9 @@ public class HealerEnemy extends Enemy{
|
||||
|
||||
public HealerEnemy() {
|
||||
|
||||
speed = 0.2f;
|
||||
reload = 14;
|
||||
maxhealth = 130;
|
||||
speed = 0.25f;
|
||||
reload = 10;
|
||||
maxhealth = 200;
|
||||
range = 90f;
|
||||
bullet = BulletType.shot;
|
||||
range = 30f;
|
||||
|
||||
@@ -9,9 +9,9 @@ public class TitanEnemy extends Enemy{
|
||||
|
||||
public TitanEnemy() {
|
||||
|
||||
speed = 0.22f;
|
||||
speed = 0.26f;
|
||||
reload = 30;
|
||||
maxhealth = 421;
|
||||
maxhealth = 430;
|
||||
range = 60f;
|
||||
bullet = BulletType.small;
|
||||
hitbox.setSize(7f);
|
||||
|
||||
Reference in New Issue
Block a user