Small heat redirector / Carbide ammo for breach

This commit is contained in:
Anuken
2025-01-04 17:46:50 -05:00
parent 7e645e0208
commit f28781dc00
12 changed files with 61 additions and 5 deletions

View File

@@ -79,6 +79,8 @@ public class Turret extends ReloadTurret{
public boolean targetAir = true;
/** If true, this block targets ground units and structures. */
public boolean targetGround = true;
/** If true, this block targets blocks. */
public boolean targetBlocks = true;
/** If true, this block targets friend blocks, to heal them. */
public boolean targetHealing = false;
/** If true, this turret can be controlled by players. */
@@ -486,7 +488,11 @@ public class Turret extends ReloadTurret{
if(targetAir && !targetGround){
return Units.bestEnemy(team, x, y, range, e -> !e.dead() && !e.isGrounded() && unitFilter.get(e), unitSort);
}else{
return Units.bestTarget(team, x, y, range, e -> !e.dead() && unitFilter.get(e) && (e.isGrounded() || targetAir) && (!e.isGrounded() || targetGround), b -> targetGround && buildingFilter.get(b), unitSort);
var ammo = peekAmmo();
boolean buildings = targetGround && targetBlocks && (ammo == null || ammo.targetBlocks), missiles = ammo == null || ammo.targetMissiles;
return Units.bestTarget(team, x, y, range,
e -> !e.dead() && unitFilter.get(e) && (e.isGrounded() || targetAir) && (!e.isGrounded() || targetGround) && (missiles || !(e instanceof TimedKillc)),
b -> buildings && buildingFilter.get(b), unitSort);
}
}

View File

@@ -619,7 +619,7 @@ public class StatValues{
}
if(type.maxDamageFraction > 0){
sep(bt, Core.bundle.format("bullet.maxdamagefraction", (int)(type.maxDamageFraction * 100)));
sep(bt, Core.bundle.format("bullet.maxdamagefraction", (int)(type.maxDamageFraction * 100)));
}
if(type.suppressionRange > 0){
@@ -631,6 +631,14 @@ public class StatValues{
((int)(type.statusDuration / 60f)) + "[lightgray] " + Core.bundle.get("unit.seconds"))).with(c -> withTooltip(c, type.status));
}
if(!type.targetMissiles){
sep(bt, "@bullet.notargetsmissiles");
}
if(!type.targetBlocks){
sep(bt, "@bullet.notargetsbuildings");
}
if(type.intervalBullet != null){
bt.row();