@@ -277,9 +277,9 @@ public class RtsAI{
|
|||||||
float extraRadius = 50f;
|
float extraRadius = 50f;
|
||||||
|
|
||||||
for(var turret : Vars.indexer.getEnemy(data.team, BlockFlag.turret)){
|
for(var turret : Vars.indexer.getEnemy(data.team, BlockFlag.turret)){
|
||||||
if(Intersector.distanceSegmentPoint(fromX, fromY, x, y, turret.x, turret.y) <= ((TurretBuild)turret).range() + extraRadius){
|
if(turret instanceof TurretBuild t && Intersector.distanceSegmentPoint(fromX, fromY, x, y, t.x, t.y) <= t.range() + extraRadius){
|
||||||
health[0] += turret.health;
|
health[0] += t.health;
|
||||||
dps[0] += ((TurretBuild)turret).estimateDps();
|
dps[0] += t.estimateDps();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user