mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 09:48:02 +00:00
Heist fix (#9032)
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
package forge.game.ability.effects;
|
package forge.game.ability.effects;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -39,16 +37,18 @@ public class HeistEffect extends SpellAbilityEffect {
|
|||||||
"Land"), 3);
|
"Land"), 3);
|
||||||
if (choices.isEmpty()) continue; //nothing to heist
|
if (choices.isEmpty()) continue; //nothing to heist
|
||||||
Card chosenCard = player.getController().chooseSingleCardForZoneChange(ZoneType.Exile,
|
Card chosenCard = player.getController().chooseSingleCardForZoneChange(ZoneType.Exile,
|
||||||
new ArrayList<ZoneType>(Arrays.asList(ZoneType.Exile)), sa, new CardCollection(choices),
|
List.of(ZoneType.Library), sa, new CardCollection(choices),
|
||||||
null, Localizer.getInstance().getMessage("lblChooseCardHeist"), false,
|
null, Localizer.getInstance().getMessage("lblChooseCardHeist"), false,
|
||||||
player);
|
player);
|
||||||
if (!chosenCard.canExiledBy(sa, true)) {
|
if (!chosenCard.canExiledBy(sa, true)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Card exiled = game.getAction().moveTo(ZoneType.Exile, chosenCard, sa, moveParams);
|
Card exiled = game.getAction().moveTo(ZoneType.Exile, chosenCard, sa, moveParams);
|
||||||
|
exiled.turnFaceDown(true);
|
||||||
|
exiled.addMayLookFaceDownExile(player);
|
||||||
handleExiledWith(exiled, sa);
|
handleExiledWith(exiled, sa);
|
||||||
heisted.add(exiled);
|
heisted.add(exiled);
|
||||||
if (chosenCard != null) triggerList.put(ZoneType.Library, exiled.getZone().getZoneType(), exiled);
|
triggerList.put(ZoneType.Library, exiled.getZone().getZoneType(), exiled);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!heisted.isEmpty()) {
|
if (!heisted.isEmpty()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user