Bugfixes
This commit is contained in:
@@ -150,8 +150,11 @@ public class Universe{
|
||||
|
||||
//increment seconds passed for this sector by the time that just passed with this turn
|
||||
if(!sector.isBeingPlayed()){
|
||||
//increment time
|
||||
sector.info.secondsPassed += turnDuration/60f;
|
||||
|
||||
//increment time if attacked
|
||||
if(sector.isAttacked()){
|
||||
sector.info.secondsPassed += turnDuration/60f;
|
||||
}
|
||||
|
||||
int wavesPassed = (int)(sector.info.secondsPassed*60f / sector.info.waveSpacing);
|
||||
boolean attacked = sector.info.waves;
|
||||
@@ -206,7 +209,7 @@ public class Universe{
|
||||
if(!sector.isAttacked() && turn > invasionGracePeriod){
|
||||
//invasion chance depends on # of nearby bases
|
||||
if(Mathf.chance(baseInvasionChance * sector.near().count(Sector::hasEnemyBase))){
|
||||
int waveMax = Math.max(sector.info.winWave, state.wave) + Mathf.random(2, 5) * 5;
|
||||
int waveMax = Math.max(sector.info.winWave, sector.isBeingPlayed() ? state.wave : sector.info.wave + sector.info.wavesPassed) + Mathf.random(2, 5) * 5;
|
||||
|
||||
//assign invasion-related things
|
||||
if(sector.isBeingPlayed()){
|
||||
|
||||
Reference in New Issue
Block a user