Some card fixes

This commit is contained in:
Bug Hunter
2021-05-31 11:10:11 +00:00
committed by Michael Kamensky
parent 51924d16db
commit 450d5b6144
35 changed files with 47 additions and 59 deletions

View File

@@ -84,7 +84,6 @@ public class ChooseSourceEffect extends SpellAbilityEffect {
if (sa.hasParam("Choices")) {
permanentSources = CardLists.getValidCards(permanentSources, sa.getParam("Choices"), host.getController(), host, sa);
stackSources = CardLists.getValidCards(stackSources, sa.getParam("Choices"), host.getController(), host, sa);
referencedSources = CardLists.getValidCards(referencedSources, sa.getParam("Choices"), host.getController(), host, sa);
commandZoneSources = CardLists.getValidCards(commandZoneSources, sa.getParam("Choices"), host.getController(), host, sa);
@@ -137,7 +136,7 @@ public class ChooseSourceEffect extends SpellAbilityEffect {
Card o = null;
do {
o = p.getController().chooseSingleEntityForEffect(sourcesToChooseFrom, sa, choiceTitle, null);
} while (o == null);
} while (o == null || o.getName().startsWith("--"));
chosen.add(o);
sourcesToChooseFrom.remove(o);
}

View File

@@ -24,7 +24,7 @@ public class ControlGainEffect extends SpellAbilityEffect {
protected String getStackDescription(SpellAbility sa) {
final StringBuilder sb = new StringBuilder();
final List<Player> newController = getTargetPlayers(sa, "NewController");
final List<Player> newController = getDefinedPlayersOrTargeted(sa, "NewController");
if (newController.isEmpty()) {
newController.add(sa.getActivatingPlayer());
}