Campaign survival wave display tweaks
This commit is contained in:
@@ -424,7 +424,7 @@ public class Bullets implements ContentList{
|
||||
}
|
||||
};
|
||||
|
||||
basicFlame = new BulletType(3.35f, 15f){{
|
||||
basicFlame = new BulletType(3.35f, 16f){{
|
||||
ammoMultiplier = 3f;
|
||||
hitSize = 7f;
|
||||
lifetime = 18f;
|
||||
@@ -439,7 +439,7 @@ public class Bullets implements ContentList{
|
||||
hittable = false;
|
||||
}};
|
||||
|
||||
pyraFlame = new BulletType(3.35f, 22f){{
|
||||
pyraFlame = new BulletType(3.35f, 25f){{
|
||||
ammoMultiplier = 4f;
|
||||
hitSize = 7f;
|
||||
lifetime = 18f;
|
||||
|
||||
@@ -21,9 +21,10 @@ import mindustry.world.blocks.storage.*;
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
public class SectorDamage{
|
||||
public static final int maxRetWave = 30, maxWavesSimulated = 50;
|
||||
|
||||
//direct damage is for testing only
|
||||
private static final boolean direct = false, rubble = true;
|
||||
private static final int maxWavesSimulated = 50, maxRetWave = 100;
|
||||
|
||||
/** @return calculated capture progress of the enemy */
|
||||
public static float getDamage(SectorInfo info){
|
||||
@@ -107,7 +108,7 @@ public class SectorDamage{
|
||||
float damage = getDamage(state.rules.sector.info);
|
||||
|
||||
//scaled damage has a power component to make it seem a little more realistic (as systems fail, enemy capturing gets easier and easier)
|
||||
float scaled = Mathf.pow(damage, 1.5f);
|
||||
float scaled = Mathf.pow(damage, 1.6f);
|
||||
|
||||
//apply damage to units
|
||||
float unitDamage = damage * state.rules.sector.info.sumHealth;
|
||||
@@ -429,6 +430,7 @@ public class SectorDamage{
|
||||
float falloff = (damage) / (Math.max(tiles.width, tiles.height) * Mathf.sqrt2);
|
||||
int peak = 0;
|
||||
|
||||
if(damage > 0.1f){
|
||||
//phase two: propagate the damage
|
||||
while(!frontier.isEmpty()){
|
||||
peak = Math.max(peak, frontier.size);
|
||||
@@ -479,6 +481,8 @@ public class SectorDamage{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static float cost(Tile tile){
|
||||
return 1f +
|
||||
(tile.block().isStatic() && tile.solid() ? 200f : 0f) +
|
||||
|
||||
@@ -20,6 +20,7 @@ import mindustry.game.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.graphics.g3d.*;
|
||||
import mindustry.maps.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.ui.*;
|
||||
import mindustry.world.blocks.storage.*;
|
||||
@@ -382,8 +383,8 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
stable.row();
|
||||
|
||||
if(sector.info.wavesSurvived >= 0 && sector.info.wavesSurvived - sector.info.wavesPassed >= 0 && !sector.isBeingPlayed()){
|
||||
boolean plus = (sector.info.wavesSurvived - sector.info.wavesPassed) >= 99;
|
||||
stable.add("[accent]Will survive " + (sector.info.wavesSurvived - sector.info.wavesPassed) + (plus ? "+" : "") + " waves");
|
||||
boolean plus = (sector.info.wavesSurvived - sector.info.wavesPassed) >= SectorDamage.maxRetWave - 1;
|
||||
stable.add("[accent]Will survive\n" + (sector.info.wavesSurvived - sector.info.wavesPassed) + (plus ? "+" : "") + " waves");
|
||||
stable.row();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user