Removed most units from tech tree / Bugfixes / Balancing
This commit is contained in:
@@ -102,6 +102,7 @@ public class WaveSpawner{
|
||||
}
|
||||
|
||||
private void reset(){
|
||||
|
||||
flySpawns.clear();
|
||||
groundSpawns.clear();
|
||||
groups = state.rules.spawns;
|
||||
|
||||
@@ -234,6 +234,10 @@ public class TechTree implements ContentList{
|
||||
|
||||
node(alphaDartPad, () -> {
|
||||
node(deltaPad, () -> {
|
||||
node(spiritFactory, () -> {
|
||||
node(phantomFactory);
|
||||
});
|
||||
|
||||
node(javelinPad, () -> {
|
||||
node(tridentPad, () -> {
|
||||
node(glaivePad);
|
||||
@@ -246,20 +250,6 @@ public class TechTree implements ContentList{
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
node(spiritFactory, () -> {
|
||||
node(daggerFactory, () -> {
|
||||
node(titanFactory, () -> {
|
||||
node(fortressFactory);
|
||||
});
|
||||
node(wraithFactory, () -> {
|
||||
node(phantomFactory);
|
||||
node(ghoulFactory, () -> {
|
||||
node(revenantFactory);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -268,7 +258,7 @@ public class TechTree implements ContentList{
|
||||
private TechNode node(Block block, Runnable children){
|
||||
ItemStack[] requirements = new ItemStack[block.buildRequirements.length];
|
||||
for(int i = 0; i < requirements.length; i++){
|
||||
requirements[i] = new ItemStack(block.buildRequirements[i].item, block.buildRequirements[i].amount * 40);
|
||||
requirements[i] = new ItemStack(block.buildRequirements[i].item, block.buildRequirements[i].amount * 35);
|
||||
}
|
||||
|
||||
return new TechNode(block, requirements, children);
|
||||
|
||||
@@ -236,7 +236,7 @@ public class UnitTypes implements ContentList{
|
||||
}};
|
||||
|
||||
revenant = new UnitType("revenant", Revenant.class, Revenant::new){{
|
||||
health = 3000;
|
||||
health = 1000;
|
||||
mass = 5f;
|
||||
hitsize = 20f;
|
||||
speed = 0.1f;
|
||||
@@ -266,7 +266,7 @@ public class UnitTypes implements ContentList{
|
||||
}};
|
||||
|
||||
lich = new UnitType("lich", Revenant.class, Revenant::new){{
|
||||
health = 9000;
|
||||
health = 6000;
|
||||
mass = 20f;
|
||||
hitsize = 40f;
|
||||
speed = 0.01f;
|
||||
@@ -297,7 +297,7 @@ public class UnitTypes implements ContentList{
|
||||
}};
|
||||
|
||||
reaper = new UnitType("reaper", Revenant.class, Revenant::new){{
|
||||
health = 20000;
|
||||
health = 12000;
|
||||
mass = 30f;
|
||||
hitsize = 56f;
|
||||
speed = 0.01f;
|
||||
|
||||
@@ -7,9 +7,8 @@ import io.anuke.annotations.Annotations.Variant;
|
||||
import io.anuke.arc.ApplicationListener;
|
||||
import io.anuke.arc.Core;
|
||||
import io.anuke.arc.collection.IntSet;
|
||||
import io.anuke.mindustry.entities.Entities;
|
||||
import io.anuke.mindustry.entities.EntityGroup;
|
||||
import io.anuke.arc.graphics.Color;
|
||||
import io.anuke.arc.math.RandomXS128;
|
||||
import io.anuke.arc.util.Interval;
|
||||
import io.anuke.arc.util.Log;
|
||||
import io.anuke.arc.util.Time;
|
||||
@@ -17,10 +16,12 @@ import io.anuke.arc.util.io.ReusableByteArrayInputStream;
|
||||
import io.anuke.arc.util.serialization.Base64Coder;
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.core.GameState.State;
|
||||
import io.anuke.mindustry.entities.type.Player;
|
||||
import io.anuke.mindustry.entities.Entities;
|
||||
import io.anuke.mindustry.entities.EntityGroup;
|
||||
import io.anuke.mindustry.entities.traits.BuilderTrait.BuildRequest;
|
||||
import io.anuke.mindustry.entities.traits.SyncTrait;
|
||||
import io.anuke.mindustry.entities.traits.TypeTrait;
|
||||
import io.anuke.mindustry.entities.type.Player;
|
||||
import io.anuke.mindustry.game.Version;
|
||||
import io.anuke.mindustry.gen.Call;
|
||||
import io.anuke.mindustry.gen.RemoteReadClient;
|
||||
@@ -34,7 +35,6 @@ import io.anuke.mindustry.world.modules.ItemModule;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Random;
|
||||
import java.util.zip.InflaterInputStream;
|
||||
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
@@ -364,7 +364,7 @@ public class NetClient implements ApplicationListener{
|
||||
return Core.settings.getString("usid-" + ip, null);
|
||||
}else{
|
||||
byte[] bytes = new byte[8];
|
||||
new Random().nextBytes(bytes);
|
||||
new RandomXS128().nextBytes(bytes);
|
||||
String result = new String(Base64Coder.encode(bytes));
|
||||
Core.settings.put("usid-" + ip, result);
|
||||
Core.settings.save();
|
||||
|
||||
@@ -4,11 +4,10 @@ import io.anuke.arc.Core;
|
||||
import io.anuke.arc.Input.TextInput;
|
||||
import io.anuke.arc.files.FileHandle;
|
||||
import io.anuke.arc.function.Consumer;
|
||||
import io.anuke.arc.math.RandomXS128;
|
||||
import io.anuke.arc.scene.ui.TextField;
|
||||
import io.anuke.arc.util.serialization.Base64Coder;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import static io.anuke.mindustry.Vars.mobile;
|
||||
|
||||
public abstract class Platform {
|
||||
@@ -49,7 +48,7 @@ public abstract class Platform {
|
||||
String uuid = Core.settings.getString("uuid", "");
|
||||
if(uuid.isEmpty()){
|
||||
byte[] result = new byte[8];
|
||||
new Random().nextBytes(result);
|
||||
new RandomXS128().nextBytes(result);
|
||||
uuid = new String(Base64Coder.encode(result));
|
||||
Core.settings.put("uuid", uuid);
|
||||
Core.settings.save();
|
||||
|
||||
@@ -5,14 +5,18 @@ import io.anuke.arc.graphics.g2d.Draw;
|
||||
import io.anuke.arc.graphics.g2d.TextureRegion;
|
||||
import io.anuke.arc.math.Mathf;
|
||||
|
||||
import static io.anuke.mindustry.Vars.headless;
|
||||
|
||||
public class RubbleDecal extends Decal{
|
||||
private static TextureRegion[][] regions = new TextureRegion[16][0];
|
||||
private static final TextureRegion[][] regions = new TextureRegion[16][0];
|
||||
private TextureRegion region;
|
||||
|
||||
/**
|
||||
* Creates a rubble effect at a position. Provide a block size to use.
|
||||
*/
|
||||
public static void create(float x, float y, int size){
|
||||
if(headless) return;
|
||||
|
||||
if(regions[size].length == 0){
|
||||
int i = 0;
|
||||
for(; i < 2; i++){
|
||||
|
||||
@@ -16,6 +16,7 @@ public class ScorchDecal extends Decal{
|
||||
|
||||
public static void create(float x, float y){
|
||||
if(headless) return;
|
||||
|
||||
if(regions[0] == null){
|
||||
for(int i = 0; i < regions.length; i++){
|
||||
regions[i] = Core.atlas.find("scorch" + (i + 1));
|
||||
|
||||
@@ -319,11 +319,11 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
request.redness = Mathf.lerpDelta(request.redness, 1f, 0.2f);
|
||||
}
|
||||
|
||||
|
||||
drawRequest(request);
|
||||
|
||||
//draw last placed request
|
||||
if(!request.remove && request == lastPlaced && request.block != null){
|
||||
Draw.alpha(0f);
|
||||
request.block.drawPlace(tile.x, tile.y, rotation, validPlace(tile.x, tile.y, request.block, rotation));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,8 +103,6 @@ public class NetworkIO{
|
||||
player.resetID(id);
|
||||
player.add();
|
||||
|
||||
world.beginMapLoad();
|
||||
|
||||
//map
|
||||
world.spawner.read(stream);
|
||||
SaveIO.getSaveWriter().readMap(stream);
|
||||
@@ -135,8 +133,6 @@ public class NetworkIO{
|
||||
}
|
||||
}
|
||||
|
||||
world.endMapLoad();
|
||||
|
||||
}catch(IOException e){
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -80,6 +80,8 @@ public class PausedDialog extends FloatingDialog{
|
||||
cont.row();
|
||||
|
||||
cont.addRowImageTextButton("$load", "icon-load", isize, load::show).disabled(b -> Net.active());
|
||||
}else{
|
||||
cont.row();
|
||||
}
|
||||
|
||||
cont.addRowImageTextButton("$hostserver.mobile", "icon-host", isize, ui.host::show).disabled(b -> Net.active());
|
||||
|
||||
@@ -87,6 +87,8 @@ public class HudFragment extends Fragment{
|
||||
}else{
|
||||
ui.chatfrag.toggle();
|
||||
}
|
||||
}else if(world.isZone()){
|
||||
ui.tech.show();
|
||||
}else{
|
||||
ui.database.show();
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import io.anuke.arc.math.geom.Vector2;
|
||||
import io.anuke.arc.scene.Group;
|
||||
import io.anuke.arc.scene.actions.Actions;
|
||||
import io.anuke.arc.scene.event.Touchable;
|
||||
import io.anuke.arc.scene.style.TextureRegionDrawable;
|
||||
import io.anuke.arc.scene.ui.ButtonGroup;
|
||||
import io.anuke.arc.scene.ui.Image;
|
||||
import io.anuke.arc.scene.ui.ImageButton;
|
||||
@@ -153,7 +154,7 @@ public class PlacementFragment extends Fragment{
|
||||
}
|
||||
}).size(46f).group(group).get();
|
||||
|
||||
button.replaceImage(new Image(block.icon(Icon.medium)));
|
||||
button.getStyle().imageUp = new TextureRegionDrawable(block.icon(Icon.medium));
|
||||
|
||||
button.update(() -> { //color unplacable things gray
|
||||
TileEntity core = players[0].getClosestCore();
|
||||
|
||||
@@ -91,7 +91,7 @@ public class ItemBridge extends Block{
|
||||
}
|
||||
|
||||
public Tile findLink(int x, int y){
|
||||
if(linkValid(world.tile(x, y), world.tile(lastPlaced))){
|
||||
if(linkValid(world.tile(x, y), world.tile(lastPlaced)) && lastPlaced != Pos.get(x, y)){
|
||||
return world.tile(lastPlaced);
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ public class ItemBridge extends Block{
|
||||
Tile tile = world.tile(x + p.x * i, y + p.y * i);
|
||||
|
||||
if(tile == null) break;
|
||||
if(tile.block() == this && tile.<ItemBridgeEntity>entity().link == Pos.invalid){
|
||||
if(tile.block() == this && !(tile.x == x && tile.y == y) && tile.entity != null && tile.<ItemBridgeEntity>entity().link == Pos.invalid){
|
||||
return tile;
|
||||
}
|
||||
}
|
||||
@@ -113,7 +113,8 @@ public class ItemBridge extends Block{
|
||||
public void drawPlace(int x, int y, int rotation, boolean valid){
|
||||
Tile link = findLink(x, y);
|
||||
|
||||
Lines.stroke(1f, Pal.placing);
|
||||
Draw.tint(Pal.placing);
|
||||
Lines.stroke(1f);
|
||||
if(link != null){
|
||||
int rot = link.absoluteRelativeTo(x, y);
|
||||
float w = (link.x == x ? tilesize : Math.abs(link.x - x) * tilesize - tilesize);
|
||||
|
||||
Reference in New Issue
Block a user