Fix NPE when moving commander created by ApiBased SA (e.g. Hogaak)

This commit is contained in:
tool4EvEr
2021-10-20 00:06:56 +02:00
parent dc3c117ba8
commit 3b2ca119db
2 changed files with 2 additions and 2 deletions

View File

@@ -1508,7 +1508,7 @@ public class GameAction {
c.getGame().getTracker().flush();
c.setMoveToCommandZone(false);
if (c.getOwner().getController().confirmAction(c.getSpellPermanent(), PlayerActionConfirmMode.ChangeZoneToAltDestination, c.getName() + ": If a commander is in a graveyard or in exile and that card was put into that zone since the last time state-based actions were checked, its owner may put it into the command zone.")) {
if (c.getOwner().getController().confirmAction(c.getFirstSpellAbility(), PlayerActionConfirmMode.ChangeZoneToAltDestination, c.getName() + ": If a commander is in a graveyard or in exile and that card was put into that zone since the last time state-based actions were checked, its owner may put it into the command zone.")) {
moveTo(c.getOwner().getZone(ZoneType.Command), c, null);
return true;
}

View File

@@ -216,7 +216,7 @@ public final class AbilityFactory {
else if (api == ApiType.PermanentCreature || api == ApiType.PermanentNoncreature) {
// If API is a permanent type, and creating AF Spell
// Clear out the auto created SpellPemanent spell
// Clear out the auto created SpellPermanent spell
if (type == AbilityRecordType.Spell
&& !mapParams.containsKey("SubAbility") && !mapParams.containsKey("NonBasicSpell")) {
hostCard.clearFirstSpell();