diff --git a/public/src/games/dominion/DominionGame.js b/public/src/games/dominion/DominionGame.js index 7ff5556..a08f4bf 100644 --- a/public/src/games/dominion/DominionGame.js +++ b/public/src/games/dominion/DominionGame.js @@ -616,8 +616,11 @@ export default class DominionGame extends Phaser.Scene { this.dynamicLayer.add(face); const hit = this.add.rectangle(x, baseY, HAND_W, HAND_H, 0x000000, 0).setDepth(D.hand + i + 1); this.dynamicLayer.add(hit); - this.attachHover(hit, def); - hit.setInteractive({ useHandCursor: true }); + // Only attach hover and interactivity once the card is visible (not animating in). + if (!this._animatingIids.has(c.iid)) { + this.attachHover(hit, def); + hit.setInteractive({ useHandCursor: true }); + } const hs = { iid: c.iid, id: c.id, def, x, baseY, face, hit, isPlayableAction, isPlayableTreasure }; this.handSprites.push(hs); @@ -2429,7 +2432,14 @@ export default class DominionGame extends Phaser.Scene { _finishDrawAnim() { this._deckAnimDisplay = null; this._discardAnimDisplay = null; - this.handSprites.forEach(s => s.face.setAlpha(1)); + this.handSprites.forEach(s => { + s.face.setAlpha(1); + // Re-enable hover and interactivity now that the card is visible. + if (!s.hit.input?.enabled) { + this.attachHover(s.hit, s.def); + s.hit.setInteractive({ useHandCursor: true }); + } + }); this._animatingIids.clear(); this._animating = false; this._suppressTurnUi = false;