mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
Fix NPE when moving commander created by ApiBased SA (e.g. Hogaak)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user