mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Merge pull request #24 from Northmoc/diffManaValue
Sudden Insight without Pump (Count$DifferentManaValue) - needs to be merged so other merged cards will work @Agetian
This commit is contained in:
@@ -2662,6 +2662,27 @@ public class AbilityUtils {
|
|||||||
return doXMath(manaCost.size(), expr, c, ctb);
|
return doXMath(manaCost.size(), expr, c, ctb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Count$DifferentManaValue<zone> <restriction>
|
||||||
|
if (l[0].contains("DifferentManaValue")) {
|
||||||
|
String[] sqparts = l[0].split(" ", 2);
|
||||||
|
final String[] rest = sqparts[1].split(",");
|
||||||
|
|
||||||
|
final CardCollectionView cardsInZones = sqparts[0].length() > 18
|
||||||
|
? game.getCardsIn(ZoneType.listValueOf(sqparts[0].substring(18)))
|
||||||
|
: game.getCardsIn(ZoneType.Battlefield);
|
||||||
|
|
||||||
|
CardCollection cards = CardLists.getValidCards(cardsInZones, rest, player, c, ctb);
|
||||||
|
final List<Integer> cmcs = Lists.newArrayList();
|
||||||
|
|
||||||
|
for (Card card : cards) {
|
||||||
|
Integer cmc = card.getCMC();
|
||||||
|
if (!cmcs.contains(cmc)) {
|
||||||
|
cmcs.add(cmc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return doXMath(cmcs.size(), expr, c, ctb);
|
||||||
|
}
|
||||||
|
|
||||||
if (sq[0].equals("StormCount")) {
|
if (sq[0].equals("StormCount")) {
|
||||||
return doXMath(game.getStack().getSpellsCastThisTurn().size() - 1, expr, c, ctb);
|
return doXMath(game.getStack().getSpellsCastThisTurn().size() - 1, expr, c, ctb);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
Name:Sudden Insight
|
Name:Sudden Insight
|
||||||
ManaCost:4 U U
|
ManaCost:4 U U
|
||||||
Types:Instant
|
Types:Instant
|
||||||
A:SP$ PumpAll | ValidCards$ Card.YouOwn+nonLand | PumpZone$ Graveyard | RememberAllPumped$ True | SubAbility$ DBDraw | StackDescription$ SpellDescription | SpellDescription$ Draw a card for each different mana value among nonland cards in your graveyard.
|
A:SP$ Draw | NumCards$ X | SpellDescription$ Draw a card for each different mana value among nonland cards in your graveyard.
|
||||||
SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ X | SubAbility$ DBCleanup | StackDescription$ None
|
SVar:X:Count$DifferentManaValueGraveyard Card.YouOwn+nonLand
|
||||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
|
||||||
SVar:X:Remembered$DifferentCMC
|
|
||||||
Oracle:Draw a card for each different mana value among nonland cards in your graveyard.
|
Oracle:Draw a card for each different mana value among nonland cards in your graveyard.
|
||||||
|
|||||||
Reference in New Issue
Block a user