mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
Merge branch 'master' into refactor/rework-tdfcs
This commit is contained in:
commit
6db5aa75aa
682 changed files with 3712 additions and 1633 deletions
|
|
@ -7,7 +7,10 @@ import mage.util.CardUtil;
|
|||
import mage.view.CardsView;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.*;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* GUI: parameters for dialogs, uses to store useful data
|
||||
|
|
@ -102,7 +105,7 @@ public class DlgParams {
|
|||
return stringList;
|
||||
}
|
||||
|
||||
public void setStringList(ArrayList<String> stringList) {
|
||||
public void setStringList(List<String> stringList) {
|
||||
this.stringList = stringList;
|
||||
}
|
||||
|
||||
|
|
@ -118,7 +121,7 @@ public class DlgParams {
|
|||
return objectList;
|
||||
}
|
||||
|
||||
public void setObjectList(ArrayList<Object> objectList) {
|
||||
public void setObjectList(List<Object> objectList) {
|
||||
this.objectList = objectList;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1213,7 +1213,7 @@ public class HumanPlayer extends PlayerImpl {
|
|||
Zone zone = game.getState().getZone(object.getId());
|
||||
if (zone != null) {
|
||||
// look at card or try to cast/activate abilities
|
||||
LinkedHashMap<UUID, ActivatedAbility> useableAbilities = new LinkedHashMap<>();
|
||||
Map<UUID, ActivatedAbility> useableAbilities = new LinkedHashMap<>();
|
||||
|
||||
Player actingPlayer = null;
|
||||
if (playerId.equals(game.getPriorityPlayerId())) {
|
||||
|
|
@ -1559,7 +1559,7 @@ public class HumanPlayer extends PlayerImpl {
|
|||
|
||||
Zone zone = game.getState().getZone(object.getId());
|
||||
if (zone != null) {
|
||||
LinkedHashMap<UUID, ActivatedManaAbilityImpl> useableAbilities = getUseableManaAbilities(object, zone, game);
|
||||
Map<UUID, ActivatedManaAbilityImpl> useableAbilities = getUseableManaAbilities(object, zone, game);
|
||||
if (!useableAbilities.isEmpty()) {
|
||||
// Added to ensure that mana is not being autopaid for spells that care about the color of mana being paid
|
||||
// See https://github.com/magefree/mage/issues/9070
|
||||
|
|
@ -2164,7 +2164,7 @@ public class HumanPlayer extends PlayerImpl {
|
|||
return super.activateAbility(ability, game);
|
||||
}
|
||||
|
||||
protected void activateAbility(LinkedHashMap<UUID, ? extends ActivatedAbility> abilities, MageObject object, Game game) {
|
||||
protected void activateAbility(Map<UUID, ? extends ActivatedAbility> abilities, MageObject object, Game game) {
|
||||
if (gameInCheckPlayableState(game)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -2268,7 +2268,7 @@ public class HumanPlayer extends PlayerImpl {
|
|||
MageObject object = game.getObject(card.getId()); // must be object to find real abilities (example: commander)
|
||||
if (object != null) {
|
||||
String message = "Choose ability to cast" + (noMana ? " for FREE" : "") + "<br>" + object.getLogName();
|
||||
LinkedHashMap<UUID, SpellAbility> useableAbilities = PlayerImpl.getCastableSpellAbilities(game, playerId, object, game.getState().getZone(object.getId()), noMana);
|
||||
Map<UUID, SpellAbility> useableAbilities = PlayerImpl.getCastableSpellAbilities(game, playerId, object, game.getState().getZone(object.getId()), noMana);
|
||||
if (useableAbilities != null
|
||||
&& useableAbilities.size() == 1) {
|
||||
return useableAbilities.values().iterator().next();
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public class DraftController {
|
|||
private final Draft draft;
|
||||
private final UUID tableId;
|
||||
|
||||
public DraftController(ManagerFactory managerFactory, Draft draft, ConcurrentHashMap<UUID, UUID> userPlayerMap, UUID tableId) {
|
||||
public DraftController(ManagerFactory managerFactory, Draft draft, ConcurrentMap<UUID, UUID> userPlayerMap, UUID tableId) {
|
||||
this.managerFactory = managerFactory;
|
||||
draftSessionId = UUID.randomUUID();
|
||||
this.userPlayerMap = userPlayerMap;
|
||||
|
|
|
|||
|
|
@ -68,11 +68,11 @@ public final class AgathaOfTheVileCauldron extends CardImpl {
|
|||
|
||||
class AgathaOfTheVileCauldronEffect extends CostModificationEffectImpl {
|
||||
|
||||
private final static DynamicValue xValue = new SourcePermanentPowerCount(false);
|
||||
private static final DynamicValue xValue = new SourcePermanentPowerCount(false);
|
||||
|
||||
AgathaOfTheVileCauldronEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST);
|
||||
staticText = "Activated abilities of creatures you control cost X less to activate, "
|
||||
staticText = "Activated abilities of creatures you control cost {X} less to activate, "
|
||||
+ "where X is {this}'s power. "
|
||||
+ "This effect can't reduce the mana in that cost to less than one mana.";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package mage.cards.a;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
|
|
@ -100,11 +99,11 @@ enum AkimTheSoaringWindCondition implements Condition {
|
|||
|
||||
class AkimTheSoaringTokenAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public AkimTheSoaringTokenAbility() {
|
||||
AkimTheSoaringTokenAbility() {
|
||||
super(Zone.BATTLEFIELD, new CreateTokenEffect(new BirdToken(), 1), false);
|
||||
}
|
||||
|
||||
public AkimTheSoaringTokenAbility(final AkimTheSoaringTokenAbility ability) {
|
||||
private AkimTheSoaringTokenAbility(final AkimTheSoaringTokenAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
|
|
@ -124,7 +123,7 @@ class AkimTheSoaringTokenAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
|
||||
@Override
|
||||
public TriggeredAbility copy() {
|
||||
public AkimTheSoaringTokenAbility copy() {
|
||||
return new AkimTheSoaringTokenAbility(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ public final class AltarOfBhaal extends AdventureCard {
|
|||
// Bone Offering
|
||||
// Create a tapped 4/1 black Skeleton creature token with menace.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect(new SkeletonMenaceToken(), 1, true, false));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private AltarOfBhaal(final AltarOfBhaal card) {
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ public final class AmethystDragon extends AdventureCard {
|
|||
// Explosive Crystal deals 4 damage divided as you choose among any number of targets.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new DamageMultiEffect(4));
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetAnyTargetAmount(4));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private AmethystDragon(final AmethystDragon card) {
|
||||
|
|
|
|||
|
|
@ -83,8 +83,7 @@ class AmplifireEffect extends OneShotEffect {
|
|||
SetBasePowerToughnessSourceEffect setBasePowerToughnessSourceEffect = new SetBasePowerToughnessSourceEffect(
|
||||
2*lastCard.getPower().getValue(),
|
||||
2*lastCard.getToughness().getValue(),
|
||||
Duration.UntilYourNextTurn,
|
||||
SubLayer.SetPT_7b
|
||||
Duration.UntilYourNextTurn
|
||||
);
|
||||
game.addEffect(setBasePowerToughnessSourceEffect, source);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,11 +2,12 @@ package mage.cards.a;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessEffect;
|
||||
import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.game.Game;
|
||||
|
|
@ -20,10 +21,11 @@ import java.util.UUID;
|
|||
public final class AncientLumberknot extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter
|
||||
= new FilterCreaturePermanent("creature you control with toughness greater than its power");
|
||||
= new FilterCreaturePermanent("each creature you control with toughness greater than its power");
|
||||
|
||||
static {
|
||||
filter.add(AncientLumberknotPredicate.instance);
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
}
|
||||
|
||||
public AncientLumberknot(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
@ -34,7 +36,7 @@ public final class AncientLumberknot extends CardImpl {
|
|||
this.toughness = new MageInt(4);
|
||||
|
||||
// Each creature you control with toughness greater than its power assigns combat damage equal to its toughness rather than its power.
|
||||
this.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessEffect(filter, true)));
|
||||
this.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessAllEffect(filter)));
|
||||
}
|
||||
|
||||
private AncientLumberknot(final AncientLumberknot card) {
|
||||
|
|
|
|||
|
|
@ -52,6 +52,8 @@ public final class AnimatingFaerie extends AdventureCard {
|
|||
CounterType.P1P1.createInstance(4)
|
||||
).setText(" "));
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private AnimatingFaerie(final AnimatingFaerie card) {
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ class AquamorphEntityReplacementEffect extends ReplacementEffectImpl {
|
|||
toughness = 5;
|
||||
break;
|
||||
}
|
||||
game.addEffect(new SetBasePowerToughnessSourceEffect(power, toughness, Duration.WhileOnBattlefield, SubLayer.CharacteristicDefining_7a), source);
|
||||
game.addEffect(new SetBasePowerToughnessSourceEffect(power, toughness, Duration.WhileOnBattlefield), source);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,8 @@ public final class AquaticAlchemist extends AdventureCard {
|
|||
this.getSpellCard().getSpellAbility().addTarget(new TargetCardInYourGraveyard(
|
||||
StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY_FROM_YOUR_GRAVEYARD
|
||||
));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private AquaticAlchemist(final AquaticAlchemist card) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderAllEffect;
|
||||
import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessEffect;
|
||||
import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessAllEffect;
|
||||
import mage.abilities.keyword.DefenderAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
|
|
@ -24,13 +24,14 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class ArcadesTheStrategist extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter
|
||||
= new FilterControlledCreaturePermanent("a creature with defender");
|
||||
private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent();
|
||||
private static final FilterControlledCreaturePermanent defenderSingle = new FilterControlledCreaturePermanent("a creature with defender");
|
||||
private static final FilterCreaturePermanent defenderPlural = new FilterCreaturePermanent("Each creature you control with defender");
|
||||
|
||||
static {
|
||||
filter.add(new AbilityPredicate(DefenderAbility.class));
|
||||
filter2.add(new AbilityPredicate(DefenderAbility.class));
|
||||
defenderSingle.add(new AbilityPredicate(DefenderAbility.class));
|
||||
|
||||
defenderPlural.add(TargetController.YOU.getControllerPredicate());
|
||||
defenderPlural.add(new AbilityPredicate(DefenderAbility.class));
|
||||
}
|
||||
|
||||
public ArcadesTheStrategist(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
@ -50,13 +51,13 @@ public final class ArcadesTheStrategist extends CardImpl {
|
|||
|
||||
// Whenever a creature with defender enters the battlefield under your control, draw a card.
|
||||
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(
|
||||
new DrawCardSourceControllerEffect(1), filter
|
||||
new DrawCardSourceControllerEffect(1), defenderSingle
|
||||
));
|
||||
|
||||
// Each creature you control with defender assigns combat damage equal to its toughness rather than its power and can attack as though it didn't have defender.
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new CombatDamageByToughnessEffect(filter2, true).setText("Each creature you control with defender assigns combat damage equal to its toughness rather than its power"));
|
||||
Ability ability = new SimpleStaticAbility(new CombatDamageByToughnessAllEffect(defenderPlural));
|
||||
ability.addEffect(new CanAttackAsThoughItDidntHaveDefenderAllEffect(
|
||||
Duration.WhileOnBattlefield, filter
|
||||
Duration.WhileOnBattlefield, defenderSingle
|
||||
).setText("and can attack as though it didn't have defender"));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ public final class ArdenvaleTactician extends AdventureCard {
|
|||
// Tap up to two target creatures.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new TapTargetEffect());
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private ArdenvaleTactician(final ArdenvaleTactician card) {
|
||||
|
|
|
|||
|
|
@ -4,9 +4,8 @@ import mage.MageInt;
|
|||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.SetBasePowerSourceEffect;
|
||||
import mage.abilities.keyword.BoastAbility;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -88,7 +87,7 @@ class ArniBrokenbrowEffect extends OneShotEffect {
|
|||
if (controller.chooseUse(outcome, "Change base power of " + mageObject.getLogName() + " to "
|
||||
+ power + " until end of turn?", source, game
|
||||
)) {
|
||||
game.addEffect(new SetBasePowerToughnessSourceEffect(StaticValue.get(power), null, Duration.EndOfTurn, SubLayer.SetPT_7b), source);
|
||||
game.addEffect(new SetBasePowerSourceEffect(power, Duration.EndOfTurn), source);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -39,8 +39,7 @@ public final class AscendantSpirit extends CardImpl {
|
|||
ability.addEffect(new SetBasePowerToughnessSourceEffect(
|
||||
2,
|
||||
3,
|
||||
Duration.WhileOnBattlefield,
|
||||
SubLayer.SetPT_7b
|
||||
Duration.Custom
|
||||
).setText("with base power and toughness 2/3"));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
@ -93,7 +92,7 @@ class AscendantSpiritWarriorEffect extends OneShotEffect {
|
|||
Duration.Custom, SubType.SPIRIT, SubType.WARRIOR, SubType.ANGEL
|
||||
), source);
|
||||
game.addEffect(new SetBasePowerToughnessSourceEffect(
|
||||
4, 4, Duration.Custom, SubLayer.SetPT_7b
|
||||
4, 4, Duration.Custom
|
||||
), source);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
120
Mage.Sets/src/mage/cards/a/AshiokWickedManipulator.java
Normal file
120
Mage.Sets/src/mage/cards/a/AshiokWickedManipulator.java
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.TotalCardsExiledOwnedManaValue;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.ExileCardsFromTopOfLibraryTargetEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.token.AshiokWickedManipulatorNightmareToken;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.watchers.common.CardsExiledThisTurnWatcher;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class AshiokWickedManipulator extends CardImpl {
|
||||
|
||||
public AshiokWickedManipulator(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{B}{B}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.ASHIOK);
|
||||
this.setStartingLoyalty(5);
|
||||
|
||||
// If you would pay life while your library has at least that many cards in it, exile that many cards from the top of your library instead.
|
||||
this.addAbility(new SimpleStaticAbility(new AshiokWickedManipulatorReplacementEffect()));
|
||||
|
||||
// +1: Look at the top two cards of your library. Exile one of them and put the other into your hand.
|
||||
this.addAbility(new LoyaltyAbility(
|
||||
new LookLibraryAndPickControllerEffect(2, 1, PutCards.EXILED, PutCards.HAND)
|
||||
.setText("look at the top two cards of your library. Exile one of them and put the other into your hand"),
|
||||
1
|
||||
));
|
||||
|
||||
// -2: Create two 1/1 black Nightmare creature tokens with "At the beginning of combat on your turn, if a card was put into exile this turn, put a +1/+1 counter on this creature."
|
||||
this.addAbility(new LoyaltyAbility(
|
||||
new CreateTokenEffect(new AshiokWickedManipulatorNightmareToken(), 2),
|
||||
-2
|
||||
), new CardsExiledThisTurnWatcher());
|
||||
|
||||
// -7: Target player exiles the top X cards of their library, where X is the total mana value of cards you own in exile.
|
||||
Ability ability = new LoyaltyAbility(
|
||||
new ExileCardsFromTopOfLibraryTargetEffect(TotalCardsExiledOwnedManaValue.instance)
|
||||
.setText("target player exiles the top X cards of their library, "
|
||||
+ "where X is the total mana value of cards you own in exile"),
|
||||
-7
|
||||
);
|
||||
ability.addTarget(new TargetPlayer());
|
||||
ability.addHint(TotalCardsExiledOwnedManaValue.getHint());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private AshiokWickedManipulator(final AshiokWickedManipulator card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AshiokWickedManipulator copy() {
|
||||
return new AshiokWickedManipulator(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AshiokWickedManipulatorReplacementEffect extends ReplacementEffectImpl {
|
||||
|
||||
AshiokWickedManipulatorReplacementEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "If you would pay life while your library has at least that many cards in it, "
|
||||
+ "exile that many cards from the top of your library instead.";
|
||||
}
|
||||
|
||||
private AshiokWickedManipulatorReplacementEffect(final AshiokWickedManipulatorReplacementEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AshiokWickedManipulatorReplacementEffect copy() {
|
||||
return new AshiokWickedManipulatorReplacementEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Set<Card> cards = player.getLibrary().getTopCards(game, event.getAmount());
|
||||
player.moveCardsToExile(cards, source, game, false, null, "");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.PAY_LIFE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
UUID playerId = source.getControllerId();
|
||||
if (!event.getPlayerId().equals(playerId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Player player = game.getPlayer(playerId);
|
||||
return player != null && player.getLibrary().size() >= event.getAmount();
|
||||
}
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessEffect;
|
||||
import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessAllEffect;
|
||||
import mage.abilities.keyword.DefenderAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -36,7 +36,7 @@ public final class AssaultFormation extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
|
||||
|
||||
// Each creature you control assigns combat damage equal to its toughness rather than its power.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CombatDamageByToughnessEffect(StaticFilters.FILTER_PERMANENT_CREATURE, true)));
|
||||
this.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessAllEffect(StaticFilters.FILTER_CONTROLLED_CREATURE_EACH)));
|
||||
|
||||
// {G}: Target creature with defender can attack this turn as though it didn't have defender.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CanAttackAsThoughItDidntHaveDefenderTargetEffect(Duration.EndOfTurn), new ManaCostsImpl<>("{G}"));
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import mage.abilities.decorator.ConditionalContinuousEffect;
|
|||
import mage.abilities.dynamicvalue.common.CardsInControllerHandCount;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessEffect;
|
||||
import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -35,19 +35,19 @@ public final class BaldinCenturyHerdmaster extends CardImpl {
|
|||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(7);
|
||||
|
||||
// Sumo Spirit—As long as it's your turn, each creature assigns combat damage equal to its toughness rather than its power.
|
||||
// As long as it's your turn, each creature assigns combat damage equal to its toughness rather than its power.
|
||||
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
|
||||
new CombatDamageByToughnessEffect(StaticFilters.FILTER_PERMANENT_CREATURE, false),
|
||||
new CombatDamageByToughnessAllEffect(StaticFilters.FILTER_PERMANENT_CREATURE),
|
||||
MyTurnCondition.instance, "as long as it's your turn, each creature " +
|
||||
"assigns combat damage equal to its toughness rather than its power"
|
||||
)).withFlavorWord("Sumo Spirit"));
|
||||
)));
|
||||
|
||||
// Hundred Hand Slap—Whenever E. Honda, Sumo Champion attacks, up to one hundred target creatures each get +0/+X until end of turn, where X is the number of cards in your hand.
|
||||
// Whenever Baldin, Century Herdmaster attacks, up to one hundred target creatures each get +0/+X until end of turn, where X is the number of cards in your hand.
|
||||
Ability ability = new AttacksTriggeredAbility(new BoostTargetEffect(
|
||||
StaticValue.get(0), CardsInControllerHandCount.instance, Duration.EndOfTurn
|
||||
).setText("up to one hundred target creatures each get +0/+X until end of turn, where X is the number of cards in your hand"));
|
||||
ability.addTarget(new TargetCreaturePermanent(0, 100));
|
||||
this.addAbility(ability.withFlavorWord("Hundred Hand Slap"));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private BaldinCenturyHerdmaster(final BaldinCenturyHerdmaster card) {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
|
@ -41,7 +40,7 @@ public final class BattlegateMimic extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Whenever you cast a spell that's both red and white, Battlegate Mimic has base power and toughness 4/2 and gains first strike until end of turn.
|
||||
SetBasePowerToughnessSourceEffect baseToughnessSourceEffect = new SetBasePowerToughnessSourceEffect(4, 2, Duration.EndOfTurn, SubLayer.SetPT_7b);
|
||||
SetBasePowerToughnessSourceEffect baseToughnessSourceEffect = new SetBasePowerToughnessSourceEffect(4, 2, Duration.EndOfTurn);
|
||||
Ability ability = SpellCastControllerTriggeredAbility.createWithRule(baseToughnessSourceEffect, filter, false, rule);
|
||||
ability.addEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, false, true));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ public final class BeanstalkGiant extends AdventureCard {
|
|||
this.getSpellCard().getSpellAbility().addEffect(
|
||||
new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND))
|
||||
);
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private BeanstalkGiant(final BeanstalkGiant card) {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ public final class BeanstalkWurm extends AdventureCard {
|
|||
// Plant Beans
|
||||
// You may play an additional land this turn.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new PlayAdditionalLandsControllerEffect(1, Duration.EndOfTurn));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private BeanstalkWurm(final BeanstalkWurm card) {
|
||||
|
|
|
|||
|
|
@ -3,14 +3,13 @@ package mage.cards.b;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessEffect;
|
||||
import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessAllEffect;
|
||||
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 java.util.UUID;
|
||||
|
||||
/**
|
||||
|
|
@ -26,7 +25,7 @@ public final class BelligerentBrontodon extends CardImpl {
|
|||
this.toughness = new MageInt(6);
|
||||
|
||||
// Each creature you control assigns combat damage equal to its toughness rather than its power.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CombatDamageByToughnessEffect(StaticFilters.FILTER_PERMANENT_CREATURE, true)));
|
||||
this.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessAllEffect(StaticFilters.FILTER_CONTROLLED_CREATURE_EACH)));
|
||||
}
|
||||
|
||||
private BelligerentBrontodon(final BelligerentBrontodon card) {
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ public final class BellowingBruiser extends AdventureCard {
|
|||
// Up to two target creatures can't block this turn.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new CantBlockTargetEffect(Duration.EndOfTurn));
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private BellowingBruiser(final BellowingBruiser card) {
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ public final class BelunaGrandsquall extends AdventureCard {
|
|||
// Seek Thrills
|
||||
// Mill seven cards. Then put all cards that have an Adventure from among the milled cards into your hand.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new SeekThrillsEffect());
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private BelunaGrandsquall(final BelunaGrandsquall card) {
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@ public final class BelunasGatekeeper extends AdventureCard {
|
|||
// Return target creature you don't control with mana value 3 or less to its owner's hand.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private BelunasGatekeeper(final BelunasGatekeeper card) {
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ public final class BesottedKnight extends AdventureCard {
|
|||
// Create a Royal Role token attached to target creature you control.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new CreateRoleAttachedTargetEffect(RoleType.ROYAL));
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private BesottedKnight(final BesottedKnight card) {
|
||||
|
|
|
|||
|
|
@ -6,20 +6,12 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessEffect;
|
||||
import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessTargetEffect;
|
||||
import mage.constants.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.MageObjectReferencePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.FoodToken;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
|
@ -43,7 +35,7 @@ public final class BillThePony extends CardImpl {
|
|||
|
||||
// Sacrifice a Food: Until end of turn, target creature you control assigns combat damage equal to its toughness rather than its power.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new BillThePonyEffect(),
|
||||
new CombatDamageByToughnessTargetEffect(Duration.EndOfTurn),
|
||||
new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_FOOD))
|
||||
);
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_CREATURE));
|
||||
|
|
@ -60,34 +52,3 @@ public final class BillThePony extends CardImpl {
|
|||
return new BillThePony(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BillThePonyEffect extends OneShotEffect {
|
||||
|
||||
BillThePonyEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Until end of turn, target creature you control assigns " +
|
||||
"combat damage equal to its toughness rather than its power.";
|
||||
}
|
||||
|
||||
private BillThePonyEffect(final BillThePonyEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BillThePonyEffect copy() {
|
||||
return new BillThePonyEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
filter.add(new MageObjectReferencePredicate(permanent, game));
|
||||
game.addEffect(new CombatDamageByToughnessEffect(filter, false, Duration.EndOfTurn), source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -49,6 +49,8 @@ public final class BlessedHippogriff extends AdventureCard {
|
|||
// Target creature gains indestructible until end of turn.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new GainAbilityTargetEffect(IndestructibleAbility.getInstance()));
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private BlessedHippogriff(final BlessedHippogriff card) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
|
@ -18,6 +17,8 @@ import mage.filter.predicate.Predicates;
|
|||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
|
|
@ -37,7 +38,7 @@ public final class BogbrewWitch extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// {2}, {T}: Search your library for a card named Festering Newt or Bubbling Cauldron, put it onto the battlefield tapped, then shuffle your library.
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(1, 1, new FilterCard(filter));
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(1, 1, filter);
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new SearchLibraryPutInPlayEffect(target, true),
|
||||
new ManaCostsImpl<>("{2}"));
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ public final class BonecrusherGiant extends AdventureCard {
|
|||
this.getSpellCard().getSpellAbility().addEffect(new DamageCantBePreventedEffect(Duration.EndOfTurn, "Damage can't be prevented this turn"));
|
||||
this.getSpellCard().getSpellAbility().addEffect(new DamageTargetEffect(2));
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetAnyTarget());
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private BonecrusherGiant(final BonecrusherGiant card) {
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ public final class BrambleFamiliar extends AdventureCard {
|
|||
// Fetch Quest
|
||||
// Mill seven cards, then put a creature, enchantment, or land card from among cards milled this way onto the battlefield.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new FetchQuestEffect());
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private BrambleFamiliar(final BrambleFamiliar card) {
|
||||
|
|
|
|||
|
|
@ -33,9 +33,7 @@ public final class BramblefortFink extends CardImpl {
|
|||
// {8}: Bramblefort Fink has base power and toughness 10/10 until end of turn. Activate this ability only if you control an Oko planeswalker.
|
||||
this.addAbility(new ActivateIfConditionActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new SetBasePowerToughnessSourceEffect(
|
||||
10, 10, Duration.EndOfTurn, SubLayer.SetPT_7b
|
||||
).setText("{this} has base power and toughness 10/10 until end of turn"),
|
||||
new SetBasePowerToughnessSourceEffect(10, 10, Duration.EndOfTurn),
|
||||
new GenericManaCost(8),
|
||||
condition));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ public final class BrazenBorrower extends AdventureCard {
|
|||
// Return target nonland permanent an opponent controls to its owner's hand.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private BrazenBorrower(final BrazenBorrower card) {
|
||||
|
|
|
|||
119
Mage.Sets/src/mage/cards/b/BrenardGingerSculptor.java
Normal file
119
Mage.Sets/src/mage/cards/b/BrenardGingerSculptor.java
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.abilities.token.FoodAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.predicate.permanent.TokenPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Xanderhall
|
||||
*/
|
||||
public final class BrenardGingerSculptor extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent foodOrGolemCreature = new FilterCreaturePermanent("a Food or a Golem creature");
|
||||
private static final FilterPermanent nontokenCreature = new FilterControlledCreaturePermanent("another nontoken creature you control");
|
||||
|
||||
static {
|
||||
foodOrGolemCreature.add(Predicates.or(SubType.FOOD.getPredicate(), SubType.GOLEM.getPredicate()));
|
||||
|
||||
nontokenCreature.add(TokenPredicate.FALSE);
|
||||
nontokenCreature.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public BrenardGingerSculptor(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{W}{U}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.ARTIFICER);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Each creature you control that's a Food or a Golem gets +2/+2 and has trample.
|
||||
Ability ability = new SimpleStaticAbility(new BoostControlledEffect(2, 2, Duration.WhileOnBattlefield, foodOrGolemCreature)
|
||||
.setText("each creature you control that's a Food or a Golem gets +2/+2"));
|
||||
ability.addEffect(new GainAbilityAllEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, foodOrGolemCreature).setText("and has trample."));
|
||||
this.addAbility(ability);
|
||||
|
||||
// Whenever another nontoken creature you control dies, you may exile it. If you do, create a token that's a copy of that creature, except it's a 1/1 Food Golem artifact creature in addition to its other types and it has "2, {T}, Sacrifice this artifact: You gain 3 life."
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(new BrenardGingerSculptorEffect(), true, nontokenCreature, true));
|
||||
|
||||
}
|
||||
|
||||
private BrenardGingerSculptor(final BrenardGingerSculptor card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BrenardGingerSculptor copy() {
|
||||
return new BrenardGingerSculptor(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BrenardGingerSculptorEffect extends OneShotEffect {
|
||||
|
||||
BrenardGingerSculptorEffect() {
|
||||
super(Outcome.Copy);
|
||||
this.staticText = "you may exile it. If you do, create a token that's a copy of that creature, except it's a 1/1 Food Golem artifact creature in "+
|
||||
"addition to its other types and it has \"{2}, {T}, Sacrifice this artifact: You gain 3 life.\"";
|
||||
}
|
||||
|
||||
private BrenardGingerSculptorEffect(final BrenardGingerSculptorEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
public BrenardGingerSculptorEffect copy() {
|
||||
return new BrenardGingerSculptorEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Card card = game.getCard(getTargetPointer().getFirst(game, source));
|
||||
if (player == null || card == null) {
|
||||
return false;
|
||||
}
|
||||
CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(
|
||||
source.getControllerId(), CardType.CREATURE, false, 1, false,
|
||||
false, null, 1, 1, false
|
||||
);
|
||||
effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game) + 1));
|
||||
effect.setBecomesArtifact(true);
|
||||
effect.setAdditionalSubType(SubType.FOOD);
|
||||
effect.setAdditionalSubType(SubType.GOLEM);
|
||||
effect.addAdditionalAbilities(new FoodAbility(false));
|
||||
|
||||
player.moveCards(card, Zone.EXILED, source, game);
|
||||
effect.apply(game, source);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -8,7 +8,6 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -28,7 +27,7 @@ public final class BrokersInitiate extends CardImpl {
|
|||
|
||||
// {4}{G/U}: Brokers Initiate has base power and toughness 5/5 until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(
|
||||
new SetBasePowerToughnessSourceEffect(5, 5, Duration.EndOfTurn, SubLayer.SetPT_7b),
|
||||
new SetBasePowerToughnessSourceEffect(5, 5, Duration.EndOfTurn),
|
||||
new ManaCostsImpl<>("{4}{G/U}")
|
||||
));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,6 +58,8 @@ public final class CallousSellSword extends AdventureCard {
|
|||
this.getSpellCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent().setTargetTag(1));
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetAnyTarget(1, 1, filterSecondTarget).setTargetTag(2));
|
||||
this.getSpellCard().getSpellAbility().addEffect(new CallousSellSwordSacrificeFirstTargetEffect().concatBy("Then"));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private CallousSellSword(final CallousSellSword card) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
|
|
@ -9,25 +8,18 @@ import mage.abilities.condition.Condition;
|
|||
import mage.abilities.condition.common.ControlsPermanentsComparedToOpponentsCondition;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AsThoughEffectType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Layer;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
|
|
@ -68,19 +60,19 @@ public final class ChaosLord extends CardImpl {
|
|||
|
||||
class ChaosLordTriggeredAbility extends BeginningOfUpkeepTriggeredAbility {
|
||||
|
||||
public ChaosLordTriggeredAbility() {
|
||||
ChaosLordTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD,
|
||||
new GainControlSourceEffect(),
|
||||
TargetController.YOU,
|
||||
false);
|
||||
}
|
||||
|
||||
public ChaosLordTriggeredAbility(ChaosLordTriggeredAbility ability) {
|
||||
private ChaosLordTriggeredAbility(final ChaosLordTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BeginningOfUpkeepTriggeredAbility copy() {
|
||||
public ChaosLordTriggeredAbility copy() {
|
||||
return new ChaosLordTriggeredAbility(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@ public final class CheekyHouseMouse extends AdventureCard {
|
|||
this.getSpellCard().getSpellAbility().addEffect(new CantBeBlockedTargetEffect(filter, Duration.EndOfTurn)
|
||||
.setText("it can't be blocked by creatures with power 3 or greater this turn"));
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private CheekyHouseMouse(final CheekyHouseMouse card) {
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public final class ChimericMass extends CardImpl {
|
|||
new CreatureToken(0, 0, "Construct artifact creature with \"This creature's power and toughness are each equal to the number of charge counters on it.\"")
|
||||
.withType(CardType.ARTIFACT)
|
||||
.withSubType(SubType.CONSTRUCT)
|
||||
.withAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetBasePowerToughnessSourceEffect(count, count, Duration.WhileOnBattlefield, SubLayer.SetPT_7b))),
|
||||
.withAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetBasePowerToughnessSourceEffect(count, Duration.WhileOnBattlefield))),
|
||||
CardType.ARTIFACT, Duration.EndOfTurn).withDurationRuleAtStart(true), new GenericManaCost(1)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
|
|
@ -12,15 +11,13 @@ import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
|||
import mage.abilities.keyword.EquipAbility;
|
||||
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;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
|
|
@ -50,10 +47,10 @@ public final class CivicSaber extends CardImpl {
|
|||
|
||||
class CivicSaberColorCount implements DynamicValue {
|
||||
|
||||
public CivicSaberColorCount() {
|
||||
CivicSaberColorCount() {
|
||||
}
|
||||
|
||||
public CivicSaberColorCount(final CivicSaberColorCount dynamicValue) {
|
||||
private CivicSaberColorCount(final CivicSaberColorCount dynamicValue) {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -70,7 +67,7 @@ class CivicSaberColorCount implements DynamicValue {
|
|||
}
|
||||
|
||||
@Override
|
||||
public DynamicValue copy() {
|
||||
public CivicSaberColorCount copy() {
|
||||
return new CivicSaberColorCount(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ public final class ColossalBadger extends AdventureCard {
|
|||
// Choose target creature. Mill four cards, then put a +1/+1 counter on that creature for each creature card milled this way.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new ColossalBadgerEffect());
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private ColossalBadger(final ColossalBadger card) {
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ public final class ConceitedWitch extends AdventureCard {
|
|||
// Create a Wicked Role token attached to target creature you control.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new CreateRoleAttachedTargetEffect(RoleType.WICKED));
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private ConceitedWitch(final ConceitedWitch card) {
|
||||
|
|
|
|||
|
|
@ -3,15 +3,16 @@ package mage.cards.c;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.AdditiveDynamicValue;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.CardTypesInGraveyardCount;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.SetBasePowerToughnessPlusOneSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.permanent.token.ConsumingBlobOozeToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -22,7 +23,6 @@ import java.util.UUID;
|
|||
public final class ConsumingBlob extends CardImpl {
|
||||
|
||||
private static final DynamicValue powerValue = CardTypesInGraveyardCount.YOU;
|
||||
private static final DynamicValue toughnessValue = new AdditiveDynamicValue(powerValue, StaticValue.get(1));
|
||||
|
||||
public ConsumingBlob(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}");
|
||||
|
|
@ -32,11 +32,7 @@ public final class ConsumingBlob extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Consuming Blob's power is equal to the number of card types among cards in your graveyard and its toughness is equal to that number plus 1.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.ALL,
|
||||
new SetBasePowerToughnessSourceEffect(powerValue, toughnessValue, Duration.EndOfGame, SubLayer.CharacteristicDefining_7a)
|
||||
.setText("{this}'s power is equal to the number of creature cards in all graveyards and its toughness is equal to that number plus 1")
|
||||
));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetBasePowerToughnessPlusOneSourceEffect(powerValue)));
|
||||
|
||||
// At the beginning of your end step, create a green Ooze creature token with "This creature's power is equal to the number of card types among cards in your graveyard and its toughness is equal to that number plus 1".
|
||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
||||
|
|
|
|||
112
Mage.Sets/src/mage/cards/c/CourtOfVantress.java
Normal file
112
Mage.Sets/src/mage/cards/c/CourtOfVantress.java
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.BecomesMonarchSourceEffect;
|
||||
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.util.functions.CopyApplier;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class CourtOfVantress extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterArtifactOrEnchantmentPermanent("other target enchantment or artifact");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public CourtOfVantress(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{U}");
|
||||
|
||||
// When Court of Vantress enters the battlefield, you become the monarch.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new BecomesMonarchSourceEffect()));
|
||||
|
||||
// At the beginning of your upkeep, choose up to one other target enchantment or artifact. If you're the monarch, you may create a token that's a copy of it. If you're not the monarch, you may have Court of Vantress become a copy of it, except it has this ability.
|
||||
this.addAbility(makeAbility());
|
||||
}
|
||||
|
||||
private CourtOfVantress(final CourtOfVantress card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CourtOfVantress copy() {
|
||||
return new CourtOfVantress(this);
|
||||
}
|
||||
|
||||
static Ability makeAbility() {
|
||||
Ability ability = new BeginningOfUpkeepTriggeredAbility(
|
||||
new CourtOfVantressEffect(), TargetController.YOU, false
|
||||
);
|
||||
ability.addTarget(new TargetPermanent(0, 1, filter));
|
||||
return ability;
|
||||
}
|
||||
}
|
||||
|
||||
class CourtOfVantressEffect extends OneShotEffect {
|
||||
|
||||
private static final CopyApplier applier = new CopyApplier() {
|
||||
@Override
|
||||
public boolean apply(Game game, MageObject blueprint, Ability source, UUID targetObjectId) {
|
||||
blueprint.getAbilities().add(CourtOfVantress.makeAbility());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
CourtOfVantressEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "choose up to one other target enchantment or artifact. If you're the monarch, " +
|
||||
"you may create a token that's a copy of it. If you're not the monarch, " +
|
||||
"you may have {this} become a copy of it, except it has this ability";
|
||||
}
|
||||
|
||||
private CourtOfVantressEffect(final CourtOfVantressEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CourtOfVantressEffect copy() {
|
||||
return new CourtOfVantressEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
if (player == null || permanent == null) {
|
||||
return false;
|
||||
}
|
||||
if (source.isControlledBy(game.getMonarchId())) {
|
||||
return player.chooseUse(outcome, "Create a token copy of " + permanent.getIdName() + '?', source, game)
|
||||
&& new CreateTokenCopyTargetEffect().setSavedPermanent(permanent).apply(game, source);
|
||||
}
|
||||
Permanent sourcePermanent = source.getSourcePermanentIfItStillExists(game);
|
||||
if (sourcePermanent == null || !player.chooseUse(outcome, "Have " + sourcePermanent.getIdName() +
|
||||
" become a copy of " + permanent.getIdName() + '?', source, game)) {
|
||||
return false;
|
||||
}
|
||||
game.copyPermanent(Duration.Custom, permanent, sourcePermanent.getId(), source, applier);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -8,9 +8,8 @@ import mage.abilities.condition.common.FormidableCondition;
|
|||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.SetBasePowerSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
|
|
@ -41,8 +40,7 @@ public final class CraterElemental extends CardImpl {
|
|||
// <i>Formidable</i> — {2}{R}: Crater Elemental has base power 8 until end of turn. Activate this ability only if creatures you control have total power 8 or greater.
|
||||
ability = new ActivateIfConditionActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new SetBasePowerToughnessSourceEffect(StaticValue.get(8), null, Duration.EndOfTurn, SubLayer.SetPT_7b)
|
||||
.setText("{this} has base power 8 until end of turn"),
|
||||
new SetBasePowerSourceEffect(8, Duration.EndOfTurn),
|
||||
new ManaCostsImpl<>("{2}{R}"),
|
||||
FormidableCondition.instance
|
||||
);
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ public final class CruelSomnophage extends AdventureCard {
|
|||
// Target player mills four cards.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new MillCardsTargetEffect(4));
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetPlayer());
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private CruelSomnophage(final CruelSomnophage card) {
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ public final class CrystalDragon extends AdventureCard {
|
|||
// Return target artifact, enchantment, or legendary card from your graveyard to your hand.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private CrystalDragon(final CrystalDragon card) {
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ public final class CuriousPair extends AdventureCard {
|
|||
// Treats to Share
|
||||
// Create a Food token.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect(new FoodToken()));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private CuriousPair(final CuriousPair card) {
|
||||
|
|
|
|||
118
Mage.Sets/src/mage/cards/c/CurseOfTheWerefox.java
Normal file
118
Mage.Sets/src/mage/cards/c/CurseOfTheWerefox.java
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.delayed.ReflexiveTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateRoleAttachedTargetEffect;
|
||||
import mage.abilities.effects.common.FightTargetsEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.RoleType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.common.TargetOpponentsCreaturePermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.util.GameLog;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class CurseOfTheWerefox extends CardImpl {
|
||||
|
||||
public CurseOfTheWerefox(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}");
|
||||
|
||||
// Create a Monster Role token attached to target creature you control. When you do, that creature fights up to one target creature you don't control.
|
||||
this.getSpellAbility().addEffect(new CurseOfTheWerefoxEffect());
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
|
||||
}
|
||||
|
||||
private CurseOfTheWerefox(final CurseOfTheWerefox card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurseOfTheWerefox copy() {
|
||||
return new CurseOfTheWerefox(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CurseOfTheWerefoxEffect extends OneShotEffect {
|
||||
|
||||
CurseOfTheWerefoxEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "create a Monster Role token attached to target creature you control. "
|
||||
+ "When you do, that creature fights up to one target creature you don't control";
|
||||
}
|
||||
|
||||
private CurseOfTheWerefoxEffect(final CurseOfTheWerefoxEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurseOfTheWerefoxEffect copy() {
|
||||
return new CurseOfTheWerefoxEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent target = game.getPermanent(source.getFirstTarget());
|
||||
if (target == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean didCreate =
|
||||
new CreateRoleAttachedTargetEffect(RoleType.MONSTER)
|
||||
.setTargetPointer(new FixedTarget(target, game))
|
||||
.apply(game, source);
|
||||
if (!didCreate) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility(
|
||||
new CurseOfTheWerefoxFightEffect(), false,
|
||||
"that creature fights up to one target creature you don't control"
|
||||
);
|
||||
ability.getEffects().setTargetPointer(new FixedTarget(target.getId(), game));
|
||||
ability.addTarget(new TargetCreaturePermanent(0, 1, StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL, false));
|
||||
game.fireReflexiveTriggeredAbility(ability, source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class CurseOfTheWerefoxFightEffect extends OneShotEffect {
|
||||
|
||||
CurseOfTheWerefoxFightEffect() {
|
||||
super(Outcome.Damage);
|
||||
}
|
||||
|
||||
private CurseOfTheWerefoxFightEffect(final CurseOfTheWerefoxFightEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent triggeredCreature = game.getPermanent(this.targetPointer.getFirst(game, source));
|
||||
Permanent target = game.getPermanent(source.getFirstTarget());
|
||||
if (triggeredCreature != null
|
||||
&& target != null
|
||||
&& triggeredCreature.isCreature(game)
|
||||
&& target.isCreature(game)) {
|
||||
return triggeredCreature.fight(target, source, game);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurseOfTheWerefoxFightEffect copy() {
|
||||
return new CurseOfTheWerefoxFightEffect(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
|
|
@ -12,11 +11,7 @@ import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
|||
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;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
|
|
@ -25,6 +20,8 @@ import mage.players.Player;
|
|||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
|
|
@ -62,13 +59,13 @@ public final class DeathsApproach extends CardImpl {
|
|||
|
||||
class CardsInEnchantedCreaturesControllerGraveyardCount implements DynamicValue {
|
||||
|
||||
private FilterCard filter;
|
||||
private final FilterCard filter;
|
||||
|
||||
public CardsInEnchantedCreaturesControllerGraveyardCount(FilterCard filter) {
|
||||
CardsInEnchantedCreaturesControllerGraveyardCount(FilterCard filter) {
|
||||
this.filter = filter;
|
||||
}
|
||||
|
||||
public CardsInEnchantedCreaturesControllerGraveyardCount(final CardsInEnchantedCreaturesControllerGraveyardCount dynamicValue) {
|
||||
private CardsInEnchantedCreaturesControllerGraveyardCount(final CardsInEnchantedCreaturesControllerGraveyardCount dynamicValue) {
|
||||
this.filter = dynamicValue.filter;
|
||||
}
|
||||
|
||||
|
|
@ -89,7 +86,7 @@ class CardsInEnchantedCreaturesControllerGraveyardCount implements DynamicValue
|
|||
}
|
||||
|
||||
@Override
|
||||
public DynamicValue copy() {
|
||||
public CardsInEnchantedCreaturesControllerGraveyardCount copy() {
|
||||
return new CardsInEnchantedCreaturesControllerGraveyardCount(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ public final class DecadentDragon extends AdventureCard {
|
|||
// Exile the top two cards of target opponent's library face down. You may look at and play those cards for as long as they remain exiled.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new ExpensiveTasteEffect());
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetOpponent());
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private DecadentDragon(final DecadentDragon card) {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import mage.abilities.effects.common.DoIfCostPaid;
|
|||
import mage.cards.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.permanent.PermanentReferenceInCollectionPredicate;
|
||||
|
|
@ -32,12 +33,11 @@ public final class DescendantsFury extends CardImpl {
|
|||
|
||||
// Whenever one or more creatures you control deal combat damage to a player, you may sacrifice one of them. If you do, reveal cards from the top of your library until you reveal a creature card that shares a creature type with the sacrificed creature. Put that card onto the battlefield and the rest on the bottom of your library in a random order.
|
||||
Ability ability = new DealCombatDamageControlledTriggeredAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new DoIfCostPaid(
|
||||
new DescendantsFuryEffect(),
|
||||
new DescendantsFurySacrificeCost()
|
||||
),
|
||||
true
|
||||
SetTargetPointer.PLAYER
|
||||
);
|
||||
|
||||
ability.addWatcher(new DamagedPlayerThisCombatWatcher());
|
||||
|
|
|
|||
|
|
@ -67,6 +67,8 @@ public final class DevouringSugarmaw extends AdventureCard {
|
|||
this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect(new HumanToken()));
|
||||
this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect(new FoodToken())
|
||||
.setText("and a Food token"));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private DevouringSugarmaw(final DevouringSugarmaw card) {
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ enum DonalHeraldOfWingsApplier implements StackObjectCopyApplier {
|
|||
copiedSpell.addSubType(SubType.SPIRIT);
|
||||
copiedSpell.getPower().setModifiedBaseValue(1);
|
||||
copiedSpell.getToughness().setModifiedBaseValue(1);
|
||||
Ability ability = new SimpleStaticAbility(new SetBasePowerToughnessSourceEffect(1,1, Duration.Custom, SubLayer.SetPT_7b));
|
||||
Ability ability = new SimpleStaticAbility(new SetBasePowerToughnessSourceEffect(1,1, Duration.Custom));
|
||||
ability.setRuleVisible(false);
|
||||
copiedSpell.getAbilities().add(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,13 +2,14 @@ package mage.cards.d;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessEffect;
|
||||
import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -25,6 +26,8 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class DoranTheSiegeTower extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("each creature");
|
||||
|
||||
public DoranTheSiegeTower(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{B}{G}");
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
|
|
@ -35,9 +38,7 @@ public final class DoranTheSiegeTower extends CardImpl {
|
|||
this.toughness = new MageInt(5);
|
||||
|
||||
// Each creature assigns combat damage equal to its toughness rather than its power.
|
||||
this.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessEffect(
|
||||
StaticFilters.FILTER_PERMANENT_CREATURE, false
|
||||
)));
|
||||
this.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessAllEffect(filter)));
|
||||
}
|
||||
|
||||
private DoranTheSiegeTower(final DoranTheSiegeTower card) {
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ class DracoplasmEffect extends ReplacementEffectImpl {
|
|||
toughness = CardUtil.overflowInc(toughness, targetCreature.getToughness().getValue());
|
||||
}
|
||||
}
|
||||
ContinuousEffect effect = new SetBasePowerToughnessSourceEffect(power, toughness, Duration.Custom, SubLayer.SetPT_7b);
|
||||
ContinuousEffect effect = new SetBasePowerToughnessSourceEffect(power, toughness, Duration.Custom);
|
||||
game.addEffect(effect, source);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ public final class DreadLinnorm extends AdventureCard {
|
|||
this.getSpellCard().getSpellAbility().addEffect(new UntapTargetEffect().setText("and untap it"));
|
||||
this.getSpellCard().getSpellAbility().addEffect(new GainAbilityTargetEffect(HexproofAbility.getInstance()).setText("It gains hexproof until end of turn"));
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private DreadLinnorm(final DreadLinnorm card) {
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class DruidClassToken extends TokenImpl {
|
|||
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
this.addAbility(new SimpleStaticAbility(new SetBasePowerToughnessSourceEffect(
|
||||
LandsYouControlCount.instance, LandsYouControlCount.instance, Duration.EndOfGame, SubLayer.SetPT_7b
|
||||
LandsYouControlCount.instance, Duration.EndOfGame
|
||||
).setText("this creature's power and toughness are each equal to the number of lands you control")));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@ public final class ElusiveOtter extends AdventureCard {
|
|||
target.setMinNumberOfTargets(0);
|
||||
target.setMaxNumberOfTargets(Integer.MAX_VALUE);
|
||||
this.getSpellCard().getSpellAbility().addTarget(target);
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private ElusiveOtter(final ElusiveOtter card) {
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ class ElvishImpersonatorsEffect extends OneShotEffect {
|
|||
List<Integer> results = controller.rollDice(outcome, source, game, 6, 2, 0);
|
||||
int firstRoll = results.get(0);
|
||||
int secondRoll = results.get(1);
|
||||
game.addEffect(new SetBasePowerToughnessSourceEffect(firstRoll, secondRoll, Duration.WhileOnBattlefield, SubLayer.SetPT_7b), source);
|
||||
game.addEffect(new SetBasePowerToughnessSourceEffect(firstRoll, secondRoll, Duration.Custom), source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ public final class EmberethShieldbreaker extends AdventureCard {
|
|||
// Destroy target artifact.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetArtifactPermanent());
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private EmberethShieldbreaker(final EmberethShieldbreaker card) {
|
||||
|
|
|
|||
|
|
@ -46,6 +46,8 @@ public final class EmeraldDragon extends AdventureCard {
|
|||
// Counter target activated or triggered ability from a noncreature source.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new CounterTargetEffect());
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetActivatedOrTriggeredAbility(filter));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private EmeraldDragon(final EmeraldDragon card) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.e;
|
||||
|
||||
import mage.MageInt;
|
||||
|
|
@ -42,9 +41,7 @@ public final class EntropicSpecter extends CardImpl {
|
|||
// Entropic Specter's power and toughness are each equal to the number of cards in the chosen player's hand.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL,
|
||||
// back to the graveyard or if the chosen player left the game it's again a 0/0
|
||||
new SetBasePowerToughnessSourceEffect(CardsInTargetPlayerHandCount.instance, CardsInTargetPlayerHandCount.instance,
|
||||
Duration.WhileOnBattlefield, SubLayer.SetPT_7b)
|
||||
.setText("{this}'s power and toughness are each equal to the number of cards in the chosen player's hand")));
|
||||
new SetBasePowerToughnessSourceEffect(CardsInTargetPlayerHandCount.instance, Duration.WhileOnBattlefield)));
|
||||
|
||||
// Whenever Entropic Specter deals damage to a player, that player discards a card.
|
||||
this.addAbility(new DealsDamageToAPlayerTriggeredAbility(new DiscardTargetEffect(1, false), false, true));
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ public final class Ettercap extends AdventureCard {
|
|||
// Destroy target creature with flying.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private Ettercap(final Ettercap card) {
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public final class EvolvedSleeper extends CardImpl {
|
|||
Duration.Custom, SubType.HUMAN, SubType.CLERIC
|
||||
).setText("{this} becomes a Human Cleric"), new ManaCostsImpl<>("{B}"));
|
||||
ability.addEffect(new SetBasePowerToughnessSourceEffect(
|
||||
2, 2, Duration.Custom, SubLayer.SetPT_7b
|
||||
2, 2, Duration.Custom
|
||||
).setText("with base power and toughness 2/2"));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ class EvolvedSleeperClericEffect extends OneShotEffect {
|
|||
Duration.Custom, SubType.PHYREXIAN, SubType.HUMAN, SubType.CLERIC
|
||||
), source);
|
||||
game.addEffect(new SetBasePowerToughnessSourceEffect(
|
||||
3, 3, Duration.Custom, SubLayer.SetPT_7b
|
||||
3, 3, Duration.Custom
|
||||
), source);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,28 +1,22 @@
|
|||
|
||||
package mage.cards.e;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.abilities.effects.common.continuous.SetBasePowerSourceEffect;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
|
|
@ -88,7 +82,7 @@ class EvraHalcyonWitnessEffect extends OneShotEffect {
|
|||
// For example, say Evra is enchanted with Dub (which makes it 6/6) and your life total is 7.
|
||||
// After the exchange, Evra would be a 9/6 creature (its power became 7, which was then modified by Dub) and your life total would be 6.
|
||||
// (2018-04-27)
|
||||
game.addEffect(new SetBasePowerToughnessSourceEffect(StaticValue.get(life), null, Duration.Custom, SubLayer.SetPT_7b), source);
|
||||
game.addEffect(new SetBasePowerSourceEffect(life, Duration.Custom), source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,8 +19,6 @@ import mage.game.ExileZone;
|
|||
import mage.game.Game;
|
||||
import mage.game.events.EntersTheBattlefieldEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.game.events.ZoneChangeGroupEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.players.Player;
|
||||
|
|
@ -108,7 +106,7 @@ class ExtraordinaryJourneyEffect extends OneShotEffect {
|
|||
|
||||
Set<Card> cards = permanents
|
||||
.stream()
|
||||
.map(p -> p.getMainCard())
|
||||
.map(Card::getMainCard)
|
||||
.filter(Objects::nonNull)
|
||||
.filter(card -> game.getState().getZone(card.getId()) == Zone.EXILED)
|
||||
.collect(Collectors.toSet());
|
||||
|
|
@ -148,7 +146,7 @@ class ExtraordinaryJourneyEffect extends OneShotEffect {
|
|||
class ExtraordinaryJourneyTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
ExtraordinaryJourneyTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), false);
|
||||
super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1, "you"), false);
|
||||
setTriggerPhrase("Whenever one or more nontoken creatures enter the battlefield, "
|
||||
+ "if one or more of them entered from exile or was cast from exile, ");
|
||||
setTriggersOnceEachTurn(true);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import mage.cards.AdventureCard;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
|
||||
|
|
@ -46,6 +45,8 @@ public final class FaeOfWishes extends AdventureCard {
|
|||
// You may reveal a noncreature card you own from outside the game and put it into your hand.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new WishEffect(StaticFilters.FILTER_CARD_A_NON_CREATURE));
|
||||
this.getSpellCard().getSpellAbility().addHint(OpenSideboardHint.instance);
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private FaeOfWishes(final FaeOfWishes card) {
|
||||
|
|
|
|||
58
Mage.Sets/src/mage/cards/f/FaerieBladecrafter.java
Normal file
58
Mage.Sets/src/mage/cards/f/FaerieBladecrafter.java
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealCombatDamageControlledTriggeredAbility;
|
||||
import mage.abilities.common.DiesSourceTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Xanderhall
|
||||
*/
|
||||
public final class FaerieBladecrafter extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.FAERIE, "Faeries");
|
||||
private static final DynamicValue count = new SourcePermanentPowerCount();
|
||||
|
||||
public FaerieBladecrafter(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
|
||||
|
||||
this.subtype.add(SubType.FAERIE);
|
||||
this.subtype.add(SubType.ROGUE);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever one or more Faeries you control deal combat damage to a player, put a +1/+1 counter on Faerie Bladecrafter.
|
||||
this.addAbility(new DealCombatDamageControlledTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter));
|
||||
|
||||
// When Faerie Bladecrafter dies, each opponent loses X life and you gain X life, where X is its power.
|
||||
Ability ability = new DiesSourceTriggeredAbility(new LoseLifeOpponentsEffect(count).setText("each opponent loses X life"));
|
||||
ability.addEffect(new GainLifeEffect(count).setText("and you gain X life, where X is its power"));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private FaerieBladecrafter(final FaerieBladecrafter card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FaerieBladecrafter copy() {
|
||||
return new FaerieBladecrafter(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -37,6 +37,8 @@ public final class FaerieGuidemother extends AdventureCard {
|
|||
FlyingAbility.getInstance(), Duration.EndOfTurn
|
||||
).setText("and gains flying until end of turn"));
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private FaerieGuidemother(final FaerieGuidemother card) {
|
||||
|
|
|
|||
88
Mage.Sets/src/mage/cards/f/FaerieSlumberParty.java
Normal file
88
Mage.Sets/src/mage/cards/f/FaerieSlumberParty.java
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandFromBattlefieldAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.FaerieBlockFliersToken;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class FaerieSlumberParty extends CardImpl {
|
||||
|
||||
public FaerieSlumberParty(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{U}{U}");
|
||||
|
||||
// Return all creatures to their owners' hands. For each opponent who controlled a creature returned this way, you create two 1/1 blue Faerie creature tokens with flying and "This creature can block only creatures with flying."
|
||||
this.getSpellAbility().addEffect(new FaerieSlumberPartyEffect());
|
||||
}
|
||||
|
||||
private FaerieSlumberParty(final FaerieSlumberParty card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FaerieSlumberParty copy() {
|
||||
return new FaerieSlumberParty(this);
|
||||
}
|
||||
}
|
||||
|
||||
class FaerieSlumberPartyEffect extends OneShotEffect {
|
||||
|
||||
FaerieSlumberPartyEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Return all creatures to their owners' hands. For each opponent who controlled a creature "
|
||||
+ "returned this way, you create two 1/1 blue Faerie creature tokens with flying and "
|
||||
+ "\"This creature can block only creatures with flying.\"";
|
||||
}
|
||||
|
||||
private FaerieSlumberPartyEffect(final FaerieSlumberPartyEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FaerieSlumberPartyEffect copy() {
|
||||
return new FaerieSlumberPartyEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Set<UUID> opponents = game.getOpponents(source.getControllerId());
|
||||
int count = game.getBattlefield()
|
||||
.getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, source.getControllerId(), game)
|
||||
.stream()
|
||||
.filter(Objects::nonNull)
|
||||
.map(Permanent::getControllerId)
|
||||
.distinct()
|
||||
.filter(opponents::contains)
|
||||
.mapToInt(id -> 1)
|
||||
.sum();
|
||||
|
||||
if(!new ReturnToHandFromBattlefieldAllEffect(StaticFilters.FILTER_PERMANENT_CREATURE)
|
||||
.apply(game, source)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(count > 0) {
|
||||
Token token = new FaerieBlockFliersToken();
|
||||
token.putOntoBattlefield(2 * count, game, source, source.getControllerId());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -30,6 +30,8 @@ public final class FangDragon extends AdventureCard {
|
|||
this.getSpellCard().getSpellAbility().addEffect(new DamageAllEffect(
|
||||
1, StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL
|
||||
));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private FangDragon(final FangDragon card) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.MageObject;
|
||||
|
|
@ -95,9 +96,9 @@ class FatalGrudgeEffect extends OneShotEffect {
|
|||
|
||||
class FatalGrudgePredicate implements Predicate<MageObject> {
|
||||
|
||||
private final HashSet<CardType> types;
|
||||
private final Set<CardType> types;
|
||||
|
||||
public FatalGrudgePredicate(HashSet<CardType> types) {
|
||||
public FatalGrudgePredicate(Set<CardType> types) {
|
||||
this.types = types;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ public final class FellHorseman extends AdventureCard {
|
|||
this.getSpellCard().getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private FellHorseman(final FellHorseman card) {
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ public final class FerociousWerefox extends AdventureCard {
|
|||
// Create a Monster Role token attached to target creature you control.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new CreateRoleAttachedTargetEffect(RoleType.MONSTER));
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private FerociousWerefox(final FerociousWerefox card) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.DealCombatDamageControlledTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||
|
|
@ -8,15 +8,8 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedPlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.PermanentToken;
|
||||
import mage.game.permanent.token.FaerieDragonToken;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
|
|
@ -32,7 +25,9 @@ public final class FeywildVisitor extends CardImpl {
|
|||
|
||||
// Commander creatures you own have "Whenever one or more nontoken creatures you control deal combat damage to a player, you create a 1/1 blue Faerie Dragon creature token with flying."
|
||||
this.addAbility(new SimpleStaticAbility(new GainAbilityAllEffect(
|
||||
new FeywildVisitorAbility(), Duration.WhileOnBattlefield,
|
||||
new DealCombatDamageControlledTriggeredAbility(new CreateTokenEffect(new FaerieDragonToken()), StaticFilters.FILTER_CREATURE_NON_TOKEN)
|
||||
.setTriggerPhrase("Whenever one or more nontoken creatures you control deal combat damage to a player, you "),
|
||||
Duration.WhileOnBattlefield,
|
||||
StaticFilters.FILTER_CREATURES_OWNED_COMMANDER
|
||||
)));
|
||||
}
|
||||
|
|
@ -46,49 +41,3 @@ public final class FeywildVisitor extends CardImpl {
|
|||
return new FeywildVisitor(this);
|
||||
}
|
||||
}
|
||||
|
||||
class FeywildVisitorAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private final List<UUID> damagedPlayerIds = new ArrayList<>();
|
||||
|
||||
FeywildVisitorAbility() {
|
||||
super(Zone.BATTLEFIELD, new CreateTokenEffect(new FaerieDragonToken()), false);
|
||||
setTriggerPhrase("Whenever one or more nontoken creatures you control deal combat damage to a player, you ");
|
||||
}
|
||||
|
||||
private FeywildVisitorAbility(final FeywildVisitorAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FeywildVisitorAbility copy() {
|
||||
return new FeywildVisitorAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DAMAGED_PLAYER
|
||||
|| event.getType() == GameEvent.EventType.COMBAT_DAMAGE_STEP_POST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.COMBAT_DAMAGE_STEP_POST) {
|
||||
damagedPlayerIds.clear();
|
||||
return false;
|
||||
}
|
||||
if (event.getType() != GameEvent.EventType.DAMAGED_PLAYER
|
||||
|| !((DamagedPlayerEvent) event).isCombatDamage()) {
|
||||
return false;
|
||||
}
|
||||
Permanent creature = game.getPermanent(event.getSourceId());
|
||||
if (creature == null
|
||||
|| !creature.isControlledBy(getControllerId())
|
||||
|| creature instanceof PermanentToken
|
||||
|| damagedPlayerIds.contains(event.getTargetId())) {
|
||||
return false;
|
||||
}
|
||||
damagedPlayerIds.add(event.getTargetId());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public final class FigureOfDestiny extends CardImpl {
|
|||
Duration.Custom, SubType.KITHKIN, SubType.SPIRIT
|
||||
).setText("{this} becomes a Kithkin Spirit"), new ManaCostsImpl<>("{R/W}"));
|
||||
ability.addEffect(new SetBasePowerToughnessSourceEffect(
|
||||
2, 2, Duration.Custom, SubLayer.SetPT_7b
|
||||
2, 2, Duration.Custom
|
||||
).setText("with base power and toughness 2/2"));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ class FigureOfDestinySpiritEffect extends OneShotEffect {
|
|||
Duration.Custom, SubType.KITHKIN, SubType.SPIRIT, SubType.WARRIOR
|
||||
), source);
|
||||
game.addEffect(new SetBasePowerToughnessSourceEffect(
|
||||
4, 4, Duration.Custom, SubLayer.SetPT_7b
|
||||
4, 4, Duration.Custom
|
||||
), source);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -119,7 +119,7 @@ class FigureOfDestinyWarriorEffect extends OneShotEffect {
|
|||
Duration.Custom, SubType.KITHKIN, SubType.SPIRIT, SubType.WARRIOR, SubType.AVATAR
|
||||
), source);
|
||||
game.addEffect(new SetBasePowerToughnessSourceEffect(
|
||||
8, 8, Duration.Custom, SubLayer.SetPT_7b
|
||||
8, 8, Duration.Custom
|
||||
), source);
|
||||
game.addEffect(new GainAbilitySourceEffect(
|
||||
FlyingAbility.getInstance(), Duration.Custom
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@ public final class FlaxenIntruder extends AdventureCard {
|
|||
// Welcome Home
|
||||
// Create three 2/2 green Bear creature tokens.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect(new BearToken(), 3));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private FlaxenIntruder(final FlaxenIntruder card) {
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ public final class FoulmireKnight extends AdventureCard {
|
|||
// You draw a card and you lose 1 life.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).setText("You draw a card"));
|
||||
this.getSpellCard().getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(1).concatBy("and"));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private FoulmireKnight(final FoulmireKnight card) {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public final class FrodoSauronsBane extends CardImpl {
|
|||
this.addAbility(new SimpleActivatedAbility(
|
||||
new ConditionalOneShotEffect(new AddContinuousEffectToGame(
|
||||
new AddCardSubTypeSourceEffect(Duration.Custom, SubType.HALFLING, SubType.SCOUT),
|
||||
new SetBasePowerToughnessSourceEffect(2, 3, Duration.Custom, SubLayer.SetPT_7b),
|
||||
new SetBasePowerToughnessSourceEffect(2, 3, Duration.Custom),
|
||||
new GainAbilitySourceEffect(LifelinkAbility.getInstance(), Duration.Custom)
|
||||
), condition1, "if {this} is a Citizen, it becomes a Halfling Scout with base power and toughness 2/3 and lifelink"),
|
||||
new ManaCostsImpl<>("{W/B}{W/B}")
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ public final class FrolickingFamiliar extends AdventureCard {
|
|||
// Blow Off Steam deals 1 damage to any target.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new DamageTargetEffect(1));
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetAnyTarget());
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private FrolickingFamiliar(final FrolickingFamiliar card) {
|
||||
|
|
|
|||
|
|
@ -1,21 +1,22 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.DrawDiscardControllerEffect;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.cards.AdventureCard;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||
import mage.target.common.TargetOpponentsCreaturePermanent;
|
||||
import mage.cards.AdventureCard;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -46,6 +47,8 @@ public final class GalvanicGiant extends AdventureCard {
|
|||
// Storm Reading
|
||||
// Draw four cards, then discard two cards.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new DrawDiscardControllerEffect(4, 2));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private GalvanicGiant(final GalvanicGiant card) {
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ public final class GarenbrigCarver extends AdventureCard {
|
|||
// Target creature gets +2/+2 until end of turn.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn));
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private GarenbrigCarver(final GarenbrigCarver card) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
|
|
@ -18,6 +17,8 @@ import mage.constants.Zone;
|
|||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
|
|
@ -51,16 +52,16 @@ public final class GhastlyRemains extends CardImpl {
|
|||
|
||||
class GhastlyRemainsTriggeredAbility extends BeginningOfUpkeepTriggeredAbility {
|
||||
|
||||
public GhastlyRemainsTriggeredAbility() {
|
||||
GhastlyRemainsTriggeredAbility() {
|
||||
super(Zone.GRAVEYARD, new DoIfCostPaid(new ReturnSourceFromGraveyardToHandEffect(), new ManaCostsImpl<>("{B}{B}{B}")), TargetController.YOU, false);
|
||||
}
|
||||
|
||||
public GhastlyRemainsTriggeredAbility(GhastlyRemainsTriggeredAbility ability) {
|
||||
private GhastlyRemainsTriggeredAbility(final GhastlyRemainsTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BeginningOfUpkeepTriggeredAbility copy() {
|
||||
public GhastlyRemainsTriggeredAbility copy() {
|
||||
return new GhastlyRemainsTriggeredAbility(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersAttachedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.cards.AdventureCard;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.constants.Outcome;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
|
|
@ -39,6 +39,8 @@ public final class GhostLantern extends AdventureCard {
|
|||
// Return target creature card from your graveyard to your hand.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private GhostLantern(final GhostLantern card) {
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ public final class GiantKiller extends AdventureCard {
|
|||
// Destroy target creature with power 4 or greater.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private GiantKiller(final GiantKiller card) {
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class GigantiformAbility extends StaticAbility {
|
|||
super(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.AURA));
|
||||
Ability ability = new SimpleStaticAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new SetBasePowerToughnessSourceEffect(8, 8, Duration.WhileOnBattlefield, SubLayer.SetPT_7b)
|
||||
new SetBasePowerToughnessSourceEffect(8, 8, Duration.WhileOnBattlefield)
|
||||
);
|
||||
this.addEffect(new GainAbilityAttachedEffect(ability, AttachmentType.AURA));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -8,7 +7,6 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CopyPermanentEffect;
|
||||
|
|
@ -18,7 +16,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
|
|
@ -56,8 +53,7 @@ class GigantoplasmCopyApplier extends CopyApplier {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, MageObject blueprint, Ability source, UUID copyToObjectId) {
|
||||
DynamicValue variableMana = ManacostVariableValue.REGULAR;
|
||||
Effect effect = new SetBasePowerToughnessSourceEffect(variableMana, variableMana, Duration.WhileOnBattlefield, SubLayer.SetPT_7b);
|
||||
Effect effect = new SetBasePowerToughnessSourceEffect(ManacostVariableValue.REGULAR, Duration.Custom);
|
||||
effect.setText("This creature has base power and toughness X/X");
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{X}"));
|
||||
blueprint.getAbilities().add(ability);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.costs.common.DiscardCardCost;
|
||||
|
|
@ -17,6 +16,8 @@ import mage.constants.Zone;
|
|||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
|
|
@ -49,16 +50,16 @@ public final class Gigapede extends CardImpl {
|
|||
|
||||
class GigapedeTriggerdAbility extends BeginningOfUpkeepTriggeredAbility {
|
||||
|
||||
public GigapedeTriggerdAbility(){
|
||||
GigapedeTriggerdAbility() {
|
||||
super(Zone.GRAVEYARD, new DoIfCostPaid(new ReturnSourceFromGraveyardToHandEffect(), new DiscardCardCost()), TargetController.YOU, false);
|
||||
}
|
||||
|
||||
public GigapedeTriggerdAbility(GigapedeTriggerdAbility ability) {
|
||||
private GigapedeTriggerdAbility(final GigapedeTriggerdAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BeginningOfUpkeepTriggeredAbility copy() {
|
||||
public GigapedeTriggerdAbility copy() {
|
||||
return new GigapedeTriggerdAbility(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ public final class GingerbreadHunter extends AdventureCard {
|
|||
// Target creature gets -2/-2 until end of turn.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new BoostTargetEffect(-2, -2));
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private GingerbreadHunter(final GingerbreadHunter card) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
|
|
@ -25,6 +24,8 @@ import mage.game.permanent.Permanent;
|
|||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
|
|
@ -70,10 +71,10 @@ class CountersOnControlledCount implements DynamicValue {
|
|||
|
||||
static FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
|
||||
public CountersOnControlledCount() {
|
||||
CountersOnControlledCount() {
|
||||
}
|
||||
|
||||
public CountersOnControlledCount(final CountersOnControlledCount dynamicValue) {
|
||||
private CountersOnControlledCount(final CountersOnControlledCount dynamicValue) {
|
||||
super();
|
||||
}
|
||||
|
||||
|
|
@ -90,7 +91,7 @@ class CountersOnControlledCount implements DynamicValue {
|
|||
}
|
||||
|
||||
@Override
|
||||
public DynamicValue copy() {
|
||||
public CountersOnControlledCount copy() {
|
||||
return new CountersOnControlledCount(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
|
|
@ -13,14 +11,13 @@ import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
|||
import mage.abilities.keyword.EquipAbility;
|
||||
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;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
|
|
@ -51,10 +48,10 @@ public final class GolemSkinGauntlets extends CardImpl {
|
|||
// compare to Goblin Gaveleer
|
||||
class GolemSkinGauntletsAttachedCount implements DynamicValue {
|
||||
|
||||
public GolemSkinGauntletsAttachedCount() {
|
||||
GolemSkinGauntletsAttachedCount() {
|
||||
}
|
||||
|
||||
public GolemSkinGauntletsAttachedCount(final GolemSkinGauntletsAttachedCount dynamicValue) {
|
||||
private GolemSkinGauntletsAttachedCount(final GolemSkinGauntletsAttachedCount dynamicValue) {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -78,7 +75,7 @@ class GolemSkinGauntletsAttachedCount implements DynamicValue {
|
|||
}
|
||||
|
||||
@Override
|
||||
public DynamicValue copy() {
|
||||
public GolemSkinGauntletsAttachedCount copy() {
|
||||
return new GolemSkinGauntletsAttachedCount(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,8 @@ public final class GrabbyGiant extends AdventureCard {
|
|||
// That's Mine
|
||||
// Create a Treasure token.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect(new TreasureToken()));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private GrabbyGiant(final GrabbyGiant card) {
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ public final class GraySlaad extends AdventureCard {
|
|||
// Entropic Decay
|
||||
// Mill four cards.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new MillCardsControllerEffect(4));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private GraySlaad(final GraySlaad card) {
|
||||
|
|
|
|||
|
|
@ -42,6 +42,8 @@ public final class GuardianNaga extends AdventureCard {
|
|||
// Exile target artifact or enchantment.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new ExileTargetEffect());
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private GuardianNaga(final GuardianNaga card) {
|
||||
|
|
|
|||
|
|
@ -1,15 +1,9 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.cards.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
|
|
@ -22,6 +16,9 @@ import mage.target.Target;
|
|||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
|
|
@ -95,7 +92,7 @@ class GuidedPassageEffect extends OneShotEffect {
|
|||
}
|
||||
TargetCard target1 = new TargetCard(1, Zone.LIBRARY, StaticFilters.FILTER_CARD_CREATURE);
|
||||
TargetCard target2 = new TargetCard(1, Zone.LIBRARY, StaticFilters.FILTER_CARD_LAND);
|
||||
TargetCard target3 = new TargetCard(1, Zone.LIBRARY, new FilterCard(filter));
|
||||
TargetCard target3 = new TargetCard(1, Zone.LIBRARY, filter);
|
||||
opponent.chooseTarget(Outcome.Detriment, cards, target1, source, game);
|
||||
opponent.chooseTarget(Outcome.Detriment, cards, target2, source, game);
|
||||
opponent.chooseTarget(Outcome.Detriment, cards, target3, source, game);
|
||||
|
|
|
|||
|
|
@ -37,15 +37,17 @@ public final class GumdropPoisoner extends AdventureCard {
|
|||
// Lifelink
|
||||
this.addAbility(LifelinkAbility.getInstance());
|
||||
|
||||
// When Gumdrop Poisoner enters the battlefield, target creature gets -X/-X until end of turn, where X is the amount of life you gained this turn.
|
||||
// When Gumdrop Poisoner enters the battlefield, up to one target creature gets -X/-X until end of turn, where X is the amount of life you gained this turn.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(xValue, xValue)
|
||||
.setText("target creature gets -X/-X until end of turn, where X is the amount of life you gained this turn"));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
.setText("up to one target creature gets -X/-X until end of turn, where X is the amount of life you gained this turn"));
|
||||
ability.addTarget(new TargetCreaturePermanent(0, 1));
|
||||
this.addAbility(ability.addHint(ControllerGainedLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
||||
|
||||
// Tempt with Treats
|
||||
// Create a Food token.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect(new FoodToken()));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private GumdropPoisoner(final GumdropPoisoner card) {
|
||||
|
|
|
|||
|
|
@ -81,8 +81,8 @@ class HalfdaneUpkeepEffect extends OneShotEffect {
|
|||
ContinuousEffect effect = new SetBasePowerToughnessSourceEffect(
|
||||
permanent.getPower().getValue(),
|
||||
permanent.getToughness().getValue(),
|
||||
Duration.UntilYourNextUpkeepStep,
|
||||
SubLayer.SetPT_7b);
|
||||
Duration.UntilYourNextUpkeepStep
|
||||
);
|
||||
game.addEffect(effect, source);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@ public final class HeartflameDuelist extends AdventureCard {
|
|||
// Heartflame Slash deals 3 damage to any target.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new DamageTargetEffect(3));
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetAnyTarget());
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private HeartflameDuelist(final HeartflameDuelist card) {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue