Harder default waves

This commit is contained in:
Anuken 2019-05-04 17:14:47 -04:00
parent 8d6afbd80d
commit f137c11c6c
5 changed files with 8 additions and 12 deletions

View File

@ -95,7 +95,7 @@ public class WaveSpawner{
Time.run(Math.min(i * 5, 60 * 2), () -> shockwave(unit));
}
Time.run(20f, () -> Effects.effect(Fx.spawnShockwave, spawn.x * tilesize, spawn.y * tilesize));
Time.run(20f, () -> Effects.effect(Fx.spawnShockwave, spawn.x * tilesize, spawn.y * tilesize, state.rules.dropZoneRadius));
//would be interesting to see player structures survive this without hacks
Time.run(40f, () -> Damage.damage(waveTeam, spawn.x * tilesize, spawn.y * tilesize, state.rules.dropZoneRadius, 99999999f, true));
}

View File

@ -583,7 +583,7 @@ public class Fx implements ContentList{
spawnShockwave = new Effect(20f, 400f, e -> {
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fin());
Lines.stroke(e.fout() * 3f + 0.5f);
Lines.poly(e.x, e.y, 60, e.fin() * 450f);
Lines.poly(e.x, e.y, 60, e.fin() * (e.rotation + 50f));
Draw.reset();
});

View File

@ -19,7 +19,7 @@ public class UnitDrops{
TileEntity core = unit.getClosestEnemyCore();
if(core == null){
if(core == null || core.dst(unit) > Vars.mineTransferRange){
return;
}
@ -37,8 +37,9 @@ public class UnitDrops{
if(Mathf.chance(0.03)){
int amount = Mathf.random(20, 40);
amount = core.tile.block().acceptStack(item, amount, core.tile, null);
if(amount > 0)
if(amount > 0){
Call.transferItemTo(item, amount, unit.x + Mathf.range(2f), unit.y + Mathf.range(2f), core.tile);
}
}
}
}

View File

@ -69,8 +69,6 @@ public class DefaultWaves{
begin = 16;
unitScaling = 1;
spacing = 2;
max = 12;
}},
new SpawnGroup(UnitTypes.dagger){{
@ -119,8 +117,7 @@ public class DefaultWaves{
begin = 40;
unitAmount = 2;
spacing = 2;
unitScaling = 3;
max = 8;
unitScaling = 2;
}},
new SpawnGroup(UnitTypes.wraith){{
@ -129,7 +126,6 @@ public class DefaultWaves{
unitScaling = 3;
spacing = 5;
effect = StatusEffects.overdrive;
max = 8;
}},
new SpawnGroup(UnitTypes.revenant){{
@ -137,7 +133,7 @@ public class DefaultWaves{
unitAmount = 2;
unitScaling = 3;
spacing = 5;
max = 8;
max = 16;
}},
new SpawnGroup(UnitTypes.ghoul){{
@ -145,7 +141,6 @@ public class DefaultWaves{
unitAmount = 2;
unitScaling = 3;
spacing = 4;
max = 8;
}},
new SpawnGroup(UnitTypes.eruptor){{
@ -181,7 +176,6 @@ public class DefaultWaves{
unitAmount = 2;
unitScaling = 3;
spacing = 4;
max = 8;
}}
);
}

View File

@ -204,6 +204,7 @@ public class UnitFactory extends Block{
@Override
public void read(DataInput stream) throws IOException{
buildTime = stream.readFloat();
stream.readFloat(); //unneeded information, will remove later
spawned = stream.readInt();
}
}