diff --git a/core/assets/music/place.wav b/core/assets/music/place.wav new file mode 100644 index 0000000000..f9f194d208 Binary files /dev/null and b/core/assets/music/place.wav differ diff --git a/core/assets/music/shoot.wav b/core/assets/music/shoot.wav new file mode 100644 index 0000000000..df95d03a3c Binary files /dev/null and b/core/assets/music/shoot.wav differ diff --git a/core/assets/sprites/moment.atlas b/core/assets/sprites/moment.atlas index df3b54a81e..47f7f3fe89 100644 --- a/core/assets/sprites/moment.atlas +++ b/core/assets/sprites/moment.atlas @@ -165,13 +165,6 @@ grass orig: 8, 8 offset: 0, 0 index: -1 -healturret - rotate: false - xy: 49, 21 - size: 10, 10 - orig: 10, 10 - offset: 0, 0 - index: -1 icon-coal rotate: false xy: 247, 23 @@ -251,7 +244,7 @@ laserend index: -1 machineturret rotate: false - xy: 49, 9 + xy: 49, 21 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -263,9 +256,9 @@ mech1 orig: 8, 8 offset: 0, 0 index: -1 -megahealturret +megarepairturret rotate: false - xy: 61, 21 + xy: 49, 9 size: 10, 10 orig: 10, 10 offset: 0, 0 @@ -277,6 +270,13 @@ player orig: 8, 8 offset: 0, 0 index: -1 +repairturret + rotate: false + xy: 61, 21 + size: 10, 10 + orig: 10, 10 + offset: 0, 0 + index: -1 router rotate: false xy: 198, 13 diff --git a/core/assets/sprites/moment.png b/core/assets/sprites/moment.png index b55ad4a78a..ff944819a8 100644 Binary files a/core/assets/sprites/moment.png and b/core/assets/sprites/moment.png differ diff --git a/core/src/io/anuke/moment/Control.java b/core/src/io/anuke/moment/Control.java index b55590a45c..fb48c76c5e 100644 --- a/core/src/io/anuke/moment/Control.java +++ b/core/src/io/anuke/moment/Control.java @@ -12,7 +12,6 @@ import com.badlogic.gdx.math.MathUtils; import com.badlogic.gdx.math.Rectangle; import com.badlogic.gdx.math.Vector2; -import io.anuke.gif.GifRecorder; import io.anuke.moment.ai.Pathfind; import io.anuke.moment.entities.TileEntity; import io.anuke.moment.resource.ItemStack; @@ -29,7 +28,7 @@ import io.anuke.ucore.util.Mathf; import io.anuke.ucore.util.Timers; public class Control extends RendererModule{ - GifRecorder recorder = new GifRecorder(batch); + //GifRecorder recorder = new GifRecorder(batch); int rangex = 10, rangey = 10; float breaktime = 0; float breakdur = 50; @@ -290,7 +289,7 @@ public class Control extends RendererModule{ drawDefault(); - recorder.update(); + //recorder.update(); } @Override @@ -431,7 +430,7 @@ public class Control extends RendererModule{ buffers.remove("shadow"); buffers.add("shadow", (int) (Gdx.graphics.getWidth() / cameraScale), (int) (Gdx.graphics.getHeight() / cameraScale)); - rangex = (int) (width / tilesize / cameraScale/2)+1; - rangey = (int) (height / tilesize / cameraScale/2)+1; + rangex = (int) (width / tilesize / cameraScale/2)+2; + rangey = (int) (height / tilesize / cameraScale/2)+2; } } diff --git a/core/src/io/anuke/moment/Moment.java b/core/src/io/anuke/moment/Moment.java index 7436ad0a55..46f20f0be5 100644 --- a/core/src/io/anuke/moment/Moment.java +++ b/core/src/io/anuke/moment/Moment.java @@ -34,7 +34,7 @@ public class Moment extends ModuleController{ public float respawntime = 60*5; public int wave = 1; - public float wavespace = 20*60; + public float wavespace = 35*60; public float wavetime; public float spawnspace = 65; public Tile core; @@ -90,6 +90,7 @@ public class Moment extends ModuleController{ //if(UInput.keyUp(Keys.Q)) // System.out.println("Enemies: " + Enemy.amount + " Wavetime: " + wavetime + " Wave: " + wave + " Wavespace: " + wavespace); + //System.out.println(Enemy.amount); if(Enemy.amount <= 0) wavetime -= delta(); @@ -123,13 +124,13 @@ public class Moment extends ModuleController{ generate(); player.x = core.worldx(); - player.y = core.worldy()+10; + player.y = core.worldy()-8; items.put(Item.stone, 20); - items.put(Item.stone, 2000); - items.put(Item.iron, 2000); - items.put(Item.steel, 2000); + //items.put(Item.stone, 2000); + //items.put(Item.iron, 2000); + //items.put(Item.steel, 2000); if(get(UI.class).about != null) get(UI.class).updateItems(); @@ -160,19 +161,20 @@ public class Moment extends ModuleController{ int x = core.x, y = core.y; set(x, y-1, TileType.conveyor, 1); - set(x, y-2, TileType.router, 0); + set(x, y-2, TileType.conveyor, 1); set(x, y-3, TileType.conveyor, 1); set(x, y-4, TileType.stonedrill, 0); //just in case tiles[x][y-4].setFloor(TileType.stone); - set(x+1, y-2, TileType.conveyor, 0); - set(x+2, y-2, TileType.conveyor, 1); + + tiles[x+2][y-2].setFloor(TileType.stone); + set(x+2, y-2, TileType.stonedrill, 0); set(x+2, y-1, TileType.conveyor, 1); set(x+2, y, TileType.turret, 0); - set(x-1, y-2, TileType.conveyor, 2); - set(x-2, y-2, TileType.conveyor, 1); + tiles[x-2][y-2].setFloor(TileType.stone); + set(x-2, y-2, TileType.stonedrill, 0); set(x-2, y-1, TileType.conveyor, 1); set(x-2, y, TileType.turret, 0); } diff --git a/core/src/io/anuke/moment/UI.java b/core/src/io/anuke/moment/UI.java index 78d222964c..3ac2d554c1 100644 --- a/core/src/io/anuke/moment/UI.java +++ b/core/src/io/anuke/moment/UI.java @@ -169,12 +169,14 @@ public class UI extends SceneModule{ tutorial.content().add( "[GREEN]Default Controls:[WHITE]\n[YELLOW][[WASD][] to move, [YELLOW][[R][] to rotate blocks." - + "\n[YELLOW][[R-MOUSE][] to destroy blocks, [YELLOW][[L-MOUSE][] to place them." + + "\nHold [YELLOW][[R-MOUSE][] to destroy blocks, click [YELLOW][[L-MOUSE][] to place them." + "\n[YELLOW][[L-MOUSE][] to shoot." + "\n\n[GOLD]Every 20 seconds, a new wave will appear." + "\nBuild turrets to defend the core." + "\nIf the core is destroyed, you lose the game." + "\n[LIME]To collect building resources, \nmove them into the core with conveyors." + + "\n[LIME]Place [ORANGE]drills[] on the right material,\nthey will automatically mine material\nand dump it to nearby conveyors or turrets." + + "\n\n[SCARLET]To produce steel, feed coal and iron into a smelter." ); tutorial.content().pad(8); diff --git a/core/src/io/anuke/moment/entities/Enemy.java b/core/src/io/anuke/moment/entities/Enemy.java index 6f342ef919..ccb814d791 100644 --- a/core/src/io/anuke/moment/entities/Enemy.java +++ b/core/src/io/anuke/moment/entities/Enemy.java @@ -45,7 +45,13 @@ public class Enemy extends DestructibleEntity{ Moment.module(Control.class).tryMove(this, vec.x*delta, vec.y*delta); //if(Timers.get(this, 10)) - target = TileType.findTileTarget(x, y, null, range, false); + target = TileType.findTileTarget(x, y, null, range, false); + + //no tile found + if(target == null) + target = Entities.getClosest(x, y, range, e->{ + return e instanceof Player; + }); if(target != null){ if(Timers.get(this, reload)){ diff --git a/core/src/io/anuke/moment/entities/Player.java b/core/src/io/anuke/moment/entities/Player.java index 77b3589e76..8cb660812c 100644 --- a/core/src/io/anuke/moment/entities/Player.java +++ b/core/src/io/anuke/moment/entities/Player.java @@ -36,7 +36,7 @@ public class Player extends DestructibleEntity{ Effects.effect("respawn", this); Timers.run(Moment.i.respawntime, ()->{ - set(Moment.i.core.worldx(), Moment.i.core.worldy()+8); + set(Moment.i.core.worldx(), Moment.i.core.worldy()-8); heal(); add(); }); @@ -53,7 +53,7 @@ public class Player extends DestructibleEntity{ @Override public void update(){ - if(health < maxhealth && Timers.get(this, 30)) + if(health < maxhealth && Timers.get(this, 50)) health ++; vector.set(0, 0); diff --git a/core/src/io/anuke/moment/resource/Recipe.java b/core/src/io/anuke/moment/resource/Recipe.java index 5d36747ee3..a9bf9cfe95 100644 --- a/core/src/io/anuke/moment/resource/Recipe.java +++ b/core/src/io/anuke/moment/resource/Recipe.java @@ -22,8 +22,8 @@ public enum Recipe{ flameturret(defense, TileType.flameturret, stack(Item.iron, 25), stack(Item.steel, 18)), sniperturret(defense, TileType.sniperturret, stack(Item.iron, 30), stack(Item.steel, 20)), - healturret(defense, TileType.healturret, stack(Item.iron, 40)), - megahealturret(defense, TileType.megahealturret, stack(Item.iron, 30), stack(Item.steel, 40)), + healturret(defense, TileType.repairturret, stack(Item.iron, 40)), + megahealturret(defense, TileType.megarepairturret, stack(Item.iron, 30), stack(Item.steel, 40)), drill(production, TileType.stonedrill, stack(Item.stone, 6)), irondrill(production, TileType.irondrill, stack(Item.stone, 40)), diff --git a/core/src/io/anuke/moment/world/TileType.java b/core/src/io/anuke/moment/world/TileType.java index 6ea158ae88..c9d484ec8c 100644 --- a/core/src/io/anuke/moment/world/TileType.java +++ b/core/src/io/anuke/moment/world/TileType.java @@ -415,7 +415,7 @@ public enum TileType{ } }, - healturret(true, true, false){ + repairturret(true, true, false){ { range = 30; reload = 40f; @@ -469,7 +469,7 @@ public enum TileType{ return "Heals nearby tiles."; } }, - megahealturret(true, true, false){ + megarepairturret(true, true, false){ { range = 30; reload = 20f;