Armored duct + Balancing

This commit is contained in:
Anuken
2022-04-11 09:42:16 -04:00
parent 9f95dc6e47
commit 54d90633e7
12 changed files with 53 additions and 11 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 468 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 633 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 B

View File

@ -546,3 +546,4 @@
63146=alphaaaa|alphaaaa
63145=malis|team-malis
63144=canvas|block-canvas-ui
63143=armored-duct|block-armored-duct-ui

Binary file not shown.

View File

@ -97,7 +97,7 @@ public class Blocks{
overflowGate, underflowGate, massDriver,
//transport - alternate
duct, ductRouter, overflowDuct, ductBridge, ductUnloader,
duct, armoredDuct, ductRouter, overflowDuct, ductBridge, ductUnloader,
surgeConveyor, surgeRouter,
unitCargoLoader, unitCargoUnloadPoint,
@ -1699,12 +1699,12 @@ public class Blocks{
}};
radar = new Radar("radar"){{
requirements(Category.effect, BuildVisibility.fogOnly, with(Items.silicon, 40, Items.graphite, 40));
requirements(Category.effect, BuildVisibility.fogOnly, with(Items.silicon, 50, Items.graphite, 50));
outlineColor = Color.valueOf("4a4b53");
fogRadius = 28;
fogRadius = 33;
researchCost = with(Items.silicon, 70, Items.graphite, 70);
consumePower(0.15f);
consumePower(0.6f);
}};
buildTower = new BuildTurret("build-tower"){{
@ -1887,6 +1887,14 @@ public class Blocks{
researchCost = with(Items.beryllium, 5);
}};
armoredDuct = new Duct("armored-duct"){{
requirements(Category.distribution, with(Items.beryllium, 2, Items.tungsten, 1));
health = 140;
speed = 4f;
armored = true;
researchCost = with(Items.beryllium, 300, Items.tungsten, 100);
}};
ductRouter = new DuctRouter("duct-router"){{
requirements(Category.distribution, with(Items.beryllium, 10));
health = 90;
@ -3007,6 +3015,7 @@ public class Blocks{
//TODO merge
chargeEffect = new MultiEffect(Fx.lancerLaserCharge, Fx.lancerLaserChargeBegin);
buildingDamageMultiplier = 0.25f;
hitEffect = Fx.hitLancer;
hitSize = 4;
lifetime = 16f;
@ -3014,7 +3023,6 @@ public class Blocks{
collidesAir = false;
length = 173f;
ammoMultiplier = 1f;
pierceCap = 4;
}};
}};
@ -3026,6 +3034,21 @@ public class Blocks{
lightningLength = 25;
collidesAir = false;
ammoMultiplier = 1f;
//for visual stats only.
buildingDamageMultiplier = 0.25f;
lightningType = new BulletType(0.0001f, 0f){{
lifetime = Fx.lightning.lifetime;
hitEffect = Fx.hitLancer;
despawnEffect = Fx.none;
status = StatusEffects.shocked;
statusDuration = 10f;
hittable = false;
lightColor = Color.white;
collidesGround = false;
buildingDamageMultiplier = 0.25f;
}};
}};
reload = 35f;
shootCone = 40f;
@ -3653,6 +3676,7 @@ public class Blocks{
trailWidth = 2.1f;
trailLength = 10;
hitEffect = despawnEffect = Fx.hitBulletColor;
buildingDamageMultiplier = 0.5f;
}},
Items.tungsten, new BasicBulletType(8f, 185){{
width = 13f;
@ -3671,6 +3695,7 @@ public class Blocks{
trailLength = 11;
hitEffect = despawnEffect = Fx.hitBulletColor;
rangeChange = 40f;
buildingDamageMultiplier = 0.5f;
}}
);
@ -3748,6 +3773,7 @@ public class Blocks{
length = r;
knockback = 1f;
pierceCap = 3;
buildingDamageMultiplier = 0.5f;
colors = new Color[]{Color.valueOf("eb7abe").a(0.55f), Color.valueOf("e189f5").a(0.7f), Color.valueOf("907ef7").a(0.8f), Color.valueOf("91a4ff"), Color.white};
}},
@ -3757,6 +3783,7 @@ public class Blocks{
length = r + rangeChange;
knockback = 2f;
pierceCap = 4;
buildingDamageMultiplier = 0.5f;
colors = new Color[]{Color.valueOf("465ab8").a(0.55f), Color.valueOf("66a6d2").a(0.7f), Color.valueOf("89e8b6").a(0.8f), Color.valueOf("cafcbe"), Color.white};
flareColor = Color.valueOf("89e8b6");
@ -3804,6 +3831,7 @@ public class Blocks{
trailInterp = v -> Math.max(Mathf.slope(v), 0.8f);
shrinkX = 0.2f;
shrinkY = 0.1f;
buildingDamageMultiplier = 0.25f;
}}
);

View File

@ -73,9 +73,11 @@ public class ErekirTechTree{
node(duct, erekirSector, () -> {
node(ductRouter, () -> {
node(ductBridge, () -> {
node(armoredDuct, () -> {
node(surgeConveyor, () -> {
node(surgeRouter);
});
});
node(unitCargoLoader, () -> {
node(unitCargoUnloadPoint, () -> {

View File

@ -462,7 +462,7 @@ public class Damage{
if(ground){
if(!complete){
tileDamage(team, World.toTile(x), World.toTile(y), radius / tilesize, damage, source);
tileDamage(team, World.toTile(x), World.toTile(y), radius / tilesize, damage * (source == null ? 1f : source.type.buildingDamageMultiplier), source);
}else{
completeDamage(team, x, y, radius, damage);
}

View File

@ -15,7 +15,7 @@ import mindustry.world.meta.*;
import static mindustry.Vars.*;
public class Radar extends Block{
public float discoveryTime = 60f * 7f;
public float discoveryTime = 60f * 10f;
public float rotateSpeed = 2f;
public @Load("@-base") TextureRegion baseRegion;

View File

@ -22,6 +22,7 @@ import static mindustry.Vars.*;
public class Duct extends Block implements Autotiler{
public float speed = 5f;
public boolean armored = false;
public @Load(value = "@-top-#", length = 5) TextureRegion[] topRegions;
public @Load(value = "@-bottom-#", length = 5, fallback = "duct-bottom-#") TextureRegion[] botRegions;
@ -74,8 +75,13 @@ public class Duct extends Block implements Autotiler{
@Override
public boolean blends(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock){
if(!armored){
return (otherblock.outputsItems() || (lookingAt(tile, rotation, otherx, othery, otherblock) && otherblock.hasItems))
&& lookingAtEither(tile, rotation, otherx, othery, otherrot, otherblock);
}else{
return (otherblock.outputsItems() && blendsArmored(tile, rotation, otherx, othery, otherrot, otherblock)) || (lookingAt(tile, rotation, otherx, othery, otherblock) && otherblock.hasItems);
}
}
@Override
public TextureRegion[] icons(){
@ -162,7 +168,12 @@ public class Duct extends Block implements Autotiler{
@Override
public boolean acceptItem(Building source, Item item){
return current == null && items.total() == 0 &&
((source.block.rotate && source.front() == this && source.block.hasItems) || Edges.getFacingEdge(source.tile(), tile).relativeTo(tile) == rotation);
(armored ?
//armored acceptance
((source.block.rotate && source.front() == this && source.block.hasItems) || Edges.getFacingEdge(source.tile(), tile).relativeTo(tile) == rotation) :
//standard acceptance - do not accept from front
!(source.block.rotate && next == source) && Math.abs(Edges.getFacingEdge(source.tile, tile).relativeTo(tile.x, tile.y) - rotation) != 2
);
}
@Override