Turret, power generator and bullet balancing sweep

This commit is contained in:
Anuken
2019-02-07 15:55:31 -05:00
parent 7e35de3c33
commit 79a9541394
6 changed files with 27 additions and 43 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

+13 -13
View File
@@ -833,14 +833,14 @@ public class Blocks implements ContentList{
thermalGenerator = new ThermalGenerator("thermal-generator"){{ thermalGenerator = new ThermalGenerator("thermal-generator"){{
requirements(Category.power, ItemStack.with(Items.copper, 80, Items.graphite, 70, Items.lead, 100, Items.silicon, 70, Items.thorium, 70)); requirements(Category.power, ItemStack.with(Items.copper, 80, Items.graphite, 70, Items.lead, 100, Items.silicon, 70, Items.thorium, 70));
powerProduction = 2f; powerProduction = 3f;
generateEffect = Fx.redgeneratespark; generateEffect = Fx.redgeneratespark;
size = 2; size = 2;
}}; }};
turbineGenerator = new TurbineGenerator("turbine-generator"){{ turbineGenerator = new TurbineGenerator("turbine-generator"){{
requirements(Category.power, ItemStack.with(Items.copper, 70, Items.graphite, 50, Items.lead, 80, Items.silicon, 60)); requirements(Category.power, ItemStack.with(Items.copper, 70, Items.graphite, 50, Items.lead, 80, Items.silicon, 60));
powerProduction = 4f; powerProduction = 6f;
itemDuration = 30f; itemDuration = 30f;
consumes.liquid(Liquids.water, 0.05f); consumes.liquid(Liquids.water, 0.05f);
size = 2; size = 2;
@@ -848,7 +848,7 @@ public class Blocks implements ContentList{
differentialGenerator = new DifferentialGenerator("differential-generator"){{ differentialGenerator = new DifferentialGenerator("differential-generator"){{
requirements(Category.power, ItemStack.with(Items.copper, 140, Items.titanium, 100, Items.lead, 200, Items.silicon, 130, Items.metaglass, 100)); requirements(Category.power, ItemStack.with(Items.copper, 140, Items.titanium, 100, Items.lead, 200, Items.silicon, 130, Items.metaglass, 100));
powerProduction = 12f; powerProduction = 24f;
itemDuration = 60f; itemDuration = 60f;
consumes.remove(ConsumeItemFilter.class); consumes.remove(ConsumeItemFilter.class);
consumes.remove(ConsumeLiquidFilter.class); consumes.remove(ConsumeLiquidFilter.class);
@@ -879,7 +879,7 @@ public class Blocks implements ContentList{
requirements(Category.power, ItemStack.with(Items.lead, 600, Items.silicon, 400, Items.graphite, 300, Items.thorium, 300)); requirements(Category.power, ItemStack.with(Items.lead, 600, Items.silicon, 400, Items.graphite, 300, Items.thorium, 300));
size = 3; size = 3;
health = 700; health = 700;
powerProduction = 11f; powerProduction = 12f;
consumes.liquid(Liquids.cryofluid, maxLiquidUse); consumes.liquid(Liquids.cryofluid, maxLiquidUse);
}}; }};
@@ -888,7 +888,7 @@ public class Blocks implements ContentList{
size = 4; size = 4;
health = 900; health = 900;
powerProduction = 70f; powerProduction = 70f;
consumes.power(20f); consumes.power(23f);
consumes.item(Items.blastCompound); consumes.item(Items.blastCompound);
consumes.liquid(Liquids.water, 0.3f); consumes.liquid(Liquids.water, 0.3f);
}}; }};
@@ -1083,11 +1083,11 @@ public class Blocks implements ContentList{
); );
size = 2; size = 2;
recoil = 0f; recoil = 0f;
reload = 4f; reload = 3f;
inaccuracy = 5f; inaccuracy = 5f;
shootCone = 50f; shootCone = 50f;
shootEffect = Fx.shootLiquid; shootEffect = Fx.shootLiquid;
range = 90f; range = 100f;
health = 360; health = 360;
drawer = (tile, entity) -> { drawer = (tile, entity) -> {
@@ -1102,13 +1102,13 @@ public class Blocks implements ContentList{
lancer = new ChargeTurret("lancer"){{ lancer = new ChargeTurret("lancer"){{
requirements(Category.turret, ItemStack.with(Items.copper, 50, Items.lead, 100, Items.silicon, 90)); requirements(Category.turret, ItemStack.with(Items.copper, 50, Items.lead, 100, Items.silicon, 90));
range = 120f; range = 135f;
chargeTime = 60f; chargeTime = 50f;
chargeMaxDelay = 30f; chargeMaxDelay = 30f;
chargeEffects = 7; chargeEffects = 7;
shootType = Bullets.lancerLaser; shootType = Bullets.lancerLaser;
recoil = 2f; recoil = 2f;
reload = 100f; reload = 90f;
cooldown = 0.03f; cooldown = 0.03f;
powerUsed = 1 / 3f; powerUsed = 1 / 3f;
consumes.powerBuffered(600f); consumes.powerBuffered(600f);
@@ -1199,7 +1199,7 @@ public class Blocks implements ContentList{
restitution = 0.02f; restitution = 0.02f;
recoil = 6f; recoil = 6f;
shootShake = 2f; shootShake = 2f;
range = 320f; range = 290f;
health = 550; health = 550;
}}; }};
@@ -1226,14 +1226,14 @@ public class Blocks implements ContentList{
fuse = new ItemTurret("fuse"){{ fuse = new ItemTurret("fuse"){{
requirements(Category.turret, ItemStack.with(Items.copper, 450, Items.graphite, 450, Items.surgealloy, 250)); requirements(Category.turret, ItemStack.with(Items.copper, 450, Items.graphite, 450, Items.surgealloy, 250));
ammo(Items.graphite, Bullets.fuseShot); ammo(Items.graphite, Bullets.fuseShot);
reload = 50f; reload = 40f;
shootShake = 4f; shootShake = 4f;
range = 80f; range = 80f;
recoil = 5f; recoil = 5f;
restitution = 0.1f; restitution = 0.1f;
size = 3; size = 3;
health = 155 * size * size; health = 165 * size * size;
}}; }};
spectre = new DoubleTurret("spectre"){{ spectre = new DoubleTurret("spectre"){{
@@ -64,7 +64,7 @@ public class Bullets implements ContentList{
splashDamage = 33f; splashDamage = 33f;
}}; }};
artilleryPlasticFrag = new BasicBulletType(2.5f, 6, "bullet"){{ artilleryPlasticFrag = new BasicBulletType(2.5f, 7, "bullet"){{
bulletWidth = 10f; bulletWidth = 10f;
bulletHeight = 12f; bulletHeight = 12f;
bulletShrink = 1f; bulletShrink = 1f;
@@ -74,16 +74,16 @@ public class Bullets implements ContentList{
despawnEffect = Fx.none; despawnEffect = Fx.none;
}}; }};
arilleryPlastic = new ArtilleryBulletType(3.3f, 0, "shell"){{ arilleryPlastic = new ArtilleryBulletType(3.4f, 0, "shell"){{
hitEffect = Fx.plasticExplosion; hitEffect = Fx.plasticExplosion;
knockback = 1f; knockback = 1f;
lifetime = 55f; lifetime = 55f;
bulletWidth = bulletHeight = 13f; bulletWidth = bulletHeight = 13f;
collidesTiles = false; collidesTiles = false;
splashDamageRadius = 35f; splashDamageRadius = 35f;
splashDamage = 35f; splashDamage = 45f;
fragBullet = artilleryPlasticFrag; fragBullet = artilleryPlasticFrag;
fragBullets = 9; fragBullets = 10;
backColor = Pal.plastaniumBack; backColor = Pal.plastaniumBack;
frontColor = Pal.plastaniumFront; frontColor = Pal.plastaniumFront;
}}; }};
@@ -140,10 +140,10 @@ public class Bullets implements ContentList{
frontColor = Pal.bulletYellow; frontColor = Pal.bulletYellow;
}}; }};
flakPlastic = new FlakBulletType(4f, 5){{ flakPlastic = new FlakBulletType(4f, 6){{
splashDamageRadius = 40f; splashDamageRadius = 50f;
fragBullet = artilleryPlasticFrag; fragBullet = artilleryPlasticFrag;
fragBullets = 4; fragBullets = 6;
hitEffect = Fx.plasticExplosion; hitEffect = Fx.plasticExplosion;
frontColor = Pal.plastaniumFront; frontColor = Pal.plastaniumFront;
backColor = Pal.plastaniumBack; backColor = Pal.plastaniumBack;
@@ -455,7 +455,7 @@ public class Bullets implements ContentList{
Color[] colors = {Pal.lancerLaser.cpy().mul(1f, 1f, 1f, 0.4f), Pal.lancerLaser, Color.WHITE}; Color[] colors = {Pal.lancerLaser.cpy().mul(1f, 1f, 1f, 0.4f), Pal.lancerLaser, Color.WHITE};
float[] tscales = {1f, 0.7f, 0.5f, 0.2f}; float[] tscales = {1f, 0.7f, 0.5f, 0.2f};
float[] lenscales = {1f, 1.1f, 1.13f, 1.14f}; float[] lenscales = {1f, 1.1f, 1.13f, 1.14f};
float length = 100f; float length = 140f;
{ {
hitEffect = Fx.hitLancer; hitEffect = Fx.hitLancer;
@@ -492,7 +492,7 @@ public class Bullets implements ContentList{
} }
}; };
meltdownLaser = new BulletType(0.001f, 26){ meltdownLaser = new BulletType(0.001f, 35){
Color tmpColor = new Color(); Color tmpColor = new Color();
Color[] colors = {Color.valueOf("ec745855"), Color.valueOf("ec7458aa"), Color.valueOf("ff9c5a"), Color.WHITE}; Color[] colors = {Color.valueOf("ec745855"), Color.valueOf("ec7458aa"), Color.valueOf("ff9c5a"), Color.WHITE};
float[] tscales = {1f, 0.7f, 0.5f, 0.2f}; float[] tscales = {1f, 0.7f, 0.5f, 0.2f};
@@ -576,7 +576,7 @@ public class Bullets implements ContentList{
}; };
waterShot = new LiquidBulletType(Liquids.water){{ waterShot = new LiquidBulletType(Liquids.water){{
knockback = 0.65f; knockback = 0.7f;
}}; }};
cryoShot = new LiquidBulletType(Liquids.cryofluid){{ cryoShot = new LiquidBulletType(Liquids.cryofluid){{
@@ -20,17 +20,17 @@ public class LiquidBulletType extends BulletType{
Liquid liquid; Liquid liquid;
public LiquidBulletType(Liquid liquid){ public LiquidBulletType(Liquid liquid){
super(2.5f, 0); super(2.8f, 0);
this.liquid = liquid; this.liquid = liquid;
lifetime = 70f; lifetime = 74f;
status = liquid.effect; status = liquid.effect;
statusDuration = 90f; statusDuration = 90f;
despawnEffect = Fx.none; despawnEffect = Fx.none;
hitEffect = Fx.hitLiquid; hitEffect = Fx.hitLiquid;
shootEffect = Fx.none; shootEffect = Fx.none;
drag = 0.01f; drag = 0.009f;
knockback = 0.5f; knockback = 0.55f;
} }
@Override @Override
@@ -124,22 +124,6 @@ public interface BuilderTrait extends Entity, TeamTrait{
return getPlaceQueue().size != 0; return getPlaceQueue().size != 0;
} }
/**
* If a place request matching this signature is present, it is removed.
* Otherwise, a new place request is added to the queue.
*/
default void replaceBuilding(int x, int y, int rotation, Block block){
for(BuildRequest request : getPlaceQueue()){
if(request.x == x && request.y == y){
clearBuilding();
addBuildRequest(request);
return;
}
}
addBuildRequest(new BuildRequest(x, y, rotation, block));
}
/**Clears the placement queue.*/ /**Clears the placement queue.*/
default void clearBuilding(){ default void clearBuilding(){
getPlaceQueue().clear(); getPlaceQueue().clear();