mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-05 23:20:27 +07:00
Multi-target zenith AI
This commit is contained in:
parent
588523b311
commit
316adf63ee
@ -935,6 +935,8 @@ public class UnitTypes implements ContentList{
|
||||
engineOffset = 5.5f;
|
||||
range = 140f;
|
||||
targetAir = false;
|
||||
//as default AI, flares are not very useful in core rushes, they attack nothing in the way
|
||||
playerTargetFlags = new BlockFlag[]{null};
|
||||
targetFlags = new BlockFlag[]{BlockFlag.generator, null};
|
||||
commandLimit = 4;
|
||||
circleTarget = true;
|
||||
@ -969,6 +971,8 @@ public class UnitTypes implements ContentList{
|
||||
range = 140f;
|
||||
faceTarget = false;
|
||||
armor = 3f;
|
||||
//do not rush core, attack closest
|
||||
playerTargetFlags = new BlockFlag[]{null};
|
||||
targetFlags = new BlockFlag[]{BlockFlag.factory, null};
|
||||
commandLimit = 5;
|
||||
circleTarget = true;
|
||||
@ -1006,6 +1010,7 @@ public class UnitTypes implements ContentList{
|
||||
range = 140f;
|
||||
hitSize = 20f;
|
||||
lowAltitude = true;
|
||||
forceMultiTarget = true;
|
||||
armor = 5f;
|
||||
|
||||
targetFlags = new BlockFlag[]{BlockFlag.launchPad, BlockFlag.storage, BlockFlag.battery, null};
|
||||
|
@ -41,7 +41,7 @@ abstract class PuddleComp implements Posc, Puddlec, Drawc{
|
||||
@Import int id;
|
||||
@Import float x, y;
|
||||
|
||||
transient float accepting, updateTime, lastRipple;
|
||||
transient float accepting, updateTime, lastRipple = Time.time + Mathf.random(40f);
|
||||
float amount;
|
||||
Tile tile;
|
||||
Liquid liquid;
|
||||
@ -73,7 +73,7 @@ abstract class PuddleComp implements Posc, Puddlec, Drawc{
|
||||
|
||||
amount = Mathf.clamp(amount, 0, maxLiquid);
|
||||
|
||||
if(amount <= 0f){
|
||||
if(amount <= 0f || Puddles.get(tile) != self()){
|
||||
remove();
|
||||
}
|
||||
|
||||
|
@ -121,6 +121,7 @@ public class UnitType extends UnlockableContent{
|
||||
public boolean canHeal = false;
|
||||
/** If true, all weapons will attack the same target. */
|
||||
public boolean singleTarget = false;
|
||||
public boolean forceMultiTarget = false;
|
||||
|
||||
public ObjectSet<StatusEffect> immunities = new ObjectSet<>();
|
||||
public Sound deathSound = Sounds.bang;
|
||||
@ -319,7 +320,7 @@ public class UnitType extends UnlockableContent{
|
||||
}
|
||||
|
||||
clipSize = Math.max(clipSize, lightRadius * 1.1f);
|
||||
singleTarget = weapons.size <= 1;
|
||||
singleTarget = weapons.size <= 1 && !forceMultiTarget;
|
||||
|
||||
if(itemCapacity < 0){
|
||||
itemCapacity = Math.max(Mathf.round((int)(hitSize * 4.3), 10), 10);
|
||||
|
Loading…
Reference in New Issue
Block a user