public BecomesCreatureSourceEffect(Token token, String theyAreStillType, Duration duration, boolean losePreviousTypes, boolean characterDefining, DynamicValue power, DynamicValue toughness, boolean loseAbilities) { super(duration, Outcome.BecomeCreature); this.characterDefining = characterDefining; this.token = token; this.theyAreStillType = theyAreStillType; this.losePreviousTypes = losePreviousTypes; this.power = power; this.toughness = toughness;this.loseAbilities=loseAbilities; setText(); this.addDependencyType(DependencyType.BecomeCreature); }
public AngelsTomb(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); // Whenever a creature enters the battlefield under your control, you may have Angel's Tomb become a 3/3 white Angel artifact creature with flying until end of turn. Effect effect = new BecomesCreatureSourceEffect(new CreatureToken(3, 3, "3/3 white Angel artifact creature with flying") .withColor("W") .withSubType(SubType.ANGEL) .withAbility(FlyingAbility.getInstance()), "", Duration.EndOfTurn) .setText("have {this} become a 3/3 white Angel artifact creature with flying until end of turn"); this.addAbility(new EntersBattlefieldControlledTriggeredAbility( Zone.BATTLEFIELD, effect, StaticFilters.FILTER_PERMANENT_CREATURE_A, true) ); }
public ChromiumTheMutable(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{U}{B}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.ELDER); this.subtype.add(SubType.DRAGON); this.power = new MageInt(7); this.toughness = new MageInt(7); // Flash this.addAbility(FlashAbility.getInstance()); // This spell can't be countered. this.addAbility(new CantBeCounteredAbility()); // Flying this.addAbility(FlyingAbility.getInstance()); // Discard a card: Until end of turn, Chromium, the Mutable becomes a Human with base power and toughness 1/1, loses all abilities, and gains hexproof. It can't be blocked this turn. Ability ability = new SimpleActivatedAbility( new BecomesCreatureSourceEffect( new ChromiumTheMutableToken(), null, Duration.EndOfTurn, false, false, null, null, true ).setText("Until end of turn, {this} becomes " + "a Human with base power and toughness 1/1, " + "loses all abilities, and gains hexproof."), new DiscardCardCost() ); ability.addEffect( new CantBeBlockedSourceEffect(Duration.EndOfTurn) .setText("It can't be blocked this turn.") ); this.addAbility(ability); }