mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
- Added Pentarch Paladin.
This commit is contained in:
parent
80c4f74ed4
commit
74935e8bbb
2 changed files with 429 additions and 323 deletions
105
Mage.Sets/src/mage/cards/p/PentarchPaladin.java
Normal file
105
Mage.Sets/src/mage/cards/p/PentarchPaladin.java
Normal file
|
@ -0,0 +1,105 @@
|
|||
/*
|
||||
* 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.cards.p;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.ChooseColorEffect;
|
||||
import mage.abilities.keyword.FlankingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class PentarchPaladin extends CardImpl {
|
||||
|
||||
private final UUID originalId;
|
||||
FilterPermanent filter = new FilterPermanent("permanent of the chosen color.");
|
||||
|
||||
public PentarchPaladin(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}{W}");
|
||||
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Knight");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Flanking
|
||||
this.addAbility(new FlankingAbility());
|
||||
|
||||
// As Pentarch Paladin enters the battlefield, choose a color.
|
||||
this.addAbility(new AsEntersBattlefieldAbility(new ChooseColorEffect(Outcome.Detriment)));
|
||||
|
||||
// {W}{W}, {tap}: Destroy target permanent of the chosen color.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{W}{W}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
originalId = ability.getOriginalId();
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void adjustTargets(Ability ability, Game game) {
|
||||
ObjectColor color = (ObjectColor) game.getState().getValue(ability.getSourceId() + "_color");
|
||||
if (ability.getOriginalId().equals(originalId)
|
||||
&& color != null) {
|
||||
ability.getTargets().clear();
|
||||
FilterPermanent filter = new FilterPermanent("permanent of the chosen color.");
|
||||
filter.add(new ColorPredicate(color));
|
||||
TargetPermanent target = new TargetPermanent(filter);
|
||||
ability.addTarget(target);
|
||||
}
|
||||
}
|
||||
|
||||
public PentarchPaladin(final PentarchPaladin card) {
|
||||
super(card);
|
||||
this.originalId = card.originalId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PentarchPaladin copy() {
|
||||
return new PentarchPaladin(this);
|
||||
}
|
||||
}
|
|
@ -194,6 +194,7 @@ public class TimeSpiral extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Paradox Haze", 71, Rarity.UNCOMMON, mage.cards.p.ParadoxHaze.class));
|
||||
cards.add(new SetCardInfo("Pardic Dragon", 173, Rarity.RARE, mage.cards.p.PardicDragon.class));
|
||||
cards.add(new SetCardInfo("Pendelhaven Elder", 209, Rarity.UNCOMMON, mage.cards.p.PendelhavenElder.class));
|
||||
cards.add(new SetCardInfo("Pentarch Paladin", 32, Rarity.RARE, mage.cards.p.PentarchPaladin.class));
|
||||
cards.add(new SetCardInfo("Pentarch Ward", 33, Rarity.COMMON, mage.cards.p.PentarchWard.class));
|
||||
cards.add(new SetCardInfo("Penumbra Spider", 210, Rarity.COMMON, mage.cards.p.PenumbraSpider.class));
|
||||
cards.add(new SetCardInfo("Phantom Wurm", 211, Rarity.UNCOMMON, mage.cards.p.PhantomWurm.class));
|
||||
|
|
Loading…
Reference in a new issue