mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Add Niv-Mizzet Reborn
This commit is contained in:
@@ -112,6 +112,11 @@ public final class ColorSet implements Comparable<ColorSet>, Iterable<Byte>, Ser
|
|||||||
return (this.myColor & colormask) == colormask;
|
return (this.myColor & colormask) == colormask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** this has exactly the colors defined by operand. */
|
||||||
|
public boolean hasExactlyColor(final int colormask) {
|
||||||
|
return this.myColor == colormask;
|
||||||
|
}
|
||||||
|
|
||||||
/** this has no other colors except defined by operand. */
|
/** this has no other colors except defined by operand. */
|
||||||
public boolean hasNoColorsExcept(final ColorSet other) {
|
public boolean hasNoColorsExcept(final ColorSet other) {
|
||||||
return hasNoColorsExcept(other.getColor());
|
return hasNoColorsExcept(other.getColor());
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ public final class MagicColor {
|
|||||||
|
|
||||||
public static final byte[] WUBRG = new byte[] { WHITE, BLUE, BLACK, RED, GREEN };
|
public static final byte[] WUBRG = new byte[] { WHITE, BLUE, BLACK, RED, GREEN };
|
||||||
public static final byte[] WUBRGC = new byte[] { WHITE, BLUE, BLACK, RED, GREEN, COLORLESS };
|
public static final byte[] WUBRGC = new byte[] { WHITE, BLUE, BLACK, RED, GREEN, COLORLESS };
|
||||||
|
public static final byte[] COLORPAIR = new byte[] { WHITE | BLUE, BLUE | BLACK, BLACK | RED, RED | GREEN, GREEN |WHITE,
|
||||||
|
WHITE | BLUE, BLUE | RED, BLACK | GREEN, RED | WHITE, GREEN | BLUE};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Private constructor to prevent instantiation.
|
* Private constructor to prevent instantiation.
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package forge.game.ability.effects;
|
package forge.game.ability.effects;
|
||||||
|
|
||||||
|
import forge.card.MagicColor;
|
||||||
import forge.game.Game;
|
import forge.game.Game;
|
||||||
import forge.game.GameActionUtil;
|
import forge.game.GameActionUtil;
|
||||||
import forge.game.GameEntityCounterTable;
|
import forge.game.GameEntityCounterTable;
|
||||||
@@ -9,6 +10,7 @@ import forge.game.card.Card;
|
|||||||
import forge.game.card.CardCollection;
|
import forge.game.card.CardCollection;
|
||||||
import forge.game.card.CardCollectionView;
|
import forge.game.card.CardCollectionView;
|
||||||
import forge.game.card.CardLists;
|
import forge.game.card.CardLists;
|
||||||
|
import forge.game.card.CardPredicates;
|
||||||
import forge.game.card.CardZoneTable;
|
import forge.game.card.CardZoneTable;
|
||||||
import forge.game.card.CounterType;
|
import forge.game.card.CounterType;
|
||||||
import forge.game.player.DelayedReveal;
|
import forge.game.player.DelayedReveal;
|
||||||
@@ -224,6 +226,20 @@ public class DigEffect extends SpellAbilityEffect {
|
|||||||
int numChanging = Math.min(destZone1ChangeNum, valid.size());
|
int numChanging = Math.min(destZone1ChangeNum, valid.size());
|
||||||
movedCards = CardLists.getRandomSubList(valid, numChanging);
|
movedCards = CardLists.getRandomSubList(valid, numChanging);
|
||||||
}
|
}
|
||||||
|
else if (sa.hasParam("ForEachColorPair")) {
|
||||||
|
movedCards = new CardCollection();
|
||||||
|
if (p == chooser) {
|
||||||
|
chooser.getController().tempShowCards(top);
|
||||||
|
}
|
||||||
|
for (final byte pair : MagicColor.COLORPAIR) {
|
||||||
|
Card chosen = chooser.getController().chooseSingleEntityForEffect(CardLists.filter(valid, CardPredicates.isExactlyColor(pair)),
|
||||||
|
delayedReveal, sa, "Choose one", false, p);
|
||||||
|
if (chosen != null) {
|
||||||
|
movedCards.add(chosen);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
chooser.getController().endTempShowCards();
|
||||||
|
}
|
||||||
else if (allButOne) {
|
else if (allButOne) {
|
||||||
movedCards = new CardCollection(valid);
|
movedCards = new CardCollection(valid);
|
||||||
String prompt;
|
String prompt;
|
||||||
|
|||||||
@@ -234,6 +234,15 @@ public final class CardPredicates {
|
|||||||
};
|
};
|
||||||
} // getColor()
|
} // getColor()
|
||||||
|
|
||||||
|
public static final Predicate<Card> isExactlyColor(final byte color) {
|
||||||
|
return new Predicate<Card>() {
|
||||||
|
@Override
|
||||||
|
public boolean apply(final Card c) {
|
||||||
|
return CardUtil.getColors(c).hasExactlyColor(color);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
public static final Predicate<Card> isColorless() {
|
public static final Predicate<Card> isColorless() {
|
||||||
return new Predicate<Card>() {
|
return new Predicate<Card>() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
8
forge-gui/res/cardsfolder/n/niv_mizzet_reborn.txt
Normal file
8
forge-gui/res/cardsfolder/n/niv_mizzet_reborn.txt
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
Name:Niv-Mizzet Reborn
|
||||||
|
ManaCost:W U B R G
|
||||||
|
Types:Legendary Creature Dragon Avatar
|
||||||
|
PT:6/6
|
||||||
|
K:Flying
|
||||||
|
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigDig | TriggerDescription$ When CARDNAME enters the battlefield, reveal the top ten cards of your library. For each color pair, choose a card that's exactly those colors from among them. Put the chosen cards into your hand and the rest on the bottom of your library in a random order.
|
||||||
|
SVar:TrigDig:DB$ Dig | DigNum$ 10 | Reveal$ True | ForEachColorPair$ True | RestRandomOrder$ True
|
||||||
|
Oracle:Flying\nWhen Niv-Mizzet Reborn enters the battlefield, reveal the top ten cards of your library. For each color pair, choose a card that's exactly those colors from among them. Put the chosen cards into your hand and the rest on the bottom of your library in a random order.
|
||||||
Reference in New Issue
Block a user