@Override public DynamicValue copy() { return new AdditiveDynamicValue(this.dynamicValues); }
public ChampionOfTheFlame(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); // Trample this.addAbility(TrampleAbility.getInstance()); // Champion of the Flame gets +2/+2 for each Aura and Equipment attached to it. DynamicValue auraAmount = new AuraAttachedCount(2); DynamicValue equipAmount = new EquipmentAttachedCount(2); DynamicValue totalAmount = new AdditiveDynamicValue(auraAmount, equipAmount); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(totalAmount, totalAmount, Duration.WhileOnBattlefield) .setText("{this} gets +2/+2 for each Aura and Equipment attached to it"))); }
public HeavenlyBlademaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}"); this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(6); // Flying this.addAbility(FlyingAbility.getInstance()); // Double strike this.addAbility(DoubleStrikeAbility.getInstance()); // When Heavenly Blademaster enters the battlefield, you may attach any number of Auras and Equipment you control to it. this.addAbility(new EntersBattlefieldTriggeredAbility( new HeavenlyBlademasterEffect(), true )); // Other creatures you control get +1/+1 for each Aura and Equipment attached to Heavenly Blademaster. DynamicValue totalAmount = new AdditiveDynamicValue( new EquipmentAttachedCount(1), new AuraAttachedCount(1) ); this.addAbility(new SimpleStaticAbility( Zone.BATTLEFIELD, new BoostControlledEffect( totalAmount, totalAmount, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES, true ).setText("Other creatures you control get +1/+1 for each Aura and Equipment attached to {this}") )); }
public MultaniYavimayasAvatar(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.ELEMENTAL); this.subtype.add(SubType.AVATAR); this.power = new MageInt(0); this.toughness = new MageInt(0); this.addAbility(ReachAbility.getInstance()); this.addAbility(TrampleAbility.getInstance()); //Multani, Yavimaya's Avatar gets +1/+1 for each land you control and each land in your graveyard. CardsInControllerGraveyardCount graveyardCount = new CardsInControllerGraveyardCount(LAND_FILTER); PermanentsOnBattlefieldCount permanentsOnBattlefieldCount = new PermanentsOnBattlefieldCount(LANDS_YOU_CONTROL_FILTER); DynamicValue powerToughnessValue = new AdditiveDynamicValue(graveyardCount, permanentsOnBattlefieldCount); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(powerToughnessValue, powerToughnessValue, Duration.WhileOnBattlefield) .setText("{this} gets +1/+1 for each land you control and each land in your graveyard") )); //{1}{G}, Return two lands you control to their owner's hand: Return Multani from your graveyard to your hand. SimpleActivatedAbility returnToHand = new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), new ManaCostsImpl<>("{1}{G}")); returnToHand.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(2, 2, LANDS_YOU_CONTROL_FILTER, true))); this.addAbility(returnToHand); }