Merge pull request #60 from magefree/master

merge
This commit is contained in:
theelk801 2017-09-09 11:18:22 -04:00 committed by GitHub
commit 901f8d749e
9216 changed files with 52731 additions and 45075 deletions

View file

@ -602,7 +602,7 @@ public class ModernCardRenderer extends CardRenderer {
int partWidth = (int) Math.max(30, 0.20f * cardWidth);
// Is it a creature?
boolean isVehicle = cardView.getSubTypes().contains("Vehicle");
boolean isVehicle = cardView.getSubTypes().contains(SubType.VEHICLE);
if (cardView.isCreature() || isVehicle) {
int x = cardWidth - borderWidth - partWidth;

View file

@ -8,6 +8,7 @@ import mage.interfaces.rate.RateCallback;
import mage.util.RandomUtil;
import java.util.*;
import mage.constants.SubType;
/**
* Builds deck from provided card pool.
@ -114,7 +115,7 @@ public final class DeckBuilder {
* @param count
*/
private static void addCardsToDeck(final Collection<MageScoredCard> remainingCards, final int minCost, final int maxCost,
final int count) {
final int count) {
for (int c = count; c > 0; c--) {
@ -140,7 +141,8 @@ public final class DeckBuilder {
}
/**
* Adds lands from non basic land (if provided), adds basic lands getting them from provided {@link RateCallback}}.
* Adds lands from non basic land (if provided), adds basic lands getting
* them from provided {@link RateCallback}}.
*
* @param allowedColors
* @param landCardPool
@ -241,9 +243,9 @@ public final class DeckBuilder {
int type;
if (card.isCreature()) {
type = 10;
} else if (card.getSubtype(null).contains("Equipment")) {
} else if (card.getSubtype(null).contains(SubType.EQUIPMENT)) {
type = 8;
} else if (card.getSubtype(null).contains("Aura")) {
} else if (card.getSubtype(null).contains(SubType.AURA)) {
type = 5;
} else if (card.isInstant()) {
type = 7;
@ -251,11 +253,11 @@ public final class DeckBuilder {
type = 6;
}
this.score =
// 5*card.getValue() + // not possible now
3 * cardRater.rateCard(card) +
// 3*card.getRemoval() + // not possible now
type + getManaCostScore(card, allowedColors);
this.score
= // 5*card.getValue() + // not possible now
3 * cardRater.rateCard(card)
+ // 3*card.getRemoval() + // not possible now
type + getManaCostScore(card, allowedColors);
}
private int getManaCostScore(Card card, List<ColoredManaSymbol> allowedColors) {

View file

@ -11,6 +11,7 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import java.util.UUID;
import mage.constants.SubType;
/**
* @author ubeefx, nantuko
@ -56,7 +57,7 @@ public final class ArtificialScoringSystem {
//score + =cardDefinition.getActivations().size()*50;
//score += cardDefinition.getManaActivations().size()*80;
} else {
if (permanent.getSubtype(game).contains("Equipment")) {
if (permanent.getSubtype(game).contains(SubType.EQUIPMENT)) {
score += 100;
}
}

View file

@ -13,6 +13,7 @@ import org.apache.log4j.Logger;
import java.io.InputStream;
import java.util.*;
import mage.constants.SubType;
/**
* Class responsible for reading ratings from resources and rating given cards.
@ -60,9 +61,9 @@ public final class RateCard {
type = 15;
} else if (card.isCreature()) {
type = 10;
} else if (card.getSubtype(null).contains("Equipment")) {
} else if (card.getSubtype(null).contains(SubType.EQUIPMENT)) {
type = 8;
} else if (card.getSubtype(null).contains("Aura")) {
} else if (card.getSubtype(null).contains(SubType.AURA)) {
type = 5;
} else if (card.isInstant()) {
type = 7;
@ -77,7 +78,7 @@ public final class RateCard {
}
private static int isRemoval(Card card) {
if (card.getSubtype(null).contains("Aura") || card.isInstant() || card.isSorcery()) {
if (card.getSubtype(null).contains(SubType.AURA) || card.isInstant() || card.isSorcery()) {
for (Ability ability : card.getAbilities()) {
for (Effect effect : ability.getEffects()) {

View file

@ -76,8 +76,8 @@ public class AdmiralBeckettBrass extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{B}{R}");
addSuperType(SuperType.LEGENDARY);
this.subtype.add("Human");
this.subtype.add("Pirate");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.PIRATE);
this.power = new MageInt(3);
this.toughness = new MageInt(3);

View file

@ -95,7 +95,7 @@ class AjanisChosenEffect extends OneShotEffect {
Token token = new CatToken();
if (token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId())) {
Permanent enchantment = game.getPermanent(this.getTargetPointer().getFirst(game, source));
if (enchantment != null && enchantment.getSubtype(game).contains("Aura")) {
if (enchantment != null && enchantment.getSubtype(game).contains(SubType.AURA)) {
for (UUID tokenId : token.getLastAddedTokenIds()) {
Permanent tokenPermanent = game.getPermanent(tokenId);
if (tokenPermanent != null) {

View file

@ -1,81 +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.a;
import java.util.UUID;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageWithPowerTargetEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.TargetController;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author ciaccona007
*/
public class Ambuscade extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control");
static {
filter.add(new ControllerPredicate(TargetController.NOT_YOU));
}
public Ambuscade(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}");
// Target creature you control gets +1/+0 until end of turn.
Effect effect = new BoostTargetEffect(1, 0, Duration.EndOfTurn);
effect.setApplyEffectsAfter(); // needed to count the boost for the second effect
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
this.getSpellAbility().addEffect(effect);
// It deals damage equal to its power to target creature you don't control.
effect = new DamageWithPowerTargetEffect();
effect.setText("It deals damage equal to its power to target creature you don't control");
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addEffect(effect);
}
public Ambuscade(final Ambuscade card) {
super(card);
}
@Override
public Ambuscade copy() {
return new Ambuscade(this);
}
}
/*
* 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.a;
import java.util.UUID;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageWithPowerTargetEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.TargetController;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author ciaccona007
*/
public class Ambuscade extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control");
static {
filter.add(new ControllerPredicate(TargetController.NOT_YOU));
}
public Ambuscade(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}");
// Target creature you control gets +1/+0 until end of turn.
Effect effect = new BoostTargetEffect(1, 0, Duration.EndOfTurn);
effect.setApplyEffectsAfter(); // needed to count the boost for the second effect
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
this.getSpellAbility().addEffect(effect);
// It deals damage equal to its power to target creature you don't control.
effect = new DamageWithPowerTargetEffect();
effect.setText("It deals damage equal to its power to target creature you don't control");
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addEffect(effect);
}
public Ambuscade(final Ambuscade card) {
super(card);
}
@Override
public Ambuscade copy() {
return new Ambuscade(this);
}
}

View file

@ -35,6 +35,7 @@ import mage.abilities.effects.ReplacementEffectImpl;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
@ -50,8 +51,8 @@ public class AngrathsMarauders extends CardImpl {
public AngrathsMarauders(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}{R}");
this.subtype.add("Human");
this.subtype.add("Pirate");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.PIRATE);
this.power = new MageInt(4);
this.toughness = new MageInt(4);

View file

@ -46,6 +46,7 @@ import mage.counters.CounterType;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.stack.Spell;
import mage.util.CardUtil;
/**
@ -111,9 +112,15 @@ class AnimarCostReductionEffect extends CostModificationEffectImpl {
@Override
public boolean applies(Ability abilityToModify, Ability source, Game game) {
if (abilityToModify instanceof SpellAbility || abilityToModify instanceof FlashbackAbility) {
Card sourceCard = game.getCard(abilityToModify.getSourceId());
if (sourceCard != null && abilityToModify.getControllerId().equals(source.getControllerId()) && (sourceCard.isCreature())) {
return true;
if (abilityToModify.getControllerId().equals(source.getControllerId())) {
Spell spell = (Spell) game.getStack().getStackObject(abilityToModify.getId());
if (spell != null) {
return spell.isCreature();
} else {
// used at least for flashback ability because Flashback ability doesn't use stack or for getPlayables where spell is not cast yet
Card sourceCard = game.getCard(abilityToModify.getSourceId());
return sourceCard != null && sourceCard.isCreature();
}
}
}
return false;

View file

@ -56,8 +56,8 @@ public class AphettoVulture extends CardImpl {
public AphettoVulture(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}");
this.subtype.add("Zombie");
this.subtype.add("Bird");
this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.BIRD);
this.power = new MageInt(3);
this.toughness = new MageInt(2);

View file

@ -1,91 +1,91 @@
/*
* 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.a;
import java.util.UUID;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.AftermathAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SpellAbilityType;
import mage.constants.TargetController;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author LevelX2
*/
public class AppealAuthority extends SplitCard {
public AppealAuthority(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, new CardType[]{CardType.SORCERY}, "{G}", "{1}{W}", SpellAbilityType.SPLIT_AFTERMATH);
// Appeal
// Until end of turn, target creature gains trample and gets +X/+X, where X is the number of creatures you control.
getLeftHalfCard().getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)
.setText("Until end of turn, target creature gains trample"));
DynamicValue controlledCreatures = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent("the number of creatures you control"));
getLeftHalfCard().getSpellAbility().addEffect(new BoostTargetEffect(controlledCreatures, controlledCreatures, Duration.EndOfTurn, true)
.setText("and gets +X/+X, where X is the number of creatures you control"));
getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
// Authority
// Aftermath
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true));
// Tap up to two target creatures your opponents control. Creatures you control gain vigilance until end of turn.
getRightHalfCard().getSpellAbility().addEffect(new TapTargetEffect());
FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures your opponents control");
filter.add(new ControllerPredicate(TargetController.OPPONENT));
getRightHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2, filter, false));
getRightHalfCard().getSpellAbility().addEffect(new GainAbilityControlledEffect(VigilanceAbility.getInstance(),
Duration.EndOfTurn, new FilterControlledCreaturePermanent("creatures")));
}
public AppealAuthority(final AppealAuthority card) {
super(card);
}
@Override
public AppealAuthority copy() {
return new AppealAuthority(this);
}
}
/*
* 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.a;
import java.util.UUID;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.AftermathAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SpellAbilityType;
import mage.constants.TargetController;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author LevelX2
*/
public class AppealAuthority extends SplitCard {
public AppealAuthority(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, new CardType[]{CardType.SORCERY}, "{G}", "{1}{W}", SpellAbilityType.SPLIT_AFTERMATH);
// Appeal
// Until end of turn, target creature gains trample and gets +X/+X, where X is the number of creatures you control.
getLeftHalfCard().getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)
.setText("Until end of turn, target creature gains trample"));
DynamicValue controlledCreatures = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent("the number of creatures you control"));
getLeftHalfCard().getSpellAbility().addEffect(new BoostTargetEffect(controlledCreatures, controlledCreatures, Duration.EndOfTurn, true)
.setText("and gets +X/+X, where X is the number of creatures you control"));
getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
// Authority
// Aftermath
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true));
// Tap up to two target creatures your opponents control. Creatures you control gain vigilance until end of turn.
getRightHalfCard().getSpellAbility().addEffect(new TapTargetEffect());
FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures your opponents control");
filter.add(new ControllerPredicate(TargetController.OPPONENT));
getRightHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2, filter, false));
getRightHalfCard().getSpellAbility().addEffect(new GainAbilityControlledEffect(VigilanceAbility.getInstance(),
Duration.EndOfTurn, new FilterControlledCreaturePermanent("creatures")));
}
public AppealAuthority(final AppealAuthority card) {
super(card);
}
@Override
public AppealAuthority copy() {
return new AppealAuthority(this);
}
}

View file

@ -116,7 +116,7 @@ class ArmamentMasterEffect extends ContinuousEffectImpl {
List<UUID> attachments = p.getAttachments();
for (UUID attachmentId : attachments) {
Permanent attached = game.getPermanent(attachmentId);
if (attached != null && attached.getSubtype(game).contains("Equipment")) {
if (attached != null && attached.getSubtype(game).contains(SubType.EQUIPMENT)) {
count++;
}
}

View file

@ -195,7 +195,7 @@ class AshiokNightmareWeaverAddTypeEffect extends ContinuousEffectImpl {
switch (layer) {
case TypeChangingEffects_4:
if (sublayer == SubLayer.NA) {
creature.getSubtype(game).add("Nightmare");
creature.getSubtype(game).add(SubType.NIGHTMARE);
}
break;
}

View file

@ -101,7 +101,7 @@ class EnchantedCreatureAurasCount implements DynamicValue {
List<UUID> attachments = permanent.getAttachments();
for (UUID attachmentId : attachments) {
Permanent attached = game.getPermanent(attachmentId);
if (attached != null && attached.getSubtype(game).contains("Aura")) {
if (attached != null && attached.getSubtype(game).contains(SubType.AURA)) {
count++;
}

View file

@ -109,7 +109,7 @@ class BartelRuneaxeEffect extends ContinuousRuleModifyingEffectImpl {
public boolean applies(GameEvent event, Ability source, Game game) {
StackObject stackObject = (StackObject) game.getStack().getStackObject(event.getSourceId());
if (stackObject != null && event.getTargetId().equals(source.getSourceId())) {
if (stackObject.getSubtype(game).contains("Aura")) {
if (stackObject.getSubtype(game).contains(SubType.AURA)) {
return true;
}
}

View file

@ -49,7 +49,7 @@ public class BelligerentBrontodon extends CardImpl {
public BelligerentBrontodon(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{W}");
this.subtype.add("Dinosaur");
this.subtype.add(SubType.DINOSAUR);
this.power = new MageInt(4);
this.toughness = new MageInt(6);

View file

@ -35,6 +35,7 @@ import mage.abilities.effects.common.counter.AddCountersAllEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.counters.CounterType;
@ -58,7 +59,7 @@ public class BellowingAegisaur extends CardImpl {
public BellowingAegisaur(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}");
this.subtype.add("Dinosaur");
this.subtype.add(SubType.DINOSAUR);
this.power = new MageInt(3);
this.toughness = new MageInt(5);

View file

@ -36,6 +36,7 @@ import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.ComparisonType;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
@ -59,8 +60,8 @@ public class BishopOfRebirth extends CardImpl {
public BishopOfRebirth(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}");
this.subtype.add("Vampire");
this.subtype.add("Cleric");
this.subtype.add(SubType.VAMPIRE);
this.subtype.add(SubType.CLERIC);
this.power = new MageInt(3);
this.toughness = new MageInt(4);

View file

@ -33,6 +33,7 @@ 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.Outcome;
import mage.game.Game;
import mage.game.permanent.Permanent;
@ -94,7 +95,7 @@ class DestroyAllAttachedEquipmentEffect extends OneShotEffect {
List<UUID> attachments = new ArrayList<>(target.getAttachments());
for (UUID attachmentId : attachments) {
Permanent attachment = game.getPermanent(attachmentId);
if (attachment != null && attachment.getSubtype(game).contains("Equipment")) {
if (attachment != null && attachment.getSubtype(game).contains(SubType.EQUIPMENT)) {
attachment.destroy(source.getSourceId(), game, false);
}
}

View file

@ -100,7 +100,7 @@ class BloodMoonEffect extends ContinuousEffectImpl {
// So the ability removing has to be done before Layer 6
land.removeAllAbilities(source.getSourceId(), game);
land.getSubtype(game).removeAll(SubType.getLandTypes(false));
land.getSubtype(game).add("Mountain");
land.getSubtype(game).add(SubType.MOUNTAIN);
break;
case AbilityAddingRemovingEffects_6:
land.addAbility(new RedManaAbility(), source.getSourceId(), game);

View file

@ -37,6 +37,7 @@ import mage.abilities.keyword.FlashAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.watchers.common.CreaturesDiedWatcher;
@ -49,8 +50,8 @@ public class BloodcrazedPaladin extends CardImpl {
public BloodcrazedPaladin(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
this.subtype.add("Vampire");
this.subtype.add("Knight");
this.subtype.add(SubType.VAMPIRE);
this.subtype.add(SubType.KNIGHT);
this.power = new MageInt(1);
this.toughness = new MageInt(1);

View file

@ -1,77 +1,77 @@
/*
* 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.b;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.PutCountersSourceCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.common.CountersSourceCount;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
import mage.abilities.effects.common.counter.RemoveCounterSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.counters.Counter;
/**
*
* @author LevelX2
*/
public class BloodletterQuill extends CardImpl {
public BloodletterQuill(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
Counter bloodCounter = new Counter("blood");
// {2}, {T}, Put a blood counter on Bloodletter Quill: Draw a card, then lose 1 life for each blood counter on Bloodletter Quill.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(2));
ability.addEffect(new LoseLifeSourceControllerEffect(new CountersSourceCount(bloodCounter.getName()))
.setText(", then lose 1 life for each blood counter on {this}"));
ability.addCost(new TapSourceCost());
ability.addCost(new PutCountersSourceCost(bloodCounter));
this.addAbility(ability);
// {U}{B}: Remove a blood counter from Bloodletter Quill.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
new RemoveCounterSourceEffect(bloodCounter), new ManaCostsImpl("{U}{B}")));
}
public BloodletterQuill(final BloodletterQuill card) {
super(card);
}
@Override
public BloodletterQuill copy() {
return new BloodletterQuill(this);
}
}
/*
* 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.b;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.PutCountersSourceCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.common.CountersSourceCount;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
import mage.abilities.effects.common.counter.RemoveCounterSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.counters.Counter;
/**
*
* @author LevelX2
*/
public class BloodletterQuill extends CardImpl {
public BloodletterQuill(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
Counter bloodCounter = new Counter("blood");
// {2}, {T}, Put a blood counter on Bloodletter Quill: Draw a card, then lose 1 life for each blood counter on Bloodletter Quill.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(2));
ability.addEffect(new LoseLifeSourceControllerEffect(new CountersSourceCount(bloodCounter.getName()))
.setText(", then lose 1 life for each blood counter on {this}"));
ability.addCost(new TapSourceCost());
ability.addCost(new PutCountersSourceCost(bloodCounter));
this.addAbility(ability);
// {U}{B}: Remove a blood counter from Bloodletter Quill.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
new RemoveCounterSourceEffect(bloodCounter), new ManaCostsImpl("{U}{B}")));
}
public BloodletterQuill(final BloodletterQuill card) {
super(card);
}
@Override
public BloodletterQuill copy() {
return new BloodletterQuill(this);
}
}

View file

@ -113,7 +113,7 @@ class BludgeonBrawlAddSubtypeEffect extends ContinuousEffectImpl {
List<Permanent> permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game);
for (Permanent permanent : permanents) {
if (permanent != null) {
permanent.getSubtype(game).add("Equipment");
permanent.getSubtype(game).add(SubType.EQUIPMENT);
affectedPermanents.add(permanent.getId());
}
}

View file

@ -1,66 +1,66 @@
/*
* 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.b;
import java.util.UUID;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetControllerEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.counters.CounterType;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author ciaccona007
*/
public class BlurOfBlades extends CardImpl {
public BlurOfBlades(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}");
// Put a -1/-1 counter on target creature. Blur of Blades deals 2 damage to that creature's controller.
getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.M1M1.createInstance(1)));
Effect effect = new DamageTargetControllerEffect(2);
effect.setText("{this} deals 2 damage to that creature's controller");
getSpellAbility().addEffect(effect);
getSpellAbility().addTarget(new TargetCreaturePermanent());
}
public BlurOfBlades(final BlurOfBlades card) {
super(card);
}
@Override
public BlurOfBlades copy() {
return new BlurOfBlades(this);
}
}
/*
* 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.b;
import java.util.UUID;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetControllerEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.counters.CounterType;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author ciaccona007
*/
public class BlurOfBlades extends CardImpl {
public BlurOfBlades(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}");
// Put a -1/-1 counter on target creature. Blur of Blades deals 2 damage to that creature's controller.
getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.M1M1.createInstance(1)));
Effect effect = new DamageTargetControllerEffect(2);
effect.setText("{this} deals 2 damage to that creature's controller");
getSpellAbility().addEffect(effect);
getSpellAbility().addTarget(new TargetCreaturePermanent());
}
public BlurOfBlades(final BlurOfBlades card) {
super(card);
}
@Override
public BlurOfBlades copy() {
return new BlurOfBlades(this);
}
}

View file

@ -1,128 +1,128 @@
/*
* 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.b;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.players.Player;
/**
*
* @author jeffwadsworth
*/
public class BreathstealersCrypt extends CardImpl {
public BreathstealersCrypt(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{B}");
// If a player would draw a card, instead he or she draws a card and reveals it. If it's a creature card, that player discards it unless he or she pays 3 life.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BreathstealersCryptEffect()));
}
public BreathstealersCrypt(final BreathstealersCrypt card) {
super(card);
}
@Override
public BreathstealersCrypt copy() {
return new BreathstealersCrypt(this);
}
}
class BreathstealersCryptEffect extends ReplacementEffectImpl {
public BreathstealersCryptEffect() {
super(Duration.WhileOnBattlefield, Outcome.LoseLife);
staticText = "If a player would draw a card, instead he or she draws a card and reveals it. If it's a creature card, that player discards it unless he or she pays 3 life";
}
public BreathstealersCryptEffect(final BreathstealersCryptEffect effect) {
super(effect);
}
@Override
public BreathstealersCryptEffect copy() {
return new BreathstealersCryptEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
return true;
}
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player player = game.getPlayer(event.getPlayerId());
PayLifeCost cost = new PayLifeCost(3);
if (player != null) {
Card cardDrawn = player.getLibrary().removeFromTop(game);
if (cardDrawn != null) {
player.moveCardToHandWithInfo(cardDrawn, source.getSourceId(), game);
Cards cards = new CardsImpl();
cards.add(cardDrawn);
player.revealCards("The card drawn from " + player.getName() + "'s library", cards, game);
if (cardDrawn.isCreature()) {
game.informPlayers("The card drawn by " + player.getName() + " is a creature card. He/she must pay 3 life or that card gets discarded.");
if (cost.canPay(source, source.getSourceId(), player.getId(), game)
&& player.chooseUse(outcome, "Do you wish to pay 3 life to keep the drawn creature card? If not, you discard it.", source, game)) {
return cost.pay(source, game, source.getSourceId(), player.getId(), true, cost);
} else {
game.informPlayers("The cost of 3 life was not paid by " + player.getName() + ", so the creature card will be discarded.");
return player.discard(cardDrawn, source, game);
}
}
}
}
return false;
}
@Override
public boolean checksEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.DRAW_CARD;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
return true;
}
}
/*
* 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.b;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.players.Player;
/**
*
* @author jeffwadsworth
*/
public class BreathstealersCrypt extends CardImpl {
public BreathstealersCrypt(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{B}");
// If a player would draw a card, instead he or she draws a card and reveals it. If it's a creature card, that player discards it unless he or she pays 3 life.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BreathstealersCryptEffect()));
}
public BreathstealersCrypt(final BreathstealersCrypt card) {
super(card);
}
@Override
public BreathstealersCrypt copy() {
return new BreathstealersCrypt(this);
}
}
class BreathstealersCryptEffect extends ReplacementEffectImpl {
public BreathstealersCryptEffect() {
super(Duration.WhileOnBattlefield, Outcome.LoseLife);
staticText = "If a player would draw a card, instead he or she draws a card and reveals it. If it's a creature card, that player discards it unless he or she pays 3 life";
}
public BreathstealersCryptEffect(final BreathstealersCryptEffect effect) {
super(effect);
}
@Override
public BreathstealersCryptEffect copy() {
return new BreathstealersCryptEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
return true;
}
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player player = game.getPlayer(event.getPlayerId());
PayLifeCost cost = new PayLifeCost(3);
if (player != null) {
Card cardDrawn = player.getLibrary().removeFromTop(game);
if (cardDrawn != null) {
player.moveCardToHandWithInfo(cardDrawn, source.getSourceId(), game);
Cards cards = new CardsImpl();
cards.add(cardDrawn);
player.revealCards("The card drawn from " + player.getName() + "'s library", cards, game);
if (cardDrawn.isCreature()) {
game.informPlayers("The card drawn by " + player.getName() + " is a creature card. He/she must pay 3 life or that card gets discarded.");
if (cost.canPay(source, source.getSourceId(), player.getId(), game)
&& player.chooseUse(outcome, "Do you wish to pay 3 life to keep the drawn creature card? If not, you discard it.", source, game)) {
return cost.pay(source, game, source.getSourceId(), player.getId(), true, cost);
} else {
game.informPlayers("The cost of 3 life was not paid by " + player.getName() + ", so the creature card will be discarded.");
return player.discard(cardDrawn, source, game);
}
}
}
}
return false;
}
@Override
public boolean checksEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.DRAW_CARD;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
return true;
}
}

View file

@ -88,7 +88,7 @@ enum BriarbridgePatrolCondition implements Condition {
if (sacrificedPermanents != null && !sacrificedPermanents.isEmpty()) {
int amountOfClues = 0;
for (Permanent permanent : sacrificedPermanents) {
if (permanent.getSubtype(game).contains("Clue")) {
if (permanent.getSubtype(game).contains(SubType.CLUE)) {
amountOfClues++;
}
}

View file

@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.target.common.TargetCreaturePermanent;
import mage.target.common.TargetOpponent;
@ -48,8 +49,8 @@ public class BurningSunsAvatar extends CardImpl {
public BurningSunsAvatar(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}{R}");
this.subtype.add("Dinosaur");
this.subtype.add("Avatar");
this.subtype.add(SubType.DINOSAUR);
this.subtype.add(SubType.AVATAR);
this.power = new MageInt(6);
this.toughness = new MageInt(6);

View file

@ -38,6 +38,7 @@ import mage.abilities.keyword.RepairAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
/**
@ -49,7 +50,7 @@ public class C3POAndR2D2 extends CardImpl {
public C3POAndR2D2(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}{W}{U}");
addSuperType(SuperType.LEGENDARY);
this.subtype.add("Droid");
this.subtype.add(SubType.DROID);
this.power = new MageInt(2);
this.toughness = new MageInt(2);

View file

@ -60,8 +60,8 @@ public class CabalArchon extends CardImpl {
public CabalArchon(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}");
this.subtype.add("Human");
this.subtype.add("Cleric");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.CLERIC);
this.power = new MageInt(2);
this.toughness = new MageInt(2);

View file

@ -37,6 +37,7 @@ import mage.abilities.keyword.MorphAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.game.Game;
@ -53,8 +54,8 @@ public class CabalExecutioner extends CardImpl {
public CabalExecutioner(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}");
this.subtype.add("Human");
this.subtype.add("Cleric");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.CLERIC);
this.power = new MageInt(2);
this.toughness = new MageInt(2);

View file

@ -57,8 +57,8 @@ public class CabalInquisitor extends CardImpl {
public CabalInquisitor(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}");
this.subtype.add("Human");
this.subtype.add("Minion");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.MINION);
this.power = new MageInt(1);
this.toughness = new MageInt(1);

View file

@ -38,6 +38,7 @@ import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.OneShotEffect;
import mage.cards.*;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.FilterCard;
@ -55,8 +56,8 @@ public class CabalInterrogator extends CardImpl {
public CabalInterrogator(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
this.subtype.add("Zombie");
this.subtype.add("Wizard");
this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(1);
this.toughness = new MageInt(1);

View file

@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.SuperType;
import mage.constants.Zone;
@ -56,8 +57,8 @@ public class CabalPatriarch extends CardImpl {
public CabalPatriarch(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{B}");
addSuperType(SuperType.LEGENDARY);
this.subtype.add("Human");
this.subtype.add("Wizard");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(5);
this.toughness = new MageInt(5);

View file

@ -53,8 +53,8 @@ public class CabalSlaver extends CardImpl {
public CabalSlaver(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}");
this.subtype.add("Human");
this.subtype.add("Cleric");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.CLERIC);
this.power = new MageInt(2);
this.toughness = new MageInt(1);

View file

@ -38,6 +38,7 @@ import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
@ -53,8 +54,8 @@ public class CabalSurgeon extends CardImpl {
public CabalSurgeon(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}");
this.subtype.add("Human");
this.subtype.add("Minion");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.MINION);
this.power = new MageInt(2);
this.toughness = new MageInt(1);

View file

@ -40,6 +40,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.target.common.TargetCreaturePermanent;
@ -52,8 +53,8 @@ public class CabalTorturer extends CardImpl {
public CabalTorturer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}");
this.subtype.add("Human");
this.subtype.add("Minion");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.MINION);
this.power = new MageInt(1);
this.toughness = new MageInt(1);

View file

@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.target.common.TargetCreaturePermanent;
@ -48,8 +49,8 @@ public class CabalTrainee extends CardImpl {
public CabalTrainee(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}");
this.subtype.add("Human");
this.subtype.add("Minion");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.MINION);
this.power = new MageInt(1);
this.toughness = new MageInt(1);

View file

@ -34,6 +34,7 @@ import mage.abilities.effects.common.ReturnToHandChosenControlledPermanentEffect
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.filter.common.FilterControlledPermanent;
@ -45,8 +46,8 @@ public class CacheRaiders extends CardImpl {
public CacheRaiders(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}");
this.subtype.add("Merfolk");
this.subtype.add("Rogue");
this.subtype.add(SubType.MERFOLK);
this.subtype.add(SubType.ROGUE);
this.power = new MageInt(4);
this.toughness = new MageInt(4);

View file

@ -35,6 +35,7 @@ import mage.abilities.effects.common.discard.DiscardEachPlayerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController;
/**
@ -45,7 +46,7 @@ public class CacklingFiend extends CardImpl {
public CacklingFiend(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}");
this.subtype.add("Zombie");
this.subtype.add(SubType.ZOMBIE);
this.power = new MageInt(2);
this.toughness = new MageInt(1);

View file

@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.target.TargetPlayer;
@ -48,7 +49,7 @@ public class CacklingImp extends CardImpl {
public CacklingImp(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}");
this.subtype.add("Imp");
this.subtype.add(SubType.IMP);
this.power = new MageInt(2);
this.toughness = new MageInt(2);

View file

@ -40,6 +40,7 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.target.common.TargetCreaturePermanent;
@ -52,8 +53,8 @@ public class CacklingWitch extends CardImpl {
public CacklingWitch(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}");
this.subtype.add("Human");
this.subtype.add("Spellshaper");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SPELLSHAPER);
this.power = new MageInt(1);
this.toughness = new MageInt(1);

View file

@ -36,6 +36,7 @@ import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreatureCard;
import mage.target.common.TargetCardInYourGraveyard;
@ -47,7 +48,7 @@ public class CadaverImp extends CardImpl {
public CadaverImp(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}");
this.subtype.add("Imp");
this.subtype.add(SubType.IMP);
this.power = new MageInt(1);
this.toughness = new MageInt(1);

View file

@ -36,6 +36,7 @@ import mage.abilities.keyword.FlankingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
/**
@ -46,8 +47,8 @@ public class CadaverousKnight extends CardImpl {
public CadaverousKnight(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}");
this.subtype.add("Zombie");
this.subtype.add("Knight");
this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.KNIGHT);
this.power = new MageInt(2);
this.toughness = new MageInt(2);

View file

@ -40,6 +40,7 @@ import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
@ -56,7 +57,7 @@ public class CageOfHands extends CardImpl {
public CageOfHands (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}");
this.subtype.add("Aura");
this.subtype.add(SubType.AURA);
// Enchant creature

View file

@ -50,7 +50,7 @@ public class Cagemail extends CardImpl {
public Cagemail(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
this.subtype.add("Aura");
this.subtype.add(SubType.AURA);
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();

View file

@ -51,7 +51,7 @@ public class CairnWanderer extends CardImpl {
public CairnWanderer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}");
this.subtype.add("Shapeshifter");
this.subtype.add(SubType.SHAPESHIFTER);
this.power = new MageInt(4);
this.toughness = new MageInt(4);

View file

@ -38,6 +38,7 @@ import mage.abilities.keyword.VanishingUpkeepAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType;
/**
@ -48,7 +49,7 @@ public class Calciderm extends CardImpl {
public Calciderm(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}");
this.subtype.add("Beast");
this.subtype.add(SubType.BEAST);
this.power = new MageInt(5);
this.toughness = new MageInt(5);

View file

@ -35,6 +35,7 @@ import mage.abilities.keyword.ShroudAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
/**
@ -45,7 +46,7 @@ public class CalciteSnapper extends CardImpl {
public CalciteSnapper(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}");
this.subtype.add("Turtle");
this.subtype.add(SubType.TURTLE);
this.power = new MageInt(1);
this.toughness = new MageInt(4);

View file

@ -36,6 +36,7 @@ import mage.abilities.keyword.DevourAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent;
/**
@ -46,7 +47,7 @@ public class CalderaHellion extends CardImpl {
public CalderaHellion(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}");
this.subtype.add("Hellion");
this.subtype.add(SubType.HELLION);
this.power = new MageInt(3);
this.toughness = new MageInt(3);

View file

@ -36,6 +36,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
@ -48,7 +49,7 @@ public class CalderaKavu extends CardImpl {
public CalderaKavu(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}");
this.subtype.add("Kavu");
this.subtype.add(SubType.KAVU);
this.power = new MageInt(2);
this.toughness = new MageInt(2);

View file

@ -37,6 +37,7 @@ import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.game.Game;
@ -52,7 +53,7 @@ public class CallForBlood extends CardImpl {
public CallForBlood(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{B}");
this.subtype.add("Arcane");
this.subtype.add(SubType.ARCANE);
// As an additional cost to cast Call for Blood, sacrifice a creature.

View file

@ -56,7 +56,7 @@ public class CallOfTheFullMoon extends CardImpl {
public CallOfTheFullMoon(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}");
this.subtype.add("Aura");
this.subtype.add(SubType.AURA);
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();

View file

@ -61,7 +61,7 @@ public class CallToServe extends CardImpl {
public CallToServe(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}");
this.subtype.add("Aura");
this.subtype.add(SubType.AURA);
// Enchant nonblack creature
TargetPermanent auraTarget = new TargetCreaturePermanent(filter);

View file

@ -63,7 +63,7 @@ public class CallToTheKindred extends CardImpl {
public CallToTheKindred(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}");
this.subtype.add("Aura");
this.subtype.add(SubType.AURA);
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();

View file

@ -39,6 +39,7 @@ import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.target.common.TargetCreaturePermanent;
@ -51,8 +52,8 @@ public class CallerOfGales extends CardImpl {
public CallerOfGales (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}");
this.subtype.add("Merfolk");
this.subtype.add("Wizard");
this.subtype.add(SubType.MERFOLK);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(1);
this.toughness = new MageInt(1);

View file

@ -38,6 +38,7 @@ import mage.abilities.keyword.FlashAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.WatcherScope;
import mage.constants.Zone;
import mage.game.Game;
@ -56,7 +57,7 @@ public class CallerOfTheClaw extends CardImpl {
public CallerOfTheClaw(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}");
this.subtype.add("Elf");
this.subtype.add(SubType.ELF);
this.color.setGreen(true);
this.power = new MageInt(2);

View file

@ -1,152 +1,152 @@
/*
* 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.c;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.SetPowerSourceEffect;
import mage.abilities.effects.common.continuous.SetToughnessSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.choices.Choice;
import mage.choices.ChoiceCreatureType;
import mage.constants.*;
import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.ChosenSubtypePredicate;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
/**
*
* @author jeffwadsworth
*/
public class CallerOfTheHunt extends CardImpl {
public CallerOfTheHunt(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
this.subtype.add("Human");
// As an additional cost to cast Caller of the Hunt, choose a creature type.
// Caller of the Hunt's power and toughness are each equal to the number of creatures of the chosen type on the battlefield.
this.addAbility(new SimpleStaticAbility(Zone.ALL, new CallerOfTheHuntAdditionalCostEffect()));
}
public CallerOfTheHunt(final CallerOfTheHunt card) {
super(card);
}
@Override
public void adjustCosts(Ability ability, Game game) {
MageObject mageObject = game.getObject(ability.getSourceId());
Effect effect = new ChooseCreatureTypeEffect(Outcome.Benefit);
if (mageObject != null
&& effect.apply(game, ability)) {
FilterPermanent filter = new FilterPermanent();
filter.add(new ChosenSubtypePredicate(mageObject.getId()));
ContinuousEffect effectPower = new SetPowerSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.Custom);
ContinuousEffect effectToughness = new SetToughnessSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.Custom);
game.addEffect(effectPower, ability);
game.addEffect(effectToughness, ability);
}
}
@Override
public CallerOfTheHunt copy() {
return new CallerOfTheHunt(this);
}
}
class CallerOfTheHuntAdditionalCostEffect extends OneShotEffect {
public CallerOfTheHuntAdditionalCostEffect() {
super(Outcome.Benefit);
this.staticText = "As an additional cost to cast {this}, choose a creature type. \r"
+ "{this}'s power and toughness are each equal to the number of creatures of the chosen type on the battlefield";
}
public CallerOfTheHuntAdditionalCostEffect(final CallerOfTheHuntAdditionalCostEffect effect) {
super(effect);
}
@Override
public CallerOfTheHuntAdditionalCostEffect copy() {
return new CallerOfTheHuntAdditionalCostEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
return true;
}
}
class ChooseCreatureTypeEffect extends OneShotEffect { // code by LevelX2, but that other version is not compatible with this card
public ChooseCreatureTypeEffect(Outcome outcome) {
super(outcome);
staticText = "choose a creature type";
}
public ChooseCreatureTypeEffect(final ChooseCreatureTypeEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
MageObject mageObject = game.getObject(source.getSourceId());
if (controller != null && mageObject != null) {
Choice typeChoice = new ChoiceCreatureType();
while (!controller.choose(outcome, typeChoice, game)) {
if (!controller.canRespond()) {
return false;
}
}
if (!game.isSimulation()) {
game.informPlayers(mageObject.getName() + ": " + controller.getLogName() + " has chosen " + typeChoice.getChoice());
}
game.getState().setValue(mageObject.getId() + "_type", SubType.byDescription(typeChoice.getChoice()));
return true;
}
return false;
}
@Override
public ChooseCreatureTypeEffect copy() {
return new ChooseCreatureTypeEffect(this);
}
}
/*
* 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.c;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.SetPowerSourceEffect;
import mage.abilities.effects.common.continuous.SetToughnessSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.choices.Choice;
import mage.choices.ChoiceCreatureType;
import mage.constants.*;
import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.ChosenSubtypePredicate;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
/**
*
* @author jeffwadsworth
*/
public class CallerOfTheHunt extends CardImpl {
public CallerOfTheHunt(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
this.subtype.add(SubType.HUMAN);
// As an additional cost to cast Caller of the Hunt, choose a creature type.
// Caller of the Hunt's power and toughness are each equal to the number of creatures of the chosen type on the battlefield.
this.addAbility(new SimpleStaticAbility(Zone.ALL, new CallerOfTheHuntAdditionalCostEffect()));
}
public CallerOfTheHunt(final CallerOfTheHunt card) {
super(card);
}
@Override
public void adjustCosts(Ability ability, Game game) {
MageObject mageObject = game.getObject(ability.getSourceId());
Effect effect = new ChooseCreatureTypeEffect(Outcome.Benefit);
if (mageObject != null
&& effect.apply(game, ability)) {
FilterPermanent filter = new FilterPermanent();
filter.add(new ChosenSubtypePredicate(mageObject.getId()));
ContinuousEffect effectPower = new SetPowerSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.Custom);
ContinuousEffect effectToughness = new SetToughnessSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.Custom);
game.addEffect(effectPower, ability);
game.addEffect(effectToughness, ability);
}
}
@Override
public CallerOfTheHunt copy() {
return new CallerOfTheHunt(this);
}
}
class CallerOfTheHuntAdditionalCostEffect extends OneShotEffect {
public CallerOfTheHuntAdditionalCostEffect() {
super(Outcome.Benefit);
this.staticText = "As an additional cost to cast {this}, choose a creature type. \r"
+ "{this}'s power and toughness are each equal to the number of creatures of the chosen type on the battlefield";
}
public CallerOfTheHuntAdditionalCostEffect(final CallerOfTheHuntAdditionalCostEffect effect) {
super(effect);
}
@Override
public CallerOfTheHuntAdditionalCostEffect copy() {
return new CallerOfTheHuntAdditionalCostEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
return true;
}
}
class ChooseCreatureTypeEffect extends OneShotEffect { // code by LevelX2, but that other version is not compatible with this card
public ChooseCreatureTypeEffect(Outcome outcome) {
super(outcome);
staticText = "choose a creature type";
}
public ChooseCreatureTypeEffect(final ChooseCreatureTypeEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
MageObject mageObject = game.getObject(source.getSourceId());
if (controller != null && mageObject != null) {
Choice typeChoice = new ChoiceCreatureType();
while (!controller.choose(outcome, typeChoice, game)) {
if (!controller.canRespond()) {
return false;
}
}
if (!game.isSimulation()) {
game.informPlayers(mageObject.getName() + ": " + controller.getLogName() + " has chosen " + typeChoice.getChoice());
}
game.getState().setValue(mageObject.getId() + "_type", SubType.byDescription(typeChoice.getChoice()));
return true;
}
return false;
}
@Override
public ChooseCreatureTypeEffect copy() {
return new ChooseCreatureTypeEffect(this);
}
}

View file

@ -34,6 +34,7 @@ import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
/**
*
@ -43,7 +44,7 @@ public class CallerOfThePack extends CardImpl {
public CallerOfThePack(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}");
this.subtype.add("Beast");
this.subtype.add(SubType.BEAST);
this.power = new MageInt(8);
this.toughness = new MageInt(6);

View file

@ -42,6 +42,7 @@ import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.*;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
@ -56,7 +57,7 @@ public class CallousDeceiver extends CardImpl {
public CallousDeceiver(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}");
this.subtype.add("Spirit");
this.subtype.add(SubType.SPIRIT);
this.power = new MageInt(1);
this.toughness = new MageInt(3);

View file

@ -35,6 +35,7 @@ import mage.abilities.effects.PreventionEffectImpl;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.game.Game;
@ -49,7 +50,7 @@ public class CallousGiant extends CardImpl {
public CallousGiant(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}");
this.subtype.add("Giant");
this.subtype.add(SubType.GIANT);
this.power = new MageInt(4);
this.toughness = new MageInt(4);

View file

@ -43,6 +43,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.counters.CounterType;
@ -59,8 +60,8 @@ public class CallowJushi extends CardImpl {
public CallowJushi(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}");
this.subtype.add("Human");
this.subtype.add("Wizard");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
@ -94,7 +95,7 @@ class JarakuTheInterloper extends Token {
addSuperType(SuperType.LEGENDARY);
cardType.add(CardType.CREATURE);
color.setBlue(true);
subtype.add("Spirit");
subtype.add(SubType.SPIRIT);
power = new MageInt(3);
toughness = new MageInt(4);

View file

@ -37,6 +37,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.ColoredManaSymbol;
import mage.constants.Zone;
@ -48,7 +49,7 @@ public class CalmingLicid extends CardImpl {
public CalmingLicid(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}");
this.subtype.add("Licid");
this.subtype.add(SubType.LICID);
this.power = new MageInt(2);
this.toughness = new MageInt(2);

View file

@ -38,6 +38,7 @@ import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.game.Game;
@ -54,8 +55,8 @@ public class CanalCourier extends CardImpl {
public CanalCourier(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}");
this.subtype.add("Human");
this.subtype.add("Rogue");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.ROGUE);
this.power = new MageInt(3);
this.toughness = new MageInt(5);

View file

@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
@ -53,8 +54,8 @@ public class CankerAbomination extends CardImpl {
public CankerAbomination(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B/G}{B/G}");
this.subtype.add("Treefolk");
this.subtype.add("Horror");
this.subtype.add(SubType.TREEFOLK);
this.subtype.add(SubType.HORROR);
this.power = new MageInt(6);
this.toughness = new MageInt(6);

View file

@ -55,7 +55,7 @@ public class CanopyCover extends CardImpl {
public CanopyCover(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
this.subtype.add("Aura");
this.subtype.add(SubType.AURA);
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();

View file

@ -39,6 +39,7 @@ import mage.abilities.keyword.AmplifyAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.counters.CounterType;
@ -52,7 +53,7 @@ public class CanopyCrawler extends CardImpl {
public CanopyCrawler(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}");
this.subtype.add("Beast");
this.subtype.add(SubType.BEAST);
this.power = new MageInt(2);
this.toughness = new MageInt(2);

View file

@ -40,6 +40,7 @@ import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
@ -51,7 +52,7 @@ public class CanopyDragon extends CardImpl {
public CanopyDragon(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}");
this.subtype.add("Dragon");
this.subtype.add(SubType.DRAGON);
this.power = new MageInt(4);
this.toughness = new MageInt(4);

View file

@ -32,6 +32,7 @@ import mage.MageInt;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
/**
*
@ -41,7 +42,7 @@ public class CanopyGorger extends CardImpl {
public CanopyGorger(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}");
this.subtype.add("Wurm");
this.subtype.add(SubType.WURM);
this.power = new MageInt(6);
this.toughness = new MageInt(5);
}

View file

@ -33,6 +33,7 @@ import mage.abilities.keyword.ReachAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
/**
*
@ -42,7 +43,7 @@ public class CanopySpider extends CardImpl {
public CanopySpider(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}");
this.subtype.add("Spider");
this.subtype.add(SubType.SPIDER);
this.power = new MageInt(1);
this.toughness = new MageInt(3);

View file

@ -39,6 +39,7 @@ import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.ComparisonType;
import mage.constants.SuperType;
import mage.filter.common.FilterLandPermanent;
@ -57,8 +58,8 @@ public class CanopyVista extends CardImpl {
public CanopyVista(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.subtype.add("Forest");
this.subtype.add("Plains");
this.subtype.add(SubType.FOREST);
this.subtype.add(SubType.PLAINS);
// Canopy Vista enters the battlefield tapped unless you control two or more basic lands.
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1));

View file

@ -37,6 +37,7 @@ import mage.abilities.effects.common.TapTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
@ -57,7 +58,7 @@ public class CantinaBand extends CardImpl {
public CantinaBand(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}");
this.subtype.add("Bith");
this.subtype.add(SubType.BITH);
this.power = new MageInt(0);
this.toughness = new MageInt(1);

View file

@ -37,6 +37,7 @@ import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.filter.FilterCard;
@ -56,7 +57,7 @@ public class Cantivore extends CardImpl {
public Cantivore(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}");
this.subtype.add("Lhurgoyf");
this.subtype.add(SubType.LHURGOYF);
this.power = new MageInt(0);
this.toughness = new MageInt(0);

View file

@ -38,6 +38,7 @@ import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
@ -49,7 +50,7 @@ public class CanyonDrake extends CardImpl {
public CanyonDrake(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}");
this.subtype.add("Drake");
this.subtype.add(SubType.DRAKE);
this.power = new MageInt(1);
this.toughness = new MageInt(2);

View file

@ -34,6 +34,7 @@ import mage.abilities.keyword.MorphAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
/**
*
@ -43,8 +44,8 @@ public class CanyonLurkers extends CardImpl {
public CanyonLurkers(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}");
this.subtype.add("Human");
this.subtype.add("Rogue");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.ROGUE);
this.power = new MageInt(5);
this.toughness = new MageInt(2);

View file

@ -33,6 +33,7 @@ import mage.MageInt;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
/**
@ -44,8 +45,8 @@ public class CanyonMinotaur extends CardImpl {
public CanyonMinotaur(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}");
this.subtype.add("Minotaur");
this.subtype.add("Warrior");
this.subtype.add(SubType.MINOTAUR);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
}

View file

@ -36,6 +36,7 @@ import mage.abilities.mana.RedManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
/**
*
@ -46,8 +47,8 @@ public class CanyonSlough extends CardImpl {
public CanyonSlough(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.subtype.add("Swamp");
this.subtype.add("Mountain");
this.subtype.add(SubType.SWAMP);
this.subtype.add(SubType.MOUNTAIN);
// <i>({T}: Add {B} or {R} to your mana pool.)</i>
this.addAbility(new BlackManaAbility());

View file

@ -33,6 +33,7 @@ import mage.abilities.keyword.MountainwalkAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
/**
*
@ -42,7 +43,7 @@ public class CanyonWildcat extends CardImpl {
public CanyonWildcat(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}");
this.subtype.add("Cat");
this.subtype.add(SubType.CAT);
this.power = new MageInt(2);
this.toughness = new MageInt(1);

View file

@ -37,6 +37,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.target.common.TargetOpponent;
@ -50,8 +51,8 @@ public class CaoCaoLordOfWei extends CardImpl {
public CaoCaoLordOfWei(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}");
addSuperType(SuperType.LEGENDARY);
this.subtype.add("Human");
this.subtype.add("Soldier");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(3);
this.toughness = new MageInt(3);

View file

@ -35,6 +35,7 @@ import mage.abilities.keyword.HorsemanshipAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
/**
@ -46,9 +47,9 @@ public class CaoRenWeiCommander extends CardImpl {
public CaoRenWeiCommander(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}");
addSuperType(SuperType.LEGENDARY);
this.subtype.add("Human");
this.subtype.add("Soldier");
this.subtype.add("Warrior");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SOLDIER);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(3);
this.toughness = new MageInt(3);

View file

@ -36,6 +36,7 @@ import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
@ -47,8 +48,8 @@ public class CapashenKnight extends CardImpl {
public CapashenKnight(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
this.subtype.add("Human");
this.subtype.add("Knight");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.KNIGHT);
this.power = new MageInt(1);
this.toughness = new MageInt(1);

View file

@ -40,6 +40,7 @@ import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
@ -54,7 +55,7 @@ public class CapashenStandard extends CardImpl {
public CapashenStandard(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}");
this.subtype.add("Aura");
this.subtype.add(SubType.AURA);
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();

View file

@ -35,6 +35,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
@ -46,8 +47,8 @@ public class CapashenTemplar extends CardImpl {
public CapashenTemplar(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}");
this.subtype.add("Human");
this.subtype.add("Knight");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.KNIGHT);
this.power = new MageInt(2);
this.toughness = new MageInt(2);

View file

@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
@ -51,7 +52,7 @@ public class CapashenUnicorn extends CardImpl {
public CapashenUnicorn(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
this.subtype.add("Unicorn");
this.subtype.add(SubType.UNICORN);
this.power = new MageInt(1);
this.toughness = new MageInt(2);

View file

@ -34,6 +34,7 @@ import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.constants.TargetController;
import mage.filter.common.FilterNonlandPermanent;
@ -63,7 +64,7 @@ public class CapriciousEfreet extends CardImpl {
public CapriciousEfreet(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}");
this.subtype.add("Efreet");
this.subtype.add(SubType.EFREET);
this.power = new MageInt(6);
this.toughness = new MageInt(4);

View file

@ -37,6 +37,7 @@ 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.target.common.TargetCreatureOrPlayer;
@ -48,8 +49,8 @@ public class CapriciousSorcerer extends CardImpl {
public CapriciousSorcerer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}");
this.subtype.add("Human");
this.subtype.add("Wizard");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(1);
this.toughness = new MageInt(1);

View file

@ -63,8 +63,8 @@ public class CaptainLanneryStorm extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
addSuperType(SuperType.LEGENDARY);
this.subtype.add("Human");
this.subtype.add("Pirate");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.PIRATE);
this.power = new MageInt(2);
this.toughness = new MageInt(2);

View file

@ -63,8 +63,8 @@ public class CaptainOfTheMists extends CardImpl {
public CaptainOfTheMists(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}");
this.subtype.add("Human");
this.subtype.add("Wizard");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(2);
this.toughness = new MageInt(3);

View file

@ -59,8 +59,8 @@ public class CaptainOfTheWatch extends CardImpl {
public CaptainOfTheWatch(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}");
this.subtype.add("Human");
this.subtype.add("Soldier");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(3);
this.toughness = new MageInt(3);

View file

@ -35,6 +35,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.FilterCard;
@ -56,8 +57,8 @@ public class CaptainSisay extends CardImpl {
public CaptainSisay(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{W}");
addSuperType(SuperType.LEGENDARY);
this.subtype.add("Human");
this.subtype.add("Soldier");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(2);
this.toughness = new MageInt(2);

View file

@ -37,6 +37,7 @@ import mage.abilities.keyword.EquipAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.game.permanent.token.KorAllyToken;
@ -49,7 +50,7 @@ public class CaptainsClaws extends CardImpl {
public CaptainsClaws(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}");
this.subtype.add("Equipment");
this.subtype.add(SubType.EQUIPMENT);
// Equipped creature gets +1/+0.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 0)));

View file

@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.game.Game;
@ -57,7 +58,7 @@ public class CaptivatingGlance extends CardImpl {
public CaptivatingGlance(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}");
this.subtype.add("Aura");
this.subtype.add(SubType.AURA);
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();

View file

@ -66,7 +66,7 @@ public class CaptivatingVampire extends CardImpl {
public CaptivatingVampire(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}");
this.subtype.add("Vampire");
this.subtype.add(SubType.VAMPIRE);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
@ -119,7 +119,7 @@ class CaptivatingVampireEffect extends ContinuousEffectImpl {
case TypeChangingEffects_4:
if (sublayer == SubLayer.NA) {
if (!permanent.hasSubtype(SubType.VAMPIRE, game)) {
permanent.getSubtype(game).add("Vampire");
permanent.getSubtype(game).add(SubType.VAMPIRE);
}
}
break;

View file

@ -67,7 +67,7 @@ public class CapturedByTheConsulate extends CardImpl {
public CapturedByTheConsulate(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}");
this.subtype.add("Aura");
this.subtype.add(SubType.AURA);
// Enchant creature you don't control
TargetPermanent auraTarget = new TargetCreaturePermanent(filter);

View file

@ -51,7 +51,7 @@ public class Carapace extends CardImpl {
public Carapace(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}");
this.subtype.add("Aura");
this.subtype.add(SubType.AURA);
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();

View file

@ -38,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
@ -50,8 +51,8 @@ public class CarapaceForger extends CardImpl {
public CarapaceForger (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}");
this.subtype.add("Elf");
this.subtype.add("Artificer");
this.subtype.add(SubType.ELF);
this.subtype.add(SubType.ARTIFICER);
this.power = new MageInt(2);
this.toughness = new MageInt(2);

View file

@ -38,6 +38,7 @@ import mage.abilities.keyword.LevelerCardBuilder;
import mage.cards.CardSetInfo;
import mage.cards.LevelerCard;
import mage.constants.CardType;
import mage.constants.SubType;
/**
*
@ -47,8 +48,8 @@ public class CaravanEscort extends LevelerCard {
public CaravanEscort(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}");
this.subtype.add("Human");
this.subtype.add("Knight");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.KNIGHT);
this.color.setWhite(true);
this.power = new MageInt(1);

View file

@ -34,6 +34,7 @@ import mage.abilities.keyword.LifelinkAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
/**
*
@ -43,7 +44,7 @@ public class CaravanHurda extends CardImpl {
public CaravanHurda (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}");
this.subtype.add("Giant");
this.subtype.add(SubType.GIANT);
this.power = new MageInt(1);
this.toughness = new MageInt(5);

View file

@ -39,6 +39,7 @@ import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.counters.CounterType;
@ -53,7 +54,7 @@ public class CarboniteChamber extends CardImpl {
public CarboniteChamber(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{U}");
this.subtype.add("Aura");
this.subtype.add(SubType.AURA);
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();

View file

@ -37,6 +37,7 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.ColoredManaSymbol;
import mage.constants.Duration;
import mage.constants.Zone;
@ -51,8 +52,8 @@ public class Caregiver extends CardImpl {
public Caregiver(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}");
this.subtype.add("Human");
this.subtype.add("Cleric");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.CLERIC);
this.power = new MageInt(1);
this.toughness = new MageInt(1);

View file

@ -66,7 +66,7 @@ public class CaribouRange extends CardImpl {
public CaribouRange(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}");
this.subtype.add("Aura");
this.subtype.add(SubType.AURA);
// Enchant land you control
TargetPermanent auraTarget = new TargetPermanent(new FilterControlledLandPermanent());

Some files were not shown because too many files have changed in this diff Show more