mirror of
https://github.com/magefree/mage.git
synced 2026-01-25 12:49:39 -08:00
Merge branch 'master' of https://github.com/magefree/mage
This commit is contained in:
commit
fbd985b5b1
25 changed files with 729 additions and 465 deletions
|
|
@ -40,7 +40,7 @@ public final class BedeckBedazzle extends SplitCard {
|
|||
// Destroy target nonbasic land. Bedazzle deals 2 damage to target opponent or planeswalker.
|
||||
this.getRightHalfCard().getSpellAbility().addEffect(new BedazzleEffect());
|
||||
this.getRightHalfCard().getSpellAbility().addTarget(new TargetLandPermanent());
|
||||
this.getSpellAbility().addTarget(new TargetOpponentOrPlaneswalker());
|
||||
this.getRightHalfCard().getSpellAbility().addTarget(new TargetOpponentOrPlaneswalker());
|
||||
}
|
||||
|
||||
private BedeckBedazzle(final BedeckBedazzle card) {
|
||||
|
|
|
|||
|
|
@ -9,10 +9,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanentAmount;
|
||||
|
|
@ -25,13 +22,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class BiogenicUpgrade extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter
|
||||
= new FilterCreaturePermanent("creatures you control");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public BiogenicUpgrade(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{G}{G}");
|
||||
|
||||
|
|
@ -40,7 +30,7 @@ public final class BiogenicUpgrade extends CardImpl {
|
|||
CounterType.P1P1, 3, false,
|
||||
"one, two, or three target creatures"
|
||||
));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(3, filter));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(3));
|
||||
this.getSpellAbility().addEffect(new BiogenicUpgradeEffect());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ class CavalcadeOfCalamityEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return game.damagePlayerOrPlaneswalker(
|
||||
game.getCombat().getDefenderId(source.getFirstTarget()), 1,
|
||||
game.getCombat().getDefenderId(targetPointer.getFirst(game, source)), 1,
|
||||
source.getSourceId(), game, false, true
|
||||
) > 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class CryOfTheCarnariumReplacementEffect extends ReplacementEffectImpl {
|
|||
|
||||
CryOfTheCarnariumReplacementEffect() {
|
||||
super(Duration.EndOfTurn, Outcome.Exile);
|
||||
staticText = "If a creature would die this turn, exile it instead.";
|
||||
staticText = " If a creature would die this turn, exile it instead.";
|
||||
}
|
||||
|
||||
private CryOfTheCarnariumReplacementEffect(final CryOfTheCarnariumReplacementEffect effect) {
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ class DomriChaosBringerTriggeredAbility extends DelayedTriggeredAbility {
|
|||
private final UUID spellId;
|
||||
|
||||
DomriChaosBringerTriggeredAbility(UUID spellId) {
|
||||
super(null, Duration.Custom, true);
|
||||
super(null, Duration.EndOfStep, true);
|
||||
this.spellId = spellId;
|
||||
this.usesStack = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public final class DovinGrandArbiter extends CardImpl {
|
|||
new StaticValue(3), StaticFilters.FILTER_CARD,
|
||||
Zone.LIBRARY, false, false, false,
|
||||
Zone.HAND, false, false, false
|
||||
).setText("Look at the top ten cards of your library. " +
|
||||
).setBackInRandomOrder(true).setText("Look at the top ten cards of your library. " +
|
||||
"Put three of them into your hand and the rest " +
|
||||
"on the bottom of your library in a random order."
|
||||
), -7));
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
|
||||
package mage.cards.k;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
|
|
@ -11,18 +7,11 @@ import mage.abilities.LoyaltyAbility;
|
|||
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ExileTargetForSourceEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.cards.*;
|
||||
import mage.constants.*;
|
||||
import mage.game.ExileZone;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameImpl;
|
||||
import mage.game.command.Commander;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
|
|
@ -34,8 +23,11 @@ import mage.target.TargetPlayer;
|
|||
import mage.target.common.TargetCardInHand;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author bunchOfDevs
|
||||
*/
|
||||
public final class KarnLiberated extends CardImpl {
|
||||
|
|
@ -102,6 +94,9 @@ class KarnLiberatedEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
game.getState().clear();
|
||||
// default watchers init, TODO: remove all restart/init code to game
|
||||
((GameImpl) game).initGameDefaultWatchers();
|
||||
|
||||
for (Card card : game.getCards()) {
|
||||
game.getState().addCard(card);
|
||||
}
|
||||
|
|
@ -122,6 +117,7 @@ class KarnLiberatedEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
((GameImpl) game).initPlayerDefaultWatchers(player.getId());
|
||||
player.init(game);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import java.util.UUID;
|
|||
public final class KayaOrzhovUsurper extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterNonlandPermanent("permanent with converted mana cost 1 or less");
|
||||
= new FilterNonlandPermanent("nonland permanent with converted mana cost 1 or less");
|
||||
|
||||
static {
|
||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 2));
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.*;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
|
|
@ -29,6 +31,8 @@ import mage.target.Target;
|
|||
import mage.target.TargetPermanent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import static mage.constants.Outcome.Benefit;
|
||||
|
|
@ -106,7 +110,7 @@ class LumberingBattlementEffect extends OneShotEffect {
|
|||
if (!player.choose(Outcome.Neutral, target, source.getSourceId(), game)) {
|
||||
return false;
|
||||
}
|
||||
Cards cards = new CardsImpl();
|
||||
Set<Card> cards = new HashSet();
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent != null) {
|
||||
|
|
@ -114,10 +118,8 @@ class LumberingBattlementEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
return player.moveCardsToExile(
|
||||
cards.getCards(game), source, game, true,
|
||||
CardUtil.getExileZoneId(
|
||||
game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()
|
||||
), sourcePerm.getIdName()
|
||||
cards, source, game, true,
|
||||
CardUtil.getCardExileZoneId(game, source), sourcePerm.getIdName()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import java.util.UUID;
|
|||
public final class PriestOfForgottenGods extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter
|
||||
= new FilterControlledCreaturePermanent("two other creatures");
|
||||
= new FilterControlledCreaturePermanent("other creatures");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public final class SilhanaWayfinder extends CardImpl {
|
|||
// When Silhana Wayfinder enters the battlefield, look at the top four cards of your library. You may reveal a creature or land card from among them and put it on top of your library. Put the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(
|
||||
new StaticValue(4), false, new StaticValue(1), filter, Zone.LIBRARY, false,
|
||||
true, false, Zone.LIBRARY, false, true, false
|
||||
true, true, Zone.LIBRARY, false, true, false
|
||||
).setText("look at the top four cards of your library. " +
|
||||
"You may reveal a creature or land card from among them " +
|
||||
"and put it on top of your library. Put the rest " +
|
||||
|
|
|
|||
|
|
@ -1,30 +1,34 @@
|
|||
|
||||
package mage.cards.t;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.InfoEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Wehk
|
||||
*/
|
||||
public final class TransguildCourier extends CardImpl {
|
||||
|
||||
public TransguildCourier(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}");
|
||||
this.subtype.add(SubType.GOLEM);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
|
||||
this.color.setWhite(true);
|
||||
this.color.setBlue(true);
|
||||
this.color.setBlack(true);
|
||||
this.color.setRed(true);
|
||||
this.color.setGreen(true);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("{this} is all colors")));
|
||||
}
|
||||
|
||||
public TransguildCourier(final TransguildCourier card) {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersAllEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -68,7 +69,7 @@ class UnbreakableFormationEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
game.addEffect(new GainAbilityControlledEffect(
|
||||
IndestructibleAbility.getInstance(), Duration.EndOfTurn,
|
||||
VigilanceAbility.getInstance(), Duration.EndOfTurn,
|
||||
StaticFilters.FILTER_PERMANENT_CREATURE
|
||||
), source);
|
||||
return new AddCountersAllEffect(
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.Effect;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
|
|
@ -20,7 +21,7 @@ import java.util.UUID;
|
|||
public final class WindstormDrake extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter
|
||||
= new FilterCreaturePermanent("creatures you control with flying");
|
||||
= new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.add(new AbilityPredicate(FlyingAbility.class));
|
||||
|
|
@ -37,9 +38,11 @@ public final class WindstormDrake extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Other creatures you control with flying get +1/+0.
|
||||
this.addAbility(new SimpleStaticAbility(new BoostControlledEffect(
|
||||
Effect effect = new BoostControlledEffect(
|
||||
1, 0, Duration.WhileOnBattlefield, filter, true
|
||||
)));
|
||||
);
|
||||
effect.setText("Other creatures you control with flying get +1/+0");
|
||||
this.addAbility(new SimpleStaticAbility(effect));
|
||||
}
|
||||
|
||||
private WindstormDrake(final WindstormDrake card) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue