mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-02 04:13:44 +07:00
Closes Anuken/Mindustry-Suggestions/issues/4452
This commit is contained in:
parent
4d301ebdbf
commit
af76e889cf
@ -253,7 +253,7 @@ public class Universe{
|
||||
|
||||
//queue random invasions
|
||||
if(!sector.isAttacked() && sector.planet.allowSectorInvasion && sector.info.minutesCaptured > invasionGracePeriod && sector.info.hasSpawns){
|
||||
int count = sector.near().count(Sector::hasEnemyBase);
|
||||
int count = sector.near().count(s -> s.hasEnemyBase() && !s.hasBase());
|
||||
|
||||
//invasion chance depends on # of nearby bases
|
||||
if(count > 0 && Mathf.chance(baseInvasionChance * (0.8f + (count - 1) * 0.3f))){
|
||||
|
@ -121,7 +121,7 @@ public class Sector{
|
||||
return save != null && (info.waves || info.attack) && info.hasCore;
|
||||
}
|
||||
|
||||
/** @return whether the player has a base here. */
|
||||
/** @return whether the player has a base (active save with a core) here. */
|
||||
public boolean hasBase(){
|
||||
return save != null && info.hasCore && !(Vars.state.isGame() && Vars.state.rules.sector == this && state.gameOver);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user