Balancing / Fixed bridge contamination

This commit is contained in:
Anuken
2018-09-02 10:46:24 -04:00
parent 469b3c0a94
commit 0fb336cf7b
11 changed files with 26 additions and 55 deletions

View File

@@ -224,7 +224,7 @@ public class Mechs implements ContentList{
@Override
public float getExtraArmor(Player player){
return player.altHeat * 40f;
return player.altHeat * 30f;
}
@Override

View File

@@ -34,7 +34,6 @@ public class Recipes implements ContentList{
new Recipe(defense, DefenseBlocks.surgeWall, new ItemStack(Items.surgealloy, 12));
new Recipe(defense, DefenseBlocks.surgeWallLarge, new ItemStack(Items.surgealloy, 12 * 4));
//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));

View File

@@ -27,10 +27,10 @@ public class UnitTypes implements ContentList{
{
isFlying = true;
drag = 0.005f;
speed = 0.5f;
maxVelocity = 1.6f;
speed = 0.6f;
maxVelocity = 1.7f;
range = 40f;
health = 35;
health = 45;
weapon = Weapons.droneBlaster;
trailColor = Color.valueOf("ffd37f");
}

View File

@@ -39,7 +39,7 @@ public class Weapons implements ContentList{
droneBlaster = new Weapon("blaster"){{
length = 2f;
reload = 30f;
reload = 25f;
width = 1f;
roundrobin = true;
ejectEffect = ShootFx.shellEjectSmall;

View File

@@ -207,7 +207,7 @@ public class CraftingBlocks extends BlockList implements ContentList{
itemCapacity = 50;
craftTime = 25f;
outputLiquid = Liquids.oil;
outputLiquidAmount = 1.4f;
outputLiquidAmount = 1.5f;
size = 2;
health = 320;
hasLiquids = true;

View File

@@ -88,7 +88,7 @@ public class ProductionBlocks extends BlockList implements ContentList{
updateEffect = BlockFx.pulverize;
liquidCapacity = 50f;
updateEffectChance = 0.05f;
pumpAmount = 0.08f;
pumpAmount = 0.09f;
size = 3;
liquidCapacity = 30f;

View File

@@ -16,7 +16,7 @@ public class UnitBlocks extends BlockList implements ContentList{
public void load(){
dronePad = new UnitPad("drone-pad"){{
type = UnitTypes.drone;
produceTime = 5500;
produceTime = 5700;
size = 2;
consumes.power(0.08f);
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"){{
type = UnitTypes.fabricator;
produceTime = 7000;
produceTime = 7300;
size = 2;
consumes.power(0.2f);
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"){{
type = UnitTypes.interceptor;
produceTime = 1900;
produceTime = 1800;
size = 2;
consumes.power(0.1f);
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"){{
type = UnitTypes.monsoon;
produceTime = 3800;
produceTime = 3600;
size = 3;
consumes.power(0.2f);
shadow = "shadow-round-3";
@@ -49,15 +49,15 @@ public class UnitBlocks extends BlockList implements ContentList{
daggerPad = new UnitPad("dagger-pad"){{
type = UnitTypes.dagger;
produceTime = 1800;
produceTime = 1700;
size = 2;
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"){{
type = UnitTypes.titan;
produceTime = 3600;
produceTime = 3400;
size = 3;
consumes.power(0.15f);
shadow = "shadow-round-3";

View File

@@ -24,7 +24,7 @@ import static io.anuke.mindustry.Vars.*;
public class Sectors{
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<>();
@@ -133,7 +133,7 @@ public class Sectors{
}
private void initSector(Sector sector){
double waveChance = 0.2;
double waveChance = 0.3;
sector.difficulty = (int)(Mathf.dst(sector.x, sector.y));

View File

@@ -9,7 +9,6 @@ import io.anuke.mindustry.content.Items;
import io.anuke.mindustry.content.Liquids;
import io.anuke.mindustry.content.blocks.*;
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.Item;
import io.anuke.mindustry.type.Recipe;
@@ -84,11 +83,10 @@ public class FortressGenerator{
Drill powerDrill = (Drill) powerDrills.get((int)(difficultyScl * powerDrills.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 turret2 = (Turret) turrets.get(Mathf.clamp((int)((difficultyScl+gen.random.range(0.2f)) * turrets.size), 0, turrets.size-1));
AStarPathFinder finder = new AStarPathFinder(gen.tiles);
float placeChance = difficultyScl*0.75f+0.25f;
IntIntMap ammoPerType = new IntIntMap();
for(Block turret : turrets){
@@ -112,7 +110,7 @@ public class FortressGenerator{
};
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);
}
};
@@ -122,7 +120,7 @@ public class FortressGenerator{
(x, y) -> {
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);
}
},
@@ -132,7 +130,7 @@ public class FortressGenerator{
//drills (not powered)
(x, y) -> {
if(!gen.random.chance(0.1)) return;
if(!gen.random.chance(0.1*placeChance)) return;
Item item = gen.drillItem(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)
(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){
gen.setBlock(x, y, LiquidBlocks.mechanicalPump, team);
@@ -154,7 +152,7 @@ public class FortressGenerator{
//drills (powered)
(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);
}
},

View File

@@ -246,30 +246,17 @@ public class ItemBridge extends Block{
ItemBridgeEntity entity = tile.entity();
Tile other = world.tile(entity.link);
boolean linked = false;
if(linkValid(tile, other)){
linked = true;
int rel = tile.absoluteRelativeTo(other.x, other.y);
int rel2 = tile.relativeTo(source.x, source.y);
if(rel == rel2) return false;
}else{
int i = tile.relativeTo(source.x, source.y);
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 source.block() instanceof ItemBridge && source.<ItemBridgeEntity>entity().link == tile.packedPosition();
}
return tile.entity.items.total() < itemCapacity && (linked || source.block() instanceof ItemBridge);
return tile.entity.items.total() < itemCapacity;
}
@Override

View File

@@ -1,6 +1,5 @@
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.Liquid;
import io.anuke.mindustry.world.Tile;
@@ -59,19 +58,7 @@ public class LiquidBridge extends ItemBridge{
Tile other = world.tile(entity.link);
if(!linkValid(tile, other)){
int i = tile.absoluteRelativeTo(to.x, to.y);
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;
return !(to.block() instanceof LiquidBridge);
}
int rel = tile.absoluteRelativeTo(other.x, other.y);