diff --git a/src/ui/interface.js b/src/ui/interface.js index 0237054e4..772ee6888 100644 --- a/src/ui/interface.js +++ b/src/ui/interface.js @@ -2267,9 +2267,10 @@ export class UI { } }); - const onCreatureMouseEnter = ifGameNotFrozen((creature) => { + const onCreatureMouseEnter = ifGameNotFrozen((placeholderCreature) => { const creatures = ui.game.creatures.filter((c) => c instanceof Creature); - const otherCreatures = creatures.filter((c) => c.id !== creature.id); + const creature = creatures.filter(c => c.id === placeholderCreature.id)[0]; + const otherCreatures = creatures.filter((c) => c.id !== placeholderCreature.id); otherCreatures.forEach((c) => { c.xray(true);