mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 09:40:44 +00:00
must click near coast to send boat
This commit is contained in:
@@ -106,7 +106,7 @@
|
||||
* store username DONE 9/11/2024
|
||||
* give anon unique number after Anon name DONE 9/11/2024
|
||||
* make color a hash of name DONE 9/11/2024
|
||||
* Make boats more intuitive (larger area to click off coast)
|
||||
* Make boats more intuitive (larger area to click off coast) DONE 9/11/2024
|
||||
* FakeHumans retaliate when attacked
|
||||
|
||||
|
||||
|
||||
@@ -236,7 +236,7 @@ export class ClientGame {
|
||||
|
||||
const enemyShoreDists = Array.from(bfs(
|
||||
tile,
|
||||
and((t) => t.isLand() && t.owner() == tile.owner(), dist(tile, bordersEnemy ? 10 : 500))
|
||||
and((t) => t.isLand() && t.owner() == tile.owner(), dist(tile, 10))
|
||||
)).filter(t => t.isOceanShore()).map(t => ({
|
||||
dist: manhattanDist(t.cell(), tile.cell()),
|
||||
tile: t
|
||||
@@ -270,9 +270,8 @@ export class ClientGame {
|
||||
if (!bordersOcean) {
|
||||
return
|
||||
}
|
||||
const tn = Array.from(bfs(tile, dist(tile, 3)))
|
||||
const tn = Array.from(bfs(tile, dist(tile, 10)))
|
||||
.filter(t => t.isOceanShore())
|
||||
.filter(t => t.owner() == tile.owner())
|
||||
.sort((a, b) => manhattanDist(tile.cell(), a.cell()) - manhattanDist(tile.cell(), b.cell()))
|
||||
if (tn.length > 0) {
|
||||
this.sendBoatAttackIntent(targetID, tn[0].cell(), this.gs.config().boatAttackAmount(this.myPlayer, owner))
|
||||
|
||||
Reference in New Issue
Block a user