mirror of
https://github.com/correl/mage.git
synced 2024-11-16 03:00:12 +00:00
Fixed Pyromancer Ascension copying effect.
This commit is contained in:
parent
566de4071c
commit
2371ed545a
1 changed files with 7 additions and 4 deletions
|
@ -29,10 +29,9 @@
|
||||||
package mage.sets.zendikar;
|
package mage.sets.zendikar;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import mage.Constants;
|
|
||||||
import mage.Constants.CardType;
|
import mage.Constants.CardType;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
|
import mage.Constants.Zone;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
|
@ -58,7 +57,10 @@ public class PyromancerAscension extends CardImpl<PyromancerAscension> {
|
||||||
super(ownerId, 143, "Pyromancer Ascension", Rarity.RARE, new CardType[] { CardType.ENCHANTMENT }, "{1}{R}");
|
super(ownerId, 143, "Pyromancer Ascension", Rarity.RARE, new CardType[] { CardType.ENCHANTMENT }, "{1}{R}");
|
||||||
this.expansionSetCode = "ZEN";
|
this.expansionSetCode = "ZEN";
|
||||||
this.color.setRed(true);
|
this.color.setRed(true);
|
||||||
|
|
||||||
|
// Whenever you cast an instant or sorcery spell that has the same name as a card in your graveyard, you may put a quest counter on Pyromancer Ascension.
|
||||||
this.addAbility(new PyromancerAscensionQuestTriggeredAbility());
|
this.addAbility(new PyromancerAscensionQuestTriggeredAbility());
|
||||||
|
// Whenever you cast an instant or sorcery spell while Pyromancer Ascension has two or more quest counters on it, you may copy that spell. You may choose new targets for the copy.
|
||||||
this.addAbility(new PyromancerAscensionCopyTriggeredAbility());
|
this.addAbility(new PyromancerAscensionCopyTriggeredAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +78,7 @@ public class PyromancerAscension extends CardImpl<PyromancerAscension> {
|
||||||
class PyromancerAscensionQuestTriggeredAbility extends TriggeredAbilityImpl<PyromancerAscensionQuestTriggeredAbility> {
|
class PyromancerAscensionQuestTriggeredAbility extends TriggeredAbilityImpl<PyromancerAscensionQuestTriggeredAbility> {
|
||||||
|
|
||||||
PyromancerAscensionQuestTriggeredAbility() {
|
PyromancerAscensionQuestTriggeredAbility() {
|
||||||
super(Constants.Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.QUEST.createInstance()), true);
|
super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.QUEST.createInstance(), true), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
PyromancerAscensionQuestTriggeredAbility(final PyromancerAscensionQuestTriggeredAbility ability) {
|
PyromancerAscensionQuestTriggeredAbility(final PyromancerAscensionQuestTriggeredAbility ability) {
|
||||||
|
@ -132,7 +134,7 @@ class PyromancerAscensionCopyTriggeredAbility extends TriggeredAbilityImpl<Pyrom
|
||||||
}
|
}
|
||||||
|
|
||||||
PyromancerAscensionCopyTriggeredAbility() {
|
PyromancerAscensionCopyTriggeredAbility() {
|
||||||
super(Constants.Zone.BATTLEFIELD, new CopyTargetSpellEffect(), true);
|
super(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), true);
|
||||||
this.addTarget(new TargetSpell(filter));
|
this.addTarget(new TargetSpell(filter));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,6 +154,7 @@ class PyromancerAscensionCopyTriggeredAbility extends TriggeredAbilityImpl<Pyrom
|
||||||
if (isControlledInstantOrSorcery(spell)) {
|
if (isControlledInstantOrSorcery(spell)) {
|
||||||
Permanent permanent = game.getBattlefield().getPermanent(this.getSourceId());
|
Permanent permanent = game.getBattlefield().getPermanent(this.getSourceId());
|
||||||
if (permanent != null && permanent.getCounters().getCount(CounterType.QUEST) >= 2) {
|
if (permanent != null && permanent.getCounters().getCount(CounterType.QUEST) >= 2) {
|
||||||
|
this.getTargets().get(0).clearChosen();
|
||||||
this.getTargets().get(0).add(spell.getId(), game);
|
this.getTargets().get(0).add(spell.getId(), game);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue