Harder default waves

This commit is contained in:
Anuken
2020-10-09 13:52:07 -04:00
parent 96656bac6b
commit c78088ab5f
17 changed files with 15 additions and 7 deletions

View File

@@ -354,6 +354,7 @@ public class Bullets implements ContentList{
width = 16f;
height = 23f;
shootEffect = Fx.shootBig;
pierceCap = 2;
}};
standardIncendiaryBig = new BasicBulletType(7f, 60, "bullet"){{
@@ -363,6 +364,7 @@ public class Bullets implements ContentList{
backColor = Pal.lightOrange;
status = StatusEffects.burning;
shootEffect = Fx.shootBig;
pierceCap = 2;
}};
damageLightning = new BulletType(0.0001f, 0f){{

View File

@@ -56,11 +56,11 @@ public class DefaultWaves{
}},
new SpawnGroup(dagger){{
begin = 8;
begin = 12;
unitScaling = 1;
unitAmount = 4;
spacing = 2;
shieldScaling = 15f;
shieldScaling = 10f;
max = 20;
}},
@@ -176,6 +176,7 @@ public class DefaultWaves{
unitAmount = 4;
unitScaling = 1;
spacing = 3;
shieldScaling = 5f;
}},
new SpawnGroup(scepter){{

View File

@@ -1,5 +1,6 @@
package mindustry.game;
import arc.util.*;
import arc.util.serialization.*;
import arc.util.serialization.Json.*;
import mindustry.content.*;
@@ -37,8 +38,10 @@ public class SpawnGroup implements Serializable{
/** Amount of enemies spawned initially, with no scaling */
public int unitAmount = 1;
/** Status effect applied to the spawned unit. Null to disable. */
@Nullable
public StatusEffect effect;
/** Items this unit spawns with. Null to disable. */
@Nullable
public ItemStack items;
public SpawnGroup(UnitType type){
@@ -90,7 +93,7 @@ public class SpawnGroup implements Serializable{
if(shields != 0) json.writeValue("shields", shields);
if(shieldScaling != 0) json.writeValue("shieldScaling", shieldScaling);
if(unitAmount != 1) json.writeValue("amount", unitAmount);
if(effect != null) json.writeValue("effect", effect.id);
if(effect != null) json.writeValue("effect", effect.name);
}
@Override
@@ -107,7 +110,7 @@ public class SpawnGroup implements Serializable{
shields = data.getFloat("shields", 0);
shieldScaling = data.getFloat("shieldScaling", 0);
unitAmount = data.getInt("amount", 1);
effect = content.getByID(ContentType.status, data.getInt("effect", -1));
effect = content.getByName(ContentType.status, data.hasChild("effect") && data.getChild("effect").isString() ? data.getString("effect", "none") : "none");
}
@Override

View File

@@ -263,8 +263,10 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
pass((x, y) -> {
//random moss
if(floor == Blocks.sporeMoss && rand.chance(0.9)){
floor = Blocks.moss;
if(floor == Blocks.sporeMoss){
if(Math.abs(0.5f - noise(x - 90, y, 4, 0.8, 65)) > 0.02){
floor = Blocks.moss;
}
}
//tar