mirror of
https://github.com/correl/mage.git
synced 2024-12-28 11:14:13 +00:00
[VOC] Implemented Millicent, Restless Revenant
This commit is contained in:
parent
7a983beb3c
commit
c5b2ca79ec
2 changed files with 132 additions and 0 deletions
131
Mage.Sets/src/mage/cards/m/MillicentRestlessRevenant.java
Normal file
131
Mage.Sets/src/mage/cards/m/MillicentRestlessRevenant.java
Normal file
|
@ -0,0 +1,131 @@
|
||||||
|
package mage.cards.m;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.MageObject;
|
||||||
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||||
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
|
import mage.abilities.effects.common.cost.SpellCostReductionForEachSourceEffect;
|
||||||
|
import mage.abilities.hint.Hint;
|
||||||
|
import mage.abilities.hint.ValueHint;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
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.filter.FilterPermanent;
|
||||||
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.events.DamagedEvent;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
import mage.game.events.ZoneChangeEvent;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.game.permanent.PermanentToken;
|
||||||
|
import mage.game.permanent.token.SpiritWhiteToken;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class MillicentRestlessRevenant extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.SPIRIT);
|
||||||
|
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter);
|
||||||
|
private static final Hint hint = new ValueHint("Spirits you control", xValue);
|
||||||
|
|
||||||
|
public MillicentRestlessRevenant(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}{U}");
|
||||||
|
|
||||||
|
this.addSuperType(SuperType.LEGENDARY);
|
||||||
|
this.subtype.add(SubType.SPIRIT);
|
||||||
|
this.subtype.add(SubType.SOLDIER);
|
||||||
|
this.power = new MageInt(4);
|
||||||
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
|
// This spell costs {1} less to cast for each Spirit you control.
|
||||||
|
this.addAbility(new SimpleStaticAbility(
|
||||||
|
Zone.ALL, new SpellCostReductionForEachSourceEffect(1, xValue)
|
||||||
|
).addHint(hint));
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// Whenever Millicent, Restless Revenant or another nontoken Spirit you control dies or deals combat damage to a player, create a 1/1 white Spirit creature token with flying.
|
||||||
|
this.addAbility(new MillicentRestlessRevenantTriggeredAbility());
|
||||||
|
}
|
||||||
|
|
||||||
|
private MillicentRestlessRevenant(final MillicentRestlessRevenant card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MillicentRestlessRevenant copy() {
|
||||||
|
return new MillicentRestlessRevenant(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MillicentRestlessRevenantTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
|
MillicentRestlessRevenantTriggeredAbility() {
|
||||||
|
super(Zone.BATTLEFIELD, new CreateTokenEffect(new SpiritWhiteToken()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private MillicentRestlessRevenantTriggeredAbility(final MillicentRestlessRevenantTriggeredAbility ability) {
|
||||||
|
super(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MillicentRestlessRevenantTriggeredAbility copy() {
|
||||||
|
return new MillicentRestlessRevenantTriggeredAbility(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.ZONE_CHANGE
|
||||||
|
|| event.getType() == GameEvent.EventType.DAMAGED_PLAYER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
|
Permanent permanent;
|
||||||
|
switch (event.getType()) {
|
||||||
|
case ZONE_CHANGE:
|
||||||
|
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||||
|
if (!zEvent.isDiesEvent()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
permanent = zEvent.getTarget();
|
||||||
|
break;
|
||||||
|
case DAMAGED_PLAYER:
|
||||||
|
if (!((DamagedEvent) event).isCombatDamage()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
permanent = game.getPermanentOrLKIBattlefield(event.getSourceId());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (permanent == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return permanent.getId().equals(this.getSourceId())
|
||||||
|
|| (!(permanent instanceof PermanentToken)
|
||||||
|
&& permanent.hasSubtype(SubType.SPIRIT, game));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isInUseableZone(Game game, MageObject source, GameEvent event) {
|
||||||
|
return TriggeredAbilityImpl.isInUseableZoneDiesTrigger(this, event, game);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRule() {
|
||||||
|
return "Whenever {this} or another nontoken Spirit you control dies or deals combat damage to a player, " +
|
||||||
|
"create a 1/1 white Spirit creature token with flying.";
|
||||||
|
}
|
||||||
|
}
|
|
@ -96,6 +96,7 @@ public final class CrimsonVowCommander extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Mentor of the Meek", 93, Rarity.RARE, mage.cards.m.MentorOfTheMeek.class));
|
cards.add(new SetCardInfo("Mentor of the Meek", 93, Rarity.RARE, mage.cards.m.MentorOfTheMeek.class));
|
||||||
cards.add(new SetCardInfo("Midnight Arsonist", 27, Rarity.RARE, mage.cards.m.MidnightArsonist.class));
|
cards.add(new SetCardInfo("Midnight Arsonist", 27, Rarity.RARE, mage.cards.m.MidnightArsonist.class));
|
||||||
cards.add(new SetCardInfo("Midnight Clock", 108, Rarity.RARE, mage.cards.m.MidnightClock.class));
|
cards.add(new SetCardInfo("Midnight Clock", 108, Rarity.RARE, mage.cards.m.MidnightClock.class));
|
||||||
|
cards.add(new SetCardInfo("Millicent, Restless Revenant", 1, Rarity.MYTHIC, mage.cards.m.MillicentRestlessRevenant.class));
|
||||||
cards.add(new SetCardInfo("Mirror Entity", 94, Rarity.RARE, mage.cards.m.MirrorEntity.class));
|
cards.add(new SetCardInfo("Mirror Entity", 94, Rarity.RARE, mage.cards.m.MirrorEntity.class));
|
||||||
cards.add(new SetCardInfo("Mob Rule", 147, Rarity.RARE, mage.cards.m.MobRule.class));
|
cards.add(new SetCardInfo("Mob Rule", 147, Rarity.RARE, mage.cards.m.MobRule.class));
|
||||||
cards.add(new SetCardInfo("Molten Echoes", 148, Rarity.RARE, mage.cards.m.MoltenEchoes.class));
|
cards.add(new SetCardInfo("Molten Echoes", 148, Rarity.RARE, mage.cards.m.MoltenEchoes.class));
|
||||||
|
|
Loading…
Reference in a new issue