Better fix for exileFromMiscZone

This commit is contained in:
tool4EvEr
2021-11-09 23:35:11 +01:00
parent 7320bc88d0
commit 9e44672d55
5 changed files with 7 additions and 11 deletions

View File

@@ -60,11 +60,10 @@ public class CopyPermanentEffect extends TokenEffectBase {
final Game game = host.getGame();
if (sa.hasParam("Optional") && !activator.getController().confirmAction(sa, null, Localizer.getInstance().getMessage("lblCopyPermanentConfirm"))) {
return;
return;
}
final int numCopies = sa.hasParam("NumCopies") ? AbilityUtils.calculateAmount(host,
sa.getParam("NumCopies"), sa) : 1;
final int numCopies = sa.hasParam("NumCopies") ? AbilityUtils.calculateAmount(host, sa.getParam("NumCopies"), sa) : 1;
Player controller = null;
if (sa.hasParam("Controller")) {

View File

@@ -39,7 +39,6 @@ import forge.game.zone.ZoneType;
public abstract class TokenEffectBase extends SpellAbilityEffect {
protected TokenCreateTable createTokenTable(Iterable<Player> players, String[] tokenScripts, final int finalAmount, final SpellAbility sa) {
TokenCreateTable tokenTable = new TokenCreateTable();
for (final Player owner : players) {
for (String script : tokenScripts) {
@@ -83,7 +82,6 @@ public abstract class TokenEffectBase extends SpellAbilityEffect {
// support PlayerCollection for affected
Set<Player> toRemove = Sets.newHashSet();
for (Player p : tokenTable.rowKeySet()) {
final Map<AbilityKey, Object> repParams = AbilityKey.mapFromAffected(p);
repParams.put(AbilityKey.Token, tokenTable);
repParams.put(AbilityKey.EffectOnly, true); // currently only effects can create tokens?

View File

@@ -2,9 +2,8 @@ Name:Champion of Wits
ManaCost:2 U
Types:Creature Naga Wizard
PT:2/1
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDraw | OptionalDecider$ You | TriggerDescription$ When CARDNAME enters the battlefield, you may draw cards equal to its power. If you do, discard two cards.
SVar:TrigDraw:DB$ Draw | Defined$ You | NumCards$ X | SubAbility$ DBDiscard
SVar:DBDiscard:DB$ Discard | Defined$ You | Mode$ TgtChoose | NumCards$ 2
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDraw | TriggerDescription$ When CARDNAME enters the battlefield, you may draw cards equal to its power. If you do, discard two cards.
SVar:TrigDraw:AB$ Discard | Defined$ You | Mode$ TgtChoose | NumCards$ 2 | Cost$ Draw<X/You>
K:Eternalize:5 U U
SVar:X:Count$CardPower
SVar:Picture:http://www.wizards.com/global/images/magic/general/champion_of_wits.jpg

View File

@@ -6,7 +6,7 @@ K:Flying
S:Mode$ Continuous | Affected$ Card.Self+counters_GE5_P1P1 | AddKeyword$ Lifelink | Description$ CARDNAME has lifelink as long as it has five or more +1/+1 counters on it.
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Creature.nonToken+Other+YouCtrl | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ Whenever another nontoken creature you control dies, put a +1/+1 counter on CARDNAME. If that creature was a Cleric, you may draw a card. If you do, you lose 1 life.
SVar:TrigPutCounter:DB$ PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ DBLoseLife
SVar:DBLoseLife:DB$ LoseLife | Defined$ You | LifeAmount$ 1 | UnlessCost$ Draw<1/Card> | UnlessSwitched$ True | UnlessPayer$ You | ConditionDefined$ TriggeredCardLKICopy | ConditionPresent$ Creature.Cleric | ConditionCompare$ EQ1
SVar:DBLoseLife:DB$ LoseLife | Defined$ You | LifeAmount$ 1 | UnlessCost$ Draw<1/You> | UnlessSwitched$ True | UnlessPayer$ You | ConditionDefined$ TriggeredCardLKICopy | ConditionPresent$ Creature.Cleric | ConditionCompare$ EQ1
DeckHas:Ability$Counters
DeckHints:Type$Cleric
Oracle:Flying\nTaborax, Hope's Demise has lifelink as long as it has five or more +1/+1 counters on it.\nWhenever another nontoken creature you control dies, put a +1/+1 counter on Taborax. If that creature was a Cleric, you may draw a card. If you do, you lose 1 life.

View File

@@ -382,11 +382,11 @@ public class HumanCostDecision extends CostDecisionMakerBase {
origin.add(cost.from);
final CardCollection exiled = new CardCollection();
final List<Card> chosen = controller.chooseCardsForZoneChange(ZoneType.Exile, origin, sa, typeList, nNeeded,
final List<Card> chosen = controller.chooseCardsForZoneChange(ZoneType.Exile, origin, sa, typeList, 0,
nNeeded, null, cost.toString(), null);
exiled.addAll(chosen);
if (exiled.isEmpty()) {
if (exiled.size() < nNeeded) {
return null;
}
return PaymentDecision.card(exiled);