Made RepairAI only move toward ally buildings

This commit is contained in:
Anuken 2020-11-19 13:30:59 -05:00
parent c468bdef6d
commit aef6ac4335
2 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@ public class RepairAI extends AIController{
} }
if(target != null){ if(target != null){
if(!target.within(unit, unit.type.range * 0.65f) && target instanceof Building){ if(!target.within(unit, unit.type.range * 0.65f) && target instanceof Building b && b.team == unit.team){
moveTo(target, unit.type.range * 0.65f); moveTo(target, unit.type.range * 0.65f);
} }

View File

@ -1739,7 +1739,7 @@ public class UnitTypes implements ContentList{
lifetime = 60f; lifetime = 60f;
shootEffect = Fx.shootSmall; shootEffect = Fx.shootSmall;
smokeEffect = Fx.shootSmallSmoke; smokeEffect = Fx.shootSmallSmoke;
tileDamageMultiplier = 0.03f; tileDamageMultiplier = 0.02f;
}}; }};
}}); }});
}}; }};
@ -1781,7 +1781,7 @@ public class UnitTypes implements ContentList{
lifetime = 60f; lifetime = 60f;
shootEffect = Fx.shootSmall; shootEffect = Fx.shootSmall;
smokeEffect = Fx.shootSmallSmoke; smokeEffect = Fx.shootSmallSmoke;
tileDamageMultiplier = 0.03f; tileDamageMultiplier = 0.02f;
}}; }};
}}); }});
}}; }};
@ -1821,7 +1821,7 @@ public class UnitTypes implements ContentList{
lifetime = 70f; lifetime = 70f;
shootEffect = Fx.shootSmall; shootEffect = Fx.shootSmall;
smokeEffect = Fx.shootSmallSmoke; smokeEffect = Fx.shootSmallSmoke;
tileDamageMultiplier = 0.03f; tileDamageMultiplier = 0.02f;
homingPower = 0.04f; homingPower = 0.04f;
}}; }};
}}); }});