openfrontio / openfrontio/OpenFrontIO

Encirclement does not work on map edges

Aperta
#4,635 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub
approved Stale
Lingua principale
TypeScript
Stelle
2.7k
Fork
1.4k
Merge medio
17h 43m
PR unite (30g)
310

Descrizione

**Describe the bug**
So far I am aware of this strategy/feature "encirclement": if player A's land fully surrounds player B's land (NPC or not), then player B instantly loses and the land becomes owned by player A.

However, this does not work on map edges.

**To Reproduce**
Steps to reproduce the behavior:

1. Start near map edge (Player A)
2. Find a player that is at the map edge (Player B)
3. Surround Player B
4. No encirclement is triggered

**Expected behavior**
Encirclement should occur and Player B loses.

**Screenshots**
(Not screenshot, but an illustration of the situation.)

Consider this hypothetical scenario, where the colors are:
- White: unowned/neutral
- Red: Player A
- Blue: Player B
- Black: out-of-bounds area / map edge

Image

Then, Player A should have encircled Player B, and Player B should lose.

**Desktop (please complete the following information):**

- OS: Windows
- Browser: Firefox
- Version 152

**Additional context**

It may be a good idea to also check lake-side / ocean-side encirclement, to ensure encirclement still works as expected.

**Assignment**

- [ ] I'd like to be assigned to this issue and work on it myself

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by reproducing the edge-of-map scenario described in the issue, then compare it with an encirclement beside a lake or ocean. Trace the encirclement check from the gameplay entry point; done means a player fully surrounded at a map edge loses and ownership changes, while existing non-edge behavior remains correct.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript
Ambito
game-dev
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
62/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.