1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-10 09:11:04 -09:00

[CLB] Undercity Dungeon - fixed game error (NPE fix)

This commit is contained in:
Oleg Agafonov 2023-04-19 18:34:52 +04:00
parent 491fc560e8
commit c061c7f436

View file

@ -159,9 +159,11 @@ class ThroneOfTheDeadThreeEffect extends OneShotEffect {
if (card != null) { if (card != null) {
player.moveCards(card, Zone.BATTLEFIELD, source, game); player.moveCards(card, Zone.BATTLEFIELD, source, game);
Permanent permanent = game.getPermanent(card.getId()); Permanent permanent = game.getPermanent(card.getId());
permanent.addCounters(CounterType.P1P1.createInstance(3), source, game); if (permanent != null) {
game.addEffect(new GainAbilityTargetEffect(HexproofAbility.getInstance(), Duration.UntilYourNextTurn) permanent.addCounters(CounterType.P1P1.createInstance(3), source, game);
.setTargetPointer(new FixedTarget(permanent, game)), source); game.addEffect(new GainAbilityTargetEffect(HexproofAbility.getInstance(), Duration.UntilYourNextTurn)
.setTargetPointer(new FixedTarget(permanent, game)), source);
}
} }
player.shuffleLibrary(source, game); player.shuffleLibrary(source, game);
return true; return true;