forked from External/mage
fix verify errors
This commit is contained in:
parent
6e68121897
commit
aac1aa55cc
2 changed files with 17 additions and 37 deletions
|
|
@ -2,6 +2,7 @@ package mage.cards.f;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.condition.common.SourceAttackingCondition;
|
||||
import mage.abilities.effects.common.CopyStackObjectEffect;
|
||||
import mage.abilities.keyword.FirebendingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -11,8 +12,6 @@ import mage.constants.SetTargetPointer;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -34,7 +33,10 @@ public final class FireLordAzula extends CardImpl {
|
|||
this.addAbility(new FirebendingAbility(2));
|
||||
|
||||
// Whenever you cast a spell while Fire Lord Azula is attacking, copy that spell. You may choose new targets for the copy.
|
||||
this.addAbility(new FireLordAzulaAbility());
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new CopyStackObjectEffect("that spell"),
|
||||
StaticFilters.FILTER_SPELL_A, false, SetTargetPointer.SPELL
|
||||
).withTriggerCondition(SourceAttackingCondition.instance));
|
||||
}
|
||||
|
||||
private FireLordAzula(final FireLordAzula card) {
|
||||
|
|
@ -46,16 +48,3 @@ public final class FireLordAzula extends CardImpl {
|
|||
return new FireLordAzula(this);
|
||||
}
|
||||
}
|
||||
|
||||
class FireLordAzulaAbility extends SpellCastControllerTriggeredAbility {
|
||||
|
||||
public FireLordAzulaAbility() {
|
||||
super(new CopyStackObjectEffect("that spell"), StaticFilters.FILTER_SPELL_A, false, SetTargetPointer.SPELL);
|
||||
setTriggerPhrase("Whenever you cast a spell while Fire Lord Azula is attacking, ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return game.getCombat().getAttackers().contains(getSourceId()) && super.checkTrigger(event, game);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,28 +1,29 @@
|
|||
package mage.cards.z;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.IsPhaseCondition;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.CountersControllerCount;
|
||||
import mage.abilities.effects.common.counter.AddCountersPlayersEffect;
|
||||
import mage.constants.*;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.FirebendingAbility;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author anonymous
|
||||
*/
|
||||
public final class ZukoFirebendingMaster extends CardImpl {
|
||||
|
||||
private static final DynamicValue xValue = new CountersControllerCount(CounterType.EXPERIENCE);
|
||||
private static final Condition condition = new IsPhaseCondition(TurnPhase.COMBAT);
|
||||
|
||||
public ZukoFirebendingMaster(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
|
|
@ -41,7 +42,10 @@ public final class ZukoFirebendingMaster extends CardImpl {
|
|||
this.addAbility(new FirebendingAbility(xValue));
|
||||
|
||||
// Whenever you cast a spell during combat, you get an experience counter.
|
||||
this.addAbility(new ZukoFirebendingMasterAbility());
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new AddCountersPlayersEffect(CounterType.EXPERIENCE.createInstance(), TargetController.YOU),
|
||||
StaticFilters.FILTER_SPELL_A, false, SetTargetPointer.SPELL
|
||||
).withTriggerCondition(condition));
|
||||
}
|
||||
|
||||
private ZukoFirebendingMaster(final ZukoFirebendingMaster card) {
|
||||
|
|
@ -53,16 +57,3 @@ public final class ZukoFirebendingMaster extends CardImpl {
|
|||
return new ZukoFirebendingMaster(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ZukoFirebendingMasterAbility extends SpellCastControllerTriggeredAbility {
|
||||
|
||||
public ZukoFirebendingMasterAbility() {
|
||||
super(new AddCountersPlayersEffect(CounterType.EXPERIENCE.createInstance(), TargetController.YOU), StaticFilters.FILTER_SPELL_A, false, SetTargetPointer.SPELL);
|
||||
setTriggerPhrase("Whenever you cast a spell during combat, ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return game.getTurnPhaseType() == TurnPhase.COMBAT && super.checkTrigger(event, game);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue