mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 13:32:06 -08:00
Implemented Wrenn and Six
This commit is contained in:
parent
758453b617
commit
ca9197b783
4 changed files with 125 additions and 0 deletions
|
|
@ -423,6 +423,7 @@ public enum SubType {
|
|||
VRASKA("Vraska", SubTypeSet.PlaneswalkerType),
|
||||
WILL("Will", SubTypeSet.PlaneswalkerType),
|
||||
WINDGRACE("Windgrace", SubTypeSet.PlaneswalkerType),
|
||||
WRENN("Wrenn", SubTypeSet.PlaneswalkerType),
|
||||
XENAGOS("Xenagos", SubTypeSet.PlaneswalkerType),
|
||||
YANGGU("Yanggu", SubTypeSet.PlaneswalkerType),
|
||||
YANLING("Yanling", SubTypeSet.PlaneswalkerType),
|
||||
|
|
|
|||
|
|
@ -0,0 +1,60 @@
|
|||
package mage.game.command.emblems;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.keyword.RetraceAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.command.Emblem;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class WrennAndSixEmblem extends Emblem {
|
||||
|
||||
public WrennAndSixEmblem() {
|
||||
this.setName("Emblem Wrenn");
|
||||
this.getAbilities().add(new SimpleStaticAbility(Zone.COMMAND, new WrennAndSixEmblemEffect()));
|
||||
this.setExpansionSetCodeForImage("MH1");
|
||||
}
|
||||
}
|
||||
|
||||
class WrennAndSixEmblemEffect extends ContinuousEffectImpl {
|
||||
WrennAndSixEmblemEffect() {
|
||||
super(Duration.WhileOnBattlefield, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility);
|
||||
staticText = "Instant and sorcery cards in your graveyard have retrace.";
|
||||
}
|
||||
|
||||
private WrennAndSixEmblemEffect(final WrennAndSixEmblemEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
for (UUID cardId : controller.getGraveyard()) {
|
||||
Card card = game.getCard(cardId);
|
||||
if (card == null || !card.isInstantOrSorcery()) {
|
||||
continue;
|
||||
}
|
||||
Ability ability = new RetraceAbility(card);
|
||||
ability.setSourceId(cardId);
|
||||
ability.setControllerId(card.getOwnerId());
|
||||
game.getState().addOtherAbility(card, ability);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WrennAndSixEmblemEffect copy() {
|
||||
return new WrennAndSixEmblemEffect(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue