Fix more things that hit non-hittable units (#7408)

* hittable check for EMP

* hittable check for Damage#status

* why push if don't get hit
This commit is contained in:
MEEPofFaith
2022-08-21 17:09:47 -04:00
committed by GitHub
parent dde9f895cf
commit 11e3f85242
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -440,7 +440,7 @@ public class Damage{
/** Applies a status effect to all enemy units in a range. */
public static void status(Team team, float x, float y, float radius, StatusEffect effect, float duration, boolean air, boolean ground){
Cons<Unit> cons = entity -> {
if(entity.team == team || !entity.within(x, y, radius) || (entity.isFlying() && !air) || (entity.isGrounded() && !ground)){
if(entity.team == team || !entity.checkTarget(air, ground) || !entity.hittable() || !entity.within(x, y, radius)){
return;
}