Targeting fixes / command center fixes
This commit is contained in:
@@ -40,11 +40,11 @@ public class UnitBlocks extends BlockList implements ContentList{
|
|||||||
|
|
||||||
monsoonPad = new UnitPad("monsoon-pad"){{
|
monsoonPad = new UnitPad("monsoon-pad"){{
|
||||||
type = UnitTypes.monsoon;
|
type = UnitTypes.monsoon;
|
||||||
produceTime = 3600;
|
produceTime = 3800;
|
||||||
size = 3;
|
size = 3;
|
||||||
consumes.power(0.2f);
|
consumes.power(0.2f);
|
||||||
shadow = "shadow-round-3";
|
shadow = "shadow-round-3";
|
||||||
consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 30), new ItemStack(Items.titanium, 30), new ItemStack(Items.plastanium, 10)});
|
consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 30), new ItemStack(Items.titanium, 30), new ItemStack(Items.plastanium, 20)});
|
||||||
}};
|
}};
|
||||||
|
|
||||||
daggerPad = new UnitPad("dagger-pad"){{
|
daggerPad = new UnitPad("dagger-pad"){{
|
||||||
@@ -57,7 +57,7 @@ public class UnitBlocks extends BlockList implements ContentList{
|
|||||||
|
|
||||||
titanPad = new UnitPad("titan-pad"){{
|
titanPad = new UnitPad("titan-pad"){{
|
||||||
type = UnitTypes.titan;
|
type = UnitTypes.titan;
|
||||||
produceTime = 3700;
|
produceTime = 3600;
|
||||||
size = 3;
|
size = 3;
|
||||||
consumes.power(0.15f);
|
consumes.power(0.15f);
|
||||||
shadow = "shadow-round-3";
|
shadow = "shadow-round-3";
|
||||||
|
|||||||
@@ -80,9 +80,9 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
|
|||||||
}else if(target == null){
|
}else if(target == null){
|
||||||
retarget(() -> {
|
retarget(() -> {
|
||||||
targetClosest();
|
targetClosest();
|
||||||
targetClosestEnemyFlag(BlockFlag.target);
|
if(target == null) targetClosestEnemyFlag(BlockFlag.target);
|
||||||
targetClosestEnemyFlag(BlockFlag.producer);
|
if(target == null) targetClosestEnemyFlag(BlockFlag.producer);
|
||||||
targetClosestEnemyFlag(BlockFlag.turret);
|
if(target == null) targetClosestEnemyFlag(BlockFlag.turret);
|
||||||
|
|
||||||
if(target == null && !isCommanded()){
|
if(target == null && !isCommanded()){
|
||||||
setState(idle);
|
setState(idle);
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ public class Sectors{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initSector(Sector sector){
|
private void initSector(Sector sector){
|
||||||
double waveChance = 0.3;
|
double waveChance = 0.2;
|
||||||
|
|
||||||
sector.difficulty = (int)(Mathf.dst(sector.x, sector.y));
|
sector.difficulty = (int)(Mathf.dst(sector.x, sector.y));
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import io.anuke.mindustry.entities.Units;
|
|||||||
import io.anuke.mindustry.entities.traits.SpawnerTrait;
|
import io.anuke.mindustry.entities.traits.SpawnerTrait;
|
||||||
import io.anuke.mindustry.entities.units.BaseUnit;
|
import io.anuke.mindustry.entities.units.BaseUnit;
|
||||||
import io.anuke.mindustry.entities.units.UnitType;
|
import io.anuke.mindustry.entities.units.UnitType;
|
||||||
|
import io.anuke.mindustry.game.Team;
|
||||||
import io.anuke.mindustry.gen.Call;
|
import io.anuke.mindustry.gen.Call;
|
||||||
import io.anuke.mindustry.graphics.Palette;
|
import io.anuke.mindustry.graphics.Palette;
|
||||||
import io.anuke.mindustry.graphics.Shaders;
|
import io.anuke.mindustry.graphics.Shaders;
|
||||||
@@ -103,7 +104,7 @@ public class CoreBlock extends StorageBlock{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float handleDamage(Tile tile, float amount){
|
public float handleDamage(Tile tile, float amount){
|
||||||
return debug ? 0 : amount;
|
return debug && tile.getTeam() == Team.blue ? 0 : amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public class CommandCenter extends Block{
|
|||||||
public CommandCenter(String name){
|
public CommandCenter(String name){
|
||||||
super(name);
|
super(name);
|
||||||
|
|
||||||
flags = EnumSet.of(BlockFlag.target);
|
flags = EnumSet.of(BlockFlag.comandCenter, BlockFlag.target);
|
||||||
destructible = true;
|
destructible = true;
|
||||||
solid = true;
|
solid = true;
|
||||||
configurable = true;
|
configurable = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user