@Override public HalfValue copy() { return new HalfValue(this); }
public Banshee(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); this.subtype.add(SubType.SPIRIT); this.power = new MageInt(0); this.toughness = new MageInt(1); // {X}, {T}: Banshee deals half X damage, rounded down, to any target, and half X damage, rounded up, to you. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new HalfValue(ManacostVariableValue.instance, false)).setText("Banshee deals half X damage, rounded down, to any target,"), new ManaCostsImpl("{X}")); ability.addCost(new TapSourceCost()); ability.addEffect(new DamageControllerEffect(new HalfValue(ManacostVariableValue.instance, true)).setText(" and half X damage, rounded up, to you")); ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); }
public FreyaliseSupplicant(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); // {tap}, Sacrifice a red or white creature: Freyalise Supplicant deals damage to any target equal to half the sacrificed creature's power, rounded down. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new HalfValue(SacrificeCostCreaturesPower.instance, false)), new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(filter))); ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); }
public RakdosTheDefiler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}{R}{R}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.DEMON); this.power = new MageInt(7); this.toughness = new MageInt(6); // Flying this.addAbility(FlyingAbility.getInstance()); // Trample this.addAbility(TrampleAbility.getInstance()); // Whenever Rakdos the Defiler attacks, sacrifice half the non-Demon permanents you control, rounded up. Effect effect = new SacrificeControllerEffect(attackTriggerFilter, new HalfValue(new PermanentsOnBattlefieldCount(attackTriggerFilter), true), ""); effect.setText("sacrifice half the non-Demon permanents you control, rounded up"); Ability ability = new AttacksTriggeredAbility(effect, false); this.addAbility(ability); // Whenever Rakdos deals combat damage to a player, that player sacrifices half the non-Demon permanents he or she controls, rounded up. effect = new SacrificeEffect(damageToPlayerTriggerFilter, new HalfValue(new PermanentsTargetOpponentControlsCount(damageToPlayerTriggerFilter), true), ""); effect.setText("that player sacrifices half the non-Demon permanents he or she controls, rounded up"); ability = new DealsCombatDamageToAPlayerTriggeredAbility(effect, false, true); this.addAbility(ability); }
public EternalFlame(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}{R}"); // Eternal Flame deals X damage to target opponent, where X is the number of Mountains you control. It deals half X damage, rounded up, to you.); this.getSpellAbility().addEffect(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter)).setText("{this} deals X damage to target opponent, where X is the number of Mountains you control")); this.getSpellAbility().addEffect(new DamageControllerEffect(new HalfValue(new PermanentsOnBattlefieldCount(filter), true)).setText("It deals half X damage, rounded up, to you")); this.getSpellAbility().addTarget(new TargetOpponentOrPlaneswalker()); }