mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
New Omnath and support
This commit is contained in:
@@ -2653,13 +2653,19 @@ public class AbilityUtils {
|
||||
}
|
||||
|
||||
int colorOcurrencices = 0;
|
||||
byte colorCode = ManaAtom.fromName(sq[1]);
|
||||
byte colorCode;
|
||||
if (sq.length > 1) {
|
||||
colorCode = ManaAtom.fromName(sq[1]);
|
||||
} else {
|
||||
colorCode = ManaAtom.ALL_MANA_COLORS;
|
||||
}
|
||||
for (Card c0 : cards) {
|
||||
for (ManaCostShard sh : c0.getManaCost()) {
|
||||
if (sh.isColor(colorCode))
|
||||
colorOcurrencices++;
|
||||
}
|
||||
}
|
||||
|
||||
return doXMath(colorOcurrencices, expr, c, ctb);
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ public class PeekAndRevealEffect extends SpellAbilityEffect {
|
||||
int numPeek = AbilityUtils.calculateAmount(source, peekAmount, sa);
|
||||
|
||||
List<Player> libraryPlayers = getDefinedPlayersOrTargeted(sa);
|
||||
Player peekingPlayer = sa.getActivatingPlayer();
|
||||
final Player peekingPlayer = sa.getActivatingPlayer();
|
||||
|
||||
for (Player libraryToPeek : libraryPlayers) {
|
||||
final PlayerZone library = libraryToPeek.getZone(ZoneType.Library);
|
||||
@@ -77,8 +77,7 @@ public class PeekAndRevealEffect extends SpellAbilityEffect {
|
||||
peekCards.add(library.get(i));
|
||||
}
|
||||
|
||||
CardCollectionView revealableCards = CardLists.getValidCards(peekCards, revealValid,
|
||||
sa.getActivatingPlayer(), source, sa);
|
||||
CardCollectionView revealableCards = CardLists.getValidCards(peekCards, revealValid, peekingPlayer, source, sa);
|
||||
boolean doReveal = !sa.hasParam("NoReveal") && !revealableCards.isEmpty();
|
||||
if (!noPeek) {
|
||||
peekingPlayer.getController().reveal(peekCards, ZoneType.Library, libraryToPeek,
|
||||
|
||||
@@ -34,16 +34,14 @@ public class ReplaceManaEffect extends SpellAbilityEffect {
|
||||
// replace type and amount
|
||||
replaced = sa.getParam("ReplaceMana");
|
||||
if ("Any".equals(replaced)) {
|
||||
byte rs = MagicColor.GREEN;
|
||||
rs = player.getController().chooseColor("Choose a color", sa, ColorSet.ALL_COLORS);
|
||||
byte rs = player.getController().chooseColor("Choose a color", sa, ColorSet.ALL_COLORS);
|
||||
replaced = MagicColor.toShortString(rs);
|
||||
}
|
||||
} else if (sa.hasParam("ReplaceType")) {
|
||||
// replace color and colorless
|
||||
String color = sa.getParam("ReplaceType");
|
||||
if ("Any".equals(color)) {
|
||||
byte rs = MagicColor.GREEN;
|
||||
rs = player.getController().chooseColor("Choose a color", sa, ColorSet.ALL_COLORS);
|
||||
byte rs = player.getController().chooseColor("Choose a color", sa, ColorSet.ALL_COLORS);
|
||||
color = MagicColor.toShortString(rs);
|
||||
}
|
||||
for (byte c : MagicColor.WUBRGC) {
|
||||
|
||||
@@ -121,16 +121,17 @@ public class ManaPool extends ManaConversionMatrix implements Iterable<Mana> {
|
||||
List<Mana> cleared = Lists.newArrayList();
|
||||
if (floatingMana.isEmpty()) { return cleared; }
|
||||
|
||||
boolean convertToColorless = false;
|
||||
Byte convertTo = null;
|
||||
|
||||
final Map<AbilityKey, Object> runParams = AbilityKey.mapFromAffected(owner);
|
||||
runParams.put(AbilityKey.Mana, "C");
|
||||
switch (owner.getGame().getReplacementHandler().run(ReplacementType.LoseMana, runParams)) {
|
||||
case NotReplaced:
|
||||
break;
|
||||
case Skipped:
|
||||
return cleared;
|
||||
default: // the only ones that does replace losing Mana are making it colorless instead
|
||||
convertToColorless = true;
|
||||
default:
|
||||
convertTo = ManaAtom.fromName((String) runParams.get(AbilityKey.Mana));
|
||||
break;
|
||||
|
||||
}
|
||||
@@ -139,8 +140,8 @@ public class ManaPool extends ManaConversionMatrix implements Iterable<Mana> {
|
||||
if (isEndOfPhase) {
|
||||
keys.removeAll(StaticAbilityUnspentMana.getManaToKeep(owner));
|
||||
}
|
||||
if (convertToColorless) {
|
||||
keys.remove(Byte.valueOf((byte)ManaAtom.COLORLESS));
|
||||
if (convertTo != null) {
|
||||
keys.remove(convertTo);
|
||||
}
|
||||
|
||||
for (Byte b : keys) {
|
||||
@@ -148,14 +149,14 @@ public class ManaPool extends ManaConversionMatrix implements Iterable<Mana> {
|
||||
final List<Mana> pMana = Lists.newArrayList();
|
||||
if (isEndOfPhase && !owner.getGame().getPhaseHandler().is(PhaseType.CLEANUP)) {
|
||||
for (final Mana mana : cm) {
|
||||
if (mana.getManaAbility()!= null && mana.getManaAbility().isPersistentMana()) {
|
||||
if (mana.getManaAbility() != null && mana.getManaAbility().isPersistentMana()) {
|
||||
pMana.add(mana);
|
||||
}
|
||||
}
|
||||
}
|
||||
cm.removeAll(pMana);
|
||||
if (convertToColorless) {
|
||||
convertManaColor(b, (byte)ManaAtom.COLORLESS);
|
||||
if (convertTo != null) {
|
||||
convertManaColor(b, convertTo);
|
||||
cm.addAll(pMana);
|
||||
} else {
|
||||
cleared.addAll(cm);
|
||||
|
||||
@@ -47,6 +47,7 @@ public class ReplaceLoseMana extends ReplacementEffect {
|
||||
@Override
|
||||
public void setReplacingObjects(Map<AbilityKey, Object> runParams, SpellAbility sa) {
|
||||
sa.setReplacingObject(AbilityKey.Player, runParams.get(AbilityKey.Affected));
|
||||
sa.setReplacingObject(AbilityKey.Mana, runParams.get(AbilityKey.Mana));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Name:Horizon Stone
|
||||
ManaCost:5
|
||||
Types:Artifact
|
||||
R:Event$ LoseMana | ValidPlayer$ You | ReplacementResult$ Replaced | ActiveZones$ Battlefield | Description$ If you would lose unspent mana, that mana becomes colorless instead.
|
||||
R:Event$ LoseMana | ValidPlayer$ You | ReplacementResult$ Replaced | ReplaceWith$ ConvertMana | ActiveZones$ Battlefield | Description$ If you would lose unspent mana, that mana becomes colorless instead.
|
||||
SVar:ConvertMana:DB$ ReplaceMana | ReplaceType$ C
|
||||
Oracle:If you would lose unspent mana, that mana becomes colorless instead.
|
||||
|
||||
@@ -6,6 +6,7 @@ K:Indestructible
|
||||
S:Mode$ Continuous | Affected$ Card.Self | RemoveType$ Creature | CheckSVar$ X | SVarCompare$ LT7 | Description$ As long as your devotion to green and blue is less than seven, CARDNAME isn't a creature.
|
||||
SVar:X:Count$DevotionDual.Green.Blue
|
||||
S:Mode$ Continuous | Affected$ You | SetMaxHandSize$ Unlimited | Description$ You have no maximum hand size.
|
||||
R:Event$ LoseMana | ValidPlayer$ You | ReplacementResult$ Replaced | ActiveZones$ Battlefield | Description$ If you would lose unspent mana, that mana becomes colorless instead.
|
||||
R:Event$ LoseMana | ValidPlayer$ You | ReplacementResult$ Replaced | ReplaceWith$ ConvertMana | ActiveZones$ Battlefield | Description$ If you would lose unspent mana, that mana becomes colorless instead.
|
||||
SVar:ConvertMana:DB$ ReplaceMana | ReplaceType$ C
|
||||
SVar:BuffedBy:Permanent.Green,Permanent.Blue
|
||||
Oracle:Indestructible\nAs long as your devotion to green and blue is less than seven, Kruphix isn't a creature.\nYou have no maximum hand size.\nIf you would lose unspent mana, that mana becomes colorless instead.
|
||||
|
||||
14
forge-gui/res/cardsfolder/upcoming/omnath_locus_of_all.txt
Normal file
14
forge-gui/res/cardsfolder/upcoming/omnath_locus_of_all.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
Name:Omnath, Locus of All
|
||||
ManaCost:W U P R G
|
||||
Types:Legendary Creature Phyrexian Elemental
|
||||
PT:4/4
|
||||
R:Event$ LoseMana | ValidPlayer$ You | ReplacementResult$ Replaced | ReplaceWith$ ConvertMana | ActiveZones$ Battlefield | Description$ If you would lose unspent mana, that mana becomes black instead.
|
||||
SVar:ConvertMana:DB$ ReplaceMana | ReplaceType$ B
|
||||
T:Mode$ Phase | ValidPlayer$ You | Phase$ Main1 | TriggerZones$ Battlefield | Execute$ TrigPeek | TriggerDescription$ At the beginning of your precombat main phase, look at the top card of your library. You may reveal that card if it has three or more colored mana symbols in its mana cost. If you do, add three mana in any combination of colors and put it into your hand. If you don’t reveal it, put it into your hand.
|
||||
SVar:TrigPeek:DB$ PeekAndReveal | Defined$ You | NoReveal$ True | RememberPeeked$ True | SubAbility$ DBReveal
|
||||
SVar:DBReveal:DB$ PeekAndReveal | Defined$ You | NoPeek$ True | RevealOptional$ True | ImprintRevealed$ True | ConditionCheckSVar$ ColorAmount | ConditionSVarCompare$ GE3 | SubAbility$ DBMana
|
||||
SVar:DBMana:DB$ Mana | Produced$ Combo Any | Amount$ 3 | ConditionDefined$ Imprinted | ConditionPresent$ Card | SubAbility$ DBMove
|
||||
SVar:DBMove:DB$ ChangeZone | Origin$ Library | Destination$ Hand | Defined$ Remembered | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearImprinted$ True
|
||||
SVar:ColorAmount:Remembered$ChromaSource
|
||||
Oracle:If you would lose unspent mana, that mana becomes black instead.\nAt the beginning of your precombat main phase, look at the top card of your library. You may reveal that card if it has three or more colored mana symbols in its mana cost. If you do, add three mana in any combination of colors and put it into your hand. If you don’t reveal it, put it into your hand.
|
||||
@@ -1,7 +1,6 @@
|
||||
All creatures able to block CARDNAME do so.
|
||||
Banding
|
||||
CARDNAME's activated abilities can't be activated.
|
||||
CARDNAME can block any number of creatures.
|
||||
CARDNAME can't be regenerated.
|
||||
CARDNAME must be blocked if able.
|
||||
CARDNAME doesn't untap during your untap step.
|
||||
@@ -38,7 +37,6 @@ Shroud
|
||||
Split Second
|
||||
Swampwalk
|
||||
Trample
|
||||
Unblockable
|
||||
Undying
|
||||
Vigilance
|
||||
Wither
|
||||
|
||||
Reference in New Issue
Block a user