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.MageInt;
|
||||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||||
|
import mage.abilities.condition.common.SourceAttackingCondition;
|
||||||
import mage.abilities.effects.common.CopyStackObjectEffect;
|
import mage.abilities.effects.common.CopyStackObjectEffect;
|
||||||
import mage.abilities.keyword.FirebendingAbility;
|
import mage.abilities.keyword.FirebendingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -11,8 +12,6 @@ import mage.constants.SetTargetPointer;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
|
||||||
import mage.game.events.GameEvent;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
|
@ -34,7 +33,10 @@ public final class FireLordAzula extends CardImpl {
|
||||||
this.addAbility(new FirebendingAbility(2));
|
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.
|
// 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) {
|
private FireLordAzula(final FireLordAzula card) {
|
||||||
|
|
@ -46,16 +48,3 @@ public final class FireLordAzula extends CardImpl {
|
||||||
return new FireLordAzula(this);
|
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,32 +1,33 @@
|
||||||
package mage.cards.z;
|
package mage.cards.z;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
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.DynamicValue;
|
||||||
import mage.abilities.dynamicvalue.common.CountersControllerCount;
|
import mage.abilities.dynamicvalue.common.CountersControllerCount;
|
||||||
import mage.abilities.effects.common.counter.AddCountersPlayersEffect;
|
import mage.abilities.effects.common.counter.AddCountersPlayersEffect;
|
||||||
import mage.constants.*;
|
|
||||||
import mage.abilities.keyword.FirstStrikeAbility;
|
|
||||||
import mage.abilities.keyword.FirebendingAbility;
|
import mage.abilities.keyword.FirebendingAbility;
|
||||||
|
import mage.abilities.keyword.FirstStrikeAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.*;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
|
||||||
import mage.game.events.GameEvent;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author anonymous
|
* @author anonymous
|
||||||
*/
|
*/
|
||||||
public final class ZukoFirebendingMaster extends CardImpl {
|
public final class ZukoFirebendingMaster extends CardImpl {
|
||||||
|
|
||||||
private static final DynamicValue xValue = new CountersControllerCount(CounterType.EXPERIENCE);
|
private static final DynamicValue xValue = new CountersControllerCount(CounterType.EXPERIENCE);
|
||||||
|
private static final Condition condition = new IsPhaseCondition(TurnPhase.COMBAT);
|
||||||
|
|
||||||
public ZukoFirebendingMaster(UUID ownerId, CardSetInfo setInfo) {
|
public ZukoFirebendingMaster(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||||
|
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
this.supertype.add(SuperType.LEGENDARY);
|
||||||
this.subtype.add(SubType.HUMAN);
|
this.subtype.add(SubType.HUMAN);
|
||||||
this.subtype.add(SubType.NOBLE);
|
this.subtype.add(SubType.NOBLE);
|
||||||
|
|
@ -41,7 +42,10 @@ public final class ZukoFirebendingMaster extends CardImpl {
|
||||||
this.addAbility(new FirebendingAbility(xValue));
|
this.addAbility(new FirebendingAbility(xValue));
|
||||||
|
|
||||||
// Whenever you cast a spell during combat, you get an experience counter.
|
// 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) {
|
private ZukoFirebendingMaster(final ZukoFirebendingMaster card) {
|
||||||
|
|
@ -53,16 +57,3 @@ public final class ZukoFirebendingMaster extends CardImpl {
|
||||||
return new ZukoFirebendingMaster(this);
|
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