Skip to content

Commit 1fc53f8

Browse files
author
sungdark
committed
Fix ability targeting cursor display (issue #2004) [bounty: 15 XTR]
- Replace spinning cancel icon with non-spinning hex_path cursor for targeted hexes during ability targeting (no player class, has reachable) - Fix reachable hex overlay for non-player hexes to use hex_path instead of spinning cancel - Enemy unit hexes already highlighted via existing hover code
1 parent 66cf764 commit 1fc53f8

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

src/utility/hex.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -660,16 +660,27 @@ export class Hex {
660660
} else if (this.overlayClasses.match(/dashed/)) {
661661
this.overlay.loadTexture(`hex_dashed_p${player}`);
662662
this.grid.overlayHexesGroup.bringToTop(this.overlay);
663+
} else if (this.overlayClasses.match(/reachable/)) {
664+
// Reachable hexes in targeting mode (non-creature, no player class)
665+
this.overlay.loadTexture('hex_path');
666+
this.grid.overlayHexesGroup.bringToTop(this.overlay);
663667
} else {
664668
this.overlay.loadTexture(`hex_p${player}`);
665669
// Colored overlays for creatures/selected should be on top
666670
this.grid.overlayHexesGroup.bringToTop(this.overlay);
667671
}
668672
} else {
669-
this.overlay.loadTexture('cancel');
670-
this.overlay.anchor.set(0.5, 0.5);
671-
if (!this.isSpinning) {
672-
this.startSpinning();
673+
if (this.overlayClasses.match(/reachable/)) {
674+
// Non-player hex targeted by ability: non-spinning hex_path cursor
675+
this.overlay.loadTexture('hex_path');
676+
this.overlay.anchor.set(0.5, 0.5);
677+
// No spinning - use static cursor
678+
} else {
679+
this.overlay.loadTexture('cancel');
680+
this.overlay.anchor.set(0.5, 0.5);
681+
if (!this.isSpinning) {
682+
this.startSpinning();
683+
}
673684
}
674685
}
675686

0 commit comments

Comments
 (0)