Don't show guardian warning when above win wave

This commit is contained in:
Anuken
2020-10-30 14:57:34 -04:00
parent ed93fa45d3
commit 28240f730f
3 changed files with 5 additions and 1 deletions

View File

@@ -174,12 +174,14 @@ public class Blocks implements ContentList{
isLiquid = true;
cacheLayer = CacheLayer.water;
albedo = 0.5f;
attributes.set(Attribute.spores, 0.15f);
}};
darksandTaintedWater = new ShallowLiquid("darksand-tainted-water"){{
speedMultiplier = 0.75f;
statusDuration = 60f;
albedo = 0.5f;
attributes.set(Attribute.spores, 0.1f);
}};
sandWater = new ShallowLiquid("sand-water"){{

View File

@@ -280,6 +280,7 @@ public class Bullets implements ContentList{
splashDamage = 25f;
hitEffect = Fx.blastExplosion;
despawnEffect = Fx.blastExplosion;
lightningDamage = 10;
lightning = 2;
lightningLength = 10;
}};

View File

@@ -51,8 +51,9 @@ public class HudFragment extends Fragment{
//warn about guardian/boss waves
Events.on(WaveEvent.class, e -> {
int max = 10;
int winWave = state.isCampaign() && state.rules.winWave > 0 ? state.rules.winWave : Integer.MAX_VALUE;
outer:
for(int i = state.wave - 1; i <= state.wave + max; i++){
for(int i = state.wave - 1; i <= Math.min(state.wave + max, winWave); i++){
for(SpawnGroup group : state.rules.spawns){
if(group.effect == StatusEffects.boss && group.getSpawned(i) > 0){
int diff = (i + 2) - state.wave;