Lots of balancing/tweaks
This commit is contained in:
@@ -169,7 +169,7 @@ public class Damage{
|
||||
});
|
||||
|
||||
Units.nearbyEnemies(b.team, rect, u -> {
|
||||
if(u.checkTarget(b.type.collidesAir, b.type.collidesGround) && u.type.hittable){
|
||||
if(u.checkTarget(b.type.collidesAir, b.type.collidesGround) && u.hittable()){
|
||||
distances.add(u.dst(b));
|
||||
}
|
||||
});
|
||||
@@ -269,7 +269,7 @@ public class Damage{
|
||||
float x2 = vec.x + x, y2 = vec.y + y;
|
||||
|
||||
Cons<Unit> cons = e -> {
|
||||
if(!e.type.hittable) return;
|
||||
if(!e.hittable()) return;
|
||||
//the peirce cap works for units, but really terribly, I'm just disabling it for now.
|
||||
//if(pierceCap > 0 && pierceCount > pierceCap) return;
|
||||
|
||||
@@ -369,7 +369,7 @@ public class Damage{
|
||||
/** Damages all entities and blocks in a radius that are enemies of the team. */
|
||||
public static void damageUnits(Team team, float x, float y, float size, float damage, Boolf<Unit> predicate, Cons<Unit> acceptor){
|
||||
Cons<Unit> cons = entity -> {
|
||||
if(!predicate.get(entity) || !entity.type.hittable) return;
|
||||
if(!predicate.get(entity) || !entity.hittable()) return;
|
||||
|
||||
entity.hitbox(hitrect);
|
||||
if(!hitrect.overlaps(rect)){
|
||||
@@ -433,7 +433,7 @@ public class Damage{
|
||||
/** Damages all entities and blocks in a radius that are enemies of the team. */
|
||||
public static void damage(Team team, float x, float y, float radius, float damage, boolean complete, boolean air, boolean ground, boolean scaled, Bullet source){
|
||||
Cons<Unit> cons = entity -> {
|
||||
if(entity.team == team || !entity.type.hittable || !entity.within(x, y, radius + (scaled ? entity.hitSize / 2f : 0f)) || (entity.isFlying() && !air) || (entity.isGrounded() && !ground)){
|
||||
if(entity.team == team || !entity.hittable() || !entity.within(x, y, radius + (scaled ? entity.hitSize / 2f : 0f)) || (entity.isFlying() && !air) || (entity.isGrounded() && !ground)){
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user