mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
[MID] Implemented Triskaidekaphile
This commit is contained in:
parent
93ddea0de1
commit
3910dae6e0
3 changed files with 71 additions and 9 deletions
63
Mage.Sets/src/mage/cards/t/Triskaidekaphile.java
Normal file
63
Mage.Sets/src/mage/cards/t/Triskaidekaphile.java
Normal file
|
@ -0,0 +1,63 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.CardsInHandCondition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.WinGameSourceControllerEffect;
|
||||
import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class Triskaidekaphile extends CardImpl {
|
||||
|
||||
private static final Condition condition = new CardsInHandCondition(ComparisonType.EQUAL_TO, 13);
|
||||
|
||||
public Triskaidekaphile(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// You have no maximum hand size.
|
||||
this.addAbility(new SimpleStaticAbility(new MaximumHandSizeControllerEffect(
|
||||
Integer.MAX_VALUE, Duration.WhileOnBattlefield,
|
||||
MaximumHandSizeControllerEffect.HandSizeModification.SET
|
||||
)));
|
||||
|
||||
// At the beginning of your upkeep, if you have exactly thirteen cards in your hand, you win the game.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new BeginningOfUpkeepTriggeredAbility(
|
||||
new WinGameSourceControllerEffect(), TargetController.YOU, false
|
||||
), condition, "At the beginning of your upkeep, " +
|
||||
"if you have exactly thirteen cards in your hand, you win the game."
|
||||
));
|
||||
|
||||
// {3}{U}: Draw a card.
|
||||
this.addAbility(new SimpleActivatedAbility(
|
||||
new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{3}{U}")
|
||||
));
|
||||
}
|
||||
|
||||
private Triskaidekaphile(final Triskaidekaphile card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Triskaidekaphile copy() {
|
||||
return new Triskaidekaphile(this);
|
||||
}
|
||||
}
|
|
@ -37,5 +37,6 @@ public final class InnistradMidnightHunt extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Plains", 268, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Play with Fire", 154, Rarity.UNCOMMON, mage.cards.p.PlayWithFire.class));
|
||||
cards.add(new SetCardInfo("Swamp", 272, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Triskaidekaphile", 81, Rarity.RARE, mage.cards.t.Triskaidekaphile.class));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
|
||||
package mage.abilities.condition.common;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Cards in controller hand condition. This condition can decorate other
|
||||
* conditions as well as be used standalone.
|
||||
|
@ -19,10 +18,10 @@ import mage.util.CardUtil;
|
|||
*/
|
||||
public class CardsInHandCondition implements Condition {
|
||||
|
||||
private Condition condition;
|
||||
private ComparisonType type;
|
||||
private int count;
|
||||
private TargetController targetController;
|
||||
private final Condition condition;
|
||||
private final ComparisonType type;
|
||||
private final int count;
|
||||
private final TargetController targetController;
|
||||
|
||||
public CardsInHandCondition() {
|
||||
this(ComparisonType.EQUAL_TO, 0);
|
||||
|
@ -116,5 +115,4 @@ public class CardsInHandCondition implements Condition {
|
|||
sb.append(" cards in hand");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue