Sector tweaks

This commit is contained in:
Anuken 2020-10-16 12:56:48 -04:00
parent f391e7a5ac
commit b0ea725142
2 changed files with 12 additions and 1 deletions

View File

@ -283,6 +283,17 @@ public class Control implements ApplicationListener, Loadable{
//if there is no base, simulate a new game and place the right loadout at the spawn position
if(state.rules.defaultTeam.cores().isEmpty()){
//no spawn set -> delete the sector save
if(sector.info.spawnPosition == 0){
//delete old save
sector.save = null;
slot.delete();
//play again
playSector(origin, sector);
return;
}
//reset wave so things are more fair
state.wave = 1;

View File

@ -165,7 +165,7 @@ public class Universe{
sector.info.damage = 1f;
sector.info.hasCore = false;
sector.info.production.clear();
}else if(attacked && wavesPassed > 0 && sector.info.wave + wavesPassed >= sector.info.winWave && !sector.hasEnemyBase()){
}else if(attacked && wavesPassed > 0 && sector.info.winWave > 1 && sector.info.wave + wavesPassed >= sector.info.winWave && !sector.hasEnemyBase()){
//autocapture the sector
sector.info.waves = false;