Wave tank crawl damage / Breach ammo use decrease
This commit is contained in:
@@ -3057,7 +3057,7 @@ public class Blocks{
|
||||
trailLength = 10;
|
||||
hitEffect = despawnEffect = Fx.hitBulletColor;
|
||||
}},
|
||||
Items.tungsten, new BasicBulletType(8f, 160){{
|
||||
Items.tungsten, new BasicBulletType(8f, 180){{
|
||||
width = 13f;
|
||||
height = 19f;
|
||||
shootEffect = sfe;
|
||||
@@ -3075,13 +3075,12 @@ public class Blocks{
|
||||
}}
|
||||
);
|
||||
|
||||
//TODO no coolant?
|
||||
coolantUsage = 15f / 60f;
|
||||
coolantOverride = Liquids.water;
|
||||
coolantMultiplier = 6f;
|
||||
|
||||
shootShake = 1f;
|
||||
ammoPerShot = 6;
|
||||
ammoPerShot = 4;
|
||||
draw = new DrawTurret("reinforced-");
|
||||
shootLength = -2;
|
||||
outlineColor = Pal.darkOutline;
|
||||
|
||||
@@ -2434,6 +2434,7 @@ public class UnitTypes{
|
||||
speed = 0.6f;
|
||||
health = 9000;
|
||||
armor = 20f;
|
||||
areaDamage = 6.5f;
|
||||
treadRect = new Rect(22f, 16f, 28f, 130f);
|
||||
|
||||
weapons.add(new Weapon("vanquish-weapon"){{
|
||||
@@ -2682,7 +2683,7 @@ public class UnitTypes{
|
||||
drawCell = false;
|
||||
segments = 4;
|
||||
drawBody = false;
|
||||
crawlDamage = 2f;
|
||||
areaDamage = 2f;
|
||||
|
||||
segmentScl = 4f;
|
||||
segmentPhase = 5f;
|
||||
|
||||
@@ -88,7 +88,7 @@ abstract class CrawlComp implements Posc, Rotc, Hitboxc, Unitc{
|
||||
|
||||
//TODO area damage to units
|
||||
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)){
|
||||
|
||||
@@ -7,6 +7,7 @@ import mindustry.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.world.*;
|
||||
@@ -19,6 +20,7 @@ abstract class TankComp implements Posc, Flyingc, Hitboxc, Unitc, ElevationMovec
|
||||
@Import float x, y, hitSize, rotation, speedMultiplier;
|
||||
@Import boolean hovering;
|
||||
@Import UnitType type;
|
||||
@Import Team team;
|
||||
|
||||
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
|
||||
//TODO is this a necessary mechanic?
|
||||
int r = Math.max(Math.round(hitSize * 0.6f / tilesize), 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()){
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -166,7 +166,8 @@ public class UnitType extends UnlockableContent{
|
||||
public float segmentScl = 4f, segmentPhase = 5f;
|
||||
public float segmentRotSpeed = 1f, segmentMaxRot = 30f;
|
||||
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 ObjectSet<StatusEffect> immunities = new ObjectSet<>();
|
||||
|
||||
Reference in New Issue
Block a user