Fixed map-3 waves

This commit is contained in:
Anuken 2022-07-15 18:57:01 -04:00
parent 47e639be28
commit f6093c864f
4 changed files with 11 additions and 5 deletions

Binary file not shown.

View File

@ -1,9 +1,5 @@
package mindustry.content;
import arc.math.geom.*;
import mindustry.game.*;
import mindustry.game.MapObjectives.*;
import mindustry.graphics.*;
import mindustry.type.*;
import static mindustry.content.Planets.*;
@ -128,6 +124,7 @@ public class SectorPresets{
three = new SectorPreset("three", erekir, 36){{
difficulty = 5;
captureWave = 9;
attackAfterWaves = true;
}};
atlas = new SectorPreset("atlas", erekir, 14){{ //TODO random sector, pick a better one

View File

@ -291,7 +291,14 @@ public class Logic implements ApplicationListener{
if(state.rules.waves && (state.enemies == 0 && state.rules.winWave > 0 && state.wave >= state.rules.winWave && !spawner.isSpawning()) ||
(state.rules.attackMode && state.rules.waveTeam.cores().isEmpty())){
Call.sectorCapture();
if(state.rules.sector.preset != null && state.rules.sector.preset.attackAfterWaves && !state.rules.attackMode){
//activate attack mode to destroy cores after waves are done.
state.rules.attackMode = true;
state.rules.waves = false;
Call.setRules(state.rules);
}else{
Call.sectorCapture();
}
}
}else{
if(!state.rules.attackMode && state.teams.playerCores().size == 0 && !state.gameOver){

View File

@ -18,6 +18,8 @@ public class SectorPreset extends UnlockableContent{
public float startWaveTimeMultiplier = 2f;
public boolean addStartingItems = false;
public boolean showSectorLandInfo = true;
/** If true, switches to attack mode after waves end. */
public boolean attackAfterWaves = false;
public SectorPreset(String name, Planet planet, int sector){
super(name);