@Override public EquipmentAttachedCount copy() { return new EquipmentAttachedCount(this); }
@Override public boolean apply(Game game, Ability source) { Permanent sourcePermanent = game.getPermanent(source.getSourceId()); if (sourcePermanent != null) { EquipmentAttachedCount eamount = new EquipmentAttachedCount(); int value = eamount.calculate(game, source, this); AuraAttachedCount aamount = new AuraAttachedCount(); value += aamount.calculate(game, source, this); CreateTokenEffect effect = new CreateTokenEffect(new ValdukElementalToken(), value); if (effect.apply(game, source)) { effect.exileTokensCreatedAtNextEndStep(game, source); return true; } } return false; } }
public GoblinGaveleer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); this.subtype.add(SubType.GOBLIN); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); // Trample this.addAbility(TrampleAbility.getInstance()); // Goblin Gaveleer gets +2/+0 for each Equipment attached to it. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new EquipmentAttachedCount(2), new StaticValue(0), Duration.WhileOnBattlefield))); }
public KembaKhaRegent(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.CAT); this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(4); this.addAbility(new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new CatToken(), new EquipmentAttachedCount()), TargetController.YOU, false)); }
public MyrAdapter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); this.subtype.add(SubType.MYR); this.power = new MageInt(1); this.toughness = new MageInt(1); // Myr Adapter gets +1/+1 for each Equipment attached to it. EquipmentAttachedCount amount = new EquipmentAttachedCount(); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(amount, amount, Duration.WhileOnBattlefield))); }
public LoxodonPunisher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); this.subtype.add(SubType.ELEPHANT); this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(2); // Loxodon Punisher gets +2/+2 for each Equipment attached to it EquipmentAttachedCount amount = new EquipmentAttachedCount(2); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(amount, amount, Duration.WhileOnBattlefield))); }
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 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"))); }