Glimmer Lens - fixed game error on usage (NPE)

This commit is contained in:
Oleg Agafonov 2023-09-23 07:06:03 +04:00
parent 0bf4b63bcf
commit a078b67434

View file

@ -71,6 +71,9 @@ class GlimmerLensTriggeredAbility extends TriggeredAbilityImpl {
@Override
public boolean checkTrigger(GameEvent event, Game game) {
Permanent attachment = getSourcePermanentOrLKI(game);
if (attachment == null) {
return false;
}
UUID equippedCreature = attachment.getAttachedTo();
return game.getCombat().getAttackers().contains(equippedCreature)
&& game