mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
* Savage Summoning - Fixed that the +1/+1 counter was not added.
This commit is contained in:
parent
bdc9260dfa
commit
ae34fd795a
3 changed files with 11 additions and 7 deletions
|
@ -28,11 +28,11 @@
|
|||
package mage.sets.gatecrash;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.effects.common.CounterTargetEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
|
@ -45,18 +45,19 @@ import mage.target.TargetSpell;
|
|||
public class ScatterArc extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("noncreature spell");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
|
||||
}
|
||||
|
||||
|
||||
public ScatterArc(UUID ownerId) {
|
||||
super(ownerId, 48, "Scatter Arc", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{3}{U}");
|
||||
this.expansionSetCode = "GTC";
|
||||
|
||||
|
||||
// Counter target noncreature spell.
|
||||
this.getSpellAbility().addEffect(new CounterTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetSpell(filter));
|
||||
|
||||
// Draw a card.
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
|
||||
}
|
||||
|
|
|
@ -207,9 +207,9 @@ class SavageSummoningWatcher extends Watcher {
|
|||
}
|
||||
|
||||
public boolean isCardCastWithThisSavageSummoning(Card card, UUID cardId, int zoneChangeCounter, Game game) {
|
||||
String creatureCardKey = new StringBuilder(card.getId().toString()).append("_").append(card.getZoneChangeCounter(game) - 1).toString();
|
||||
String creatureCardKey = card.getId().toString() + "_" + (card.getZoneChangeCounter(game));
|
||||
// add one because card is now gone to battlefield as creature
|
||||
String cardKey = new StringBuilder(cardId.toString()).append("_").append(zoneChangeCounter).toString();
|
||||
String cardKey = cardId.toString() + "_" + zoneChangeCounter;
|
||||
HashSet<String> savageSpells = (HashSet<String>) cardsCastWithSavageSummoning.get(creatureCardKey);
|
||||
return savageSpells != null && savageSpells.contains(cardKey);
|
||||
}
|
||||
|
|
|
@ -56,15 +56,18 @@ public class CastBRGCommanderTest extends CardTestCommanderDuelBase {
|
|||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 5);
|
||||
|
||||
// The next creature card you cast this turn can be cast as though it had flash.
|
||||
// That spell can't be countered. That creature enters the battlefield with an additional +1/+1 counter on it.
|
||||
addCard(Zone.HAND, playerA, "Savage Summoning");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Savage Summoning");
|
||||
castSpell(1, PhaseStep.BEGIN_COMBAT, playerA, "Prossh, Skyraider of Kher");
|
||||
castSpell(1, PhaseStep.BEGIN_COMBAT, playerA, "Prossh, Skyraider of Kher"); // 5/5
|
||||
setStopAt(1, PhaseStep.END_COMBAT);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, "Savage Summoning", 1);
|
||||
assertPermanentCount(playerA, "Prossh, Skyraider of Kher", 1);
|
||||
assertPowerToughness(playerA, "Prossh, Skyraider of Kher", 6, 6); // +1/+1 by Savage Summoning
|
||||
assertPermanentCount(playerA, "Kobolds of Kher Keep", 6);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue