Better heal FX / Lower wall priority
This commit is contained in:
@@ -3,6 +3,7 @@ package mindustry.entities;
|
||||
/** Higher priority blocks will always get targeted over those of lower priority, regardless of distance. */
|
||||
public class TargetPriority{
|
||||
public static final float
|
||||
wall = -1f,
|
||||
base = 0f,
|
||||
constructing = 1f,
|
||||
turret = 2f,
|
||||
|
||||
@@ -135,7 +135,7 @@ public class EnergyFieldAbility extends Ability{
|
||||
hitEffect.at(rx, ry, unit.angleTo(other), color);
|
||||
|
||||
if(other instanceof Building b){
|
||||
Fx.healBlockFull.at(b.x, b.y, b.block.size, color);
|
||||
Fx.healBlockFull.at(b.x, b.y, 0f, color, b.block);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
|
||||
@@ -265,7 +265,7 @@ public class BulletType extends Content implements Cloneable{
|
||||
}
|
||||
|
||||
if(heals() && build.team == b.team && !(build.block instanceof ConstructBlock)){
|
||||
healEffect.at(build.x, build.y, build.block.size, healColor);
|
||||
healEffect.at(build.x, build.y, 0f, healColor, build.block);
|
||||
build.heal(healPercent / 100f * build.maxHealth + healAmount);
|
||||
}else if(build.team != b.team && direct){
|
||||
hit(b);
|
||||
@@ -337,7 +337,7 @@ public class BulletType extends Content implements Cloneable{
|
||||
|
||||
if(heals()){
|
||||
indexer.eachBlock(b.team, x, y, splashDamageRadius, Building::damaged, other -> {
|
||||
healEffect.at(other.x, other.y, other.block.size, healColor);
|
||||
healEffect.at(other.x, other.y, 0f, healColor, other.block);
|
||||
other.heal(healPercent / 100f * other.maxHealth() + healAmount);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class EmpBulletType extends BasicBulletType{
|
||||
|
||||
if(other.block.hasPower && other.damaged()){
|
||||
other.heal(healPercent / 100f * other.maxHealth() + healAmount);
|
||||
Fx.healBlockFull.at(other.x, other.y, other.block.size, hitColor);
|
||||
Fx.healBlockFull.at(other.x, other.y, other.block.size, hitColor, other.block);
|
||||
applyEffect.at(other, other.block.size * 7f);
|
||||
}
|
||||
}else if(other.power != null){
|
||||
|
||||
@@ -109,7 +109,7 @@ abstract class TankComp implements Posc, Flyingc, Hitboxc, Unitc, ElevationMovec
|
||||
@Override
|
||||
public void moveAt(Vec2 vector, float acceleration){
|
||||
//mark walking state when moving in a controlled manner
|
||||
if(!vector.isZero()){
|
||||
if(!vector.isZero(0.001f)){
|
||||
walked = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user