mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Merge branch 'snowCast' into 'master'
AbilityUtils: CastTotalSnowManaSpent for snow spent See merge request core-developers/forge!3655
This commit is contained in:
@@ -20,6 +20,7 @@ import forge.game.card.*;
|
|||||||
import forge.game.cost.Cost;
|
import forge.game.cost.Cost;
|
||||||
import forge.game.keyword.Keyword;
|
import forge.game.keyword.Keyword;
|
||||||
import forge.game.keyword.KeywordInterface;
|
import forge.game.keyword.KeywordInterface;
|
||||||
|
import forge.game.mana.Mana;
|
||||||
import forge.game.mana.ManaConversionMatrix;
|
import forge.game.mana.ManaConversionMatrix;
|
||||||
import forge.game.mana.ManaCostBeingPaid;
|
import forge.game.mana.ManaCostBeingPaid;
|
||||||
import forge.game.player.Player;
|
import forge.game.player.Player;
|
||||||
@@ -1771,6 +1772,18 @@ public class AbilityUtils {
|
|||||||
if (sq[0].startsWith("CastTotalManaSpent")) {
|
if (sq[0].startsWith("CastTotalManaSpent")) {
|
||||||
return CardFactoryUtil.doXMath(c.getCastSA() != null ? c.getCastSA().getTotalManaSpent() : 0, expr, c);
|
return CardFactoryUtil.doXMath(c.getCastSA() != null ? c.getCastSA().getTotalManaSpent() : 0, expr, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sq[0].equals("CastTotalSnowManaSpent")) {
|
||||||
|
int v = 0;
|
||||||
|
if (c.getCastSA() != null) {
|
||||||
|
for (Mana m : c.getCastSA().getPayingMana()) {
|
||||||
|
if (m.isSnow()) {
|
||||||
|
v += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return CardFactoryUtil.doXMath(v, expr, c);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return CardFactoryUtil.xCount(c, s2);
|
return CardFactoryUtil.xCount(c, s2);
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
Name:Ugin's Insight
|
Name:Ugin's Insight
|
||||||
ManaCost:3 U U
|
ManaCost:3 U U
|
||||||
Types:Sorcery
|
Types:Sorcery
|
||||||
A:SP$ Scry | Cost$ 3 U U | ScryNum$ X | References$ X | SpellDescription$ Scry X, where X is the highest converted mana cost among permanents you control, then draw three cards. | SubAbility$ DBDraw
|
A:SP$ Scry | Cost$ 3 U U | ScryNum$ X | References$ X | SubAbility$ DBDraw | SpellDescription$ Scry X, where X is the highest converted mana cost among permanents you control, then draw three cards.
|
||||||
SVar:X:Count$MaxCMCYouCtrl
|
SVar:X:Count$MaxCMCYouCtrl
|
||||||
SVar:DBDraw:DB$Draw | NumCards$ 3
|
SVar:DBDraw:DB$ Draw | NumCards$ 3
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/ugins_insight.jpg
|
|
||||||
Oracle:Scry X, where X is the highest converted mana cost among permanents you control, then draw three cards.
|
Oracle:Scry X, where X is the highest converted mana cost among permanents you control, then draw three cards.
|
||||||
|
|||||||
8
forge-gui/res/cardsfolder/upcoming/graven_lore.txt
Normal file
8
forge-gui/res/cardsfolder/upcoming/graven_lore.txt
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
Name:Graven Lore
|
||||||
|
ManaCost:3 U U
|
||||||
|
Types:Snow Instant
|
||||||
|
A:SP$ Scry | Cost$ 3 U U | ScryNum$ X | References$ X | SubAbility$ DBDraw | SpellDescription$ Scry X, where is the amount of {S} spent to cast this spell, then draw three cards. ({S} is mana from a snow source.)
|
||||||
|
SVar:DBDraw:DB$ Draw | NumCards$ 3
|
||||||
|
SVar:X:Count$CastTotalSnowManaSpent
|
||||||
|
DeckNeeds:Type$Snow
|
||||||
|
Oracle:Scry X, where is the amount of {S} spent to cast this spell, then draw three cards. ({S} is mana from a snow source.)
|
||||||
Reference in New Issue
Block a user