@Override public MaximumHandSizeControllerEffect copy() { return new MaximumHandSizeControllerEffect(this); }
public MaximumHandSizeControllerEffect(DynamicValue handSize, Duration duration, HandSizeModification handSizeModification, TargetController targetController) { super(duration, Layer.PlayerEffects, SubLayer.NA, defineOutcome(handSizeModification, targetController)); this.handSize = handSize; this.handSizeModification = handSizeModification; this.targetController = targetController; setText(); }
public MineMineMine(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{G}{G}"); // When Mine, Mine, Mine enters the battlefield, each player puts their library into their hand. this.addAbility(new EntersBattlefieldTriggeredAbility(new MineMineMineDrawEffect())); // Players have no maximum hand size and don't lose the game for drawing from an empty library. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.WhileOnBattlefield, HandSizeModification.SET, TargetController.ANY) .setText("Players have no maximum hand size and don't lose the game for drawing from an empty library"))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MineMineMineDontLoseEffect())); // Each player can't cast more than one spell each turn. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantCastMoreThanOneSpellEffect(TargetController.ANY))); // When Mine, Mine, Mine leaves the battlefield, each player shuffles their hand and graveyard into their library. this.addAbility(new LeavesBattlefieldTriggeredAbility(new ShuffleHandGraveyardAllEffect(), false)); }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { switch (targetController) { case ANY: for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { setHandSize(game, source, playerId); } break; case OPPONENT: for (UUID playerId : game.getOpponents(source.getControllerId())) { setHandSize(game, source, playerId); } break; case YOU: setHandSize(game, source, source.getControllerId()); break; default: throw new UnsupportedOperationException("Not supported yet."); } return true; } return false; }
public Spellbook(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{0}"); // You have no maximum hand size. Effect effect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.WhileOnBattlefield, HandSizeModification.SET); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); }
public LocustMiser(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); this.subtype.add(SubType.RAT); this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); // Each opponent's maximum hand size is reduced by two. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MaximumHandSizeControllerEffect(2, Duration.WhileOnBattlefield, HandSizeModification.REDUCE, TargetController.OPPONENT))); }
public GnatMiser(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); this.subtype.add(SubType.RAT); this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); // Each opponent's maximum hand size is reduced by one. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MaximumHandSizeControllerEffect(1, Duration.WhileOnBattlefield, HandSizeModification.REDUCE, TargetController.OPPONENT))); }
public ThoughtDevourer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); // Flying this.addAbility(FlyingAbility.getInstance()); // Your maximum hand size is reduced by four. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MaximumHandSizeControllerEffect(4, Duration.WhileOnBattlefield, HandSizeModification.REDUCE))); }
public ThoughtNibbler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); this.subtype.add(SubType.BEAST); this.power = new MageInt(1); this.toughness = new MageInt(1); // Flying this.addAbility(FlyingAbility.getInstance()); // Your maximum hand size is reduced by two. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MaximumHandSizeControllerEffect(2, Duration.WhileOnBattlefield, HandSizeModification.REDUCE))); }
public ThoughtEater(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); // Flying this.addAbility(FlyingAbility.getInstance()); // Your maximum hand size is reduced by three. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MaximumHandSizeControllerEffect(3, Duration.WhileOnBattlefield, HandSizeModification.REDUCE))); }
public ReliquaryTower(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); // You have no maximum hand size. Effect effect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.WhileOnBattlefield, HandSizeModification.SET); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); // {tap}: Add {C}. this.addAbility(new ColorlessManaAbility()); }
public ThoughtVessel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); // You have no maximum hand size. Effect effect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.WhileOnBattlefield, MaximumHandSizeControllerEffect.HandSizeModification.SET); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); // {T}: Add {C}. this.addAbility(new ColorlessManaAbility()); }
public Recycle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{G}{G}"); // Skip your draw step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipDrawStepEffect())); // Whenever you play a card, draw a card. this.addAbility(new RecycleTriggeredAbility()); // Your maximum hand size is two. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MaximumHandSizeControllerEffect(2, Duration.WhileOnBattlefield, HandSizeModification.SET))); }
public MinamoScrollkeeper(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(2); this.toughness = new MageInt(3); // Defender (This creature can't attack.) this.addAbility(DefenderAbility.getInstance()); // Your maximum hand size is increased by one. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MaximumHandSizeControllerEffect(1, Duration.WhileOnBattlefield, HandSizeModification.INCREASE))); }
public TrustedAdvisor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.ADVISOR); this.power = new MageInt(1); this.toughness = new MageInt(2); // Your maximum hand size is increased by two. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MaximumHandSizeControllerEffect(2, Duration.WhileOnBattlefield, HandSizeModification.INCREASE))); // At the beginning of your upkeep, return a blue creature you control to its owner's hand. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new ReturnToHandChosenControlledPermanentEffect(filter), TargetController.YOU, false)); }
public LibraryOfLeng(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); // You have no maximum hand size. Effect effect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.WhileOnBattlefield, MaximumHandSizeControllerEffect.HandSizeModification.SET); addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); // If an effect causes you to discard a card, discard it, but you may put it on top of your library instead of into your graveyard. addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new LibraryOfLengEffect())); }
public VensersJournal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{5}"); // You have no maximum hand size. Effect effect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.WhileOnBattlefield, HandSizeModification.SET); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); // At the beginning of your upkeep, you gain 1 life for each card in your hand. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new GainLifeEffect(CardsInControllerHandCount.instance), TargetController.YOU, false)); }
/** * Emblem with "You have no maximum hand size" and "Whenever a card is put * into your graveyard from anywhere, you may return it to your hand." */ public TamiyoTheMoonSageEmblem() { this.setName("Emblem Tamiyo"); Ability ability = new SimpleStaticAbility(Zone.COMMAND, new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.EndOfGame, HandSizeModification.SET)); this.getAbilities().add(ability); Effect effect = new ReturnToHandTargetEffect(); effect.setText("return it to your hand"); this.getAbilities().add(new PutCardIntoGraveFromAnywhereAllTriggeredAbility( Zone.COMMAND, effect, true, new FilterCard("a card"), TargetController.YOU, SetTargetPointer.CARD)); } }
public PriceOfKnowledge(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{6}{B}"); // Players have no maximum hand size. Effect effect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.WhileOnBattlefield, HandSizeModification.SET, TargetController.ANY); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); // At the beginning of each opponent's upkeep, Price of Knowledge deals damage to that player equal to the number of cards in that player's hand. this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new PriceOfKnowledgeEffect(), TargetController.OPPONENT, false)); }
public GracefulAdept(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{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. Effect effect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.WhileOnBattlefield, HandSizeModification.SET); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); }