mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-03 22:21:17 +07:00
Fixed #3565
This commit is contained in:
parent
2282cb89b1
commit
058b2ddfce
@ -88,7 +88,7 @@ public class Vars implements Loadable{
|
||||
/** duration of time between turns in ticks */
|
||||
public static final float turnDuration = 2 * Time.toMinutes;
|
||||
/** chance of an invasion per turn, 1 = 100% */
|
||||
public static final float baseInvasionChance = 1f / 60f;
|
||||
public static final float baseInvasionChance = 1f / 75f;
|
||||
/** how many turns have to pass before invasions start */
|
||||
public static final int invasionGracePeriod = 20;
|
||||
/** min armor fraction damage; e.g. 0.05 = at least 5% damage */
|
||||
|
@ -1195,7 +1195,7 @@ public class Blocks implements ContentList{
|
||||
size = 2;
|
||||
|
||||
ambientSound = Sounds.smelter;
|
||||
ambientSoundVolume = 0.05f;
|
||||
ambientSoundVolume = 0.06f;
|
||||
}};
|
||||
|
||||
differentialGenerator = new SingleTypeGenerator("differential-generator"){{
|
||||
|
@ -61,7 +61,7 @@ public class SapBulletType extends BulletType{
|
||||
b.data = target;
|
||||
|
||||
if(target != null){
|
||||
float result = Math.min(target.health(), damage);
|
||||
float result = Math.max(Math.min(target.health(), damage), 0);
|
||||
|
||||
if(b.owner instanceof Healthc h){
|
||||
h.heal(result * sapStrength);
|
||||
|
@ -127,6 +127,9 @@ public class Schematics implements Loadable{
|
||||
newSchematic.tags.putAll(target.tags);
|
||||
newSchematic.file = target.file;
|
||||
|
||||
loadouts.each((block, list) -> list.remove(target));
|
||||
checkLoadout(target, true);
|
||||
|
||||
try{
|
||||
write(newSchematic, target.file);
|
||||
}catch(Exception e){
|
||||
@ -134,6 +137,8 @@ public class Schematics implements Loadable{
|
||||
Log.err(e);
|
||||
ui.showException(e);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private @Nullable Schematic loadFile(Fi file){
|
||||
|
@ -10,7 +10,7 @@ import mindustry.type.*;
|
||||
import static mindustry.content.UnitTypes.*;
|
||||
|
||||
public class Waves{
|
||||
public static final int waveVersion = 3;
|
||||
public static final int waveVersion = 4;
|
||||
|
||||
private Seq<SpawnGroup> spawns;
|
||||
|
||||
@ -277,7 +277,7 @@ public class Waves{
|
||||
int cap = 150;
|
||||
|
||||
float shieldStart = 30, shieldsPerWave = 20 + difficulty*30f;
|
||||
float[] scaling = {1, 1.2f, 2f, 3f, 4f};
|
||||
float[] scaling = {1, 1.5f, 3f, 4f, 5f};
|
||||
|
||||
Intc createProgression = start -> {
|
||||
//main sequence
|
||||
@ -286,7 +286,7 @@ public class Waves{
|
||||
|
||||
for(int i = start; i < cap;){
|
||||
int f = i;
|
||||
int next = rand.random(8, 16) + (int)Mathf.lerp(4f, 0f, difficulty) + curTier * 4;
|
||||
int next = rand.random(8, 16) + (int)Mathf.lerp(5f, 0f, difficulty) + curTier * 4;
|
||||
|
||||
float shieldAmount = Math.max((i - shieldStart) * shieldsPerWave, 0);
|
||||
int space = start == 0 ? 1 : rand.random(1, 2);
|
||||
@ -298,7 +298,7 @@ public class Waves{
|
||||
begin = f;
|
||||
end = f + next >= cap ? never : f + next;
|
||||
max = 13;
|
||||
unitScaling = (difficulty < 0.4f ? rand.random(2.5f, 4f) : rand.random(1f, 4f)) * scaling[ctier];
|
||||
unitScaling = (difficulty < 0.4f ? rand.random(2.5f, 5f) : rand.random(1f, 4f)) * scaling[ctier];
|
||||
shields = shieldAmount;
|
||||
shieldScaling = shieldsPerWave;
|
||||
spacing = space;
|
||||
|
@ -437,7 +437,7 @@ public class SectorDamage{
|
||||
float falloff = (fraction) / (Math.max(tiles.width, tiles.height) * Mathf.sqrt2);
|
||||
int peak = 0;
|
||||
|
||||
if(fraction > 0.1f){
|
||||
if(fraction > 0.15f){
|
||||
//phase two: propagate the damage
|
||||
while(!frontier.isEmpty()){
|
||||
peak = Math.max(peak, frontier.size);
|
||||
|
@ -167,6 +167,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
}
|
||||
|
||||
newPresets.reverse();
|
||||
updateSelected();
|
||||
|
||||
if(planets.planet.getLastSector() != null){
|
||||
lookAt(planets.planet.getLastSector());
|
||||
|
Loading…
Reference in New Issue
Block a user