Campaign fixes & balance
This commit is contained in:
@@ -147,6 +147,7 @@ planetmap = Planet Map
|
|||||||
launchcore = Launch Core
|
launchcore = Launch Core
|
||||||
filename = File Name:
|
filename = File Name:
|
||||||
unlocked = New content unlocked!
|
unlocked = New content unlocked!
|
||||||
|
available = New research available!
|
||||||
completed = [accent]Completed
|
completed = [accent]Completed
|
||||||
techtree = Tech Tree
|
techtree = Tech Tree
|
||||||
research.list = [lightgray]Research:
|
research.list = [lightgray]Research:
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public class SectorPresets implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
frozenForest = new SectorPreset("frozenForest", serpulo, 86){{
|
frozenForest = new SectorPreset("frozenForest", serpulo, 86){{
|
||||||
captureWave = 20;
|
captureWave = 15;
|
||||||
difficulty = 2;
|
difficulty = 2;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|||||||
@@ -556,7 +556,7 @@ public class UnitTypes implements ContentList{
|
|||||||
range = 40f;
|
range = 40f;
|
||||||
|
|
||||||
weapons.add(new Weapon(){{
|
weapons.add(new Weapon(){{
|
||||||
reload = 12f;
|
reload = 24f;
|
||||||
shootCone = 180f;
|
shootCone = 180f;
|
||||||
ejectEffect = Fx.none;
|
ejectEffect = Fx.none;
|
||||||
shootSound = Sounds.explosion;
|
shootSound = Sounds.explosion;
|
||||||
@@ -1321,7 +1321,7 @@ public class UnitTypes implements ContentList{
|
|||||||
sprite = "large-bomb";
|
sprite = "large-bomb";
|
||||||
width = height = 120/4f;
|
width = height = 120/4f;
|
||||||
|
|
||||||
range = 30f;
|
maxRange = 30f;
|
||||||
ignoreRotation = true;
|
ignoreRotation = true;
|
||||||
|
|
||||||
backColor = Pal.heal;
|
backColor = Pal.heal;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import arc.audio.*;
|
|||||||
import arc.graphics.g2d.*;
|
import arc.graphics.g2d.*;
|
||||||
import arc.input.*;
|
import arc.input.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
|
import arc.scene.style.*;
|
||||||
import arc.scene.ui.*;
|
import arc.scene.ui.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
@@ -16,6 +17,7 @@ import mindustry.core.GameState.*;
|
|||||||
import mindustry.entities.*;
|
import mindustry.entities.*;
|
||||||
import mindustry.game.EventType.*;
|
import mindustry.game.EventType.*;
|
||||||
import mindustry.game.*;
|
import mindustry.game.*;
|
||||||
|
import mindustry.game.Objectives.*;
|
||||||
import mindustry.game.Saves.*;
|
import mindustry.game.Saves.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.input.*;
|
import mindustry.input.*;
|
||||||
@@ -24,6 +26,7 @@ import mindustry.io.SaveIO.*;
|
|||||||
import mindustry.maps.Map;
|
import mindustry.maps.Map;
|
||||||
import mindustry.net.*;
|
import mindustry.net.*;
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
|
import mindustry.ui.*;
|
||||||
import mindustry.ui.dialogs.*;
|
import mindustry.ui.dialogs.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
|
|
||||||
@@ -124,10 +127,18 @@ public class Control implements ApplicationListener, Loadable{
|
|||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
Events.on(UnlockEvent.class, e -> ui.hudfrag.showUnlock(e.content));
|
|
||||||
|
|
||||||
Events.on(UnlockEvent.class, e -> {
|
Events.on(UnlockEvent.class, e -> {
|
||||||
|
ui.hudfrag.showUnlock(e.content);
|
||||||
|
|
||||||
checkAutoUnlocks();
|
checkAutoUnlocks();
|
||||||
|
|
||||||
|
if(e.content instanceof SectorPreset){
|
||||||
|
for(TechNode node : TechTree.all){
|
||||||
|
if(!node.content.unlocked() && node.objectives.contains(o -> o instanceof SectorComplete sec && sec.preset == e.content) && !node.objectives.contains(o -> !o.complete())){
|
||||||
|
ui.hudfrag.showToast(new TextureRegionDrawable(node.content.icon(Cicon.large)), bundle.get("available"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Events.on(SectorCaptureEvent.class, e -> {
|
Events.on(SectorCaptureEvent.class, e -> {
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ public abstract class BulletType extends Content{
|
|||||||
* Do not change unless you know what you're doing. */
|
* Do not change unless you know what you're doing. */
|
||||||
public boolean backMove = true;
|
public boolean backMove = true;
|
||||||
/** Bullet range override. */
|
/** Bullet range override. */
|
||||||
public float range = -1f;
|
public float maxRange = -1f;
|
||||||
/** % of block health healed **/
|
/** % of block health healed **/
|
||||||
public float healPercent = 0f;
|
public float healPercent = 0f;
|
||||||
/** whether to make fire on impact */
|
/** whether to make fire on impact */
|
||||||
@@ -154,7 +154,7 @@ public abstract class BulletType extends Content{
|
|||||||
|
|
||||||
/** Returns maximum distance the bullet this bullet type has can travel. */
|
/** Returns maximum distance the bullet this bullet type has can travel. */
|
||||||
public float range(){
|
public float range(){
|
||||||
return Math.max(speed * lifetime * (1f - drag), range);
|
return Math.max(speed * lifetime * (1f - drag), maxRange);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean collides(Bullet bullet, Building tile){
|
public boolean collides(Bullet bullet, Building tile){
|
||||||
|
|||||||
@@ -48,7 +48,8 @@ public class Objectives{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class SectorComplete extends SectorObjective{
|
public static class SectorComplete implements Objective{
|
||||||
|
public SectorPreset preset;
|
||||||
|
|
||||||
public SectorComplete(SectorPreset zone){
|
public SectorComplete(SectorPreset zone){
|
||||||
this.preset = zone;
|
this.preset = zone;
|
||||||
@@ -67,11 +68,6 @@ public class Objectives{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO merge
|
|
||||||
public abstract static class SectorObjective implements Objective{
|
|
||||||
public SectorPreset preset;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Defines a specific objective for a game. */
|
/** Defines a specific objective for a game. */
|
||||||
public interface Objective{
|
public interface Objective{
|
||||||
|
|
||||||
@@ -86,9 +82,5 @@ public class Objectives{
|
|||||||
default void build(Table table){
|
default void build(Table table){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
default SectorPreset zone(){
|
|
||||||
return this instanceof SectorObjective ? ((SectorObjective)this).preset : null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ public class Waves{
|
|||||||
int cap = 150;
|
int cap = 150;
|
||||||
|
|
||||||
float shieldStart = 30, shieldsPerWave = 20 + difficulty*30f;
|
float shieldStart = 30, shieldsPerWave = 20 + difficulty*30f;
|
||||||
float[] scaling = {1, 1, 1.5f, 3f, 4f};
|
float[] scaling = {1, 1.2f, 1.5f, 3f, 4f};
|
||||||
|
|
||||||
Intc createProgression = start -> {
|
Intc createProgression = start -> {
|
||||||
//main sequence
|
//main sequence
|
||||||
@@ -298,7 +298,7 @@ public class Waves{
|
|||||||
begin = f;
|
begin = f;
|
||||||
end = f + next >= cap ? never : f + next;
|
end = f + next >= cap ? never : f + next;
|
||||||
max = 13;
|
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;
|
shields = shieldAmount;
|
||||||
shieldScaling = shieldsPerWave;
|
shieldScaling = shieldsPerWave;
|
||||||
spacing = space;
|
spacing = space;
|
||||||
@@ -310,7 +310,7 @@ public class Waves{
|
|||||||
begin = f + next - 1;
|
begin = f + next - 1;
|
||||||
end = f + next + rand.random(6, 10);
|
end = f + next + rand.random(6, 10);
|
||||||
max = 6;
|
max = 6;
|
||||||
unitScaling = rand.random(1f, 2f);
|
unitScaling = rand.random(2f, 4f);
|
||||||
spacing = rand.random(2, 4);
|
spacing = rand.random(2, 4);
|
||||||
shields = shieldAmount/2f;
|
shields = shieldAmount/2f;
|
||||||
shieldScaling = shieldsPerWave;
|
shieldScaling = shieldsPerWave;
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ public class SectorDamage{
|
|||||||
//first, calculate the total health of blocks in the path
|
//first, calculate the total health of blocks in the path
|
||||||
|
|
||||||
//radius around the path that gets counted
|
//radius around the path that gets counted
|
||||||
int radius = 8;
|
int radius = 9;
|
||||||
IntSet counted = new IntSet();
|
IntSet counted = new IntSet();
|
||||||
|
|
||||||
for(Tile t : sparse2){
|
for(Tile t : sparse2){
|
||||||
|
|||||||
@@ -328,7 +328,7 @@ public class UnitType extends UnlockableContent{
|
|||||||
//suicide enemy
|
//suicide enemy
|
||||||
if(weapons.contains(w -> w.bullet.killShooter)){
|
if(weapons.contains(w -> w.bullet.killShooter)){
|
||||||
//scale down DPS to be insignificant
|
//scale down DPS to be insignificant
|
||||||
dpsEstimate /= 20f;
|
dpsEstimate /= 25f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user