Phyrexian Gargantua fix, 2 cards

This commit is contained in:
Loki 2011-07-29 11:55:05 +03:00
parent 73e525c75a
commit 017fb17616
4 changed files with 139 additions and 3 deletions

View file

@ -36,6 +36,7 @@ import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.DrawCardControllerEffect;
import mage.abilities.effects.common.LoseLifeControllerEffect;
import mage.abilities.effects.common.LoseLifeSourceEffect;
import mage.cards.CardImpl;
/**
@ -52,7 +53,7 @@ public class PhyrexianGargantua extends CardImpl<PhyrexianGargantua> {
this.power = new MageInt(4);
this.toughness = new MageInt(4);
Ability ability = new EntersBattlefieldTriggeredAbility(new DrawCardControllerEffect(2), false);
ability.addEffect(new LoseLifeControllerEffect(2));
ability.addEffect(new LoseLifeSourceEffect(2));
this.addAbility(ability);
}

View file

@ -0,0 +1,69 @@
/*
* 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.elspethvstezzeret;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.effects.common.TapTargetEffect;
import mage.cards.CardImpl;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author Loki
*/
public class SeasonedMarshal extends CardImpl<SeasonedMarshal> {
public SeasonedMarshal(UUID ownerId) {
super(ownerId, 15, "Seasoned Marshal", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}{W}");
this.expansionSetCode = "DDF";
this.subtype.add("Human");
this.subtype.add("Soldier");
this.color.setWhite(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
Ability ability = new AttacksTriggeredAbility(new TapTargetEffect(), true);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}
public SeasonedMarshal(final SeasonedMarshal card) {
super(card);
}
@Override
public SeasonedMarshal copy() {
return new SeasonedMarshal(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.riseoftheeldrazi;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.effects.common.DrawCardControllerEffect;
import mage.abilities.effects.common.TapTargetEffect;
import mage.cards.CardImpl;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author Loki
*/
public class RepelTheDarkness extends CardImpl<RepelTheDarkness> {
public RepelTheDarkness(UUID ownerId) {
super(ownerId, 42, "Repel the Darkness", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{W}");
this.expansionSetCode = "ROE";
this.color.setWhite(true);
this.getSpellAbility().addEffect(new TapTargetEffect());
this.getSpellAbility().addEffect(new DrawCardControllerEffect(1));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2));
}
public RepelTheDarkness(final RepelTheDarkness card) {
super(card);
}
@Override
public RepelTheDarkness copy() {
return new RepelTheDarkness(this);
}
}

View file

@ -72,8 +72,11 @@ public class TapTargetEffect extends OneShotEffect<TapTargetEffect> {
@Override
public String getText(Mode mode) {
Target target = mode.getTargets().get(0);
if (target.getNumberOfTargets() > 1)
return "tap " + target.getNumberOfTargets() + " target " + mode.getTargets().get(0).getTargetName() + "s";
if (target.getMaxNumberOfTargets() > 1)
if (target.getMaxNumberOfTargets() == target.getNumberOfTargets())
return "tap " + target.getNumberOfTargets() + " target " + mode.getTargets().get(0).getTargetName() + "s";
else
return "tap up to " + target.getMaxNumberOfTargets() + " target " + mode.getTargets().get(0).getTargetName() + "s";
else
return "tap target " + mode.getTargets().get(0).getTargetName();
}