forked from External/mage
[TLA] Implement Fire Lord Zuko
This commit is contained in:
parent
43ac278946
commit
ef270721a5
3 changed files with 102 additions and 3 deletions
|
|
@ -92,9 +92,10 @@ class FaldornDreadWolfHeraldTriggeredAbility extends TriggeredAbilityImpl {
|
|||
return Optional
|
||||
.ofNullable(game.getSpell(event.getTargetId()))
|
||||
.map(Spell::getFromZone)
|
||||
.orElse(Zone.ALL)
|
||||
.equals(Zone.EXILED);
|
||||
.filter(Zone.EXILED::match)
|
||||
.isPresent();
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
96
Mage.Sets/src/mage/cards/f/FireLordZuko.java
Normal file
96
Mage.Sets/src/mage/cards/f/FireLordZuko.java
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.dynamicvalue.common.SourcePermanentPowerValue;
|
||||
import mage.abilities.effects.common.counter.AddCountersAllEffect;
|
||||
import mage.abilities.keyword.FirebendingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.EntersTheBattlefieldEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.Spell;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class FireLordZuko extends CardImpl {
|
||||
|
||||
public FireLordZuko(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{W}{B}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.NOBLE);
|
||||
this.subtype.add(SubType.ALLY);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Firebending X, where X is Fire Lord Zuko's power.
|
||||
this.addAbility(new FirebendingAbility(SourcePermanentPowerValue.NOT_NEGATIVE));
|
||||
|
||||
// Whenever you cast a spell from exile and whenever a permanent you control enters from exile, put a +1/+1 counter on each creature you control.
|
||||
this.addAbility(new FireLordZukoTriggeredAbility());
|
||||
}
|
||||
|
||||
private FireLordZuko(final FireLordZuko card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FireLordZuko copy() {
|
||||
return new FireLordZuko(this);
|
||||
}
|
||||
}
|
||||
|
||||
class FireLordZukoTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
FireLordZukoTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new AddCountersAllEffect(CounterType.P1P1.createInstance(), StaticFilters.FILTER_CONTROLLED_CREATURE));
|
||||
setTriggerPhrase("Whenever you cast a spell from exile and whenever a permanent you control enters from exile, ");
|
||||
}
|
||||
|
||||
private FireLordZukoTriggeredAbility(final FireLordZukoTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FireLordZukoTriggeredAbility copy() {
|
||||
return new FireLordZukoTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD
|
||||
|| event.getType() == GameEvent.EventType.SPELL_CAST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (!this.isControlledBy(event.getPlayerId())) {
|
||||
return false;
|
||||
}
|
||||
switch (event.getType()) {
|
||||
case ENTERS_THE_BATTLEFIELD:
|
||||
return Zone.EXILED.match(((EntersTheBattlefieldEvent) event).getFromZone());
|
||||
case SPELL_CAST:
|
||||
return Optional
|
||||
.ofNullable(game.getSpell(event.getTargetId()))
|
||||
.map(Spell::getFromZone)
|
||||
.filter(Zone.EXILED::match)
|
||||
.isPresent();
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -37,6 +37,8 @@ public final class AvatarTheLastAirbender extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Earthbending Lesson", 176, Rarity.COMMON, mage.cards.e.EarthbendingLesson.class));
|
||||
cards.add(new SetCardInfo("Fated Firepower", 132, Rarity.MYTHIC, mage.cards.f.FatedFirepower.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Fated Firepower", 341, Rarity.MYTHIC, mage.cards.f.FatedFirepower.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Fire Lord Zuko", 221, Rarity.RARE, mage.cards.f.FireLordZuko.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Fire Lord Zuko", 360, Rarity.RARE, mage.cards.f.FireLordZuko.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Fire Nation Attacks", 133, Rarity.UNCOMMON, mage.cards.f.FireNationAttacks.class));
|
||||
cards.add(new SetCardInfo("Forest", 291, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Island", 288, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue