[AFR] Implemented Mordenkainen (#7990)

* [AFR] Implemented Mordenkainen

* [AFR] Mordenkainen - Use putCardsOnTopOfLibrary method
This commit is contained in:
Daniel Bomar 2021-07-10 18:43:31 -05:00 committed by GitHub
parent 9d9bf3e88c
commit 08aead581c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 208 additions and 0 deletions

View file

@ -432,6 +432,7 @@ public enum SubType {
LILIANA("Liliana", SubTypeSet.PlaneswalkerType),
LUKKA("Lukka", SubTypeSet.PlaneswalkerType),
LOLTH("Lolth", SubTypeSet.PlaneswalkerType),
MORDENKAINEN("Mordenkainen", SubTypeSet.PlaneswalkerType),
NAHIRI("Nahiri", SubTypeSet.PlaneswalkerType),
NARSET("Narset", SubTypeSet.PlaneswalkerType),
NIKO("Niko", SubTypeSet.PlaneswalkerType),

View file

@ -0,0 +1,22 @@
package mage.game.command.emblems;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.game.command.Emblem;
/**
*
* @author weirddan455
*/
public final class MordenkainenEmblem extends Emblem {
// You get an emblem with "You have no maximum hand size."
public MordenkainenEmblem() {
this.setName("Emblem Mordenkainen");
this.getAbilities().add(new SimpleStaticAbility(Zone.COMMAND, new MaximumHandSizeControllerEffect(
Integer.MAX_VALUE, Duration.WhileOnBattlefield, MaximumHandSizeControllerEffect.HandSizeModification.SET
)));
}
}

View file

@ -0,0 +1,67 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.game.Game;
import mage.players.Player;
/**
*
* @author weirddan455
*/
public final class DogIllusionToken extends TokenImpl {
public DogIllusionToken() {
super("Dog Illusion", "blue Dog Illusion creature token with \"This creature's power and toughness are each equal to twice the number of cards in your hand.\"");
cardType.add(CardType.CREATURE);
color.setBlue(true);
subtype.add(SubType.DOG);
subtype.add(SubType.ILLUSION);
power = new MageInt(0);
toughness = new MageInt(0);
addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(
DogIllusionValue.instance, Duration.EndOfGame)
.setText("{this}'s power and toughness are each equal to twice the number of cards in your hand")
));
}
private DogIllusionToken(final DogIllusionToken token) {
super(token);
}
@Override
public DogIllusionToken copy() {
return new DogIllusionToken(this);
}
}
enum DogIllusionValue implements DynamicValue {
instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
Player controller = game.getPlayer(sourceAbility.getControllerId());
if (controller == null) {
return 0;
}
return controller.getHand().size() * 2;
}
@Override
public DogIllusionValue copy() {
return instance;
}
@Override
public String getMessage() {
return "twice the number of cards in your hand";
}
}