Balancing / Fixed bridge contamination
This commit is contained in:
@@ -224,7 +224,7 @@ public class Mechs implements ContentList{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getExtraArmor(Player player){
|
public float getExtraArmor(Player player){
|
||||||
return player.altHeat * 40f;
|
return player.altHeat * 30f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ public class Recipes implements ContentList{
|
|||||||
new Recipe(defense, DefenseBlocks.surgeWall, new ItemStack(Items.surgealloy, 12));
|
new Recipe(defense, DefenseBlocks.surgeWall, new ItemStack(Items.surgealloy, 12));
|
||||||
new Recipe(defense, DefenseBlocks.surgeWallLarge, new ItemStack(Items.surgealloy, 12 * 4));
|
new Recipe(defense, DefenseBlocks.surgeWallLarge, new ItemStack(Items.surgealloy, 12 * 4));
|
||||||
|
|
||||||
|
|
||||||
//projectors
|
//projectors
|
||||||
new Recipe(defense, DefenseBlocks.mendProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 150), new ItemStack(Items.titanium, 150), new ItemStack(Items.silicon, 250));
|
new Recipe(defense, DefenseBlocks.mendProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 150), new ItemStack(Items.titanium, 150), new ItemStack(Items.silicon, 250));
|
||||||
|
|
||||||
|
|||||||
@@ -27,10 +27,10 @@ public class UnitTypes implements ContentList{
|
|||||||
{
|
{
|
||||||
isFlying = true;
|
isFlying = true;
|
||||||
drag = 0.005f;
|
drag = 0.005f;
|
||||||
speed = 0.5f;
|
speed = 0.6f;
|
||||||
maxVelocity = 1.6f;
|
maxVelocity = 1.7f;
|
||||||
range = 40f;
|
range = 40f;
|
||||||
health = 35;
|
health = 45;
|
||||||
weapon = Weapons.droneBlaster;
|
weapon = Weapons.droneBlaster;
|
||||||
trailColor = Color.valueOf("ffd37f");
|
trailColor = Color.valueOf("ffd37f");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public class Weapons implements ContentList{
|
|||||||
|
|
||||||
droneBlaster = new Weapon("blaster"){{
|
droneBlaster = new Weapon("blaster"){{
|
||||||
length = 2f;
|
length = 2f;
|
||||||
reload = 30f;
|
reload = 25f;
|
||||||
width = 1f;
|
width = 1f;
|
||||||
roundrobin = true;
|
roundrobin = true;
|
||||||
ejectEffect = ShootFx.shellEjectSmall;
|
ejectEffect = ShootFx.shellEjectSmall;
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ public class CraftingBlocks extends BlockList implements ContentList{
|
|||||||
itemCapacity = 50;
|
itemCapacity = 50;
|
||||||
craftTime = 25f;
|
craftTime = 25f;
|
||||||
outputLiquid = Liquids.oil;
|
outputLiquid = Liquids.oil;
|
||||||
outputLiquidAmount = 1.4f;
|
outputLiquidAmount = 1.5f;
|
||||||
size = 2;
|
size = 2;
|
||||||
health = 320;
|
health = 320;
|
||||||
hasLiquids = true;
|
hasLiquids = true;
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ public class ProductionBlocks extends BlockList implements ContentList{
|
|||||||
updateEffect = BlockFx.pulverize;
|
updateEffect = BlockFx.pulverize;
|
||||||
liquidCapacity = 50f;
|
liquidCapacity = 50f;
|
||||||
updateEffectChance = 0.05f;
|
updateEffectChance = 0.05f;
|
||||||
pumpAmount = 0.08f;
|
pumpAmount = 0.09f;
|
||||||
size = 3;
|
size = 3;
|
||||||
liquidCapacity = 30f;
|
liquidCapacity = 30f;
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public class UnitBlocks extends BlockList implements ContentList{
|
|||||||
public void load(){
|
public void load(){
|
||||||
dronePad = new UnitPad("drone-pad"){{
|
dronePad = new UnitPad("drone-pad"){{
|
||||||
type = UnitTypes.drone;
|
type = UnitTypes.drone;
|
||||||
produceTime = 5500;
|
produceTime = 5700;
|
||||||
size = 2;
|
size = 2;
|
||||||
consumes.power(0.08f);
|
consumes.power(0.08f);
|
||||||
consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 30), new ItemStack(Items.lead, 30)});
|
consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 30), new ItemStack(Items.lead, 30)});
|
||||||
@@ -24,7 +24,7 @@ public class UnitBlocks extends BlockList implements ContentList{
|
|||||||
|
|
||||||
fabricatorPad = new UnitPad("fabricator-pad"){{
|
fabricatorPad = new UnitPad("fabricator-pad"){{
|
||||||
type = UnitTypes.fabricator;
|
type = UnitTypes.fabricator;
|
||||||
produceTime = 7000;
|
produceTime = 7300;
|
||||||
size = 2;
|
size = 2;
|
||||||
consumes.power(0.2f);
|
consumes.power(0.2f);
|
||||||
consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 70), new ItemStack(Items.lead, 80), new ItemStack(Items.titanium, 80)});
|
consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 70), new ItemStack(Items.lead, 80), new ItemStack(Items.titanium, 80)});
|
||||||
@@ -32,7 +32,7 @@ public class UnitBlocks extends BlockList implements ContentList{
|
|||||||
|
|
||||||
interceptorPad = new UnitPad("interceptor-pad"){{
|
interceptorPad = new UnitPad("interceptor-pad"){{
|
||||||
type = UnitTypes.interceptor;
|
type = UnitTypes.interceptor;
|
||||||
produceTime = 1900;
|
produceTime = 1800;
|
||||||
size = 2;
|
size = 2;
|
||||||
consumes.power(0.1f);
|
consumes.power(0.1f);
|
||||||
consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 10), new ItemStack(Items.titanium, 10)});
|
consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 10), new ItemStack(Items.titanium, 10)});
|
||||||
@@ -40,7 +40,7 @@ public class UnitBlocks extends BlockList implements ContentList{
|
|||||||
|
|
||||||
monsoonPad = new UnitPad("monsoon-pad"){{
|
monsoonPad = new UnitPad("monsoon-pad"){{
|
||||||
type = UnitTypes.monsoon;
|
type = UnitTypes.monsoon;
|
||||||
produceTime = 3800;
|
produceTime = 3600;
|
||||||
size = 3;
|
size = 3;
|
||||||
consumes.power(0.2f);
|
consumes.power(0.2f);
|
||||||
shadow = "shadow-round-3";
|
shadow = "shadow-round-3";
|
||||||
@@ -49,15 +49,15 @@ public class UnitBlocks extends BlockList implements ContentList{
|
|||||||
|
|
||||||
daggerPad = new UnitPad("dagger-pad"){{
|
daggerPad = new UnitPad("dagger-pad"){{
|
||||||
type = UnitTypes.dagger;
|
type = UnitTypes.dagger;
|
||||||
produceTime = 1800;
|
produceTime = 1700;
|
||||||
size = 2;
|
size = 2;
|
||||||
consumes.power(0.05f);
|
consumes.power(0.05f);
|
||||||
consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 10), new ItemStack(Items.copper, 15)});
|
consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 10), new ItemStack(Items.copper, 10)});
|
||||||
}};
|
}};
|
||||||
|
|
||||||
titanPad = new UnitPad("titan-pad"){{
|
titanPad = new UnitPad("titan-pad"){{
|
||||||
type = UnitTypes.titan;
|
type = UnitTypes.titan;
|
||||||
produceTime = 3600;
|
produceTime = 3400;
|
||||||
size = 3;
|
size = 3;
|
||||||
consumes.power(0.15f);
|
consumes.power(0.15f);
|
||||||
shadow = "shadow-round-3";
|
shadow = "shadow-round-3";
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import static io.anuke.mindustry.Vars.*;
|
|||||||
|
|
||||||
public class Sectors{
|
public class Sectors{
|
||||||
private static final int sectorImageSize = 32;
|
private static final int sectorImageSize = 32;
|
||||||
private static final float sectorLargeChance = 0.23f;
|
private static final float sectorLargeChance = 0.24f;
|
||||||
|
|
||||||
private GridMap<Sector> grid = new GridMap<>();
|
private GridMap<Sector> grid = new GridMap<>();
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ public class Sectors{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initSector(Sector sector){
|
private void initSector(Sector sector){
|
||||||
double waveChance = 0.2;
|
double waveChance = 0.3;
|
||||||
|
|
||||||
sector.difficulty = (int)(Mathf.dst(sector.x, sector.y));
|
sector.difficulty = (int)(Mathf.dst(sector.x, sector.y));
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import io.anuke.mindustry.content.Items;
|
|||||||
import io.anuke.mindustry.content.Liquids;
|
import io.anuke.mindustry.content.Liquids;
|
||||||
import io.anuke.mindustry.content.blocks.*;
|
import io.anuke.mindustry.content.blocks.*;
|
||||||
import io.anuke.mindustry.game.Team;
|
import io.anuke.mindustry.game.Team;
|
||||||
import io.anuke.mindustry.maps.generation.pathfinding.AStarPathFinder;
|
|
||||||
import io.anuke.mindustry.type.AmmoType;
|
import io.anuke.mindustry.type.AmmoType;
|
||||||
import io.anuke.mindustry.type.Item;
|
import io.anuke.mindustry.type.Item;
|
||||||
import io.anuke.mindustry.type.Recipe;
|
import io.anuke.mindustry.type.Recipe;
|
||||||
@@ -84,11 +83,10 @@ public class FortressGenerator{
|
|||||||
Drill powerDrill = (Drill) powerDrills.get((int)(difficultyScl * powerDrills.size));
|
Drill powerDrill = (Drill) powerDrills.get((int)(difficultyScl * powerDrills.size));
|
||||||
|
|
||||||
Turret powerTurret = (Turret) powerTurrets.get((int)(difficultyScl * powerTurrets.size));
|
Turret powerTurret = (Turret) powerTurrets.get((int)(difficultyScl * powerTurrets.size));
|
||||||
Turret bigTurret = (Turret) turrets.get(Mathf.clamp((int)((difficultyScl+0.3f+gen.random.range(0.2f)) * turrets.size), 0, turrets.size-1));
|
Turret bigTurret = (Turret) turrets.get(Mathf.clamp((int)((difficultyScl+0.2f+gen.random.range(0.2f)) * turrets.size), 0, turrets.size-1));
|
||||||
Turret turret1 = (Turret) turrets.get(Mathf.clamp((int)((difficultyScl+gen.random.range(0.2f)) * turrets.size), 0, turrets.size-1));
|
Turret turret1 = (Turret) turrets.get(Mathf.clamp((int)((difficultyScl+gen.random.range(0.2f)) * turrets.size), 0, turrets.size-1));
|
||||||
Turret turret2 = (Turret) turrets.get(Mathf.clamp((int)((difficultyScl+gen.random.range(0.2f)) * turrets.size), 0, turrets.size-1));
|
Turret turret2 = (Turret) turrets.get(Mathf.clamp((int)((difficultyScl+gen.random.range(0.2f)) * turrets.size), 0, turrets.size-1));
|
||||||
|
float placeChance = difficultyScl*0.75f+0.25f;
|
||||||
AStarPathFinder finder = new AStarPathFinder(gen.tiles);
|
|
||||||
|
|
||||||
IntIntMap ammoPerType = new IntIntMap();
|
IntIntMap ammoPerType = new IntIntMap();
|
||||||
for(Block turret : turrets){
|
for(Block turret : turrets){
|
||||||
@@ -112,7 +110,7 @@ public class FortressGenerator{
|
|||||||
};
|
};
|
||||||
|
|
||||||
BiFunction<Block, Predicate<Tile>, IntPositionConsumer> seeder = (block, pred) -> (x, y) -> {
|
BiFunction<Block, Predicate<Tile>, IntPositionConsumer> seeder = (block, pred) -> (x, y) -> {
|
||||||
if(gen.canPlace(x, y, block) && ((block instanceof Wall && block.size == 1) || gen.random.chance(difficultyScl/2f+0.5f)) && checker.get(gen.tile(x, y), block, pred)){
|
if(gen.canPlace(x, y, block) && ((block instanceof Wall && block.size == 1) || gen.random.chance(placeChance)) && checker.get(gen.tile(x, y), block, pred)){
|
||||||
gen.setBlock(x, y, block, team);
|
gen.setBlock(x, y, block, team);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -122,7 +120,7 @@ public class FortressGenerator{
|
|||||||
(x, y) -> {
|
(x, y) -> {
|
||||||
Block block = PowerBlocks.largeSolarPanel;
|
Block block = PowerBlocks.largeSolarPanel;
|
||||||
|
|
||||||
if(gen.random.chance(0.001) && gen.canPlace(x, y, block)){
|
if(gen.random.chance(0.001*placeChance) && gen.canPlace(x, y, block)){
|
||||||
gen.setBlock(x, y, block, team);
|
gen.setBlock(x, y, block, team);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -132,7 +130,7 @@ public class FortressGenerator{
|
|||||||
|
|
||||||
//drills (not powered)
|
//drills (not powered)
|
||||||
(x, y) -> {
|
(x, y) -> {
|
||||||
if(!gen.random.chance(0.1)) return;
|
if(!gen.random.chance(0.1*placeChance)) return;
|
||||||
|
|
||||||
Item item = gen.drillItem(x, y, drill);
|
Item item = gen.drillItem(x, y, drill);
|
||||||
if(item != null && item != Items.stone && item != Items.sand && gen.canPlace(x, y, drill)){
|
if(item != null && item != Items.stone && item != Items.sand && gen.canPlace(x, y, drill)){
|
||||||
@@ -142,7 +140,7 @@ public class FortressGenerator{
|
|||||||
|
|
||||||
//drills (not powered)
|
//drills (not powered)
|
||||||
(x, y) -> {
|
(x, y) -> {
|
||||||
if(!gen.random.chance(0.1)) return;
|
if(!gen.random.chance(0.1*placeChance)) return;
|
||||||
|
|
||||||
if(gen.tile(x, y).floor().isLiquid && gen.tile(x, y).floor().liquidDrop == Liquids.water){
|
if(gen.tile(x, y).floor().isLiquid && gen.tile(x, y).floor().liquidDrop == Liquids.water){
|
||||||
gen.setBlock(x, y, LiquidBlocks.mechanicalPump, team);
|
gen.setBlock(x, y, LiquidBlocks.mechanicalPump, team);
|
||||||
@@ -154,7 +152,7 @@ public class FortressGenerator{
|
|||||||
|
|
||||||
//drills (powered)
|
//drills (powered)
|
||||||
(x, y) -> {
|
(x, y) -> {
|
||||||
if(gen.random.chance(0.4) && gen.canPlace(x, y, powerDrill) && gen.drillItem(x, y, powerDrill) == Items.thorium && checker.get(gen.tile(x, y), powerDrill, other -> other.block() instanceof PowerGenerator)){
|
if(gen.random.chance(0.4*placeChance) && gen.canPlace(x, y, powerDrill) && gen.drillItem(x, y, powerDrill) == Items.thorium && checker.get(gen.tile(x, y), powerDrill, other -> other.block() instanceof PowerGenerator)){
|
||||||
gen.setBlock(x, y, powerDrill, team);
|
gen.setBlock(x, y, powerDrill, team);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -246,30 +246,17 @@ public class ItemBridge extends Block{
|
|||||||
|
|
||||||
ItemBridgeEntity entity = tile.entity();
|
ItemBridgeEntity entity = tile.entity();
|
||||||
Tile other = world.tile(entity.link);
|
Tile other = world.tile(entity.link);
|
||||||
boolean linked = false;
|
|
||||||
|
|
||||||
if(linkValid(tile, other)){
|
if(linkValid(tile, other)){
|
||||||
linked = true;
|
|
||||||
int rel = tile.absoluteRelativeTo(other.x, other.y);
|
int rel = tile.absoluteRelativeTo(other.x, other.y);
|
||||||
int rel2 = tile.relativeTo(source.x, source.y);
|
int rel2 = tile.relativeTo(source.x, source.y);
|
||||||
|
|
||||||
if(rel == rel2) return false;
|
if(rel == rel2) return false;
|
||||||
}else{
|
}else{
|
||||||
int i = tile.relativeTo(source.x, source.y);
|
return source.block() instanceof ItemBridge && source.<ItemBridgeEntity>entity().link == tile.packedPosition();
|
||||||
|
|
||||||
IntSetIterator it = entity.incoming.iterator();
|
|
||||||
|
|
||||||
while(it.hasNext){
|
|
||||||
int v = it.next();
|
|
||||||
int x = v % world.width();
|
|
||||||
int y = v / world.width();
|
|
||||||
if(tile.absoluteRelativeTo(x, y) == i){
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return tile.entity.items.total() < itemCapacity && (linked || source.block() instanceof ItemBridge);
|
return tile.entity.items.total() < itemCapacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package io.anuke.mindustry.world.blocks.distribution;
|
package io.anuke.mindustry.world.blocks.distribution;
|
||||||
|
|
||||||
import com.badlogic.gdx.utils.IntSet.IntSetIterator;
|
|
||||||
import io.anuke.mindustry.type.Item;
|
import io.anuke.mindustry.type.Item;
|
||||||
import io.anuke.mindustry.type.Liquid;
|
import io.anuke.mindustry.type.Liquid;
|
||||||
import io.anuke.mindustry.world.Tile;
|
import io.anuke.mindustry.world.Tile;
|
||||||
@@ -59,19 +58,7 @@ public class LiquidBridge extends ItemBridge{
|
|||||||
|
|
||||||
Tile other = world.tile(entity.link);
|
Tile other = world.tile(entity.link);
|
||||||
if(!linkValid(tile, other)){
|
if(!linkValid(tile, other)){
|
||||||
int i = tile.absoluteRelativeTo(to.x, to.y);
|
return !(to.block() instanceof LiquidBridge);
|
||||||
|
|
||||||
IntSetIterator it = entity.incoming.iterator();
|
|
||||||
|
|
||||||
while(it.hasNext){
|
|
||||||
int v = it.next();
|
|
||||||
int x = v % world.width();
|
|
||||||
int y = v / world.width();
|
|
||||||
if(tile.absoluteRelativeTo(x, y) == i){
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int rel = tile.absoluteRelativeTo(other.x, other.y);
|
int rel = tile.absoluteRelativeTo(other.x, other.y);
|
||||||
|
|||||||
Reference in New Issue
Block a user