Skip to content

Commit

Permalink
1.1.6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
guiYMOUR authored Jul 11, 2024
1 parent d265331 commit 3a22b15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ExtraUtilities/ai/DefenderHealAI.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public DefenderHealAI() {
public void updateMovement() {
if(target != null){
boolean shoot = false;
if(target.within(unit, unit.type.range) && (target instanceof Healthc && ((Healthc)target).damaged()) && target.team() == unit.team && ((targetUnit && target instanceof Unit) || (targetBuilding && target instanceof Building))){
if(target.within(unit, unit.type.range) && (target instanceof Healthc hc && hc.health() < hc.maxHealth() - 0.001f) && target.team() == unit.team && ((targetUnit && target instanceof Unit) || (targetBuilding && target instanceof Building))){
unit.aim(target);
shoot = true;
}
Expand Down

0 comments on commit 3a22b15

Please sign in to comment.