get attacks working, adjust name placement scaling factor

This commit is contained in:
Evan
2025-02-01 12:05:11 -08:00
parent 39c8f9481d
commit 9a95fbe89e
3 changed files with 29 additions and 20 deletions
+3
View File
@@ -218,6 +218,9 @@ export class ClientGameRunner {
} else {
outer_loop: for (const t of bfs(tile, and(t => !t.hasOwner() && t.terrain().isLand(), dist(tile, 200)))) {
for (const n of t.neighbors()) {
if (n.owner().isPlayer()) {
console.log(`owner: ${(n.owner() as PlayerView).name()}`)
}
if (n.owner() == this.myPlayer) {
this.eventBus.emit(new SendAttackIntentEvent(targetID, this.myPlayer.troops() * this.renderer.uiState.attackRatio))
break outer_loop