mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
fix M21 bugs
This commit is contained in:
parent
d2d892a7cb
commit
1a0dca9067
4 changed files with 24 additions and 7 deletions
|
@ -5,6 +5,7 @@ import mage.abilities.LoyaltyAbility;
|
|||
import mage.abilities.common.DamageAsThoughNotBlockedAbility;
|
||||
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DamageWithPowerFromOneToAnotherTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
|
@ -12,7 +13,12 @@ import mage.cards.Card;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.*;
|
||||
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.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherTargetPredicate;
|
||||
import mage.game.Game;
|
||||
|
@ -39,7 +45,7 @@ public final class GarrukSavageHerald extends CardImpl {
|
|||
this.addAbility(new LoyaltyAbility(new GarrukSavageHeraldEffect(), 1));
|
||||
|
||||
// −2: Target creature you control deals damage equal to its power to another target creature.
|
||||
DamageWithPowerFromOneToAnotherTargetEffect effect = new DamageWithPowerFromOneToAnotherTargetEffect();
|
||||
Effect effect = new DamageWithPowerFromOneToAnotherTargetEffect();
|
||||
effect.setText("Target creature you control deals damage equal to its power to another target creature");
|
||||
|
||||
Ability minusAbility = new LoyaltyAbility(effect, -2);
|
||||
|
@ -47,7 +53,7 @@ public final class GarrukSavageHerald extends CardImpl {
|
|||
controlledCreature.setTargetTag(1);
|
||||
minusAbility.addTarget(controlledCreature);
|
||||
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("Another creature: damage dealt to");
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature to deal damage to");
|
||||
filter.add(new AnotherTargetPredicate(2));
|
||||
TargetCreaturePermanent anotherTargetCreature = new TargetCreaturePermanent(filter);
|
||||
minusAbility.addTarget(anotherTargetCreature);
|
||||
|
|
|
@ -9,7 +9,11 @@ import mage.abilities.effects.common.LoseLifeTargetControllerEffect;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
@ -78,7 +82,7 @@ class LilianaDeathMagePlusEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null || !player.chooseUse(Outcome.Benefit, "Return a creature card from your graveyard to your hand?", source, game)) {
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
Card card = game.getCard(source.getTargets().get(0).getFirstTarget());
|
||||
|
|
|
@ -20,6 +20,7 @@ import mage.target.TargetCard;
|
|||
import mage.target.common.TargetCardInLibrary;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
|
@ -94,6 +95,8 @@ class NecromentiaEffect extends OneShotEffect {
|
|||
numberOfCardsExiledFromHand = target.getTargets().size();
|
||||
controller.moveCards(new CardsImpl(target.getTargets()), Zone.EXILED, source, game);
|
||||
}
|
||||
} else {
|
||||
targetPlayer.revealCards(targetPlayer.getName() + "'s Hand", targetPlayer.getHand(), game);
|
||||
}
|
||||
|
||||
// cards in Library
|
||||
|
@ -106,6 +109,8 @@ class NecromentiaEffect extends OneShotEffect {
|
|||
if (controller.choose(Outcome.Exile, cardsInLibrary, targetLib, game)) {
|
||||
controller.moveCards(new CardsImpl(targetLib.getTargets()), Zone.EXILED, source, game);
|
||||
}
|
||||
} else {
|
||||
targetPlayer.revealCards(targetPlayer.getName() + "'s Library", new CardsImpl(new HashSet<>(targetPlayer.getLibrary().getCards(game))), game);
|
||||
}
|
||||
|
||||
targetPlayer.shuffleLibrary(source, game);
|
||||
|
|
|
@ -97,9 +97,11 @@ class SanctumOfAllTriggerEffect extends ReplacementEffectImpl {
|
|||
// Only trigger while you control six or more Shrines
|
||||
int numShrines = SanctumOfAll.count.calculate(game, source, this);
|
||||
if (numShrines >= 6) {
|
||||
// Only for triggers of Shrines
|
||||
// Only for triggers of other Shrines
|
||||
Permanent permanent = game.getPermanent(event.getSourceId());
|
||||
return permanent != null && permanent.hasSubtype(SubType.SHRINE, game);
|
||||
return permanent != null
|
||||
&& !permanent.getId().equals(source.getSourceId())
|
||||
&& permanent.hasSubtype(SubType.SHRINE, game);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue