@Override public DomainValue copy() { return new DomainValue(this); }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { CardUtil.reduceCost(abilityToModify, new DomainValue(2).calculate(game, source, this)); return true; }
protected static boolean isCanKill(DynamicValue toughness) { if (toughness instanceof StaticValue) { return toughness.calculate(null, null, null) < 0; } if (toughness instanceof SignInversionDynamicValue) { // count this class as used for "-{something_positive}" return true; } if (toughness instanceof DomainValue) { return ((DomainValue) toughness).getAmount() < 0; } return false; }
public MightOfAlara(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}"); // Domain - Target creature gets +1/+1 until end of turn for each basic land type among lands you control. this.getSpellAbility().addEffect(new BoostTargetEffect(new DomainValue(), new DomainValue(), Duration.EndOfTurn, true)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); }
@Override protected int getInputValue(Game game, Ability source) { return new DomainValue(1, game.getActivePlayerId()).calculate(game, source, null); } }
public DragDown(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{B}"); // Domain - Target creature gets -1/-1 until end of turn for each basic land type among lands you control. this.getSpellAbility().addEffect(new BoostTargetEffect(new DomainValue(-1), new DomainValue(-1), Duration.EndOfTurn, true)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { CardUtil.reduceCost(abilityToModify, new DomainValue().calculate(game, source, this)); return true; }
public PowerArmor(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); // Domain - {3}, {tap}: Target creature gets +1/+1 until end of turn for each basic land type among lands you control. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect( new DomainValue(), new DomainValue(), Duration.EndOfTurn), new TapSourceCost()); ability.addCost(new ManaCostsImpl("{3}")); ability.addTarget(new TargetCreaturePermanent()); ability.setAbilityWord(AbilityWord.DOMAIN); this.addAbility(ability); }
@Override public void init(Ability source, Game game) { super.init(source, game); amountToPrevent = new DomainValue().calculate(game, source, this); }
public WanderingStream(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}"); // Domain - You gain 2 life for each basic land type among lands you control. Effect effect = new GainLifeEffect(new MultipliedValue(new DomainValue(), 2)); effect.setText("Domain - You gain 2 life for each basic land type among lands you control"); this.getSpellAbility().addEffect(effect); }
@Override public ManaCosts getManaCostToPay(GameEvent event, Ability source, Game game) { int domainValue = new DomainValue().calculate(game, source, this); if (domainValue > 0) { return new ManaCostsImpl<>("{" + domainValue + '}'); } return null; }
public GaeasMight(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}"); // Domain - Target creature gets +1/+1 until end of turn for each basic land type among lands you control. this.getSpellAbility().addEffect(new BoostTargetEffect(new DomainValue(), new DomainValue(), Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().setAbilityWord(AbilityWord.DOMAIN); }
@Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); Permanent permanent = game.getPermanent(source.getSourceId()); if (player != null && permanent != null) { // The cost is reduced by {2} for each basic land type. int domainValueReduction = new DomainValue(2).calculate(game, source, this); int count = MAX_DOMAIN_VALUE - domainValueReduction; if (player.chooseUse(Outcome.Benefit, "Pay {" + count + "}? Or " + permanent.getName() + " will be sacrificed.", source, game)) { GenericManaCost cost = new GenericManaCost(count); if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) { return true; } } permanent.sacrifice(source.getSourceId(), game); return true; } return false; }
public SporeBurst(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{G}"); // Domain - Create a 1/1 green Saproling creature token for each basic land type among lands you control. this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), new DomainValue())); }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller == null) { return false; } Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, (new DomainValue()).calculate(game, source, this))); controller.lookAtCards(source, null, cards, game); if (!cards.isEmpty()) { if (cards.size() == 1) { controller.moveCards(cards, Zone.HAND, source, game); } else { TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put into your hand")); if (controller.choose(Outcome.DrawCard, cards, target, game)) { Card card = cards.get(target.getFirstTarget(), game); if (card != null) { cards.remove(card); controller.moveCards(card, Zone.HAND, source, game); } } controller.putCardsOnBottomOfLibrary(cards, game, source, true); } } return true; } }
public PlanarDespair(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}{B}"); // Domain - All creatures get -1/-1 until end of turn for each basic land type among lands you control. DynamicValue dv = new SignInversionDynamicValue(new DomainValue()); Effect effect = new BoostAllEffect(dv, dv, Duration.EndOfTurn); effect.setText("Domain - All creatures get -1/-1 until end of turn for each basic land type among lands you control."); this.getSpellAbility().addEffect(effect); }
public TribalFlames(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{R}"); // Domain - Tribal Flames deals X damage to any target, where X is the number of basic land types among lands you control. this.getSpellAbility().addEffect(new DamageTargetEffect(new DomainValue())); this.getSpellAbility().addTarget(new TargetAnyTarget()); }
public VoicesFromTheVoid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{B}"); // Domain - Target player discards a card for each basic land type among lands you control. this.getSpellAbility().addEffect(new DiscardTargetEffect(new DomainValue())); this.getSpellAbility().addTarget(new TargetPlayer()); }
public AvenTrailblazer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); this.subtype.add(SubType.BIRD); this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(0); // Flying this.addAbility(FlyingAbility.getInstance()); // Domain - Aven Trailblazer's toughness is equal to the number of basic land types among lands you control. this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetToughnessSourceEffect(new DomainValue(), Duration.EndOfGame))); }
public OrderedMigration(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}{U}"); // Domain - Create a 1/1 blue Bird creature token with flying for each basic land type among lands you control. this.getSpellAbility().addEffect(new CreateTokenEffect(new OrderedMigrationBirdToken(), new DomainValue())); this.getSpellAbility().setAbilityWord(AbilityWord.DOMAIN); }