public DamagePlayersEffect(Outcome outcome, DynamicValue amount, TargetController controller) { super(outcome); this.amount = amount; this.controller = controller; setText(); }
public DamagePlayersEffect(int amount, TargetController controller, String whoDealDamageName) { this(Outcome.Damage, new StaticValue(amount), controller); this.sourceName = whoDealDamageName; setText(); // TODO: replace to @Override public String getText() }
HallarTheFirefletcherTriggeredAbility() { super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()).setText("put a +1/+1 counter on {this}"), true); this.addEffect(new DamagePlayersEffect(Outcome.Benefit, new CountersSourceCount(CounterType.P1P1), TargetController.OPPONENT) .setText("then {this} deals damage equal to the number of +1/+1 counters on it to each opponent") ); }
public CabalPaladin(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.KNIGHT); this.power = new MageInt(4); this.toughness = new MageInt(2); // Whenever you cast a historic spell, Cabal Paladin deals 2 damage to each opponent. this.addAbility(new SpellCastControllerTriggeredAbility( new DamagePlayersEffect(Outcome.Damage, new StaticValue(2), TargetController.OPPONENT) .setText("{this} deals 2 damage to each opponent. <i>(Artifacts, legendaries, and Sagas are historic.)</i>"), new FilterHistoricSpell("a historic spell"), false )); }
public GoblinChainwhirler(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{R}{R}"); this.subtype.add(SubType.GOBLIN); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); // First strike this.addAbility(FirstStrikeAbility.getInstance()); // When Goblin Chainwhirler enters the battlefield, it deals 1 damage to each opponent and each creature and planeswalker they control. DamagePlayersEffect effect1 = new DamagePlayersEffect(1, TargetController.OPPONENT); effect1.setText("it deals 1 damage to each opponent"); DamageAllEffect effect2 = new DamageAllEffect(1, filter); effect2.setText("and each creature and planeswalker they control"); Ability ability = new EntersBattlefieldTriggeredAbility(effect1); ability.addEffect(effect2); this.addAbility(ability); }
public SarkhansUnsealing(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}"); // Whenever you cast a creature spell with power 4, 5, or 6, Sarkhan's Unsealing deals 4 damage to any target. Ability ability = new SpellCastControllerTriggeredAbility( new DamageTargetEffect(4), filter, false ); ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // Whenever you cast a creature spell with power 7 or greater, Sarkhan's Unsealing deals 4 damage to each opponent and each creature and planeswalker they control. ability = new SpellCastControllerTriggeredAbility( new DamagePlayersEffect(4, TargetController.OPPONENT) .setText("{this} deals 4 damage to each opponent"), filter2, false ); ability.addEffect( new DamageAllEffect(4, filter3) .setText("and each creature and planeswalker they control") ); this.addAbility(ability); }
public ArmageddonClock(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}"); // At the beginning of your upkeep, put a doom counter on Armageddon Clock. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.DOOM.createInstance(), new StaticValue(1), true), TargetController.YOU, false)); // At the beginning of your draw step, Armageddon Clock deals damage equal to the number of doom counters on it to each player. this.addAbility(new BeginningOfDrawTriggeredAbility(new DamagePlayersEffect(Outcome.Damage, new CountersSourceCount(CounterType.DOOM)) .setText("{this} deals damage equal to the number of doom counters on it to each player"), TargetController.YOU, false)); // {4}: Remove a doom counter from Armageddon Clock. Any player may activate this ability but only during any upkeep step. ActivatedAbilityImpl ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new RemoveCounterSourceEffect(CounterType.DOOM.createInstance()), new ManaCostsImpl("{4}"), new IsStepCondition(PhaseStep.UPKEEP, false), "Remove a doom counter from {this}. Any player may activate this ability but only during any upkeep step"); ability.setMayActivate(TargetController.ANY); this.addAbility(ability); }