MBS, with Inquisition of Kozilek and Into the Roil thrown in.

This commit is contained in:
Viserion 2011-02-27 00:19:45 -06:00
parent 86acd268ac
commit 6653e34bc3
6 changed files with 592 additions and 0 deletions

View file

@ -0,0 +1,84 @@
/*
* 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.Duration;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.MageInt;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.keyword.InfectAbility;
import mage.abilities.keyword.ProtectionAbility;
import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.CardImpl;
import mage.filter.FilterCard;
/**
*
* @author Viserion
*/
public class PhyrexianCrusader extends CardImpl<PhyrexianCrusader> {
private static FilterCard filter = new FilterCard("Red");
private static FilterCard filter2 = new FilterCard("White");
static {
filter.setUseColor(true);
filter.getColor().setRed(true);
filter2.setUseColor(true);
filter2.getColor().setWhite(true);
}
public PhyrexianCrusader (UUID ownerId) {
super(ownerId, 50, "Phyrexian Crusader", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{B}{B}");
this.expansionSetCode = "MBS";
this.subtype.add("Zombie");
this.subtype.add("Knight");
this.color.setBlack(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
this.addAbility(FirstStrikeAbility.getInstance());
this.addAbility(new ProtectionAbility(filter));
this.addAbility(new ProtectionAbility(filter2));
this.addAbility(InfectAbility.getInstance());
}
public PhyrexianCrusader (final PhyrexianCrusader card) {
super(card);
}
@Override
public PhyrexianCrusader copy() {
return new PhyrexianCrusader(this);
}
}

View file

@ -0,0 +1,110 @@
/*
* 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.common.OnEventTriggeredAbility;
import mage.abilities.keyword.InfectAbility;
import mage.cards.CardImpl;
import mage.game.events.GameEvent.EventType;
import mage.Constants.Outcome;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.counters.CounterType;
import mage.game.Game;
import mage.players.Player;
/**
*
* @author Viserion
*/
public class PhyrexianVatmother extends CardImpl<PhyrexianVatmother> {
public PhyrexianVatmother (UUID ownerId) {
super(ownerId, 52, "Phyrexian Vatmother", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{B}");
this.expansionSetCode = "MBS";
this.subtype.add("Horror");
this.color.setBlack(true);
this.power = new MageInt(4);
this.toughness = new MageInt(5);
this.addAbility(InfectAbility.getInstance());
this.addAbility(new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new PoisonControllerEffect(1)));
}
public PhyrexianVatmother (final PhyrexianVatmother card) {
super(card);
}
@Override
public PhyrexianVatmother copy() {
return new PhyrexianVatmother(this);
}
}
class PoisonControllerEffect extends OneShotEffect<PoisonControllerEffect> {
protected int amount;
public PoisonControllerEffect(int amount) {
super(Outcome.Damage);
this.amount = amount;
}
public PoisonControllerEffect(final PoisonControllerEffect effect) {
super(effect);
this.amount = effect.amount;
}
@Override
public PoisonControllerEffect copy() {
return new PoisonControllerEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
player.getCounters().addCounter(CounterType.POISON.createInstance(amount));
return true;
}
return false;
}
@Override
public String getText(Ability source) {
StringBuilder sb = new StringBuilder();
sb.append("you get ").append(Integer.toString(amount)).append(" poison counter(s)");
return sb.toString();
}
}

View file

@ -0,0 +1,124 @@
/*
* 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.Constants.Zone;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.continious.BoostEquippedEffect;
import mage.abilities.effects.common.DiscardTargetEffect;
import mage.abilities.effects.common.UntapAllLandsControllerEffect;
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
import mage.abilities.keyword.EquipAbility;
import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.game.Game;
import mage.game.events.DamagedPlayerEvent;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.target.TargetPlayer;
/**
*
* @author Viserion
*/
public class SwordOfFeastAndFamine extends CardImpl<SwordOfFeastAndFamine> {
private static FilterCard filter = new FilterCard("green and from black");
static {
filter.setUseColor(true);
filter.getColor().setBlack(true);
filter.getColor().setGreen(true);
filter.setScopeColor(Filter.ComparisonScope.Any);
}
public SwordOfFeastAndFamine (UUID ownerId) {
super(ownerId, 138, "Sword of Feast and Famine", Rarity.MYTHIC, new CardType[]{CardType.ARTIFACT}, "{3}");
this.expansionSetCode = "MBS";
this.subtype.add("Equipment");
this.addAbility(new EquipAbility(Constants.Outcome.AddAbility, new GenericManaCost(2)));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2)));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new ProtectionAbility(filter), Constants.AttachmentType.EQUIPMENT)));
this.addAbility(new SwordOfFeastAndFamineAbility());
}
public SwordOfFeastAndFamine (final SwordOfFeastAndFamine card) {
super(card);
}
@Override
public SwordOfFeastAndFamine copy() {
return new SwordOfFeastAndFamine(this);
}
}
class SwordOfFeastAndFamineAbility extends TriggeredAbilityImpl<SwordOfFeastAndFamineAbility> {
public SwordOfFeastAndFamineAbility() {
super(Zone.BATTLEFIELD, new DiscardTargetEffect(1));
this.addEffect(new UntapAllLandsControllerEffect());
this.addTarget(new TargetPlayer());
}
public SwordOfFeastAndFamineAbility(final SwordOfFeastAndFamineAbility ability) {
super(ability);
}
@Override
public SwordOfFeastAndFamineAbility copy() {
return new SwordOfFeastAndFamineAbility(this);
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (event instanceof DamagedPlayerEvent) {
DamagedPlayerEvent damageEvent = (DamagedPlayerEvent)event;
Permanent p = game.getPermanent(event.getSourceId());
if (damageEvent.isCombatDamage() && p != null && p.getAttachments().contains(this.getSourceId())) {
this.targets.get(0).add(event.getPlayerId(), game);
return true;
}
}
return false;
}
@Override
public String getRule() {
return "Whenever equipped creature deals combat damage to a player, that player discards a card and you untap all lands you control.";
}
}

View file

@ -0,0 +1,127 @@
/*
* 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.Outcome;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.filter.Filter.ComparisonScope;
import mage.filter.Filter.ComparisonType;
import mage.filter.FilterCard;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetCard;
import mage.target.TargetPlayer;
/**
*
* @author BetaSteward_at_googlemail.com
*/
public class InquisitionOfKozilek extends CardImpl<InquisitionOfKozilek> {
public InquisitionOfKozilek(UUID ownerId){
super(ownerId, 115, "Inquisition of Kozilek", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY},"{B}");
this.expansionSetCode = "ROE";
this.color.setBlack(true);
this.getSpellAbility().addTarget(new TargetPlayer());
this.getSpellAbility().addEffect(new InquisitionOfKozilekEffect());
}
public InquisitionOfKozilek(final InquisitionOfKozilek card) {
super(card);
}
@Override
public InquisitionOfKozilek copy() {
return new InquisitionOfKozilek(this);
}
@Override
public String getArt() {
return "122154_typ_reg_sty_010.jpg";
}
}
class InquisitionOfKozilekEffect extends OneShotEffect<InquisitionOfKozilekEffect> {
private static FilterCard filter = new FilterCard("nonland card with converted mana cost 3 or less");
static {
filter.getCardType().add(CardType.LAND);
filter.setScopeCardType(ComparisonScope.Any);
filter.setNotCardType(true);
filter.setConvertedManaCost(4);
filter.setConvertedManaCostComparison(ComparisonType.LessThan);
}
public InquisitionOfKozilekEffect() {
super(Outcome.Discard);
}
public InquisitionOfKozilekEffect(final InquisitionOfKozilekEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getFirstTarget());
if (player != null) {
player.revealCards("Inquisition of Kozilek", player.getHand(), game);
Player you = game.getPlayer(source.getControllerId());
if (you != null) {
TargetCard target = new TargetCard(Zone.PICK, filter);
if (you.choose(player.getHand(), target, game)) {
Card card = player.getHand().get(target.getFirstTarget(), game);
if (card != null) {
return player.discard(card, source, game);
}
}
}
}
return false;
}
@Override
public InquisitionOfKozilekEffect copy() {
return new InquisitionOfKozilekEffect(this);
}
@Override
public String getText(Ability source) {
return "Target player reveals his or her hand. You choose a nonland card from it with converted mana cost 3 or less. That player discards that card";
}
}

View file

@ -0,0 +1,72 @@
/*
* 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.zendikar;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DrawCardControllerEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.keyword.KickerAbility;
import mage.cards.CardImpl;
import mage.target.common.TargetNonlandPermanent;
/**
*
* @author Viserion
*/
public class IntoTheRoil extends CardImpl<IntoTheRoil> {
public IntoTheRoil(UUID ownerId) {
super(ownerId, 48, "Into the Roil", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}");
this.expansionSetCode = "ZEN";
this.color.setBlue(true);
this.getSpellAbility().addTarget(new TargetNonlandPermanent());
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
KickerAbility ability = new KickerAbility(new DrawCardControllerEffect(1), false);
ability.addManaCost(new ManaCostsImpl("{1}{U}"));
this.addAbility(ability);
}
public IntoTheRoil(final IntoTheRoil card) {
super(card);
}
@Override
public IntoTheRoil copy() {
return new IntoTheRoil(this);
}
@Override
public String getArt() {
return "123560_typ_reg_sty_010.jpg";
}
}

View file

@ -0,0 +1,75 @@
/*
* 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.abilities.effects.common;
import mage.Constants.Outcome;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.filter.common.FilterLandPermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
/**
*
* @author Viserion
*/
public class UntapAllLandsControllerEffect extends OneShotEffect<UntapAllLandsControllerEffect> {
public UntapAllLandsControllerEffect() {
super(Outcome.Untap);
}
public UntapAllLandsControllerEffect(final UntapAllLandsControllerEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
for (Permanent land: game.getBattlefield().getAllActivePermanents(new FilterLandPermanent(), player.getId())) {
land.untap(game);
}
return true;
}
return false;
}
@Override
public UntapAllLandsControllerEffect copy() {
return new UntapAllLandsControllerEffect(this);
}
@Override
public String getText(Ability source) {
return "Untap all lands you control";
}
}