diff --git a/core/src/mindustry/content/Bullets.java b/core/src/mindustry/content/Bullets.java index a3f9a4b313..658f80ac9f 100644 --- a/core/src/mindustry/content/Bullets.java +++ b/core/src/mindustry/content/Bullets.java @@ -44,7 +44,7 @@ public class Bullets implements ContentList{ @Override public void load(){ - artilleryDense = new ArtilleryBulletType(3f, 0, "shell"){{ + artilleryDense = new ArtilleryBulletType(3f, 12, "shell"){{ hitEffect = Fx.flakExplosion; knockback = 0.8f; lifetime = 50f; @@ -64,7 +64,7 @@ public class Bullets implements ContentList{ despawnEffect = Fx.none; }}; - artilleryPlastic = new ArtilleryBulletType(3.4f, 0, "shell"){{ + artilleryPlastic = new ArtilleryBulletType(3.4f, 12, "shell"){{ hitEffect = Fx.plasticExplosion; knockback = 1f; lifetime = 55f; @@ -78,7 +78,7 @@ public class Bullets implements ContentList{ frontColor = Pal.plastaniumFront; }}; - artilleryHoming = new ArtilleryBulletType(3f, 0, "shell"){{ + artilleryHoming = new ArtilleryBulletType(3f, 12, "shell"){{ hitEffect = Fx.flakExplosion; knockback = 0.8f; lifetime = 45f; @@ -90,7 +90,7 @@ public class Bullets implements ContentList{ homingRange = 50f; }}; - artilleryIncendiary = new ArtilleryBulletType(3f, 0, "shell"){{ + artilleryIncendiary = new ArtilleryBulletType(3f, 12, "shell"){{ hitEffect = Fx.blastExplosion; knockback = 0.8f; lifetime = 60f; @@ -104,7 +104,7 @@ public class Bullets implements ContentList{ trailEffect = Fx.incendTrail; }}; - artilleryExplosive = new ArtilleryBulletType(2f, 0, "shell"){{ + artilleryExplosive = new ArtilleryBulletType(2f, 12, "shell"){{ hitEffect = Fx.blastExplosion; knockback = 0.8f; lifetime = 70f; @@ -115,6 +115,9 @@ public class Bullets implements ContentList{ splashDamage = 50f; backColor = Pal.missileYellowBack; frontColor = Pal.missileYellow; + + status = StatusEffects.blasted; + statusDuration = 60f; }}; artilleryUnit = new ArtilleryBulletType(2f, 8, "shell"){{ @@ -192,6 +195,9 @@ public class Bullets implements ContentList{ //default bullet type, no changes shootEffect = Fx.shootBig; ammoMultiplier = 4f; + + status = StatusEffects.blasted; + statusDuration = 60f; }}; flakSurge = new FlakBulletType(4f, 7){{ @@ -212,6 +218,9 @@ public class Bullets implements ContentList{ lifetime = 150f; hitEffect = Fx.blastExplosion; despawnEffect = Fx.blastExplosion; + + status = StatusEffects.blasted; + statusDuration = 60f; }}; missileIncendiary = new MissileBulletType(2.9f, 12, "missile"){{ @@ -361,19 +370,19 @@ public class Bullets implements ContentList{ despawnEffect = Fx.hitBulletSmall; }}; - standardDenseBig = new BasicBulletType(7f, 42, "bullet"){{ + standardDenseBig = new BasicBulletType(7f, 44, "bullet"){{ bulletWidth = 15f; bulletHeight = 21f; shootEffect = Fx.shootBig; }}; - standardThoriumBig = new BasicBulletType(8f, 65, "bullet"){{ + standardThoriumBig = new BasicBulletType(8f, 67, "bullet"){{ bulletWidth = 16f; bulletHeight = 23f; shootEffect = Fx.shootBig; }}; - standardIncendiaryBig = new BasicBulletType(7f, 38, "bullet"){{ + standardIncendiaryBig = new BasicBulletType(7f, 44, "bullet"){{ bulletWidth = 16f; bulletHeight = 21f; frontColor = Pal.lightishOrange; @@ -591,8 +600,7 @@ public class Bullets implements ContentList{ @Override public void init(Bulletc b){ - //TODO owners are never players... - Lightning.create(b.team(), Pal.lancerLaser, damage * (b.owner() instanceof Playerc ? state.rules.playerDamageMultiplier : 1f), b.x(), b.y(), b.rotation(), 30); + Lightning.create(b.team(), Pal.lancerLaser, damage * (b.owner().isLocal() ? state.rules.playerDamageMultiplier : 1f), b.x(), b.y(), b.rotation(), 30); } }; @@ -617,6 +625,9 @@ public class Bullets implements ContentList{ hitEffect = Fx.flakExplosion; shootEffect = Fx.none; smokeEffect = Fx.none; + + status = StatusEffects.blasted; + statusDuration = 60f; }}; bombIncendiary = new BombBulletType(7f, 10f, "shell"){{ diff --git a/core/src/mindustry/content/StatusEffects.java b/core/src/mindustry/content/StatusEffects.java index 45264275b3..d72ddd84db 100644 --- a/core/src/mindustry/content/StatusEffects.java +++ b/core/src/mindustry/content/StatusEffects.java @@ -9,7 +9,7 @@ import mindustry.type.StatusEffect; import static mindustry.Vars.*; public class StatusEffects implements ContentList{ - public static StatusEffect none, burning, freezing, wet, melting, tarred, overdrive, shielded, shocked, corroded, boss; + public static StatusEffect none, burning, freezing, wet, melting, tarred, overdrive, shielded, shocked, blasted, corroded, boss; @Override public void load(){ @@ -17,13 +17,13 @@ public class StatusEffects implements ContentList{ none = new StatusEffect("none"); burning = new StatusEffect("burning"){{ - damage = 0.06f; + damage = 0.075f; effect = Fx.burning; init(() -> { opposite(wet,freezing); trans(tarred, ((unit, time, newTime, result) -> { - unit.damage(1f); + unit.damage(8f); Fx.burning.at(unit.x() + Mathf.range(unit.bounds() / 2f), unit.y() + Mathf.range(unit.bounds() / 2f)); result.set(this, Math.min(time + newTime, 300f)); })); @@ -37,6 +37,11 @@ public class StatusEffects implements ContentList{ init(() -> { opposite(melting, burning); + + trans(blasted, ((unit, time, newTime, result) -> { + unit.damage(18f); + result.set(this, time); + })); }); }}; @@ -98,6 +103,8 @@ public class StatusEffects implements ContentList{ shocked = new StatusEffect("shocked"); + blasted = new StatusEffect("blasted"); + //no effects, just small amounts of damage. corroded = new StatusEffect("corroded"){{ damage = 0.1f; diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 2ca9a20960..e022d26f47 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -299,7 +299,6 @@ public class UnitTypes implements ContentList{ }}; /* - chaosArray = new UnitType("chaos-array", GroundUnit::new){{ maxVelocity = 0.68f; speed = 0.12f; diff --git a/core/src/mindustry/core/Logic.java b/core/src/mindustry/core/Logic.java index de8d3be828..b02198d644 100644 --- a/core/src/mindustry/core/Logic.java +++ b/core/src/mindustry/core/Logic.java @@ -114,8 +114,8 @@ public class Logic implements ApplicationListener{ //disable new waves after the boss spawns Events.on(WaveEvent.class, e -> { - //only works for preset sectors so far - if(state.isCampaign() && state.boss() != null && state.rules.sector.preset != null){ + //only works for non-attack sectors + if(state.isCampaign() && state.boss() != null && !state.rules.attackMode){ state.rules.waitEnemies = true; } }); @@ -188,7 +188,7 @@ public class Logic implements ApplicationListener{ //check if there is a boss present Unitc boss = state.boss(); //if this was a boss wave and there is no boss anymore, then it's a victory - if(state.rules.sector.preset != null && boss == null && state.rules.waves && state.rules.waitEnemies){ + if(boss == null && state.rules.waves && state.rules.waitEnemies){ //the sector has been conquered - waves get disabled state.rules.waves = false; @@ -253,7 +253,7 @@ public class Logic implements ApplicationListener{ } if(state.isCampaign()){ - //TODO implement + //TODO implement? //state.getSector().setLaunched(); } diff --git a/core/src/mindustry/game/Stats.java b/core/src/mindustry/game/Stats.java index 4c45ea100b..397454d69a 100644 --- a/core/src/mindustry/game/Stats.java +++ b/core/src/mindustry/game/Stats.java @@ -116,7 +116,7 @@ public class Stats{ //weigh used fractions float frac = 0f; - Array obtainable = Array.with(zone.data.resources).select(i -> i instanceof Item && ((Item)i).type == ItemType.material).as(Item.class); + Array obtainable = Array.select(zone.data.resources, i -> i instanceof Item && ((Item)i).type == ItemType.material).as(Item.class); for(Item item : obtainable){ frac += Mathf.clamp((float)itemsDelivered.get(item, 0) / capacity) / (float)obtainable.size; } diff --git a/core/src/mindustry/maps/planet/TODOPlanetGenerator.java b/core/src/mindustry/maps/planet/TODOPlanetGenerator.java index d5b9bd4d87..7558f1a03f 100644 --- a/core/src/mindustry/maps/planet/TODOPlanetGenerator.java +++ b/core/src/mindustry/maps/planet/TODOPlanetGenerator.java @@ -21,13 +21,13 @@ public class TODOPlanetGenerator extends PlanetGenerator{ Block[][] arr = { - {Blocks.water, Blocks.darksandWater, Blocks.darksand, Blocks.darksand, Blocks.darksand, Blocks.darksand, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.darksandTaintedWater, Blocks.snow, Blocks.ice}, - {Blocks.water, Blocks.darksandWater, Blocks.darksand, Blocks.darksand, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.darksandTaintedWater, Blocks.snow, Blocks.snow, Blocks.ice}, - {Blocks.water, Blocks.darksandWater, Blocks.darksand, Blocks.sand, Blocks.salt, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.darksandTaintedWater, Blocks.snow, Blocks.ice, Blocks.ice}, - {Blocks.water, Blocks.sandWater, Blocks.sand, Blocks.salt, Blocks.salt, Blocks.salt, Blocks.sand, Blocks.sand, Blocks.iceSnow, Blocks.snow, Blocks.snow, Blocks.ice, Blocks.ice}, + {Blocks.water, Blocks.darksandWater, Blocks.darksand, Blocks.darksand, Blocks.darksand, Blocks.darksand, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.darksandTaintedWater, Blocks.stone, Blocks.stone}, + {Blocks.water, Blocks.darksandWater, Blocks.darksand, Blocks.darksand, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.darksandTaintedWater, Blocks.stone, Blocks.stone, Blocks.stone}, + {Blocks.water, Blocks.darksandWater, Blocks.darksand, Blocks.sand, Blocks.salt, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.darksandTaintedWater, Blocks.stone, Blocks.stone, Blocks.stone}, + {Blocks.water, Blocks.sandWater, Blocks.sand, Blocks.salt, Blocks.salt, Blocks.salt, Blocks.sand, Blocks.stone, Blocks.stone, Blocks.stone, Blocks.snow, Blocks.iceSnow, Blocks.ice}, {Blocks.deepwater, Blocks.water, Blocks.sandWater, Blocks.sand, Blocks.salt, Blocks.sand, Blocks.sand, Blocks.ignarock, Blocks.snow, Blocks.snow, Blocks.snow, Blocks.snow, Blocks.ice}, {Blocks.deepwater, Blocks.water, Blocks.sandWater, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.moss, Blocks.iceSnow, Blocks.snow, Blocks.snow, Blocks.ice, Blocks.snow, Blocks.ice}, - {Blocks.deepwater, Blocks.sandWater, Blocks.sand, Blocks.sand, Blocks.moss, Blocks.moss, Blocks.moss, Blocks.snow, Blocks.snow, Blocks.ice, Blocks.ice, Blocks.snow, Blocks.ice}, + {Blocks.deepwater, Blocks.sandWater, Blocks.sand, Blocks.sand, Blocks.moss, Blocks.moss, Blocks.snow, Blocks.snow, Blocks.snow, Blocks.ice, Blocks.ice, Blocks.snow, Blocks.ice}, {Blocks.taintedWater, Blocks.darksandTaintedWater, Blocks.darksand, Blocks.darksand, Blocks.ignarock, Blocks.moss, Blocks.snow, Blocks.snow, Blocks.snow, Blocks.ice, Blocks.snow, Blocks.ice, Blocks.ice}, {Blocks.darksandWater, Blocks.darksand, Blocks.darksand, Blocks.darksand, Blocks.moss, Blocks.sporeMoss, Blocks.snow, Blocks.snow, Blocks.snow, Blocks.snow, Blocks.snow, Blocks.ice, Blocks.ice}, {Blocks.darksandWater, Blocks.darksand, Blocks.darksand, Blocks.sporeMoss, Blocks.ice, Blocks.ice, Blocks.snow, Blocks.snow, Blocks.snow, Blocks.snow, Blocks.ice, Blocks.ice, Blocks.ice}, diff --git a/core/src/mindustry/type/SectorPreset.java b/core/src/mindustry/type/SectorPreset.java index df24fb0f42..e381ac8e02 100644 --- a/core/src/mindustry/type/SectorPreset.java +++ b/core/src/mindustry/type/SectorPreset.java @@ -93,8 +93,7 @@ public class SectorPreset extends UnlockableContent{ public void updateObjectives(Runnable closure){ Array incomplete = content.sectors() .flatMap(z -> z.requirements) - .select(o -> o.zone() == this && !o.complete()) - .as(SectorObjective.class); + .filter(o -> o.zone() == this && !o.complete()).as(); closure.run(); for(SectorObjective objective : incomplete){ diff --git a/core/src/mindustry/ui/dialogs/ZoneInfoDialog.java b/core/src/mindustry/ui/dialogs/ZoneInfoDialog.java index 2e6a11765b..6f4c4173b5 100644 --- a/core/src/mindustry/ui/dialogs/ZoneInfoDialog.java +++ b/core/src/mindustry/ui/dialogs/ZoneInfoDialog.java @@ -79,7 +79,7 @@ public class ZoneInfoDialog extends FloatingDialog{ } req.row(); - Array blocks = zone.requirements.select(o -> o instanceof Unlock).as(Unlock.class); + Array blocks = zone.requirements.select(o -> o instanceof Unlock).as(); if(!blocks.isEmpty()){ req.table(r -> { diff --git a/core/src/mindustry/world/meta/values/AmmoListValue.java b/core/src/mindustry/world/meta/values/AmmoListValue.java index f1e1c81635..8734632cbc 100644 --- a/core/src/mindustry/world/meta/values/AmmoListValue.java +++ b/core/src/mindustry/world/meta/values/AmmoListValue.java @@ -33,7 +33,7 @@ public class AmmoListValue implements StatValue{ table.table(Tex.underline, bt -> { bt.left().defaults().padRight(3).left(); - if(type.damage > 0){ + if(type.damage > 0 && type.collides){ bt.add(Core.bundle.format("bullet.damage", type.damage)); } diff --git a/gradle.properties b/gradle.properties index 2271444fad..2cc6b111b3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=1cfb465e0113f6eeb17a831d561885ca0b34fa68 +archash=6f712c9333d9415f0184c7d0eb72eec2db095126