mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Merge pull request #51 from magefree/master
Merge https://github.com/magefree/mage
This commit is contained in:
commit
9aceab774d
88 changed files with 1333 additions and 203 deletions
|
@ -54,7 +54,7 @@ public class ActOfHeroism extends CardImpl {
|
|||
|
||||
// It gets +2/+2 until end of turn
|
||||
effect = new BoostTargetEffect(2, 2, Duration.EndOfTurn);
|
||||
effect.setText("It gets +2/+2");
|
||||
effect.setText("It gets +2/+2 until end of turn");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
|
||||
// and can block an additional creature this turn
|
||||
|
|
|
@ -31,7 +31,7 @@ package mage.cards.a;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.common.LandfallAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -39,10 +39,6 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -53,8 +49,12 @@ public class AdventuringGear extends CardImpl {
|
|||
public AdventuringGear(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}");
|
||||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// Landfall — Whenever a land enters the battlefield under your control, equipped creature gets +2/+2 until end of turn.
|
||||
this.addAbility(new LandfallAbility(new BoostEquippedEffect(2, 2, Duration.EndOfTurn), false));
|
||||
|
||||
// Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.)
|
||||
this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(1)));
|
||||
this.addAbility(new AdventuringGearAbility());
|
||||
}
|
||||
|
||||
public AdventuringGear(final AdventuringGear card) {
|
||||
|
@ -65,40 +65,4 @@ public class AdventuringGear extends CardImpl {
|
|||
public AdventuringGear copy() {
|
||||
return new AdventuringGear(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class AdventuringGearAbility extends LandfallAbility {
|
||||
|
||||
public AdventuringGearAbility() {
|
||||
super(null, false);
|
||||
this.addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn));
|
||||
this.addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
public AdventuringGearAbility(final AdventuringGearAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (super.checkTrigger(event, game)) {
|
||||
Permanent equipment = game.getPermanent(this.sourceId);
|
||||
if (equipment != null && equipment.getAttachedTo() != null) {
|
||||
Permanent creature = game.getPermanent(equipment.getAttachedTo());
|
||||
if (creature != null) {
|
||||
this.getTargets().get(0).clearChosen();
|
||||
this.getTargets().get(0).add(creature.getId(), game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdventuringGearAbility copy() {
|
||||
return new AdventuringGearAbility(this);
|
||||
}
|
||||
|
||||
}
|
|
@ -91,7 +91,7 @@ class AllSunsDawnEffect extends OneShotEffect {
|
|||
|
||||
public AllSunsDawnEffect() {
|
||||
super(Outcome.ReturnToHand);
|
||||
this.staticText = "For each color, return up to one target card of that color from your graveyard to your hand. Exile {this}";
|
||||
this.staticText = "For each color, return up to one target card of that color from your graveyard to your hand";
|
||||
}
|
||||
|
||||
public AllSunsDawnEffect(final AllSunsDawnEffect effect) {
|
||||
|
|
|
@ -77,6 +77,7 @@ class PreventDamageToSourceByCardTypeEffect extends PreventAllDamageToSourceEffe
|
|||
|
||||
public PreventDamageToSourceByCardTypeEffect(CardType cardT){
|
||||
super(Duration.WhileOnBattlefield);
|
||||
staticText = "Prevent all damage that would be dealt to {this} by artifact sources";
|
||||
cardType = cardT;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ public class BeastHunt extends CardImpl {
|
|||
public BeastHunt(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}");
|
||||
|
||||
this.getSpellAbility().addEffect(new RevealLibraryPutIntoHandEffect(3, new FilterCreatureCard(), Zone.GRAVEYARD));
|
||||
this.getSpellAbility().addEffect(new RevealLibraryPutIntoHandEffect(3, new FilterCreatureCard("creature cards"), Zone.GRAVEYARD));
|
||||
}
|
||||
|
||||
public BeastHunt(final BeastHunt card) {
|
||||
|
|
|
@ -30,6 +30,7 @@ package mage.cards.b;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
|
@ -56,8 +57,11 @@ public class BladeOfTheBloodchief extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}");
|
||||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// Whenever a creature dies, put a +1/+1 counter on equipped creature. If equipped creature is a Vampire, put two +1/+1 counters on it instead.
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(new BladeOfTheBloodchiefEffect(), false));
|
||||
|
||||
//Equip {1}
|
||||
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(1)));
|
||||
this.addAbility(new BladeOfTheBloodChiefTriggeredAbility());
|
||||
}
|
||||
|
||||
public BladeOfTheBloodchief(final BladeOfTheBloodchief card) {
|
||||
|
@ -70,50 +74,6 @@ public class BladeOfTheBloodchief extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class BladeOfTheBloodChiefTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private static final String text = "Whenever a creature dies, put a +1/+1 counter on equipped "
|
||||
+ "creature. If equipped creature is a Vampire, put two +1/+1 counters on it instead.";
|
||||
|
||||
BladeOfTheBloodChiefTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new BladeOfTheBloodchiefEffect());
|
||||
}
|
||||
|
||||
BladeOfTheBloodChiefTriggeredAbility(final BladeOfTheBloodChiefTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.ZONE_CHANGE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||
if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD) {
|
||||
Permanent p = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD);
|
||||
if (p != null && p.isCreature()) {
|
||||
Permanent enchantment = game.getPermanent(getSourceId());
|
||||
if (enchantment != null && enchantment.getAttachedTo() != null) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BladeOfTheBloodChiefTriggeredAbility copy() {
|
||||
return new BladeOfTheBloodChiefTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
class BladeOfTheBloodchiefEffect extends OneShotEffect {
|
||||
|
||||
BladeOfTheBloodchiefEffect() {
|
||||
|
|
|
@ -42,7 +42,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
|
|||
*/
|
||||
public class Boil extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("islands");
|
||||
private static final FilterPermanent filter = new FilterPermanent("Islands");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate(SubType.ISLAND));
|
||||
|
|
|
@ -35,6 +35,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
|
||||
|
@ -48,10 +49,10 @@ public class BontusLastReckoning extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}{B}");
|
||||
|
||||
// Destroy all creatures. Lands you control don't untap during your next untap step.
|
||||
this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterCreaturePermanent()));
|
||||
this.getSpellAbility().addEffect(new DestroyAllEffect(StaticFilters.FILTER_PERMANENT_CREATURES));
|
||||
this.getSpellAbility().addEffect(new DontUntapInControllersUntapStepAllEffect(
|
||||
Duration.UntilYourNextTurn, TargetController.YOU, new FilterControlledLandPermanent("Lands you control"))
|
||||
.setText("Lands you control don't untap during your next untap phase"));
|
||||
.setText("Lands you control don't untap during your next untap step"));
|
||||
}
|
||||
|
||||
public BontusLastReckoning(final BontusLastReckoning card) {
|
||||
|
|
|
@ -55,8 +55,9 @@ public class BroodmateDragon extends CardImpl {
|
|||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(dragonToken), false));
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(dragonToken), false));
|
||||
}
|
||||
|
||||
public BroodmateDragon(final BroodmateDragon card) {
|
||||
|
|
|
@ -47,7 +47,7 @@ public class BuildersBlessing extends CardImpl {
|
|||
|
||||
|
||||
// Untapped creatures you control get +0/+2.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(0, 2, Duration.WhileOnBattlefield, new FilterUntappedCreature())));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(0, 2, Duration.WhileOnBattlefield, new FilterUntappedCreature("untapped creatures"))));
|
||||
}
|
||||
|
||||
public BuildersBlessing(final BuildersBlessing card) {
|
||||
|
|
|
@ -16,7 +16,7 @@ import java.util.UUID;
|
|||
|
||||
public class BullElephant extends CardImpl {
|
||||
|
||||
private static FilterControlledLandPermanent controlledForest = new FilterControlledLandPermanent("Forests you control");
|
||||
private static FilterControlledLandPermanent controlledForest = new FilterControlledLandPermanent("Forests");
|
||||
|
||||
static {
|
||||
controlledForest.add(new SubtypePredicate(SubType.FOREST));
|
||||
|
|
|
@ -54,7 +54,7 @@ import java.util.UUID;
|
|||
public class CallToTheGrave extends CardImpl {
|
||||
|
||||
private static final String ruleText = "At the beginning of the end step, if no creatures are on the battlefield, sacrifice {this}.";
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a non-Zombie creature");
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Zombie creature");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new SubtypePredicate(SubType.ZOMBIE)));
|
||||
|
|
|
@ -57,7 +57,9 @@ public class CallerOfGales extends CardImpl {
|
|||
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{U}"));
|
||||
|
||||
// {1}{U}, {T}: Target creature gains flying until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{1}{U}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -64,7 +64,7 @@ public class ConsecrateLand extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Enchanted land is indestructible and can't be enchanted by other Auras.
|
||||
Ability ability2 = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(IndestructibleAbility.getInstance(), AttachmentType.AURA));
|
||||
Ability ability2 = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(IndestructibleAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield, "Enchanted land is indestructible"));
|
||||
ability2.addEffect(new ConsecrateLandRuleEffect());
|
||||
this.addAbility(ability2);
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@ class CyclopeanTombCreateTriggeredEffect extends OneShotEffect {
|
|||
|
||||
public CyclopeanTombCreateTriggeredEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "At the beginning of each of your upkeeps for the rest of the game, remove all mire counters from a land that a mire counter was put onto with {this} but that a mire counter has not been removed from with {this}";
|
||||
this.staticText = "at the beginning of each of your upkeeps for the rest of the game, remove all mire counters from a land that a mire counter was put onto with {this} but that a mire counter has not been removed from with {this}";
|
||||
}
|
||||
|
||||
public CyclopeanTombCreateTriggeredEffect(final CyclopeanTombCreateTriggeredEffect effect) {
|
||||
|
|
|
@ -48,7 +48,7 @@ public class DeadDrop extends CardImpl {
|
|||
// Delve
|
||||
this.addAbility(new DelveAbility());
|
||||
// Target player sacrifices two creatures
|
||||
this.getSpellAbility().addEffect(new SacrificeEffect(StaticFilters.FILTER_PERMANENT_CREATURE, 2, "Target player"));
|
||||
this.getSpellAbility().addEffect(new SacrificeEffect(StaticFilters.FILTER_PERMANENT_CREATURES, 2, "Target player"));
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
}
|
||||
|
||||
|
|
|
@ -88,6 +88,7 @@ class PreventDamageToSourceBySubtypeEffect extends PreventAllDamageToSourceEffec
|
|||
public PreventDamageToSourceBySubtypeEffect(SubType sub){
|
||||
super(Duration.WhileOnBattlefield);
|
||||
subtype = sub;
|
||||
staticText = "Prevent all damage that would be dealt to {this} by " + subtype.getDescription();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -51,7 +51,7 @@ import mage.target.TargetPermanent;
|
|||
* @author Plopman
|
||||
*/
|
||||
public class DevoutHarpist extends CardImpl {
|
||||
private static final FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent("Auras attached to a creature");
|
||||
private static final FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent("Aura attached to a creature");
|
||||
static
|
||||
{
|
||||
filter.add(new SubtypePredicate(SubType.AURA));
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.filter.StaticFilters;
|
|||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -50,7 +51,9 @@ public class DispellersCapsule extends CardImpl {
|
|||
public DispellersCapsule (UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{W}");
|
||||
|
||||
// {2}{W}, {T}, Sacrifice Dispeller's Capsule: Destroy target artifact or enchantment.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{2}{W}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -70,7 +70,7 @@ class DoomsdayEffect extends OneShotEffect {
|
|||
|
||||
public DoomsdayEffect() {
|
||||
super(Outcome.LoseLife);
|
||||
staticText = "Search your library and graveyard for five cards and exile the rest. Put the chosen cards on top of your library in any order. You lose half your life, rounded up";
|
||||
staticText = "Search your library and graveyard for five cards and exile the rest. Put the chosen cards on top of your library in any order";
|
||||
}
|
||||
|
||||
public DoomsdayEffect(final DoomsdayEffect effect) {
|
||||
|
|
|
@ -43,7 +43,7 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
|
|||
*/
|
||||
public class Dredge extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("a creature or land");
|
||||
private static final FilterPermanent filter = new FilterPermanent("creature or land");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.LAND)));
|
||||
|
|
|
@ -86,7 +86,7 @@ class EarthbindEffect extends OneShotEffect {
|
|||
|
||||
public EarthbindEffect() {
|
||||
super(Outcome.Damage);
|
||||
staticText = "if enchanted creature has flying, {this} deals 2 damage to that creature and Earthbind gains 'Enchanted creature loses flying.'";
|
||||
staticText = "if enchanted creature has flying, {this} deals 2 damage to that creature and Earthbind gains \"Enchanted creature loses flying.\"";
|
||||
}
|
||||
|
||||
public EarthbindEffect(final EarthbindEffect effect) {
|
||||
|
|
123
Mage.Sets/src/mage/cards/e/EvraHalcyonWitness.java
Normal file
123
Mage.Sets/src/mage/cards/e/EvraHalcyonWitness.java
Normal file
|
@ -0,0 +1,123 @@
|
|||
/*
|
||||
* 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.e;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class EvraHalcyonWitness extends CardImpl {
|
||||
|
||||
public EvraHalcyonWitness(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{W}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.AVATAR);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Lifelink
|
||||
this.addAbility(LifelinkAbility.getInstance());
|
||||
|
||||
// {4}: Exchange your life total with Evra, Halcyon Witness's power.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new EvraHalcyonWitnessEffect(), new ManaCostsImpl("{4}")));
|
||||
}
|
||||
|
||||
public EvraHalcyonWitness(final EvraHalcyonWitness card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EvraHalcyonWitness copy() {
|
||||
return new EvraHalcyonWitness(this);
|
||||
}
|
||||
}
|
||||
|
||||
class EvraHalcyonWitnessEffect extends OneShotEffect {
|
||||
|
||||
public EvraHalcyonWitnessEffect() {
|
||||
super(Outcome.GainLife);
|
||||
staticText = "Exchange your life total with {this}'s power";
|
||||
}
|
||||
|
||||
public EvraHalcyonWitnessEffect(final EvraHalcyonWitnessEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null && player.isLifeTotalCanChange()) {
|
||||
Permanent perm = game.getPermanent(source.getSourceId());
|
||||
if (perm != null) {
|
||||
int amount = perm.getPower().getValue();
|
||||
int life = player.getLife();
|
||||
if (life == amount) {
|
||||
return false;
|
||||
}
|
||||
if (life < amount && !player.isCanGainLife()) {
|
||||
return false;
|
||||
}
|
||||
if (life > amount && !player.isCanLoseLife()) {
|
||||
return false;
|
||||
}
|
||||
player.setLife(amount, game);
|
||||
game.addEffect(new SetPowerToughnessSourceEffect(life, Integer.MIN_VALUE, Duration.Custom, SubLayer.SetPT_7b), source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EvraHalcyonWitnessEffect copy() {
|
||||
return new EvraHalcyonWitnessEffect(this);
|
||||
}
|
||||
|
||||
}
|
|
@ -66,7 +66,7 @@ public class Farmstead extends CardImpl {
|
|||
new DoIfCostPaid(new GainLifeEffect(1), new ManaCostsImpl("{W}{W}")),
|
||||
TargetController.YOU, true);
|
||||
Effect effect = new GainAbilityAttachedEffect(ability, AttachmentType.AURA);
|
||||
effect.setText("Enchanted artifact has \"At the beginning of your upkeep, you may pay {W}{W}. If you do, you gain 1 life.\"");
|
||||
effect.setText("Enchanted land has \"At the beginning of your upkeep, you may pay {W}{W}. If you do, you gain 1 life.\"");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class GathererOfGraces extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("an aura");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("an Aura");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate(SubType.AURA));
|
||||
|
|
|
@ -54,7 +54,7 @@ public class GhostlyVisit extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}");
|
||||
|
||||
// Destroy target nonblack creature.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ import mage.filter.predicate.permanent.TokenPredicate;
|
|||
*/
|
||||
public class HourOfReckoning extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nontoken creature");
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nontoken creatures");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new TokenPredicate()));
|
||||
|
|
|
@ -46,7 +46,7 @@ import mage.target.common.TargetCardInLibrary;
|
|||
*/
|
||||
public class ImperialRecruiter extends CardImpl {
|
||||
|
||||
private static final FilterCreatureCard filter = new FilterCreatureCard("a creature card with power 2 or less");
|
||||
private static final FilterCreatureCard filter = new FilterCreatureCard("creature card with power 2 or less");
|
||||
|
||||
static{
|
||||
filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, 3));
|
||||
|
|
84
Mage.Sets/src/mage/cards/i/InBolassClutches.java
Normal file
84
Mage.Sets/src/mage/cards/i/InBolassClutches.java
Normal 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.cards.i;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.AddCardSuperTypeAttachedEffect;
|
||||
import mage.abilities.effects.common.continuous.ControlEnchantedEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class InBolassClutches extends CardImpl {
|
||||
|
||||
public InBolassClutches(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{U}{U}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
||||
// Enchant permanent
|
||||
TargetPermanent auraTarget = new TargetPermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
|
||||
// You control enchanted permanent.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ControlEnchantedEffect("permanent")));
|
||||
|
||||
// Enchanted permanent is legendary.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new AddCardSuperTypeAttachedEffect(SuperType.LEGENDARY, Duration.WhileOnBattlefield, AttachmentType.AURA)
|
||||
));
|
||||
}
|
||||
|
||||
public InBolassClutches(final InBolassClutches card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InBolassClutches copy() {
|
||||
return new InBolassClutches(this);
|
||||
}
|
||||
}
|
|
@ -87,7 +87,7 @@ class InstigatorEffect extends OneShotEffect {
|
|||
|
||||
public InstigatorEffect() {
|
||||
super(Outcome.Detriment);
|
||||
staticText = "Creatures target player control attack this turn if able";
|
||||
staticText = "Creatures target player controls attack this turn if able";
|
||||
}
|
||||
|
||||
public InstigatorEffect(final InstigatorEffect effect) {
|
||||
|
|
|
@ -75,7 +75,7 @@ public class InstillFuror extends CardImpl {
|
|||
new ConditionalOneShotEffect(new SacrificeSourceEffect(), new InvertCondition(AttackedThisTurnSourceCondition.instance),
|
||||
"sacrifice this creature unless it attacked this turn"), TargetController.YOU, false);
|
||||
Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield);
|
||||
effect.setText("Enchanted creature has \"At the beginning of your upkeep, sacrifice this creature unless it attacked this turn.\"");
|
||||
effect.setText("Enchanted creature has \"At the beginning of your end step, sacrifice this creature unless it attacked this turn.\"");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect), new AttackedThisTurnWatcher());
|
||||
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ public class JettingGlasskite extends CardImpl {
|
|||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever Jetting Glasskite becomes the target of a spell or ability for the first time in a turn, counter that spell or ability.
|
||||
// Whenever Jetting Glasskite becomes the target of a spell or ability for the first time each turn, counter that spell or ability.
|
||||
this.addAbility(new JettingGlasskiteAbility());
|
||||
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ class JettingGlasskiteAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever {this} becomes the target of a spell or ability for the first time in a turn, counter that spell or ability.";
|
||||
return "Whenever {this} becomes the target of a spell or ability for the first time each turn, counter that spell or ability.";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
126
Mage.Sets/src/mage/cards/k/KazarovSengirPureblood.java
Normal file
126
Mage.Sets/src/mage/cards/k/KazarovSengirPureblood.java
Normal file
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
* 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.k;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class KazarovSengirPureblood extends CardImpl {
|
||||
|
||||
public KazarovSengirPureblood(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{B}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.VAMPIRE);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever a creature an opponent controls is dealt damage, put a +1/+1 counter on Kazarov, Sengir Pureblood.
|
||||
this.addAbility(new KazarovSengirPurebloodTriggeredAbility());
|
||||
|
||||
// {3}{R}: Kazarov deals 2 damage to target creature.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{3}{R}"));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public KazarovSengirPureblood(final KazarovSengirPureblood card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KazarovSengirPureblood copy() {
|
||||
return new KazarovSengirPureblood(this);
|
||||
}
|
||||
}
|
||||
|
||||
class KazarovSengirPurebloodTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public KazarovSengirPurebloodTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()));
|
||||
}
|
||||
|
||||
public KazarovSengirPurebloodTriggeredAbility(final KazarovSengirPurebloodTriggeredAbility effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KazarovSengirPurebloodTriggeredAbility copy() {
|
||||
return new KazarovSengirPurebloodTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DAMAGED_CREATURE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event == null) {
|
||||
return false;
|
||||
}
|
||||
Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId());
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
if (permanent.getControllerId() == this.getControllerId()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever a creature an opponent controls is dealt damage, put a +1/+1 counter on {this}.";
|
||||
}
|
||||
}
|
|
@ -52,7 +52,7 @@ public class Kismet extends CardImpl {
|
|||
public Kismet(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}");
|
||||
|
||||
// Artifacts, creatures, and lands played by your opponents enter the battlefield tapped.
|
||||
// Artifacts, creatures, and lands your opponents control enter the battlefield tapped.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KismetEffect()));
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ class KismetEffect extends ReplacementEffectImpl {
|
|||
|
||||
KismetEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Tap);
|
||||
staticText = "Artifacts, creatures, and lands played by your opponents enter the battlefield tapped";
|
||||
staticText = "Artifacts, creatures, and lands your opponents control enter the battlefield tapped";
|
||||
}
|
||||
|
||||
KismetEffect(final KismetEffect effect) {
|
||||
|
|
|
@ -48,7 +48,7 @@ public class Knighthood extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
|
||||
|
||||
// Creatures you control have first strike.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE, false)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES, false)));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ import mage.filter.predicate.permanent.ControllerPredicate;
|
|||
*/
|
||||
public class KoboldTaskmaster extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Other Kobold creatures you control");
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Kobold creatures you control");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
|
|
|
@ -53,7 +53,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public class LeadBellyChimera extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Chimera creature you control");
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Chimera creature");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate(SubType.CHIMERA));
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
|
||||
/**
|
||||
|
@ -46,16 +47,10 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
|
|||
*/
|
||||
public class Levitation extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("creatures ");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
}
|
||||
|
||||
public Levitation (UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}{U}");
|
||||
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield, filter, false)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES, false)));
|
||||
}
|
||||
|
||||
public Levitation (final Levitation card) {
|
||||
|
|
252
Mage.Sets/src/mage/cards/l/LichsMastery.java
Normal file
252
Mage.Sets/src/mage/cards/l/LichsMastery.java
Normal file
|
@ -0,0 +1,252 @@
|
|||
/*
|
||||
* 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.l;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.GainLifeControllerTriggeredAbility;
|
||||
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.abilities.effects.common.LoseGameSourceControllerEffect;
|
||||
import mage.constants.SuperType;
|
||||
import mage.abilities.keyword.HexproofAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class LichsMastery extends CardImpl {
|
||||
|
||||
public LichsMastery(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}{B}{B}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
|
||||
// Hexproof
|
||||
this.addAbility(HexproofAbility.getInstance());
|
||||
|
||||
// You can't lose the game.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new LichsMasteryCantLoseEffect()));
|
||||
|
||||
// Whenever you gain life, draw that many cards.
|
||||
this.addAbility(new GainLifeControllerTriggeredAbility(new LichsMasteryDrawCardsEffect(), false, true));
|
||||
|
||||
// Whenever you lose life, for each 1 life you lost, exile a permanent you control or a card from your hand or graveyard.
|
||||
this.addAbility(new LichsMasteryLoseLifeTriggeredAbility());
|
||||
|
||||
// When Lich's Mastery leaves the battlefield, you lose the game.
|
||||
this.addAbility(new LeavesBattlefieldTriggeredAbility(new LoseGameSourceControllerEffect(), false));
|
||||
}
|
||||
|
||||
public LichsMastery(final LichsMastery card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LichsMastery copy() {
|
||||
return new LichsMastery(this);
|
||||
}
|
||||
}
|
||||
|
||||
class LichsMasteryCantLoseEffect extends ContinuousRuleModifyingEffectImpl {
|
||||
|
||||
public LichsMasteryCantLoseEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit, false, false);
|
||||
staticText = "You can't lose the game";
|
||||
}
|
||||
|
||||
public LichsMasteryCantLoseEffect(final LichsMasteryCantLoseEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LichsMasteryCantLoseEffect copy() {
|
||||
return new LichsMasteryCantLoseEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return event.getType() == GameEvent.EventType.LOSES && event.getPlayerId().equals(source.getControllerId());
|
||||
}
|
||||
}
|
||||
|
||||
class LichsMasteryDrawCardsEffect extends OneShotEffect {
|
||||
|
||||
public LichsMasteryDrawCardsEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "draw that many cards";
|
||||
}
|
||||
|
||||
public LichsMasteryDrawCardsEffect(final LichsMasteryDrawCardsEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LichsMasteryDrawCardsEffect copy() {
|
||||
return new LichsMasteryDrawCardsEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int lifeGained = (Integer) this.getValue("gainedLife");
|
||||
if (lifeGained > 0) {
|
||||
return new DrawCardSourceControllerEffect(lifeGained).apply(game, source);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class LichsMasteryLoseLifeTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public LichsMasteryLoseLifeTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new LichsMasteryLoseLifeEffect(), false);
|
||||
}
|
||||
|
||||
public LichsMasteryLoseLifeTriggeredAbility(final LichsMasteryLoseLifeTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LichsMasteryLoseLifeTriggeredAbility copy() {
|
||||
return new LichsMasteryLoseLifeTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.LOST_LIFE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getPlayerId().equals(this.getControllerId())) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
if (effect instanceof LichsMasteryLoseLifeEffect) {
|
||||
((LichsMasteryLoseLifeEffect) effect).setAmount(event.getAmount());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever you lose life, for each 1 life you lost, exile a permanent you control or a card from your hand or graveyard.";
|
||||
}
|
||||
}
|
||||
|
||||
class LichsMasteryLoseLifeEffect extends OneShotEffect {
|
||||
|
||||
private int amount = 0;
|
||||
|
||||
public LichsMasteryLoseLifeEffect() {
|
||||
super(Outcome.Exile);
|
||||
this.staticText = "for each 1 life you lost, exile a permanent you control or a card from your hand or graveyard.";
|
||||
}
|
||||
|
||||
public LichsMasteryLoseLifeEffect(final LichsMasteryLoseLifeEffect effect) {
|
||||
super(effect);
|
||||
this.amount = effect.amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LichsMasteryLoseLifeEffect copy() {
|
||||
return new LichsMasteryLoseLifeEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
FilterPermanent filter = new FilterPermanent();
|
||||
filter.add(new ControllerIdPredicate(controller.getId()));
|
||||
for (int i = 0; i < amount; i++) {
|
||||
int handCount = controller.getHand().size();
|
||||
int graveCount = controller.getGraveyard().size();
|
||||
int permCount = game.getBattlefield().getActivePermanents(filter, controller.getId(), game).size();
|
||||
if (graveCount + handCount == 0 || (permCount > 0 && controller.chooseUse(Outcome.Exile, "Exile permanent you control? (No = from hand or graveyard)", source, game))) {
|
||||
Target target = new TargetControlledPermanent(1, 1, new FilterControlledPermanent(), true);
|
||||
controller.choose(outcome, target, source.getSourceId(), game);
|
||||
Effect effect = new ExileTargetEffect();
|
||||
effect.setTargetPointer(new FixedTarget(target.getFirstTarget(), game));
|
||||
effect.apply(game, source);
|
||||
} else if (graveCount == 0 || (handCount > 0 && controller.chooseUse(Outcome.Exile, "Exile a card from your hand? (No = from graveyard)", source, game))) {
|
||||
Target target = new TargetCardInHand(1, 1, new FilterCard());
|
||||
controller.choose(outcome, target, source.getSourceId(), game);
|
||||
Card card = controller.getHand().get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
controller.moveCards(card, Zone.EXILED, source, game);
|
||||
}
|
||||
} else if (graveCount > 0) {
|
||||
Target target = new TargetCardInYourGraveyard(1, 1, new FilterCard(), true);
|
||||
target.choose(Outcome.Exile, source.getControllerId(), source.getSourceId(), game);
|
||||
Card card = controller.getGraveyard().get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
controller.moveCards(card, Zone.EXILED, source, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public void setAmount(int amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
}
|
|
@ -50,7 +50,8 @@ public class LotusCobra extends CardImpl {
|
|||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
this.addAbility(new LandfallAbility(new AddManaOfAnyColorEffect(), false));
|
||||
// Landfall — Whenever a land enters the battlefield under your control, you may add one mana of any color to your mana pool.
|
||||
this.addAbility(new LandfallAbility(new AddManaOfAnyColorEffect(), true));
|
||||
}
|
||||
|
||||
public LotusCobra(final LotusCobra card) {
|
||||
|
|
|
@ -51,7 +51,7 @@ import mage.filter.predicate.permanent.ControllerPredicate;
|
|||
*/
|
||||
public class LoxodonHierarch extends CardImpl {
|
||||
|
||||
private static FilterCreaturePermanent filter = new FilterCreaturePermanent("each creature you control");
|
||||
private static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you control");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -46,11 +47,11 @@ public class MakeAStand extends CardImpl {
|
|||
public MakeAStand(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{W}");
|
||||
|
||||
// Creature you control get +1/+0 and gain indestructible until end of turn.
|
||||
// Creatures you control get +1/+0 and gain indestructible until end of turn.
|
||||
Effect effect1 = new BoostControlledEffect(1, 0, Duration.EndOfTurn);
|
||||
effect1.setText("Creature you control get +1/+0");
|
||||
effect1.setText("Creatures you control get +1/+0");
|
||||
this.getSpellAbility().addEffect(effect1);
|
||||
Effect effect2 = new GainAbilityControlledEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn);
|
||||
Effect effect2 = new GainAbilityControlledEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES);
|
||||
effect2.setText("and gain indestructible until end of turn");
|
||||
this.getSpellAbility().addEffect(effect2);
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ class NetherbornPhalanxEffect extends OneShotEffect {
|
|||
|
||||
NetherbornPhalanxEffect() {
|
||||
super(Outcome.Sacrifice);
|
||||
this.staticText = "Each opponent loses 1 life for each creature he or she controls";
|
||||
this.staticText = "each opponent loses 1 life for each creature he or she controls";
|
||||
}
|
||||
|
||||
NetherbornPhalanxEffect(final NetherbornPhalanxEffect effect) {
|
||||
|
|
100
Mage.Sets/src/mage/cards/o/OnSerrasWings.java
Normal file
100
Mage.Sets/src/mage/cards/o/OnSerrasWings.java
Normal file
|
@ -0,0 +1,100 @@
|
|||
/*
|
||||
* 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.o;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.AddCardSuperTypeAttachedEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class OnSerrasWings extends CardImpl {
|
||||
|
||||
public OnSerrasWings(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
||||
// Enchant creature
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Enchanted creature is legendary, gets +1/+1, and has flying, vigilance, and lifelink.
|
||||
Effect effect = new AddCardSuperTypeAttachedEffect(SuperType.LEGENDARY, Duration.WhileOnBattlefield, AttachmentType.AURA);
|
||||
effect.setText("Enchanted creature is legendary,");
|
||||
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
|
||||
effect = new BoostEnchantedEffect(4, 4, Duration.WhileOnBattlefield);
|
||||
effect.setText("gets +1/+1,");
|
||||
ability.addEffect(effect);
|
||||
effect = new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA);
|
||||
effect.setText("and has flying");
|
||||
ability.addEffect(effect);
|
||||
effect = new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.AURA);
|
||||
effect.setText("vigilance,");
|
||||
ability.addEffect(effect);
|
||||
effect = new GainAbilityAttachedEffect(LifelinkAbility.getInstance(), AttachmentType.AURA);
|
||||
effect.setText("and lifelink");
|
||||
ability.addEffect(effect);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public OnSerrasWings(final OnSerrasWings card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OnSerrasWings copy() {
|
||||
return new OnSerrasWings(this);
|
||||
}
|
||||
}
|
81
Mage.Sets/src/mage/cards/o/OrcishVandal.java
Normal file
81
Mage.Sets/src/mage/cards/o/OrcishVandal.java
Normal file
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* 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.o;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
|
||||
import java.util.UUID;
|
||||
/**
|
||||
*
|
||||
* @author themattfiles
|
||||
*/
|
||||
public class OrcishVandal extends CardImpl {
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("an artifact");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
}
|
||||
|
||||
public OrcishVandal(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
|
||||
this.subtype.add(SubType.ORC);
|
||||
this.subtype.add(SubType.WARRIOR);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// {t}, Sacrifice an artifact: Orcish Vandal deals 2 damage to any target.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost());
|
||||
ability.addTarget(new TargetCreatureOrPlayer());
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public OrcishVandal(final OrcishVandal card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrcishVandal copy() {
|
||||
return new OrcishVandal(this);
|
||||
}
|
||||
}
|
|
@ -69,7 +69,7 @@ public class PresenceOfGond extends CardImpl {
|
|||
// Enchanted creature has "{tap}: Create a 1/1 green Elf Warrior creature token."
|
||||
Ability abilityToGain = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new ElfToken()), new TapSourceCost());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(abilityToGain, AttachmentType.AURA, Duration.WhileOnBattlefield,
|
||||
"Enchanted creature has \"{t}: Create a 1/1 green Elf Warrior creature token.\"")));
|
||||
"Enchanted creature has \"{T}: Create a 1/1 green Elf Warrior creature token.\"")));
|
||||
}
|
||||
|
||||
public PresenceOfGond(final PresenceOfGond card) {
|
||||
|
|
|
@ -72,7 +72,7 @@ public class QuicksilverDagger extends CardImpl {
|
|||
gainAbility.addEffect(new DrawCardSourceControllerEffect(1));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityAttachedEffect(gainAbility, AttachmentType.AURA, Duration.WhileOnBattlefield,
|
||||
"Enchanted creature has \"{tap}: This creature deals 1 damage to target player. You draw a card.\"")
|
||||
"Enchanted creature has \"{T}: This creature deals 1 damage to target player. You draw a card.\"")
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ public class Reap extends CardImpl {
|
|||
opponentId = target.getFirstTarget();
|
||||
}
|
||||
int numbTargets = game.getBattlefield().getAllActivePermanents(filter, opponentId, game).size();
|
||||
ability.addTarget(new TargetCardInYourGraveyard(0, numbTargets, new FilterCard("cards from your graveyard")));
|
||||
ability.addTarget(new TargetCardInYourGraveyard(0, numbTargets, new FilterCard("card" + (numbTargets == 1 ? "" : "s") + " from your graveyard")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public class RendFlesh extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Non-Spirit");
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Non-Spirit creature");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new SubtypePredicate(SubType.SPIRIT)));
|
||||
|
@ -56,6 +56,7 @@ public class RendFlesh extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{B}");
|
||||
this.subtype.add(SubType.ARCANE);
|
||||
|
||||
// Destroy target non-Spirit creature.
|
||||
Target target = new TargetCreaturePermanent(filter);
|
||||
this.getSpellAbility().addTarget(target);
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
|
|
|
@ -48,7 +48,7 @@ import mage.target.common.TargetCreaturePermanentAmount;
|
|||
*/
|
||||
public class RockSlide extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("attacking or blocking creatures without flying");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
|
|
|
@ -51,7 +51,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public class SeshiroTheAnointed extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Snakes");
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Snake creatures");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate(SubType.SNAKE));
|
||||
|
@ -65,7 +65,10 @@ public class SeshiroTheAnointed extends CardImpl {
|
|||
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Other Snake creatures you control get +2/+2.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(2, 2, Duration.WhileOnBattlefield, filter, true)));
|
||||
// Whenever a Snake you control deals combat damage to a player, you may draw a card.
|
||||
this.addAbility(new SeshiroTheAnointedAbility());
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
|
@ -60,7 +61,7 @@ public class ShadowLance extends CardImpl {
|
|||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.AURA)));
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2, Duration.EndOfTurn), new ManaCostsImpl("{1}{B}")));
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2, Duration.EndOfTurn), new ManaCostsImpl("{1}{B}")));
|
||||
}
|
||||
|
||||
public ShadowLance(final ShadowLance card) {
|
||||
|
|
|
@ -67,7 +67,7 @@ public class ShisatoWhisperingHunter extends CardImpl {
|
|||
// At the beginning of your upkeep, sacrifice a Snake.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeControllerEffect(filter, 1,""), TargetController.YOU, false));
|
||||
// Whenever Shisato, Whispering Hunter deals combat damage to a player, that player skips their next untap step.
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new SkipNextPlayerUntapStepEffect("that "),false, true));
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new SkipNextPlayerUntapStepEffect("that"), false, true));
|
||||
}
|
||||
|
||||
public ShisatoWhisperingHunter(final ShisatoWhisperingHunter card) {
|
||||
|
|
|
@ -77,7 +77,7 @@ class SkeletonizeEffect extends OneShotEffect {
|
|||
|
||||
public SkeletonizeEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.staticText = "When a creature dealt damage this way dies this turn, create a 1/1 black Skeleton creature token with \"{B}: Regenerate this creature\"";
|
||||
this.staticText = "When a creature dealt damage this way dies this turn, create a 1/1 black Skeleton creature token with \"{B}: Regenerate this creature.\"";
|
||||
}
|
||||
|
||||
public SkeletonizeEffect(final SkeletonizeEffect effect) {
|
||||
|
|
|
@ -66,7 +66,7 @@ public class Subversion extends CardImpl {
|
|||
|
||||
public SubversionEffect() {
|
||||
super(Outcome.Damage);
|
||||
staticText = "Each opponent loses 1 life. You gain life equal to the life lost this way";
|
||||
staticText = "each opponent loses 1 life. You gain life equal to the life lost this way";
|
||||
}
|
||||
|
||||
public SubversionEffect(final SubversionEffect effect) {
|
||||
|
|
|
@ -34,6 +34,7 @@ import mage.abilities.effects.common.DestroyAllEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -51,7 +52,7 @@ public class SupremeVerdict extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Destroy all creatures.
|
||||
this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterCreaturePermanent()));
|
||||
this.getSpellAbility().addEffect(new DestroyAllEffect(StaticFilters.FILTER_PERMANENT_CREATURES));
|
||||
}
|
||||
|
||||
public SupremeVerdict(final SupremeVerdict card) {
|
||||
|
|
|
@ -78,7 +78,7 @@ public class SurrakDragonclaw extends CardImpl {
|
|||
|
||||
// Other creatures you control have trample.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE, true)));
|
||||
new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES, true)));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -37,12 +37,11 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.ColoredManaSymbol;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -50,18 +49,12 @@ import java.util.UUID;
|
|||
*/
|
||||
public class SurvivalOfTheFittest extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("a creature card");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
}
|
||||
|
||||
public SurvivalOfTheFittest(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}");
|
||||
|
||||
// {G}, Discard a creature card: Search your library for a creature card, reveal that card, and put it into your hand. Then shuffle your library.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true, true), new ColoredManaCost(ColoredManaSymbol.G));
|
||||
ability.addCost(new DiscardTargetCost(new TargetCardInHand(filter)));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), true, true), new ColoredManaCost(ColoredManaSymbol.G));
|
||||
ability.addCost(new DiscardTargetCost(new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE)));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ class TreasureMapEffect extends OneShotEffect {
|
|||
this.staticText = "Scry 1. Put a landmark counter on {this}. "
|
||||
+ "Then if there are three or more landmark counters on it, "
|
||||
+ "remove those counters, transform {this}, and create "
|
||||
+ "three colorless Treasure artifact tokens with \"{T}, Sacrifice this artifact: Add one mana of any color to your mana pool.";
|
||||
+ "three colorless Treasure artifact tokens with \"{T}, Sacrifice this artifact: Add one mana of any color to your mana pool.\"";
|
||||
}
|
||||
|
||||
TreasureMapEffect(final TreasureMapEffect effect) {
|
||||
|
|
108
Mage.Sets/src/mage/cards/t/TwoHeadedGiant.java
Normal file
108
Mage.Sets/src/mage/cards/t/TwoHeadedGiant.java
Normal file
|
@ -0,0 +1,108 @@
|
|||
/*
|
||||
* 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.t;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.DoubleStrikeAbility;
|
||||
import mage.abilities.keyword.MenaceAbility;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class TwoHeadedGiant extends CardImpl {
|
||||
|
||||
public TwoHeadedGiant(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}");
|
||||
|
||||
this.subtype.add(SubType.GIANT);
|
||||
this.subtype.add(SubType.WARRIOR);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Whenever Two-Headed Giant attacks, flip two coins. If both coins come up heads, Two-Headed Giant gains double strike until end of turn. If both coins come up tails, Two-Headed Giant gains menace until end of turn.
|
||||
this.addAbility(new AttacksTriggeredAbility(new TwoHeadedGiantEffect(), false));
|
||||
}
|
||||
|
||||
public TwoHeadedGiant(final TwoHeadedGiant card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TwoHeadedGiant copy() {
|
||||
return new TwoHeadedGiant(this);
|
||||
}
|
||||
}
|
||||
|
||||
class TwoHeadedGiantEffect extends OneShotEffect {
|
||||
|
||||
public TwoHeadedGiantEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "flip two coins. If both coins come up heads, {this} gains double strike until end of turn."
|
||||
+ " If both coins come up tails, {this} gains menace until end of turn";
|
||||
}
|
||||
|
||||
public TwoHeadedGiantEffect(final TwoHeadedGiantEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TwoHeadedGiantEffect copy() {
|
||||
return new TwoHeadedGiantEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
boolean head1 = player.flipCoin(game);
|
||||
boolean head2 = player.flipCoin(game);
|
||||
if (head1 == head2) {
|
||||
if (head1) {
|
||||
new GainAbilitySourceEffect(DoubleStrikeAbility.getInstance()).apply(game, source);
|
||||
} else {
|
||||
new GainAbilitySourceEffect(new MenaceAbility()).apply(game, source);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -72,6 +72,7 @@ class PreventDamageToSourceByCardTypeEffect extends PreventAllDamageToSourceEffe
|
|||
|
||||
public PreventDamageToSourceByCardTypeEffect() {
|
||||
super(Duration.WhileOnBattlefield);
|
||||
staticText = "Prevent all damage that would be dealt to {this} by creatures";
|
||||
}
|
||||
|
||||
public PreventDamageToSourceByCardTypeEffect(final PreventDamageToSourceByCardTypeEffect effect) {
|
||||
|
|
109
Mage.Sets/src/mage/cards/u/UrzasTome.java
Normal file
109
Mage.Sets/src/mage/cards/u/UrzasTome.java
Normal file
|
@ -0,0 +1,109 @@
|
|||
/*
|
||||
* 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.u;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.ExileFromGraveCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterHistoricCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class UrzasTome extends CardImpl {
|
||||
|
||||
public UrzasTome(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
|
||||
// {3}, {T}: Draw a card. Then discard a card unless you exile a historic card from your graveyard.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UrzasTomeEffect(), new GenericManaCost(3));
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public UrzasTome(final UrzasTome card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UrzasTome copy() {
|
||||
return new UrzasTome(this);
|
||||
}
|
||||
}
|
||||
|
||||
class UrzasTomeEffect extends OneShotEffect {
|
||||
|
||||
public UrzasTomeEffect() {
|
||||
super(Outcome.Discard);
|
||||
staticText = "Draw a card. Then discard a card unless you exile a historic card from your graveyard";
|
||||
}
|
||||
|
||||
public UrzasTomeEffect(final UrzasTomeEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UrzasTomeEffect copy() {
|
||||
return new UrzasTomeEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
new DrawCardSourceControllerEffect(1).apply(game, source);
|
||||
if (controller != null
|
||||
&& controller.chooseUse(Outcome.Discard, "Exile a historic card from your graveyard?", source, game)) {
|
||||
Cost cost = new ExileFromGraveCost(new TargetCardInYourGraveyard(new FilterHistoricCard()));
|
||||
if (cost.canPay(source, source.getSourceId(), controller.getId(), game)) {
|
||||
if (cost.pay(source, game, source.getSourceId(), controller.getId(), false, null)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (controller != null) {
|
||||
controller.discard(1, false, source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -68,7 +68,7 @@ public class VanquishersBanner extends CardImpl {
|
|||
this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.Benefit)));
|
||||
|
||||
// Creatures you control of the chosen type get +1/+1.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllOfChosenSubtypeEffect(1, 1, Duration.WhileOnBattlefield, filter, true)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllOfChosenSubtypeEffect(1, 1, Duration.WhileOnBattlefield, filter, false)));
|
||||
|
||||
// Whenever you cast a creature spell of the chosen type, draw a card.
|
||||
this.addAbility(new DrawCardIfCreatureTypeAbility());
|
||||
|
|
|
@ -44,7 +44,7 @@ public class WarriorsHonor extends CardImpl {
|
|||
public WarriorsHonor(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}");
|
||||
|
||||
this.getSpellAbility().addEffect(new BoostControlledEffect(1, 1, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, false));
|
||||
this.getSpellAbility().addEffect(new BoostControlledEffect(1, 1, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES, false));
|
||||
}
|
||||
|
||||
public WarriorsHonor(final WarriorsHonor card) {
|
||||
|
|
|
@ -58,7 +58,7 @@ public class WarriorsStand extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Creatures you control get +2/+2 until end of turn.
|
||||
this.getSpellAbility().addEffect(new BoostControlledEffect(2, 2, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, false));
|
||||
this.getSpellAbility().addEffect(new BoostControlledEffect(2, 2, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES, false));
|
||||
}
|
||||
|
||||
public WarriorsStand(final WarriorsStand card) {
|
||||
|
|
|
@ -43,7 +43,7 @@ import mage.filter.common.FilterControlledPermanent;
|
|||
*/
|
||||
public class Wildfire extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent("land");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent("lands");
|
||||
|
||||
public Wildfire(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{R}{R}");
|
||||
|
@ -52,7 +52,7 @@ public class Wildfire extends CardImpl {
|
|||
//Each player sacrifices four lands.
|
||||
this.getSpellAbility().addEffect(new SacrificeAllEffect(4, filter));
|
||||
//Wildfire deals 4 damage to each creature.
|
||||
this.getSpellAbility().addEffect(new DamageAllEffect(4, StaticFilters.FILTER_PERMANENT_CREATURES));
|
||||
this.getSpellAbility().addEffect(new DamageAllEffect(4, StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
}
|
||||
|
||||
public Wildfire(final Wildfire card) {
|
||||
|
|
|
@ -70,7 +70,7 @@ public class YoseiTheMorningStar extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// When Yosei, the Morning Star dies, target player skips their next untap step. Tap up to five target permanents that player controls.
|
||||
Ability ability = new DiesTriggeredAbility(new SkipNextPlayerUntapStepEffect("target "));
|
||||
Ability ability = new DiesTriggeredAbility(new SkipNextPlayerUntapStepEffect("target"));
|
||||
ability.addTarget(new TargetPlayer());
|
||||
ability.addTarget(new YoseiTheMorningStarTarget());
|
||||
ability.addEffect(new YoseiTheMorningStarTapEffect());
|
||||
|
|
|
@ -104,6 +104,7 @@ public class Dominaria extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Drudge Sentinel", 89, Rarity.COMMON, mage.cards.d.DrudgeSentinel.class));
|
||||
cards.add(new SetCardInfo("Dub", 15, Rarity.SPECIAL, mage.cards.d.Dub.class));
|
||||
cards.add(new SetCardInfo("Eviscerate", 91, Rarity.COMMON, mage.cards.e.Eviscerate.class));
|
||||
cards.add(new SetCardInfo("Evra, Halcyon Witness", 16, Rarity.RARE, mage.cards.e.EvraHalcyonWitness.class));
|
||||
cards.add(new SetCardInfo("Excavation Elephant", 17, Rarity.COMMON, mage.cards.e.ExcavationElephant.class));
|
||||
cards.add(new SetCardInfo("Fall of the Thran", 18, Rarity.RARE, mage.cards.f.FallOfTheThran.class));
|
||||
cards.add(new SetCardInfo("Feral Abomination", 92, Rarity.COMMON, mage.cards.f.FeralAbomination.class));
|
||||
|
@ -139,6 +140,7 @@ public class Dominaria extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Homarid Explorer", 53, Rarity.UNCOMMON, mage.cards.h.HomaridExplorer.class));
|
||||
cards.add(new SetCardInfo("Howling Golem", 218, Rarity.UNCOMMON, mage.cards.h.HowlingGolem.class));
|
||||
cards.add(new SetCardInfo("Icy Manipulator", 219, Rarity.UNCOMMON, mage.cards.i.IcyManipulator.class));
|
||||
cards.add(new SetCardInfo("In Bolas's Clutches", 54, Rarity.UNCOMMON, mage.cards.i.InBolassClutches.class));
|
||||
cards.add(new SetCardInfo("Invoke the Divine", 22, Rarity.COMMON, mage.cards.i.InvokeTheDivine.class));
|
||||
cards.add(new SetCardInfo("Island", 254, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Island", 255, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
|
||||
|
@ -156,6 +158,7 @@ public class Dominaria extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Karn, Scion of Urza", 1, Rarity.MYTHIC, mage.cards.k.KarnScionOfUrza.class));
|
||||
cards.add(new SetCardInfo("Karn's Temporal Sundering", 55, Rarity.RARE, mage.cards.k.KarnsTemporalSundering.class));
|
||||
cards.add(new SetCardInfo("Karplusan Hound", 277, Rarity.UNCOMMON, mage.cards.k.KarplusanHound.class));
|
||||
cards.add(new SetCardInfo("Kazarov, Sengir Pureblood", 96, Rarity.RARE, mage.cards.k.KazarovSengirPureblood.class));
|
||||
cards.add(new SetCardInfo("Keldon Overseer", 134, Rarity.COMMON, mage.cards.k.KeldonOverseer.class));
|
||||
cards.add(new SetCardInfo("Keldon Raider", 135, Rarity.COMMON, mage.cards.k.KeldonRaider.class));
|
||||
cards.add(new SetCardInfo("Keldon Warcaller", 136, Rarity.COMMON, mage.cards.k.KeldonWarcaller.class));
|
||||
|
@ -163,6 +166,7 @@ public class Dominaria extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Knight of Malice", 97, Rarity.UNCOMMON, mage.cards.k.KnightOfMalice.class));
|
||||
cards.add(new SetCardInfo("Knight of New Benalia", 24, Rarity.COMMON, mage.cards.k.KnightOfNewBenalia.class));
|
||||
cards.add(new SetCardInfo("Kwende, Pride of Femeref", 25, Rarity.UNCOMMON, mage.cards.k.KwendePrideOfFemeref.class));
|
||||
cards.add(new SetCardInfo("Lich's Mastery", 98, Rarity.RARE, mage.cards.l.LichsMastery.class));
|
||||
cards.add(new SetCardInfo("Lingering Phantom", 99, Rarity.UNCOMMON, mage.cards.l.LingeringPhantom.class));
|
||||
cards.add(new SetCardInfo("Llanowar Elves", 168, Rarity.COMMON, mage.cards.l.LlanowarElves.class));
|
||||
cards.add(new SetCardInfo("Llanowar Envoy", 169, Rarity.COMMON, mage.cards.l.LlanowarEnvoy.class));
|
||||
|
@ -189,7 +193,9 @@ public class Dominaria extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Naru Meha, Master Wizard", 59, Rarity.MYTHIC, mage.cards.n.NaruMehaMasterWizard.class));
|
||||
cards.add(new SetCardInfo("Nature's Spiral", 175, Rarity.UNCOMMON, mage.cards.n.NaturesSpiral.class));
|
||||
cards.add(new SetCardInfo("Niambi, Faithful Healer", 272, Rarity.RARE, mage.cards.n.NiambiFaithfulHealer.class));
|
||||
cards.add(new SetCardInfo("On Serra's Wings", 28, Rarity.UNCOMMON, mage.cards.o.OnSerrasWings.class));
|
||||
cards.add(new SetCardInfo("Opt", 60, Rarity.COMMON, mage.cards.o.Opt.class));
|
||||
cards.add(new SetCardInfo("Orcish Vandal", 137, Rarity.COMMON, mage.cards.o.OrcishVandal.class));
|
||||
cards.add(new SetCardInfo("Pardic Wanderer", 226, Rarity.COMMON, mage.cards.p.PardicWanderer.class));
|
||||
cards.add(new SetCardInfo("Pegasus Courser", 29, Rarity.COMMON, mage.cards.p.PegasusCourser.class));
|
||||
cards.add(new SetCardInfo("Pierce the Sky", 176, Rarity.COMMON, mage.cards.p.PierceTheSky.class));
|
||||
|
@ -252,9 +258,11 @@ public class Dominaria extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Tragic Poet", 37, Rarity.COMMON, mage.cards.t.TragicPoet.class));
|
||||
cards.add(new SetCardInfo("Traxos, Scourge of Kroog", 234, Rarity.RARE, mage.cards.t.TraxosScourgeOfKroog.class));
|
||||
cards.add(new SetCardInfo("Triumph of Gerrard", 38, Rarity.UNCOMMON, mage.cards.t.TriumphOfGerrard.class));
|
||||
cards.add(new SetCardInfo("Two-Headed Giant", 147, Rarity.RARE, mage.cards.t.TwoHeadedGiant.class));
|
||||
cards.add(new SetCardInfo("Untamed Kavu", 186, Rarity.UNCOMMON, mage.cards.u.UntamedKavu.class));
|
||||
cards.add(new SetCardInfo("Unwind", 72, Rarity.COMMON, mage.cards.u.Unwind.class));
|
||||
cards.add(new SetCardInfo("Urza's Ruinous Blast", 39, Rarity.RARE, mage.cards.u.UrzasRuinousBlast.class));
|
||||
cards.add(new SetCardInfo("Urza's Tome", 235, Rarity.UNCOMMON, mage.cards.u.UrzasTome.class));
|
||||
cards.add(new SetCardInfo("Verdant Force", 187, Rarity.RARE, mage.cards.v.VerdantForce.class));
|
||||
cards.add(new SetCardInfo("Verix Bladewing", 149, Rarity.MYTHIC, mage.cards.v.VerixBladewing.class));
|
||||
cards.add(new SetCardInfo("Vicious Offering", 110, Rarity.COMMON, mage.cards.v.ViciousOffering.class));
|
||||
|
|
|
@ -101,11 +101,11 @@ public class GideonTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 2);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Gideon, Champion of Justice");
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+0: Until end of turn");
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "0: Until end of turn");
|
||||
|
||||
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "+1: Put a loyalty counter on", playerB);
|
||||
|
||||
activateAbility(5, PhaseStep.PRECOMBAT_MAIN, playerA, "+0: Until end of turn");
|
||||
activateAbility(5, PhaseStep.PRECOMBAT_MAIN, playerA, "0: Until end of turn");
|
||||
|
||||
setStopAt(5, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
@ -146,7 +146,7 @@ public class GideonTest extends CardTestPlayerBase {
|
|||
attack(2, playerB, "Silvercoat Lion");
|
||||
attack(2, playerB, "Pillarfield Ox");
|
||||
|
||||
activateAbility(4, PhaseStep.PRECOMBAT_MAIN, playerB, "+0: Until ");
|
||||
activateAbility(4, PhaseStep.PRECOMBAT_MAIN, playerB, "0: Until ");
|
||||
activateAbility(4, PhaseStep.PRECOMBAT_MAIN, playerB, "Equip {2}", "Gideon, Battle-Forged");
|
||||
attack(4, playerB, "Gideon, Battle-Forged"); // 7 damage
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ public class TamiyoTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerA, "Gideon, Ally of Zendikar", 1);
|
||||
|
||||
// put 2/2 knight ally token on battlefield
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+0: Create a");
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "0: Create a");
|
||||
|
||||
// next, activate Gideon to make him a 5/5 human soldier ally creature
|
||||
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "+1: Until end of turn");
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
package org.mage.test.cards.single;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
|
@ -15,7 +14,6 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class ChandraPyromasterTest extends CardTestPlayerBase {
|
||||
|
||||
@Test
|
||||
|
@ -28,7 +26,7 @@ public class ChandraPyromasterTest extends CardTestPlayerBase {
|
|||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+0: Exile the top card of your library. You may play it this turn.");
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "0: Exile the top card of your library. You may play it this turn.");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Mizzium Mortars", "Silvercoat Lion");
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
@ -54,7 +52,7 @@ public class ChandraPyromasterTest extends CardTestPlayerBase {
|
|||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+0: Exile the top card of your library. You may play it this turn.");
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "0: Exile the top card of your library. You may play it this turn.");
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
|
@ -78,7 +76,7 @@ public class ChandraPyromasterTest extends CardTestPlayerBase {
|
|||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 2);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+0: Exile the top card of your library. You may play it this turn.");
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "0: Exile the top card of your library. You may play it this turn.");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Mizzium Mortars with overload");
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
|
|
@ -121,7 +121,7 @@ public class AlternativeCostSourceAbility extends StaticAbility implements Alter
|
|||
|
||||
private AlternativeCost2 convertToAlternativeCost(Cost cost) {
|
||||
//return cost != null ? new AlternativeCost2Impl(null, cost.getText(), cost) : null;
|
||||
return cost != null ? new AlternativeCost2Impl(null, "", cost) : null;
|
||||
return cost != null ? new AlternativeCost2Impl(null, "", "", cost) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -47,7 +47,7 @@ public class PayLoyaltyCost extends CostImpl {
|
|||
public PayLoyaltyCost(int amount) {
|
||||
this.amount = amount;
|
||||
this.text = Integer.toString(amount);
|
||||
if (amount >= 0) {
|
||||
if (amount > 0) {
|
||||
this.text = '+' + this.text;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ public class ChooseBasicLandTypeEffect extends OneShotEffect {
|
|||
|
||||
public ChooseBasicLandTypeEffect(Outcome outcome) {
|
||||
super(outcome);
|
||||
this.staticText = "Choose a basic land type";
|
||||
this.staticText = "choose a basic land type";
|
||||
}
|
||||
|
||||
public ChooseBasicLandTypeEffect(final ChooseBasicLandTypeEffect effect) {
|
||||
|
|
|
@ -158,7 +158,7 @@ public class RevealCardsFromLibraryUntilEffect extends OneShotEffect {
|
|||
if (anyOrder) {
|
||||
sb.append("any");
|
||||
} else {
|
||||
sb.append("random");
|
||||
sb.append("a random");
|
||||
|
||||
}
|
||||
sb.append(" order.");
|
||||
|
|
|
@ -182,7 +182,7 @@ public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect{
|
|||
|
||||
private void setText() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Each opponent sacrifices ");
|
||||
sb.append("each opponent sacrifices ");
|
||||
|
||||
if (amount.toString().equals("X")) {
|
||||
sb.append(amount.toString());
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
* 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.continuous;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
* @author nantuko
|
||||
*/
|
||||
public class AddCardSuperTypeAttachedEffect extends ContinuousEffectImpl {
|
||||
|
||||
private final SuperType addedSuperType;
|
||||
private final AttachmentType attachmentType;
|
||||
|
||||
public AddCardSuperTypeAttachedEffect(SuperType addedSuperType, Duration duration, AttachmentType attachmentType) {
|
||||
super(duration, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit);
|
||||
this.addedSuperType = addedSuperType;
|
||||
this.attachmentType = attachmentType;
|
||||
setText();
|
||||
}
|
||||
|
||||
public AddCardSuperTypeAttachedEffect(final AddCardSuperTypeAttachedEffect effect) {
|
||||
super(effect);
|
||||
this.addedSuperType = effect.addedSuperType;
|
||||
this.attachmentType = effect.attachmentType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent equipment = game.getPermanent(source.getSourceId());
|
||||
if (equipment != null && equipment.getAttachedTo() != null) {
|
||||
Permanent target = game.getPermanent(equipment.getAttachedTo());
|
||||
if (target != null && !target.getSuperType().contains(addedSuperType)) {
|
||||
target.addSuperType(addedSuperType);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AddCardSuperTypeAttachedEffect copy() {
|
||||
return new AddCardSuperTypeAttachedEffect(this);
|
||||
}
|
||||
|
||||
private void setText() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(attachmentType.verb());
|
||||
sb.append(" permanent is ").append(addedSuperType.toString()); //TODO add attacked card type detection
|
||||
staticText = sb.toString();
|
||||
}
|
||||
}
|
|
@ -58,11 +58,11 @@ public class BoostAllEffect extends ContinuousEffectImpl {
|
|||
}
|
||||
|
||||
public BoostAllEffect(DynamicValue power, DynamicValue toughness, Duration duration) {
|
||||
this(power, toughness, duration, new FilterCreaturePermanent("All creatures"), false);
|
||||
this(power, toughness, duration, new FilterCreaturePermanent("all creatures"), false);
|
||||
}
|
||||
|
||||
public BoostAllEffect(int power, int toughness, Duration duration, boolean excludeSource) {
|
||||
this(power, toughness, duration, new FilterCreaturePermanent("All creatures"), excludeSource);
|
||||
this(power, toughness, duration, new FilterCreaturePermanent("all creatures"), excludeSource);
|
||||
}
|
||||
|
||||
public BoostAllEffect(int power, int toughness, Duration duration, FilterCreaturePermanent filter, boolean excludeSource) {
|
||||
|
|
|
@ -39,7 +39,7 @@ public class MenaceAbility extends StaticAbility { // Menace may not be a Single
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
String res = "Menace";
|
||||
String res = "menace";
|
||||
if (this.showAbilityHint) {
|
||||
res += " <i>(This creature can't be blocked except by two or more creatures.)</i>";
|
||||
}
|
||||
|
|
|
@ -1077,7 +1077,7 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
// 20180408 - 901.5
|
||||
if (gameOptions.planeChase) {
|
||||
Plane plane = Plane.getRandomPlane();
|
||||
plane.setControllerId(getActivePlayerId());
|
||||
plane.setControllerId(startingPlayerId);
|
||||
addPlane(plane, null, getActivePlayerId());
|
||||
state.setPlaneChase(this, gameOptions.planeChase);
|
||||
}
|
||||
|
|
|
@ -33,17 +33,23 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.HellbentCondition;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.MainPhaseStackEmptyCondition;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.RollPlanarDieEffect;
|
||||
import mage.abilities.effects.common.discard.DiscardHandControllerEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.command.Plane;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.util.CardUtil;
|
||||
import mage.watchers.common.PlanarRollWatcher;
|
||||
|
||||
/**
|
||||
|
@ -57,7 +63,7 @@ public class AcademyAtTolariaWestPlane extends Plane {
|
|||
this.setExpansionSetCodeForImage("PCA");
|
||||
|
||||
// At the beginning of your end step, if you have 0 cards in hand, draw seven cards
|
||||
Ability ability = new BeginningOfEndStepTriggeredAbility(Zone.COMMAND, new DrawCardSourceControllerEffect(7), TargetController.ANY, HellbentCondition.instance, false);
|
||||
Ability ability = new BeginningOfEndStepTriggeredAbility(Zone.COMMAND, new DrawCardsActivePlayerEffect(7), TargetController.ANY, HellbentAPCondition.instance, false);
|
||||
this.getAbilities().add(ability);
|
||||
|
||||
// Active player can roll the planar die: Whenever you roll {CHAOS}, discard your hand
|
||||
|
@ -77,3 +83,66 @@ public class AcademyAtTolariaWestPlane extends Plane {
|
|||
this.getAbilities().add(new SimpleStaticAbility(Zone.ALL, new PlanarDieRollCostIncreasingEffect(chaosAbility.getOriginalId())));
|
||||
}
|
||||
}
|
||||
|
||||
class DrawCardsActivePlayerEffect extends OneShotEffect {
|
||||
|
||||
protected DynamicValue amount;
|
||||
|
||||
public DrawCardsActivePlayerEffect(int amount) {
|
||||
this(new StaticValue(amount));
|
||||
}
|
||||
|
||||
public DrawCardsActivePlayerEffect(DynamicValue amount) {
|
||||
super(Outcome.DrawCard);
|
||||
this.amount = amount.copy();
|
||||
setText();
|
||||
}
|
||||
|
||||
public DrawCardsActivePlayerEffect(final DrawCardsActivePlayerEffect effect) {
|
||||
super(effect);
|
||||
this.amount = effect.amount.copy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public DrawCardsActivePlayerEffect copy() {
|
||||
return new DrawCardsActivePlayerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
if (game.getState().getCurrentPlane() != null) {
|
||||
if (!game.getState().getCurrentPlane().getName().equalsIgnoreCase("Plane - Academy at Tolaria West")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Player player = game.getPlayer(game.getActivePlayerId());
|
||||
if (player != null) {
|
||||
player.drawCards(amount.calculate(game, source, this), game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void setText() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("draw ").append(CardUtil.numberToText(amount.toString())).append(" cards");
|
||||
staticText = sb.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
enum HellbentAPCondition implements Condition {
|
||||
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return game.getPlayer(game.getActivePlayerId()).getHand().isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "if you have no cards in hand";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,15 +29,17 @@ package mage.game.command.planes;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.MainPhaseStackEmptyCondition;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.RollPlanarDieEffect;
|
||||
import mage.abilities.effects.common.SkipUntapStepEffect;
|
||||
import mage.abilities.effects.common.UntapAllControllerEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.constants.Duration;
|
||||
|
@ -120,11 +122,19 @@ class EdgeOfMalacolEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
// Prevent untap event of creatures of target player
|
||||
if (game.getTurn().getStepType() == PhaseStep.UNTAP) {
|
||||
if (game.getState().getCurrentPlane() != null) {
|
||||
if (!game.getState().getCurrentPlane().getName().equalsIgnoreCase("Plane - Edge of Malacol")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
if (permanent != null && filter.match(permanent, game)) {
|
||||
if (permanent != null && filter.match(permanent, game) && permanent.getControllerId() == game.getActivePlayerId()) {
|
||||
UUID oldController = source.getControllerId();
|
||||
source.setControllerId(game.getActivePlayerId());
|
||||
Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(2));
|
||||
effect.setTargetPointer(new FixedTarget(permanent, game));
|
||||
effect.apply(game, source);
|
||||
source.setControllerId(oldController);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,6 +117,11 @@ class HedronFieldsOfAgadeemRestrictionEffect extends RestrictionEffect {
|
|||
|
||||
@Override
|
||||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||
if (game.getState().getCurrentPlane() != null) {
|
||||
if (!game.getState().getCurrentPlane().getName().equalsIgnoreCase("Plane - Hedron Fields of Agadeem")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return filter.match(permanent, source.getSourceId(), source.getControllerId(), game);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,14 +34,18 @@ import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.MainPhaseStackEmptyCondition;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.RollPlanarDieEffect;
|
||||
import mage.abilities.effects.common.SkipUntapStepEffect;
|
||||
import mage.abilities.effects.common.UntapAllControllerEffect;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.command.Plane;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.Target;
|
||||
import mage.watchers.common.PlanarRollWatcher;
|
||||
|
||||
|
@ -56,7 +60,7 @@ public class TheEonFogPlane extends Plane {
|
|||
this.setExpansionSetCodeForImage("PCA");
|
||||
|
||||
// All players miss their untap step
|
||||
Ability ability = new SimpleStaticAbility(Zone.COMMAND, new SkipUntapStepEffect());
|
||||
Ability ability = new SimpleStaticAbility(Zone.COMMAND, new TheEonFogSkipUntapStepEffect(Duration.Custom, true));
|
||||
this.getAbilities().add(ability);
|
||||
|
||||
// Active player can roll the planar die: Whenever you roll {CHAOS}, untap all permanents you control
|
||||
|
@ -76,3 +80,40 @@ public class TheEonFogPlane extends Plane {
|
|||
this.getAbilities().add(new SimpleStaticAbility(Zone.ALL, new PlanarDieRollCostIncreasingEffect(chaosAbility.getOriginalId())));
|
||||
}
|
||||
}
|
||||
|
||||
class TheEonFogSkipUntapStepEffect extends ContinuousRuleModifyingEffectImpl {
|
||||
|
||||
boolean allPlayers = false;
|
||||
|
||||
public TheEonFogSkipUntapStepEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Neutral, false, false);
|
||||
this.allPlayers = false;
|
||||
staticText = "Players skip their untap steps";
|
||||
}
|
||||
|
||||
public TheEonFogSkipUntapStepEffect(Duration d, boolean allPlayers) {
|
||||
super(d, Outcome.Neutral, false, false);
|
||||
this.allPlayers = allPlayers;
|
||||
staticText = "Players skip their untap steps";
|
||||
}
|
||||
|
||||
public TheEonFogSkipUntapStepEffect(final TheEonFogSkipUntapStepEffect effect) {
|
||||
super(effect);
|
||||
this.allPlayers = effect.allPlayers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TheEonFogSkipUntapStepEffect copy() {
|
||||
return new TheEonFogSkipUntapStepEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (game.getState().getCurrentPlane() != null) {
|
||||
if (!game.getState().getCurrentPlane().getName().equalsIgnoreCase("Plane - The Eon Fog")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return event.getType() == GameEvent.EventType.UNTAP_STEP;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,14 +29,16 @@ package mage.game.command.planes;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import static jdk.nashorn.internal.objects.NativeRegExp.source;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.MainPhaseStackEmptyCondition;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.DrawCardTargetEffect;
|
||||
import mage.abilities.effects.common.RollPlanarDieEffect;
|
||||
import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect;
|
||||
import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect.HandSizeModification;
|
||||
|
@ -53,6 +55,7 @@ import mage.game.events.GameEvent;
|
|||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.watchers.common.PlanarRollWatcher;
|
||||
|
||||
/**
|
||||
|
@ -96,7 +99,7 @@ public class UndercityReachesPlane extends Plane {
|
|||
class UndercityReachesTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public UndercityReachesTriggeredAbility() {
|
||||
super(Zone.COMMAND, new DrawCardSourceControllerEffect(1), true);
|
||||
super(Zone.COMMAND, null, true);
|
||||
}
|
||||
|
||||
public UndercityReachesTriggeredAbility(final UndercityReachesTriggeredAbility ability) {
|
||||
|
@ -118,6 +121,9 @@ class UndercityReachesTriggeredAbility extends TriggeredAbilityImpl {
|
|||
if (((DamagedPlayerEvent) event).isCombatDamage()) {
|
||||
Permanent creature = game.getPermanent(event.getSourceId());
|
||||
if (creature != null) {
|
||||
Effect effect = new DrawCardTargetEffect(new StaticValue(1), false, true);
|
||||
effect.setTargetPointer(new FixedTarget(creature.getControllerId()));
|
||||
effect.apply(game, null);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
public class WaspToken extends TokenImpl {
|
||||
|
||||
public WaspToken() {
|
||||
super("Wasp", "1/1 colorless Insect artifact creature token with flying");
|
||||
super("Wasp", "1/1 colorless Insect artifact creature token with flying named Wasp");
|
||||
cardType.add(CardType.ARTIFACT);
|
||||
cardType.add(CardType.CREATURE);
|
||||
this.subtype.add(SubType.INSECT);
|
||||
|
|
|
@ -50,7 +50,7 @@ public class TargetActivatedAbility extends TargetObject {
|
|||
protected final FilterAbility filter;
|
||||
|
||||
public TargetActivatedAbility() {
|
||||
this(new FilterAbility());
|
||||
this(new FilterAbility("activated ability"));
|
||||
}
|
||||
|
||||
public TargetActivatedAbility(FilterAbility filter) {
|
||||
|
|
Loading…
Reference in a new issue