temp fix for #1116 by removing choice in rider and add check to detect future cases

master
melvinzhang 2017-05-07 10:04:42 +08:00
parent c0f9cb81a3
commit 541b4323c2
6 changed files with 11 additions and 4 deletions

View File

@ -4,6 +4,6 @@ value=3.167
rarity=C
type=Instant
cost={1}{U}
effect=Return target creature to its owner's hand.~If you control a creature with power 4 or greater, you may draw a card. If you do, discard a card.
effect=Return target creature to its owner's hand.~If you control a creature with power 4 or greater, draw a card. If you do, discard a card.
timing=removal
oracle=Return target creature to its owner's hand.\nFerocious — If you control a creature with power 4 or greater, you may draw a card. If you do, discard a card.

View File

@ -4,6 +4,6 @@ value=2.500
rarity=C
type=Instant
cost={G}
effect=Target creature gets +2/+2 until end of turn.~You may remove a -1/-1 counter from *it*.
effect=Target creature gets +2/+2 until end of turn.~Remove a -1/-1 counter from *it*.
timing=removal
oracle=Target creature gets +2/+2 until end of turn. You may remove a -1/-1 counter from it.

View File

@ -5,6 +5,6 @@ value=2.500
rarity=C
type=Instant
cost={1}{G}
effect=Target creature gets +2/+2 until end of turn.~You may put a land card from your hand onto the battlefield.
effect=Target creature gets +2/+2 until end of turn.~Put a land card from your hand onto the battlefield.
timing=pump
oracle=Target creature gets +2/+2 until end of turn. You may put a land card from your hand onto the battlefield.

View File

@ -6,6 +6,6 @@ type=Creature
subtype=Vedalken,Wizard
cost={2}{U}
pt=1/2
ability={2}{U}, {T}: Put a -1/-1 counter on target creature.~You may tap or untap *that creature*.
ability={2}{U}, {T}: Put a -1/-1 counter on target creature.~Tap or untap *that creature*.
timing=main
oracle={2}{U}, {T}: Put a -1/-1 counter on target creature. You may tap or untap that creature.

View File

@ -2995,6 +2995,9 @@ public enum MagicRuleEventAction {
if (hasReference == false && riderSourceEvent.getChoice().isValid()) {
throw new RuntimeException("rider should not have choice: \"" + part[i] + "\"");
}
if (riderSourceEvent.getEventChoice() instanceof MagicMayChoice) {
throw new RuntimeException("rider should not have choice: \"" + part[i] + "\"");
}
acts[i] = riderSourceEvent.getEventAction();
part[i] = matcher.replaceAll("$1");

View File

@ -100,6 +100,10 @@ public class MagicSourceEvent {
return rule.getChoice(matcher);
}
public MagicChoice getEventChoice() {
return choiceFact.build(MagicSource.NONE, MagicPlayer.NONE, MagicEvent.NO_REF);
}
public MagicTargetPicker<?> getPicker() {
return rule.getPicker(matcher);
}