Fixed tutorial, many balancing changes

This commit is contained in:
Anuken
2017-12-03 17:08:28 -05:00
parent 9dd2bfaeeb
commit 8481a3a5f3
17 changed files with 125 additions and 94 deletions

View File

@@ -155,9 +155,9 @@ public class Tutorial{
}
public void setDefaultBlocks(int corex, int corey){
world.tile(corex, corey - 1).setBlock(Blocks.air);
world.tile(corex, corey - 2).setBlock(Blocks.air);
world.tile(corex, corey - 2).setFloor(Blocks.stone);
world.tile(corex, corey - 3).setBlock(Blocks.air);
world.tile(corex, corey - 3).setFloor(Blocks.stone);
}
enum Stage{
@@ -203,7 +203,7 @@ public class Tutorial{
canForward = false;
blockRotation = 1;
blockPlaceX = 0;
blockPlaceY = -1;
blockPlaceY = -2;
targetBlock = DistributionBlocks.conveyor;
text = "Use [orange][[R][] to rotate the conveyor to face [orange]forwards[], then place it in the [yellow]marked location[] using the [orange][[left mouse button][].";
}
@@ -216,7 +216,7 @@ public class Tutorial{
canForward = false;
blockRotation = 1;
blockPlaceX = 0;
blockPlaceY = -1;
blockPlaceY = -2;
targetBlock = DistributionBlocks.conveyor;
text = "Use the [orange][[rotate button][] to rotate the conveyor to face [orange]forwards[], drag it into position with one finger, then place it in the [yellow]marked location[] using the [orange][[checkmark][].";
}
@@ -241,7 +241,7 @@ public class Tutorial{
showBlock = true;
canForward = false;
blockPlaceX = 0;
blockPlaceY = -2;
blockPlaceY = -3;
targetBlock = ProductionBlocks.stonedrill;
text = "Now, select and place a [yellow]stone drill[] at the marked location.";
}
@@ -292,11 +292,12 @@ public class Tutorial{
void onSwitch(){
for(int flip : new int[]{1, -1}){
world.tile(control.core.x + flip, control.core.y - 1).setBlock(DistributionBlocks.conveyor, 2 * flip);
world.tile(control.core.x + flip*2, control.core.y - 1).setBlock(DistributionBlocks.conveyor, 2 * flip);
world.tile(control.core.x + flip*2, control.core.y - 2).setBlock(DistributionBlocks.conveyor, 1);
world.tile(control.core.x + flip*2, control.core.y - 3).setFloor(Blocks.stone);
world.tile(control.core.x + flip*2, control.core.y - 3).setBlock(ProductionBlocks.stonedrill);
world.tile(control.core.x + flip, control.core.y - 2).setBlock(DistributionBlocks.conveyor, 2 * flip);
world.tile(control.core.x + flip*2, control.core.y - 2).setBlock(DistributionBlocks.conveyor, 2 * flip);
world.tile(control.core.x + flip*2, control.core.y - 3).setBlock(DistributionBlocks.conveyor, 2 * flip);
world.tile(control.core.x + flip*2, control.core.y - 3).setBlock(DistributionBlocks.conveyor, 1);
world.tile(control.core.x + flip*2, control.core.y - 4).setFloor(Blocks.stone);
world.tile(control.core.x + flip*2, control.core.y - 4).setBlock(ProductionBlocks.stonedrill);
}
}
@@ -308,23 +309,24 @@ public class Tutorial{
showBlock = true;
targetBlock = Blocks.air;
blockPlaceX = 2;
blockPlaceY = -1;
blockPlaceY = -2;
text = !Vars.android ?
"You can delete blocks by holding the [orange]right mouse button[] on the block you want to delete. Try deleting this conveyor.":
"You can delete blocks by [orange]tapping and holding[] on the block you want to delete. Try deleting this conveyor.";
}
},
/*
deleteBlock2{
{
canBack = false;
canForward = false;
showBlock = true;
targetBlock = Blocks.air;
blockPlaceX = 1;
blockPlaceY = -1;
blockPlaceX = -2;
blockPlaceY = -2;
text = "Try deleting this other conveyor too.";
}
},
},*/
placeTurret{
{
canBack = false;
@@ -333,12 +335,12 @@ public class Tutorial{
canPlace = true;
targetBlock = WeaponBlocks.turret;
blockPlaceX = 2;
blockPlaceY = -1;
blockPlaceY = 2;
text = "Now, select and place a [yellow]turret[] at the [yellow]marked location[].";
}
void onSwitch(){
Vars.ui.<ImageButton>find("sectionbuttondefense").fireClick();
Vars.ui.<ImageButton>find("sectionbuttonweapon").fireClick();
}
},
placedTurretAmmo{
@@ -349,6 +351,9 @@ public class Tutorial{
}
void onSwitch(){
for(int i = 0; i < 4; i ++){
world.tile(control.core.x + 2, control.core.y - 2 + i).setBlock(DistributionBlocks.conveyor, 1);
}
Vars.player.recipe = null;
}
},
@@ -518,7 +523,7 @@ public class Tutorial{
void onSwitch(){
world.tile(blockPlaceX + control.core.x, blockPlaceY + control.core.y).setBlock(Blocks.air);
Vars.ui.<ImageButton>find("sectionbuttonproduction").fireClick();
Vars.ui.<ImageButton>find("sectionbuttoncrafting").fireClick();
Vars.control.addItem(Item.steel, 60);
Vars.control.addItem(Item.iron, 60);
}
@@ -535,9 +540,9 @@ public class Tutorial{
world.tile(control.core.x + i + 4, control.core.y + 2).setFloor(Blocks.stone);
}
for(int i = 0; i < 3; i ++){
world.tile(control.core.x + 4 - 1 - i, control.core.y).setBlock(DistributionBlocks.conveyor, 2);
}
world.tile(control.core.x + 3, control.core.y).setBlock(DistributionBlocks.conveyor, 2);
world.tile(control.core.x + 2, control.core.y).setBlock(DistributionBlocks.junction, 2);
world.tile(control.core.x + 2, control.core.y + 1).setBlock(DistributionBlocks.conveyor, 0);
world.tile(control.core.x + 3, control.core.y + 1).setBlock(DistributionBlocks.conveyor, 0);

View File

@@ -124,7 +124,7 @@ public class Enemy extends DestructibleEntity{
void updateShooting(){
if(Timers.get(this, "reload", reload * Vars.multiplier)){
shoot(bullet);
Effects.sound(shootsound, this);
if(shootsound != null) Effects.sound(shootsound, this);
}
}

View File

@@ -6,12 +6,14 @@ import io.anuke.mindustry.Vars;
import io.anuke.mindustry.entities.BulletType;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.util.Mathf;
public class TargetEnemy extends Enemy{
public TargetEnemy(){
speed = 0f;
maxhealth = 10;
maxhealth = 25;
shootsound = null;
}
@Override
@@ -37,7 +39,7 @@ public class TargetEnemy extends Enemy{
Draw.color(Color.YELLOW);
if(Vars.control.getTutorial().showTarget()){
Draw.spikes(x, y, 11f, 4f, 8, Timers.time());
Draw.spikes(x, y, 11f + Mathf.sin(Timers.time(), 7f, 1f), 4f, 8, Timers.time());
}
Draw.color();

View File

@@ -68,6 +68,7 @@ public enum Recipe{
nuclearreactor(power, ProductionBlocks.nuclearReactor, stack(Item.titanium, 40), stack(Item.dirium, 40), stack(Item.steel, 50)),
powerbooster(power, DistributionBlocks.powerbooster, stack(Item.steel, 8), stack(Item.iron, 8)),
powerlaser(power, DistributionBlocks.powerlaser, stack(Item.steel, 3), stack(Item.iron, 3)),
powerlasercorner(power, DistributionBlocks.powerlasercorner, stack(Item.steel, 4), stack(Item.iron, 4)),
powerlaserrouter(power, DistributionBlocks.powerlaserrouter, stack(Item.steel, 5), stack(Item.iron, 5)),
shieldgenerator(power, DefenseBlocks.shieldgenerator, stack(Item.titanium, 30), stack(Item.dirium, 40)),

View File

@@ -286,7 +286,7 @@ public class World extends Module{
if(tile == null) return false;
if(type.isMultiblock() && Vars.control.getTutorial().active() &&
if(!type.isMultiblock() && Vars.control.getTutorial().active() &&
Vars.control.getTutorial().showBlock()){
GridPoint2 point = Vars.control.getTutorial().getPlacePoint();

View File

@@ -92,6 +92,13 @@ public class DistributionBlocks{
fullDescription = "Laser that distributes power to three directions at once. "
+ "Useful in situations where it is required to power multiple blocks from one generator.";
}},
powerlasercorner = new PowerLaserRouter("powerlasercorner"){{
laserDirections = 2;
formalName = "laser corner";
description = "Splits input power into 2 lasers.";
fullDescription = "Laser that distributes power to two directions at once. "
+ "Useful in situations where it is required to power multiple blocks from one generator, and a normal router is imprecise.";
}},
teleporter = new Teleporter("teleporter"){{
description = "[interact]Tap block to config[]\nTeleports items to others of the same color.";
fullDescription = "Advanced item transport block. Teleporters input items to other teleporters of the same color."

View File

@@ -26,6 +26,7 @@ public class WeaponBlocks{
range = 52;
reload = 15f;
bullet = BulletType.stone;
health = 50;
ammo = Item.stone;
fullDescription = "A basic, cheap turret. Uses stone for ammo. Has slightly more range than the double-turret.";
}
@@ -38,6 +39,7 @@ public class WeaponBlocks{
reload = 13f;
bullet = BulletType.stone;
ammo = Item.stone;
health = 55;
health = 50;
fullDescription = "A slightly more powerful version of the turret. Uses stone for ammo. Does significantly more damage, but has a lower range. Shoots two bullets.";
}

View File

@@ -22,6 +22,7 @@ public class LaserTurret extends PowerTurret{
public LaserTurret(String name) {
super(name);
shootsound = null;
}
@Override

View File

@@ -33,6 +33,12 @@ public class PowerTurret extends Turret implements PowerAcceptor{
list.add("[powerinfo]Power/shot: " + Strings.toFixed(powerUsed, 1));
}
@Override
public void postInit(){
super.postInit();
description += "\n[powerinfo]Power/shot: " + Strings.toFixed(powerUsed, 1);
}
@Override
public void drawPixelOverlay(Tile tile){
Vector2 offset = getPlaceOffset();

View File

@@ -158,7 +158,7 @@ public class Turret extends Block{
float reload = Vars.multiplier*this.reload;
if(Angles.angleDist(entity.rotation, targetRot) < shootCone && Timers.get(tile, "reload", reload)){
Effects.sound(shootsound, entity);
if(shootsound != null) Effects.sound(shootsound, entity);
shoot(tile);
consumeAmmo(tile);
entity.ammo --;

View File

@@ -33,7 +33,7 @@ public class LiquidItemJunction extends LiquidBlock{
int dir = source.relativeTo(dest.x, dest.y);
dir = (dir+4)%4;
if(dir % 2 == 0) return false;
if(dir+dest.getRotation() % 2 == 1) return false;
Tile to = dest.getNearby()[dir];
return to != null && to.block() != this && to.block() instanceof LiquidBlock &&
@@ -56,7 +56,7 @@ public class LiquidItemJunction extends LiquidBlock{
public boolean acceptItem(Item item, Tile dest, Tile source){
int dir = source.relativeTo(dest.x, dest.y);
if(dir % 2 == 1) return false;
if((dir+dest.getRotation()) % 2 == 0) return false;
Tile to = dest.getNearby()[dir];
return to != null && to.block().acceptItem(item, to, dest);

View File

@@ -19,7 +19,7 @@ import io.anuke.ucore.core.Timers;
import io.anuke.ucore.util.Strings;
public class LiquidPowerGenerator extends Generator implements LiquidAcceptor{
public int generateTime = 5;
public int generateTime = 15;
public Liquid generateLiquid;
/**Power to generate per generateInput.*/
public float generatePower = 1f;