[MBS] 3 cards

This commit is contained in:
magenoxx 2011-03-06 20:31:15 +03:00
parent 2eb3058158
commit f62fe42973
4 changed files with 257 additions and 0 deletions

View file

@ -0,0 +1,112 @@
/*
* 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.mirrodinbesieged;
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.DestroyTargetEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterPermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPermanent;
/**
*
* @author ayratn
*/
public class DivineOffering extends CardImpl<DivineOffering> {
private static FilterPermanent filter = new FilterPermanent("artifact");
static {
filter.getCardType().add(CardType.ARTIFACT);
filter.setScopeCardType(Filter.ComparisonScope.Any);
}
public DivineOffering (UUID ownerId) {
super(ownerId, 5, "Divine Offering", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{W}");
this.expansionSetCode = "MBS";
this.color.setWhite(true);
this.getSpellAbility().addTarget(new TargetPermanent(filter));
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addEffect(new DivineOfferingEffect());
}
public DivineOffering (final DivineOffering card) {
super(card);
}
@Override
public DivineOffering copy() {
return new DivineOffering(this);
}
private class DivineOfferingEffect extends OneShotEffect<DivineOfferingEffect> {
public DivineOfferingEffect() {
super(Constants.Outcome.DestroyPermanent);
}
public DivineOfferingEffect(DivineOfferingEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Card card = game.getLastKnownInformation(source.getFirstTarget(), Constants.Zone.BATTLEFIELD);
if (card != null) {
int cost = card.getManaCost().get(0).convertedManaCost();
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
player.gainLife(cost, game);
}
}
return true;
}
@Override
public DivineOfferingEffect copy() {
return new DivineOfferingEffect(this);
}
@Override
public String getText(Ability source) {
return "You gain life equal to its converted mana cost";
}
}
}

View file

@ -0,0 +1,78 @@
/*
* 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.mirrodinbesieged;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.abilities.keyword.DoubleStrikeAbility;
import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl;
import mage.filter.FilterCard;
/**
*
* @author ayratn
*/
public class MirranCrusader extends CardImpl<MirranCrusader> {
private static FilterCard filter = new FilterCard("Black");
private static FilterCard filter2 = new FilterCard("Green");
static {
filter.setUseColor(true);
filter.getColor().setBlack(true);
filter2.setUseColor(true);
filter2.getColor().setGreen(true);
}
public MirranCrusader (UUID ownerId) {
super(ownerId, 14, "Mirran Crusader", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{W}{W}");
this.expansionSetCode = "MBS";
this.subtype.add("Human");
this.subtype.add("Knight");
this.color.setWhite(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
this.addAbility(DoubleStrikeAbility.getInstance());
this.addAbility(new ProtectionAbility(filter));
this.addAbility(new ProtectionAbility(filter2));
}
public MirranCrusader (final MirranCrusader card) {
super(card);
}
@Override
public MirranCrusader copy() {
return new MirranCrusader(this);
}
}

View file

@ -0,0 +1,65 @@
/*
* 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.mirrodinbesieged;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.abilities.keyword.InfectAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
/**
*
* @author ayratn
*/
public class PriestsofNorn extends CardImpl<PriestsofNorn> {
public PriestsofNorn (UUID ownerId) {
super(ownerId, 16, "Priests of Norn", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.expansionSetCode = "MBS";
this.subtype.add("Cleric");
this.color.setWhite(true);
this.power = new MageInt(1);
this.toughness = new MageInt(4);
this.addAbility(VigilanceAbility.getInstance());
this.addAbility(InfectAbility.getInstance());
}
public PriestsofNorn (final PriestsofNorn card) {
super(card);
}
@Override
public PriestsofNorn copy() {
return new PriestsofNorn(this);
}
}

View file

@ -76,6 +76,7 @@ $fulltoshort{'Magic 2010'} = 'M10';
$fulltoshort{'Magic 2011'} = 'M11';
$fulltoshort{'Masters Edition II'} = 'ME2';
$fulltoshort{'Masters Edition III'} = 'ME3';
$fulltoshort{'Masters Edition IV'} = 'ME4';
$fulltoshort{'Masters Edition'} = 'MED';
$fulltoshort{'Mirage'} = 'MIR';
$fulltoshort{'Mercadian Masques'} = 'MMQ';
@ -156,6 +157,7 @@ $wizardstous{'EVG'} = 'EVG';
$wizardstous{'BR'} = 'BRB';
$wizardstous{'ME2'} = 'ME2';
$wizardstous{'ME3'} = 'ME3';
$wizardstous{'ME4'} = 'ME4';
$wizardstous{'HOP'} = 'HOP';
$wizardstous{'PO'} = 'POR';
$wizardstous{'P2'} = 'PO2';