Testing waves

This commit is contained in:
Anuken
2021-12-02 18:33:33 -05:00
parent 2b416588f1
commit 8168d8a3be
4 changed files with 20 additions and 10 deletions

View File

@@ -2770,7 +2770,7 @@ public class Blocks{
breach = new ItemTurret("breach"){{ breach = new ItemTurret("breach"){{
requirements(Category.turret, with(Items.beryllium, 35, Items.silicon, 20), true); requirements(Category.turret, with(Items.beryllium, 35, Items.silicon, 20), true);
ammo( ammo(
Items.beryllium, new BasicBulletType(7f, 30){{ Items.beryllium, new BasicBulletType(7f, 32){{
width = 8f; width = 8f;
height = 14f; height = 14f;
shootEffect = Fx.berylSpark; shootEffect = Fx.berylSpark;
@@ -2795,7 +2795,7 @@ public class Blocks{
outlineColor = Pal.darkOutline; outlineColor = Pal.darkOutline;
size = 2; size = 2;
envEnabled |= Env.space; envEnabled |= Env.space;
reloadTime = 40f; reloadTime = 35f;
restitution = 0.03f; restitution = 0.03f;
range = 180; range = 180;
shootCone = 3f; shootCone = 3f;

View File

@@ -2531,8 +2531,9 @@ public class UnitTypes{
}}; }};
emanate = new UnitType("emanate"){{ emanate = new UnitType("emanate"){{
defaultController = BuilderAI::new; //TODO not a real enemy, should not be counted or have flying AI
isCounted = false; defaultController = FlyingAI::new;
//isCounted = false;
envDisabled = 0; envDisabled = 0;
outlineColor = Pal.darkOutline; outlineColor = Pal.darkOutline;
@@ -2547,7 +2548,7 @@ public class UnitTypes{
rotateSpeed = 3f; rotateSpeed = 3f;
accel = 0.11f; accel = 0.11f;
itemCapacity = 140; itemCapacity = 140;
health = 1500f; health = 1300f;
armor = 3f; armor = 3f;
hitSize = 36f; hitSize = 36f;
commandLimit = 9; commandLimit = 9;
@@ -2600,9 +2601,6 @@ public class UnitTypes{
}}; }};
//TODO emanate (+ better names)
//endregion //endregion
//region internal + special //region internal + special

View File

@@ -101,6 +101,7 @@ public class Logic implements ApplicationListener{
if(state.isCampaign()){ if(state.isCampaign()){
//enable building AI on campaign unless the preset disables it //enable building AI on campaign unless the preset disables it
//TODO should be configurable, I don't want building AI everywhere.
if(!(state.getSector().preset != null && !state.getSector().preset.useAI)){ if(!(state.getSector().preset != null && !state.getSector().preset.useAI)){
state.rules.waveTeam.rules().ai = true; state.rules.waveTeam.rules().ai = true;
} }

View File

@@ -184,9 +184,9 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
if(block != Blocks.air){ if(block != Blocks.air){
//TODO use d4 instead of d8 for no out-of-reach ores? //TODO use d4 instead of d8 for no out-of-reach ores?
if(nearAir(x, y)){ if(nearAir(x, y)){
if(noise(x + 78, y, 4, 0.7f, 35f, 1f) > 0.6f && block == Blocks.carbonWall){ if(block == Blocks.carbonWall && noise(x + 78, y, 4, 0.7f, 33f, 1f) > 0.59f){
block = Blocks.graphiticWall; block = Blocks.graphiticWall;
}else if(noise(x + 782, y, 4, 0.8f, 38f, 1f) > 0.68f && block != Blocks.carbonWall){ }else if(block != Blocks.carbonWall && noise(x + 782, y, 4, 0.8f, 37f, 1f) > 0.68f){
ore = Blocks.wallOreBeryl; ore = Blocks.wallOreBeryl;
} }
} }
@@ -242,5 +242,16 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
//TODO this is only for testing //TODO this is only for testing
state.rules.defaultTeam.items().add(Seq.with(ItemStack.with(Items.beryllium, 200, Items.graphite, 200))); state.rules.defaultTeam.items().add(Seq.with(ItemStack.with(Items.beryllium, 200, Items.graphite, 200)));
//TODO proper waves
state.rules.waves = !OS.hasProp("mindustry.debug");
state.rules.waveTimer = true;
state.rules.waveSpacing = 60f * 60f * 7.5f;
state.rules.spawns = Seq.with(new SpawnGroup(){{
type = UnitTypes.emanate;
spacing = 1;
shieldScaling = 60;
unitScaling = 2f;
}});
} }
} }