@@ -375,17 +375,16 @@ public void splasherAttack(MapLocation loc, boolean useSecondaryColor) {
375375 this .gameWorld .getMatchMaker ().addDamageAction (tower .ID , UnitType .SPLASHER .aoeAttackStrength );
376376 this .gameWorld .getMatchMaker ().addAttackAction (tower .ID );
377377 }
378- } else { // otherwise, maybe paint
379- // If the tile is empty or same team paint, paint it
380- if (!this .gameWorld .isPaintable (loc )) continue ;
381- if (this .gameWorld .getPaint (loc ) == 0 || this .gameWorld .teamFromPaint (paintType ) == this .gameWorld .teamFromPaint (this .gameWorld .getPaint (loc ))) {
382- this .gameWorld .setPaint (loc , paintType );
383- this .gameWorld .getMatchMaker ().addPaintAction (loc , useSecondaryColor );
384- } else { // If the tile has opposite enemy team, paint only if within sqrt(2) radius
385- if (loc .isWithinDistanceSquared (newLoc , 2 )){
386- this .gameWorld .setPaint (loc , paintType );
387- this .gameWorld .getMatchMaker ().addPaintAction (loc , useSecondaryColor );
388- }
378+ }
379+ // If the tile is empty or same team paint, paint it
380+ if (!this .gameWorld .isPaintable (newLoc )) continue ;
381+ if (this .gameWorld .getPaint (newLoc ) == 0 || getTeam () == this .gameWorld .teamFromPaint (this .gameWorld .getPaint (newLoc ))) {
382+ this .gameWorld .setPaint (newLoc , paintType );
383+ this .gameWorld .getMatchMaker ().addPaintAction (newLoc , useSecondaryColor );
384+ } else { // If the tile has opposite enemy team, paint only if within sqrt(2) radius
385+ if (loc .isWithinDistanceSquared (newLoc , 2 )){
386+ this .gameWorld .setPaint (newLoc , paintType );
387+ this .gameWorld .getMatchMaker ().addPaintAction (newLoc , useSecondaryColor );
389388 }
390389 }
391390 }
0 commit comments