Fixed erekir unit requirements

This commit is contained in:
Anuken
2022-02-13 20:54:25 -05:00
parent 0593c66f70
commit c8b11c4447
11 changed files with 43 additions and 1 deletions

View File

@@ -230,6 +230,20 @@ public class DesktopInput extends InputHandler{
brequest.config = null;
Draw.reset();
}
if(!valid && state.rules.placeRangeCheck){
var blocker = Build.getEnemyOverlap(block, player.team(), cursorX, cursorY);
if(blocker != null){
Drawf.selected(blocker, blocker.team.color);
Tmp.v1.set(cursorX, cursorY).scl(tilesize).add(block.offset, block.offset).sub(blocker).scl(-1f).nor();
Drawf.dashLineDst(Pal.remove,
cursorX * tilesize + block.offset + Tmp.v1.x * block.size * tilesize/2f,
cursorY * tilesize + block.offset + Tmp.v1.y * block.size * tilesize/2f,
blocker.x + Tmp.v1.x * -blocker.block.size * tilesize/2f,
blocker.y + Tmp.v1.y * -blocker.block.size * tilesize/2f
);
}
}
}
}