Merge remote-tracking branch 'origin/7.0-features' into 7.0-features

This commit is contained in:
epowerj
2022-01-26 15:21:47 -05:00
6 changed files with 19 additions and 8 deletions

View File

@@ -3057,7 +3057,7 @@ public class Blocks{
trailLength = 10; trailLength = 10;
hitEffect = despawnEffect = Fx.hitBulletColor; hitEffect = despawnEffect = Fx.hitBulletColor;
}}, }},
Items.tungsten, new BasicBulletType(8f, 160){{ Items.tungsten, new BasicBulletType(8f, 180){{
width = 13f; width = 13f;
height = 19f; height = 19f;
shootEffect = sfe; shootEffect = sfe;
@@ -3075,13 +3075,12 @@ public class Blocks{
}} }}
); );
//TODO no coolant?
coolantUsage = 15f / 60f; coolantUsage = 15f / 60f;
coolantOverride = Liquids.water; coolantOverride = Liquids.water;
coolantMultiplier = 6f; coolantMultiplier = 6f;
shootShake = 1f; shootShake = 1f;
ammoPerShot = 6; ammoPerShot = 4;
draw = new DrawTurret("reinforced-"); draw = new DrawTurret("reinforced-");
shootLength = -2; shootLength = -2;
outlineColor = Pal.darkOutline; outlineColor = Pal.darkOutline;

View File

@@ -2434,6 +2434,7 @@ public class UnitTypes{
speed = 0.6f; speed = 0.6f;
health = 9000; health = 9000;
armor = 20f; armor = 20f;
areaDamage = 6.5f;
treadRect = new Rect(22f, 16f, 28f, 130f); treadRect = new Rect(22f, 16f, 28f, 130f);
weapons.add(new Weapon("vanquish-weapon"){{ weapons.add(new Weapon("vanquish-weapon"){{
@@ -2682,7 +2683,7 @@ public class UnitTypes{
drawCell = false; drawCell = false;
segments = 4; segments = 4;
drawBody = false; drawBody = false;
crawlDamage = 2f; areaDamage = 2f;
segmentScl = 4f; segmentScl = 4f;
segmentPhase = 5f; segmentPhase = 5f;

View File

@@ -88,7 +88,7 @@ abstract class CrawlComp implements Posc, Rotc, Hitboxc, Unitc{
//TODO area damage to units //TODO area damage to units
if(t.build != null && t.build.team != team){ if(t.build != null && t.build.team != team){
t.build.damage(team, type.crawlDamage * Time.delta); t.build.damage(team, type.areaDamage * Time.delta);
} }
if(Mathf.chanceDelta(0.025)){ if(Mathf.chanceDelta(0.025)){

View File

@@ -7,6 +7,7 @@ import mindustry.*;
import mindustry.annotations.Annotations.*; import mindustry.annotations.Annotations.*;
import mindustry.content.*; import mindustry.content.*;
import mindustry.entities.*; import mindustry.entities.*;
import mindustry.game.*;
import mindustry.gen.*; import mindustry.gen.*;
import mindustry.type.*; import mindustry.type.*;
import mindustry.world.*; import mindustry.world.*;
@@ -19,6 +20,7 @@ abstract class TankComp implements Posc, Flyingc, Hitboxc, Unitc, ElevationMovec
@Import float x, y, hitSize, rotation, speedMultiplier; @Import float x, y, hitSize, rotation, speedMultiplier;
@Import boolean hovering; @Import boolean hovering;
@Import UnitType type; @Import UnitType type;
@Import Team team;
transient private float treadEffectTime, lastSlowdown = 1f; transient private float treadEffectTime, lastSlowdown = 1f;
@@ -48,7 +50,6 @@ abstract class TankComp implements Posc, Flyingc, Hitboxc, Unitc, ElevationMovec
} }
//calculate overlapping tiles so it slows down when going "over" walls //calculate overlapping tiles so it slows down when going "over" walls
//TODO is this a necessary mechanic?
int r = Math.max(Math.round(hitSize * 0.6f / tilesize), 1); int r = Math.max(Math.round(hitSize * 0.6f / tilesize), 1);
int solids = 0, total = (r*2+1)*(r*2+1); int solids = 0, total = (r*2+1)*(r*2+1);
@@ -58,6 +59,14 @@ abstract class TankComp implements Posc, Flyingc, Hitboxc, Unitc, ElevationMovec
if(t == null || t.solid()){ if(t == null || t.solid()){
solids ++; solids ++;
} }
//TODO should this apply to the player team(s)? currently PvE due to balancing
if(walked && t != null && t.build != null && t.build.team != team && (state.rules.waves && team == state.rules.waveTeam)
//damage radius is 1 tile smaller to prevent it from just touching walls as it passes
&& Math.max(Math.abs(dx), Math.abs(dy)) <= r - 1){
t.build.damage(team, type.areaDamage * Time.delta);
}
} }
} }

View File

@@ -166,7 +166,8 @@ public class UnitType extends UnlockableContent{
public float segmentScl = 4f, segmentPhase = 5f; public float segmentScl = 4f, segmentPhase = 5f;
public float segmentRotSpeed = 1f, segmentMaxRot = 30f; public float segmentRotSpeed = 1f, segmentMaxRot = 30f;
public float crawlSlowdown = 0.5f; public float crawlSlowdown = 0.5f;
public float crawlDamage = 0.5f; //used for tanks too
public float areaDamage = 0.5f;
public float crawlSlowdownFrac = 0.55f; public float crawlSlowdownFrac = 0.55f;
public ObjectSet<StatusEffect> immunities = new ObjectSet<>(); public ObjectSet<StatusEffect> immunities = new ObjectSet<>();

View File

@@ -3,6 +3,7 @@ package mindustry.world.blocks.liquid;
import mindustry.gen.*; import mindustry.gen.*;
import mindustry.type.*; import mindustry.type.*;
import mindustry.world.*; import mindustry.world.*;
import mindustry.world.blocks.distribution.*;
public class ArmoredConduit extends Conduit{ public class ArmoredConduit extends Conduit{
@@ -20,7 +21,7 @@ public class ArmoredConduit extends Conduit{
public class ArmoredConduitBuild extends ConduitBuild{ public class ArmoredConduitBuild extends ConduitBuild{
@Override @Override
public boolean acceptLiquid(Building source, Liquid liquid){ public boolean acceptLiquid(Building source, Liquid liquid){
return super.acceptLiquid(source, liquid) && (tile == null || source.block instanceof Conduit || return super.acceptLiquid(source, liquid) && (tile == null || source.block instanceof Conduit || source.block instanceof DirectionLiquidBridge ||
source.tile.absoluteRelativeTo(tile.x, tile.y) == rotation); source.tile.absoluteRelativeTo(tile.x, tile.y) == rotation);
} }
} }