more reward cards

This commit is contained in:
Loki 2011-11-18 22:04:09 +04:00
parent 93f55ec2dc
commit 90116082ea
26 changed files with 789 additions and 24 deletions

View file

@ -0,0 +1,61 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.planarchaos;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.effects.common.DestroyAllEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent;
/**
*
* @author Loki
*/
public class Damnation extends CardImpl<Damnation> {
public Damnation(UUID ownerId) {
super(ownerId, 85, "Damnation", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{B}{B}");
this.expansionSetCode = "PLC";
this.color.setBlack(true);
// Destroy all creatures. They can't be regenerated.
this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterCreaturePermanent("creatures"), true));
}
public Damnation(final Damnation card) {
super(card);
}
@Override
public Damnation copy() {
return new Damnation(this);
}
}

View file

@ -0,0 +1,60 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.planarchaos;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.effects.common.DrawCardControllerEffect;
import mage.cards.CardImpl;
/**
*
* @author Loki
*/
public class Harmonize extends CardImpl<Harmonize> {
public Harmonize(UUID ownerId) {
super(ownerId, 149, "Harmonize", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{G}{G}");
this.expansionSetCode = "PLC";
this.color.setGreen(true);
// Draw three cards.
this.getSpellAbility().addEffect(new DrawCardControllerEffect(3));
}
public Harmonize(final Harmonize card) {
super(card);
}
@Override
public Harmonize copy() {
return new Harmonize(this);
}
}

View file

@ -0,0 +1,63 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.planarchaos;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.CounterUnlessPaysEffect;
import mage.cards.CardImpl;
import mage.target.TargetSpell;
/**
*
* @author Loki
*/
public class ManaTithe extends CardImpl<ManaTithe> {
public ManaTithe(UUID ownerId) {
super(ownerId, 25, "Mana Tithe", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{W}");
this.expansionSetCode = "PLC";
this.color.setWhite(true);
// Counter target spell unless its controller pays {1}.
this.getSpellAbility().addTarget(new TargetSpell());
this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new GenericManaCost(1)));
}
public ManaTithe(final ManaTithe card) {
super(card);
}
@Override
public ManaTithe copy() {
return new ManaTithe(this);
}
}

View file

@ -0,0 +1,23 @@
package mage.sets.playerrewards;
import java.util.UUID;
/**
* @author Loki
*/
public class Condemn extends mage.sets.tenth.Condemn {
public Condemn(UUID ownerId) {
super(ownerId);
this.cardNumber = 18;
this.expansionSetCode = "MPR";
}
public Condemn(final Condemn card) {
super(card);
}
@Override
public Condemn copy() {
return new Condemn(this);
}
}

View file

@ -0,0 +1,23 @@
package mage.sets.playerrewards;
import java.util.UUID;
/**
* @author Loki
*/
public class CruelEdict extends mage.sets.tenth.CruelEdict {
public CruelEdict(UUID ownerId) {
super(ownerId);
this.cardNumber = 21;
this.expansionSetCode = "MPR";
}
public CruelEdict(final CruelEdict card) {
super(card);
}
@Override
public CruelEdict copy() {
return new CruelEdict(this);
}
}

View file

@ -0,0 +1,23 @@
package mage.sets.playerrewards;
import java.util.UUID;
/**
* @author Loki
*/
public class Damnation extends mage.sets.planarchaos.Damnation{
public Damnation(UUID ownerId) {
super(ownerId);
this.cardNumber = 24;
this.expansionSetCode = "MPR";
}
public Damnation(final Damnation card) {
super(card);
}
@Override
public Damnation copy() {
return new Damnation(this);
}
}

View file

@ -0,0 +1,23 @@
package mage.sets.playerrewards;
import java.util.UUID;
/**
* @author Loki
*/
public class Disenchant extends mage.sets.tempest.Disenchant {
public Disenchant(UUID ownerId) {
super(ownerId);
this.cardNumber = 22;
this.expansionSetCode = "MPR";
}
public Disenchant(final Disenchant card) {
super(card);
}
@Override
public Disenchant copy() {
return new Disenchant(this);
}
}

View file

@ -0,0 +1,23 @@
package mage.sets.playerrewards;
import java.util.UUID;
/**
* @author Loki
*/
public class GiantGrowth extends mage.sets.tenth.GiantGrowth {
public GiantGrowth(UUID ownerId) {
super(ownerId);
this.cardNumber = 13;
this.expansionSetCode = "MPR";
}
public GiantGrowth(final GiantGrowth card) {
super(card);
}
@Override
public GiantGrowth copy() {
return new GiantGrowth(this);
}
}

View file

@ -0,0 +1,23 @@
package mage.sets.playerrewards;
import java.util.UUID;
/**
* @author Loki
*/
public class Harmonize extends mage.sets.planarchaos.Harmonize {
public Harmonize(UUID ownerId) {
super(ownerId);
this.cardNumber = 28;
this.expansionSetCode = "MPR";
}
public Harmonize(final Harmonize card) {
super(card);
}
@Override
public Harmonize copy() {
return new Harmonize(this);
}
}

View file

@ -0,0 +1,23 @@
package mage.sets.playerrewards;
import java.util.UUID;
/**
* @author Loki
*/
public class Incinerate extends mage.sets.tenth.Incinerate {
public Incinerate(UUID ownerId) {
super(ownerId);
this.cardNumber = 26;
this.expansionSetCode = "MPR";
}
public Incinerate(final Incinerate card) {
super(card);
}
@Override
public Incinerate copy() {
return new Incinerate(this);
}
}

View file

@ -0,0 +1,23 @@
package mage.sets.playerrewards;
import java.util.UUID;
/**
* @author Loki
*/
public class LightningHelix extends mage.sets.ravnika.LightningHelix {
public LightningHelix(UUID ownerId) {
super(ownerId);
this.cardNumber = 16;
this.expansionSetCode = "MPR";
}
public LightningHelix(final LightningHelix card) {
super(card);
}
@Override
public LightningHelix copy() {
return new LightningHelix(this);
}
}

View file

@ -0,0 +1,23 @@
package mage.sets.playerrewards;
import java.util.UUID;
/**
* @author Loki
*/
public class ManaLeak extends mage.sets.magic2011.ManaLeak {
public ManaLeak(UUID ownerId) {
super(ownerId);
this.cardNumber = 8;
this.expansionSetCode = "MPR";
}
public ManaLeak(final ManaLeak card) {
super(card);
}
@Override
public ManaLeak copy() {
return new ManaLeak(this);
}
}

View file

@ -0,0 +1,23 @@
package mage.sets.playerrewards;
import java.util.UUID;
/**
* @author Loki
*/
public class ManaTithe extends mage.sets.planarchaos.ManaTithe {
public ManaTithe(UUID ownerId) {
super(ownerId);
this.cardNumber = 27;
this.expansionSetCode = "MPR";
}
public ManaTithe(final ManaTithe card) {
super(card);
}
@Override
public ManaTithe copy() {
return new ManaTithe(this);
}
}

View file

@ -0,0 +1,23 @@
package mage.sets.playerrewards;
import java.util.UUID;
/**
* @author Loki
*/
public class Mortify extends mage.sets.guildpact.Mortify{
public Mortify(UUID ownerId) {
super(ownerId);
this.cardNumber = 19;
this.expansionSetCode = "MPR";
}
public Mortify(final Mortify card) {
super(card);
}
@Override
public Mortify copy() {
return new Mortify(this);
}
}

View file

@ -0,0 +1,23 @@
package mage.sets.playerrewards;
import java.util.UUID;
/**
* @author Loki
*/
public class PsionicBlast extends mage.sets.timeshifted.PsionicBlast {
public PsionicBlast(UUID ownerId) {
super(ownerId);
this.cardNumber = 20;
this.expansionSetCode = "MPR";
}
public PsionicBlast(final PsionicBlast card) {
super(card);
}
@Override
public PsionicBlast copy() {
return new PsionicBlast(this);
}
}

View file

@ -0,0 +1,23 @@
package mage.sets.playerrewards;
import java.util.UUID;
/**
* @author Loki
*/
public class Putrefy extends mage.sets.ravnika.Putrefy {
public Putrefy(UUID ownerId) {
super(ownerId);
this.cardNumber = 14;
this.expansionSetCode = "MPR";
}
public Putrefy(final Putrefy card) {
super(card);
}
@Override
public Putrefy copy() {
return new Putrefy(this);
}
}

View file

@ -0,0 +1,23 @@
package mage.sets.playerrewards;
import java.util.UUID;
/**
* @author Loki
*/
public class Pyroclasm extends mage.sets.tenth.Pyroclasm {
public Pyroclasm(UUID ownerId) {
super(ownerId);
this.cardNumber = 12;
this.expansionSetCode = "MPR";
}
public Pyroclasm(final Pyroclasm card) {
super(card);
}
@Override
public Pyroclasm copy() {
return new Pyroclasm(this);
}
}

View file

@ -0,0 +1,23 @@
package mage.sets.playerrewards;
import java.util.UUID;
/**
* @author Loki
*/
public class Recollect extends mage.sets.tenth.Recollect {
public Recollect(UUID ownerId) {
super(ownerId);
this.cardNumber = 23;
this.expansionSetCode = "MPR";
}
public Recollect(final Recollect card) {
super(card);
}
@Override
public Recollect copy() {
return new Recollect(this);
}
}

View file

@ -0,0 +1,23 @@
package mage.sets.playerrewards;
import java.util.UUID;
/**
* @author Loki
*/
public class Tidings extends mage.sets.tenth.Tidings {
public Tidings(UUID ownerId) {
super(ownerId);
this.cardNumber = 25;
this.expansionSetCode = "MPR";
}
public Tidings(final Tidings card) {
super(card);
}
@Override
public Tidings copy() {
return new Tidings(this);
}
}

View file

@ -0,0 +1,23 @@
package mage.sets.playerrewards;
import java.util.UUID;
/**
* @author Loki
*/
public class WrathOfGod extends mage.sets.tenth.WrathOfGod{
public WrathOfGod(UUID ownerId) {
super(ownerId);
this.cardNumber = 17;
this.expansionSetCode = "MPR";
}
public WrathOfGod(final WrathOfGod card) {
super(card);
}
@Override
public WrathOfGod copy() {
return new WrathOfGod(this);
}
}

View file

@ -34,6 +34,7 @@ import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.effects.common.continious.BoostAllEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent;
/**
*
@ -48,7 +49,7 @@ public class Infest extends CardImpl<Infest> {
this.color.setBlack(true);
// All creatures get -2/-2 until end of turn.
this.getSpellAbility().addEffect(new BoostAllEffect(-2, -2, Constants.Duration.EndOfTurn));
this.getSpellAbility().addEffect(new BoostAllEffect(-2, -2, Constants.Duration.EndOfTurn, new FilterCreaturePermanent("All creatures"), false));
}
public Infest(final Infest card) {

View file

@ -0,0 +1,61 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.tenth;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.effects.common.DestroyAllEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent;
/**
*
* @author Loki
*/
public class WrathOfGod extends CardImpl<WrathOfGod> {
public WrathOfGod(UUID ownerId) {
super(ownerId, 61, "Wrath of God", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{W}{W}");
this.expansionSetCode = "10E";
this.color.setWhite(true);
// Destroy all creatures. They can't be regenerated.
this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterCreaturePermanent("creatures"), true));
}
public WrathOfGod(final WrathOfGod card) {
super(card);
}
@Override
public WrathOfGod copy() {
return new WrathOfGod(this);
}
}

View file

@ -0,0 +1,95 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.timeshifted;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCreatureOrPlayer;
/**
*
* @author Loki
*/
public class PsionicBlast extends CardImpl<PsionicBlast> {
public PsionicBlast(UUID ownerId) {
super(ownerId, 30, "Psionic Blast", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{U}");
this.expansionSetCode = "TSB";
this.color.setBlue(true);
// Psionic Blast deals 4 damage to target creature or player and 2 damage to you.
this.getSpellAbility().addEffect(new DamageTargetEffect(4));
this.getSpellAbility().addEffect(new PsionicBlastEffect());
this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
}
public PsionicBlast(final PsionicBlast card) {
super(card);
}
@Override
public PsionicBlast copy() {
return new PsionicBlast(this);
}
}
class PsionicBlastEffect extends OneShotEffect<PsionicBlastEffect> {
PsionicBlastEffect() {
super(Constants.Outcome.Damage);
staticText = "{this} deals 2 damage to you";
}
PsionicBlastEffect(final PsionicBlastEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
player.damage(2, source.getSourceId(), game, false, true);
return true;
}
return false;
}
@Override
public PsionicBlastEffect copy() {
return new PsionicBlastEffect(this);
}
}

View file

@ -0,0 +1,25 @@
package org.mage.test.cards.damage;
import mage.Constants;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestBase;
/**
* @author Loki
*/
public class PsionicBlastTest extends CardTestBase {
@Test
public void testDamageInPlayer() {
addCard(Constants.Zone.BATTLEFIELD, playerA, "Island");
addCard(Constants.Zone.BATTLEFIELD, playerA, "Island");
addCard(Constants.Zone.BATTLEFIELD, playerA, "Island");
addCard(Constants.Zone.HAND, playerA, "Psionic Blast");
castSpell(playerA, "Psionic Blast");
execute();
assertLife(playerA, 18);
assertLife(playerB, 16);
}
}

View file

@ -36,35 +36,43 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
/**
*
* @author BetaSteward_at_googlemail.com
*/
public class DestroyAllEffect extends OneShotEffect {
private FilterPermanent filter;
private FilterPermanent filter;
private boolean noRegen;
public DestroyAllEffect(FilterPermanent filter) {
super(Outcome.DestroyPermanent);
this.filter = filter;
staticText = "Destroy all " + filter.getMessage();
}
public DestroyAllEffect(FilterPermanent filter, boolean noRegen) {
super(Outcome.DestroyPermanent);
this.filter = filter;
this.noRegen = noRegen;
if (noRegen)
staticText = "Destroy all " + filter.getMessage() + ". They can't be regenerated";
else
staticText = "Destroy all " + filter.getMessage();
}
public DestroyAllEffect(final DestroyAllEffect effect) {
super(effect);
this.filter = effect.filter.copy();
}
public DestroyAllEffect(FilterPermanent filter) {
this(filter, false);
}
@Override
public DestroyAllEffect copy() {
return new DestroyAllEffect(this);
}
public DestroyAllEffect(final DestroyAllEffect effect) {
super(effect);
this.filter = effect.filter.copy();
}
@Override
public boolean apply(Game game, Ability source) {
for (Permanent permanent: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
permanent.destroy(source.getId(), game, false);
}
return true;
}
@Override
public DestroyAllEffect copy() {
return new DestroyAllEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
permanent.destroy(source.getId(), game, noRegen);
}
return true;
}
}

View file

@ -118,7 +118,7 @@ public class BoostAllEffect extends ContinuousEffectImpl<BoostAllEffect> {
StringBuilder sb = new StringBuilder();
if (excludeSource)
sb.append("Other ");
sb.append(filter.getMessage()).append(" get ");
sb.append(filter.getMessage()).append(" gets ");
String p = power.toString();
if(!p.startsWith("-"))
sb.append("+");