@Override public BecomesColorSourceEffect copy() { return new BecomesColorSourceEffect(this); }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller == null) { return false; } if (setColor != null) { MageObject sourceObject = game.getObject(source.getSourceId()); if (sourceObject != null) { sourceObject.getColor(game).setColor(setColor); } else { this.discard(); } return true; } return false; }
@Override public void init(Ability source, Game game) { Player controller = game.getPlayer(source.getControllerId()); if (controller == null) { return; } if (setColor == null) { ChoiceColor choice = new ChoiceColor(); if (!controller.choose(Outcome.PutManaInPool, choice, game)) { discard(); return; } setColor = choice.getColor(); if (!game.isSimulation()) { game.informPlayers(controller.getLogName() + " has chosen the color: " + setColor.toString()); } } super.init(source, game); }
public AlloyGolem(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); this.subtype.add(SubType.GOLEM); this.power = new MageInt(4); this.toughness = new MageInt(4); // As Alloy Golem enters the battlefield, choose a color. // Alloy Golem is the chosen color. this.addAbility(new EntersBattlefieldAbility(new BecomesColorSourceEffect(Duration.WhileOnBattlefield), null, "As {this} enters the battlefield, choose a color.\n{this} is the chosen color.", "")); }
public RainbowCrow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(2); // Flying this.addAbility(FlyingAbility.getInstance()); // // {1}: Rainbow Crow becomes the color of your choice until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesColorSourceEffect(Duration.EndOfTurn), new ManaCostsImpl("{1}"))); }
public RagingSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(3); // {2}: Raging Spirit becomes colorless until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesColorSourceEffect(new ObjectColor(), Duration.EndOfTurn), new ManaCostsImpl("{2}"))); }
public AncientKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); this.subtype.add(SubType.KAVU); this.power = new MageInt(3); this.toughness = new MageInt(3); // {2}: Ancient Kavu becomes colorless until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesColorSourceEffect(new ObjectColor(), Duration.EndOfTurn), new ManaCostsImpl("{2}"))); }
public KavuChameleon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); this.subtype.add(SubType.KAVU); this.power = new MageInt(4); this.toughness = new MageInt(4); // Kavu Chameleon can't be countered. this.addAbility(new SimpleStaticAbility(Zone.STACK, new CantBeCounteredSourceEffect())); // {G}: Kavu Chameleon becomes the color of your choice until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesColorSourceEffect(Duration.EndOfTurn), new ManaCostsImpl("{G}"))); }
public BlazingBladeAskari(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); this.subtype.add(SubType.HUMAN, SubType.KNIGHT); this.power = new MageInt(2); this.toughness = new MageInt(2); // Flanking this.addAbility(new FlankingAbility()); // {2}: Blazing Blade Askari becomes colorless until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesColorSourceEffect(new ObjectColor(), Duration.EndOfTurn), new ManaCostsImpl("{2}"))); }
public CalderaKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); this.subtype.add(SubType.KAVU); this.power = new MageInt(2); this.toughness = new MageInt(2); // {1}{B}: Caldera Kavu gets +1/+1 until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("{1}{B}"))); // {G}: Caldera Kavu becomes the color of your choice until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesColorSourceEffect(Duration.EndOfTurn), new ManaCostsImpl("{G}"))); }
public Spiritmonger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{G}"); this.subtype.add(SubType.BEAST); this.power = new MageInt(6); this.toughness = new MageInt(6); // Whenever Spiritmonger deals damage to a creature, put a +1/+1 counter on Spiritmonger. this.addAbility(new DealsDamageToACreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(), true), false, false, false)); // {B}: Regenerate Spiritmonger. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{B}"))); // {G}: Spiritmonger becomes the color of your choice until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesColorSourceEffect(Duration.EndOfTurn), new ManaCostsImpl("{G}"))); }
public RepentantVampire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(3); this.toughness = new MageInt(3); // Flying this.addAbility(FlyingAbility.getInstance()); // Whenever a creature dealt damage by Repentant Vampire this turn dies, put a +1/+1 counter on Repentant Vampire. this.addAbility(new DealtDamageAndDiedTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false)); // Threshold - As long as seven or more cards are in your graveyard, Repentant Vampire is white and has "{tap}: Destroy target black creature." Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( new BecomesColorSourceEffect(ObjectColor.WHITE, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7), "As long as seven or more cards are in your graveyard, {this} is white")); Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapSourceCost()); gainedAbility.addTarget(new TargetCreaturePermanent(filter)); ability.addEffect(new ConditionalContinuousEffect( new GainAbilitySourceEffect(gainedAbility, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7), "and has \"{T}: Destroy target black creature.\"")); ability.setAbilityWord(AbilityWord.THRESHOLD); this.addAbility(ability); }
public WildMongrel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); this.subtype.add(SubType.HOUND); this.power = new MageInt(2); this.toughness = new MageInt(2); // Discard a card: Wild Mongrel gets +1/+1 and becomes the color of your choice until end of turn. Effect effect = new BoostSourceEffect(1, 1, Duration.EndOfTurn); effect.setText("{this} gets +1/+1"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new DiscardTargetCost(new TargetCardInHand())); effect = new BecomesColorSourceEffect(Duration.EndOfTurn); effect.setText("and becomes the color of your choice until end of turn."); ability.addEffect(effect); this.addAbility(ability); }
public PossessedBarbarian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.BARBARIAN); this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(3); // First strike this.addAbility(FirstStrikeAbility.getInstance()); // Threshold - As long as seven or more cards are in your graveyard, Possessed Barbarian gets +1/+1, is black, and has "{2}{B}, {tap}: Destroy target red creature." Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7), "As long as seven or more cards are in your graveyard, {this} gets +1/+1")); Effect effect = new ConditionalContinuousEffect(new BecomesColorSourceEffect(ObjectColor.BLACK, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7), ", is black"); ability.addEffect(effect); Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{2}{B}")); gainedAbility.addCost(new TapSourceCost()); gainedAbility.addTarget(new TargetCreaturePermanent(filter)); effect = new ConditionalContinuousEffect(new GainAbilitySourceEffect(gainedAbility), new CardsInControllerGraveCondition(7), ", and has \"{2}{B}, {T}: Destroy target red creature.\""); ability.addEffect(effect); ability.setAbilityWord(AbilityWord.THRESHOLD); this.addAbility(ability); }
public PossessedCentaur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); this.subtype.add(SubType.CENTAUR); this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(3); // Trample this.addAbility(TrampleAbility.getInstance()); // Threshold - As long as seven or more cards are in your graveyard, Possessed Centaur gets +1/+1, is black, and has "{2}{B}, {tap}: Destroy target green creature." Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7), "As long as seven or more cards are in your graveyard, {this} gets +1/+1")); Effect effect = new ConditionalContinuousEffect(new BecomesColorSourceEffect(ObjectColor.BLACK, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7), ", is black"); ability.addEffect(effect); Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{2}{B}")); gainedAbility.addCost(new TapSourceCost()); gainedAbility.addTarget(new TargetCreaturePermanent(filter)); effect = new ConditionalContinuousEffect(new GainAbilitySourceEffect(gainedAbility), new CardsInControllerGraveCondition(7), ", and has \"{2}{B}, {T}: Destroy target green creature.\""); ability.addEffect(effect); ability.setAbilityWord(AbilityWord.THRESHOLD); this.addAbility(ability); }
public PossessedAven(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); this.subtype.add(SubType.BIRD); this.subtype.add(SubType.SOLDIER); this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(3); // Flying this.addAbility(FlyingAbility.getInstance()); // Threshold - As long as seven or more cards are in your graveyard, Possessed Aven gets +1/+1, is black, and has "{2}{B}, {tap}: Destroy target blue creature." Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7), "As long as seven or more cards are in your graveyard, {this} gets +1/+1")); Effect effect = new ConditionalContinuousEffect(new BecomesColorSourceEffect(ObjectColor.BLACK, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7), ", is black"); ability.addEffect(effect); Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{2}{B}")); gainedAbility.addCost(new TapSourceCost()); gainedAbility.addTarget(new TargetCreaturePermanent(filter)); effect = new ConditionalContinuousEffect(new GainAbilitySourceEffect(gainedAbility), new CardsInControllerGraveCondition(7), ", and has \"{2}{B}, {T}: Destroy target blue creature.\""); ability.addEffect(effect); ability.setAbilityWord(AbilityWord.THRESHOLD); this.addAbility(ability); }
public PossessedNomad(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.NOMAD); this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(3); // Vigilance this.addAbility(VigilanceAbility.getInstance()); // Threshold - As long as seven or more cards are in your graveyard, Possessed Nomad gets +1/+1, is black, and has "{2}{B}, {tap}: Destroy target white creature." Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7), "As long as seven or more cards are in your graveyard, {this} gets +1/+1")); Effect effect = new ConditionalContinuousEffect(new BecomesColorSourceEffect(ObjectColor.BLACK, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7), ", is black"); ability.addEffect(effect); Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{2}{B}")); gainedAbility.addCost(new TapSourceCost()); gainedAbility.addTarget(new TargetCreaturePermanent(filter)); effect = new ConditionalContinuousEffect(new GainAbilitySourceEffect(gainedAbility), new CardsInControllerGraveCondition(7), ", and has \"{2}{B}, {T}: Destroy target white creature.\""); ability.addEffect(effect); ability.setAbilityWord(AbilityWord.THRESHOLD); this.addAbility(ability); }
"As long as seven or more cards are in your graveyard, {this} gets +3/+3")); ability.addEffect(new ConditionalContinuousEffect( new BecomesColorSourceEffect(ObjectColor.BLACK, Duration.WhileOnBattlefield), new CardsInControllerGraveCondition(7), ", is black"));