xCount Cleanup

This commit is contained in:
tool4EvEr
2022-04-13 21:16:10 +02:00
parent c320688b73
commit 9c33c3a27e
39 changed files with 81 additions and 144 deletions

View File

@@ -2662,27 +2662,6 @@ public class AbilityUtils {
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")) {
return doXMath(game.getStack().getSpellsCastThisTurn().size() - 1, expr, c, ctb);
}
@@ -2711,25 +2690,6 @@ public class AbilityUtils {
return MyRandom.getRandom().nextInt(1+max-min) + min;
}
// Count$SumPower_valid
if (sq[0].startsWith("SumPower")) {
final String[] restrictions = l[0].split("_");
CardCollection filteredCards = CardLists.getValidCards(game.getCardsIn(ZoneType.Battlefield), restrictions[1], player, c, ctb);
return doXMath(Aggregates.sum(filteredCards, CardPredicates.Accessors.fnGetNetPower), expr, c, ctb);
}
// Count$SumCMC_valid
if (sq[0].startsWith("SumCMC")) {
ZoneType zone = ZoneType.Battlefield;
//graveyard support for Inferno Project (may need other zones or multi-zone in future)
if (sq[0].contains("Graveyard"))
zone = ZoneType.Graveyard;
final String[] restrictions = l[0].split("_");
CardCollectionView cardsonbattlefield = game.getCardsIn(zone);
CardCollection filteredCards = CardLists.getValidCards(cardsonbattlefield, restrictions[1], player, c, ctb);
return Aggregates.sum(filteredCards, CardPredicates.Accessors.fnGetCmc);
}
// Count$TotalCounters.<counterType>_<valid>
if (sq[0].startsWith("TotalCounters")) {
final String[] restrictions = l[0].split("_");
@@ -2795,49 +2755,19 @@ public class AbilityUtils {
// count valid cards in any specified zone/s
if (sq[0].startsWith("Valid")) {
String[] lparts = l[0].split(" ", 2);
String[] paidparts = l[0].split("\\$", 2);
String[] lparts = paidparts[0].split(" ", 2);
final CardCollectionView cardsInZones = lparts[0].length() > 5
? game.getCardsIn(ZoneType.listValueOf(lparts[0].substring(5)))
: game.getCardsIn(ZoneType.Battlefield);
if (paidparts.length > 1) {
return doXMath(handlePaid(CardLists.getValidCards(cardsInZones, lparts[1], player, c, ctb), paidparts[1], c, ctb), expr, c, ctb);
}
return doXMath(CardLists.getValidCardCount(cardsInZones, lparts[1], player, c, ctb), expr, c, ctb);
}
if (sq[0].startsWith("GreatestPower")) {
final String[] lparts = l[0].split("_", 2);
final String[] rest = lparts[1].split(",");
final CardCollectionView cardsInZones = lparts[0].length() > 13
? game.getCardsIn(ZoneType.listValueOf(lparts[0].substring(13)))
: game.getCardsIn(ZoneType.Battlefield);
CardCollection list = CardLists.getValidCards(cardsInZones, rest, player, c, ctb);
int highest = 0;
for (final Card crd : list) {
if (crd.getNetPower() > highest) {
highest = crd.getNetPower();
}
}
return highest;
}
if (sq[0].startsWith("GreatestToughness_")) {
final String restriction = l[0].substring(18);
CardCollection list = CardLists.getValidCards(game.getCardsIn(ZoneType.Battlefield), restriction, player, c, ctb);
int highest = 0;
for (final Card crd : list) {
if (crd.getNetToughness() > highest) {
highest = crd.getNetToughness();
}
}
return highest;
}
if (sq[0].startsWith("HighestCMC_")) {
final String restriction = l[0].substring(11);
CardCollection list = CardLists.getValidCards(game.getCardsInGame(), restriction, player, c, ctb);
return Aggregates.max(list, CardPredicates.Accessors.fnGetCmc);
}
if (sq[0].startsWith("MostCardName")) {
String[] lparts = l[0].split(" ", 2);
final String[] rest = lparts[1].split(",");
@@ -2877,19 +2807,6 @@ public class AbilityUtils {
return doXMath(crdname.size(), expr, c, ctb);
}
if (sq[0].startsWith("DifferentPower_")) {
final List<Integer> powers = Lists.newArrayList();
final String restriction = l[0].substring(15);
CardCollection list = CardLists.getValidCards(game.getCardsIn(ZoneType.Battlefield), restriction, player, c, ctb);
for (final Card card : list) {
Integer pow = card.getNetPower();
if (!powers.contains(pow)) {
powers.add(pow);
}
}
return doXMath(powers.size(), expr, c, ctb);
}
if (sq[0].startsWith("MostProminentCreatureType")) {
String restriction = l[0].split(" ")[1];
CardCollection list = CardLists.getValidCards(game.getCardsIn(ZoneType.Battlefield), restriction, player, c, ctb);
@@ -2929,6 +2846,31 @@ public class AbilityUtils {
}
return doXMath(creatTypes.size(), expr, c, ctb);
}
// TODO move below to handlePaid
if (sq[0].startsWith("SumPower")) {
final String[] restrictions = l[0].split("_");
CardCollection filteredCards = CardLists.getValidCards(game.getCardsIn(ZoneType.Battlefield), restrictions[1], player, c, ctb);
return doXMath(Aggregates.sum(filteredCards, CardPredicates.Accessors.fnGetNetPower), expr, c, ctb);
}
if (sq[0].startsWith("HighestCMC_")) {
final String restriction = l[0].substring(11);
CardCollection list = CardLists.getValidCards(game.getCardsInGame(), restriction, player, c, ctb);
return Aggregates.max(list, CardPredicates.Accessors.fnGetCmc);
}
if (sq[0].startsWith("DifferentPower_")) {
final List<Integer> powers = Lists.newArrayList();
final String restriction = l[0].substring(15);
CardCollection list = CardLists.getValidCards(game.getCardsIn(ZoneType.Battlefield), restriction, player, c, ctb);
for (final Card card : list) {
Integer pow = card.getNetPower();
if (!powers.contains(pow)) {
powers.add(pow);
}
}
return doXMath(powers.size(), expr, c, ctb);
}
// Complex counting methods
CardCollectionView someCards = getCardListForXCount(c, player, sq, ctb);
@@ -3628,13 +3570,14 @@ public class AbilityUtils {
}
if (string.startsWith("GreatestPower")) {
int highest = 0;
for (final Card crd : paidList) {
if (crd.getNetPower() > highest) {
highest = crd.getNetPower();
}
}
return highest;
return Aggregates.max(paidList, CardPredicates.Accessors.fnGetNetPower);
}
if (string.startsWith("GreatestToughness")) {
return Aggregates.max(paidList, CardPredicates.Accessors.fnGetNetToughness);
}
if (string.startsWith("SumToughness")) {
return Aggregates.sum(paidList, CardPredicates.Accessors.fnGetNetToughness);
}
if (string.startsWith("DifferentCMC")) {
@@ -3646,11 +3589,7 @@ public class AbilityUtils {
}
if (string.startsWith("SumCMC")) {
int sumCMC = 0;
for (Card c : paidList) {
sumCMC += c.getCMC();
}
return sumCMC;
return Aggregates.sum(paidList, CardPredicates.Accessors.fnGetCmc);
}
if (string.startsWith("Valid")) {

View File

@@ -4,6 +4,6 @@ Types:Creature Dog Shaman
PT:2/1
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigToughDraw | TriggerDescription$ At the beginning of your upkeep, draw a card if you control the creature with the greatest toughness or tied for the greatest toughness.
SVar:TrigToughDraw:DB$ Draw | Defined$ You | ConditionPresent$ Creature | ConditionCompare$ GE1 | ConditionCheckSVar$ YourTough | ConditionSVarCompare$ GEOppsTough
SVar:YourTough:Count$GreatestToughness_Creature.YouCtrl
SVar:OppsTough:Count$GreatestToughness_Creature.YouDontCtrl
SVar:YourTough:Count$Valid Creature.YouCtrl$GreatestToughness
SVar:OppsTough:Count$Valid Creature.YouDontCtrl$GreatestToughness
Oracle:At the beginning of your upkeep, draw a card if you control the creature with the greatest toughness or tied for the greatest toughness.

View File

@@ -5,5 +5,5 @@ PT:4/3
K:First Strike
K:Partner
A:AB$ Mana | Cost$ T | Produced$ R | Amount$ X | SpellDescription$ Add an amount of {R} equal to the greatest power among creatures you control that entered the battlefield this turn.
SVar:X:Count$GreatestPower_Creature.YouCtrl+ThisTurnEntered
SVar:X:Count$Valid Creature.YouCtrl+ThisTurnEntered$GreatestPower
Oracle:First strike\n{T}: Add an amount of {R} equal to the greatest power among creatures you control that entered the battlefield this turn.\nPartner (You can have two commanders if both have partner.)

View File

@@ -3,6 +3,6 @@ ManaCost:5 G G
Types:Creature Ooze
PT:*/*
S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ X | SetToughness$ X | Description$ CARDNAME's power and toughness are each equal to the total mana value of other creatures you control.
SVar:X:Count$SumCMC_Creature.Other+YouCtrl
SVar:X:Count$Valid Creature.Other+YouCtrl$SumCMC
SVar:NeedsToPlayVar:X GE4
Oracle:Ancient Ooze's power and toughness are each equal to the total mana value of other creatures you control.

View File

@@ -5,5 +5,5 @@ PT:3/3
K:Haste
A:AB$ Animate | Cost$ 1 | Power$ Y | Boast$ True | StackDescription$ SpellDescription | SpellDescription$ You may change CARDNAME's base power to 1 plus the greatest power among other creatures you control until end of turn.
SVar:Y:SVar$X/Plus.1
SVar:X:Count$GreatestPower_Creature.Other+YouCtrl
SVar:X:Count$Valid Creature.Other+YouCtrl$GreatestPower
Oracle:Haste\nBoast — {1}: You may change Arni Brokenbrow's base power to 1 plus the greatest power among other creatures you control until end of turn. (Activate only if this creature attacked this turn and only once each turn.)

View File

@@ -7,6 +7,6 @@ SVar:DBFight:DB$ Fight | Defined$ ParentTarget | ValidTgts$ Creature.YouDontCtrl
SVar:DBPutCounter:DB$ PutCounter | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature | CounterType$ P1P1 | CounterNum$ 2 | TargetMin$ 0 | TargetMax$ 1 | SubAbility$ DBRedMana | SpellDescription$ Add {R}. Put two +1/+1 counters on up to one target creature you control.
SVar:DBRedMana:DB$ Mana | Produced$ R
SVar:DBGainLife:DB$ GainLife | Defined$ You | LifeAmount$ X | SpellDescription$ You gain life equal to the greatest power among creatures you control.
SVar:X:Count$GreatestPower_Creature.YouCtrl
SVar:X:Count$Valid Creature.YouCtrl$GreatestPower
DeckHas:Ability$Counters|LifeGain
Oracle:(As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)\nI — Target creature you control fights up to one target creature you don't control.\nII — Add {R}. Put two +1/+1 counters on up to one target creature you control.\nIII — You gain life equal to the greatest power among creatures you control.

View File

@@ -3,7 +3,7 @@ ManaCost:3 B
Types:Creature Insect
PT:0/5
S:Mode$ Continuous | Affected$ Card.Self | AddPower$ X | Description$ CARDNAME gets +X/+0, where X is the greatest power among creature cards in your graveyard.
SVar:X:Count$GreatestPowerGraveyard_Creature.YouOwn
SVar:X:Count$ValidGraveyard Creature.YouOwn$GreatestPower
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigMill | TriggerDescription$ When CARDNAME enters the battlefield, mill four cards.
SVar:TrigMill:DB$ Mill | Defined$ You | NumCards$ 4
DeckHas:Ability$Graveyard

View File

@@ -4,7 +4,7 @@ Types:Sorcery
A:SP$ Dig | DigNum$ 4 | DestinationZone2$ Graveyard | RememberMovedToZone$ 2 | SubAbility$ DBLifeGain | StackDescription$ SpellDescription | SpellDescription$ Look at the top four cards of your library. Put one of them into your hand and the rest into your graveyard. You gain life equal to the greatest power among creature cards put into your graveyard this way.
SVar:DBLifeGain:DB$ GainLife | Defined$ You | LifeAmount$ X | SubAbility$ DBCleanup | StackDescription$ None
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Count$GreatestPowerGraveyard_Creature.IsRemembered
SVar:X:Count$ValidGraveyard Creature.IsRemembered$GreatestPower
DeckHints:Ability$Graveyard
DeckHas:Ability$LifeGain
Oracle:Look at the top four cards of your library. Put one of them into your hand and the rest into your graveyard. You gain life equal to the greatest power among creature cards put into your graveyard this way.

View File

@@ -3,5 +3,5 @@ ManaCost:2 B
Types:Sorcery
A:SP$ LoseLife | Cost$ 2 B | ValidTgts$ Player | TgtPrompt$ Select target player | LifeAmount$ X | SubAbility$ DBGainLife | SpellDescription$ Target player loses X life and you gain X life, where X is the highest power amongst creatures you control.
SVar:DBGainLife:DB$ GainLife | Defined$ You | LifeAmount$ X
SVar:X:Count$GreatestPower_Creature.YouCtrl
SVar:X:Count$Valid Creature.YouCtrl$GreatestPower
Oracle:Target player loses X life and you gain X life, where X is the greatest power among creatures you control.

View File

@@ -4,6 +4,6 @@ Types:Creature Wolf Spirit
PT:6/6
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigGainLife | TriggerDescription$ When CARDNAME enters the battlefield, you gain life equal to the greatest toughness among other creatures you control.
SVar:TrigGainLife:DB$ GainLife | LifeAmount$ X
SVar:X:Count$GreatestToughness_Creature.YouCtrl+Other
SVar:X:Count$Valid Creature.YouCtrl+Other$GreatestToughness
DeckHas:Ability$LifeGain
Oracle:When Flourishing Hunter enters the battlefield, you gain life equal to the greatest toughness among other creatures you control.

View File

@@ -2,6 +2,6 @@ Name:Fungal Sprouting
ManaCost:3 G
Types:Sorcery
A:SP$ Token | Cost$ 3 G | TokenAmount$ X | TokenScript$ g_1_1_saproling | TokenOwner$ You | SpellDescription$ Create X 1/1 green Saproling creature tokens, where X is the greatest power among creatures you control.
SVar:X:Count$GreatestPower_Creature.YouCtrl
SVar:X:Count$Valid Creature.YouCtrl$GreatestPower
DeckHas:Ability$Token
Oracle:Create X 1/1 green Saproling creature tokens, where X is the greatest power among creatures you control.

View File

@@ -4,7 +4,7 @@ Types:Legendary Planeswalker Garruk
Loyalty:3
A:AB$ Token | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | TokenAmount$ 1 | TokenScript$ g_3_3_beast | TokenOwner$ You | SpellDescription$ Create a 3/3 green Beast creature token.
A:AB$ Draw | Cost$ SubCounter<3/LOYALTY> | Planeswalker$ True | Defined$ You | NumCards$ X | SpellDescription$ Draw cards equal to the greatest power among creatures you control.
SVar:X:Count$GreatestPower_Creature.YouCtrl
SVar:X:Count$Valid Creature.YouCtrl$GreatestPower
A:AB$ Token | Cost$ SubCounter<6/LOYALTY> | Planeswalker$ True | Ultimate$ True | TokenAmount$ Y | TokenScript$ g_6_6_wurm | TokenOwner$ You | SpellDescription$ Create a 6/6 green Wurm creature token for each land you control.
SVar:Y:Count$Valid Land.YouCtrl
Oracle:[+1]: Create a 3/3 green Beast creature token.\n[-3]: Draw cards equal to the greatest power among creatures you control.\n[-6]: Create a 6/6 green Wurm creature token for each land you control.

View File

@@ -4,7 +4,7 @@ Types:Legendary Planeswalker Huatli
Loyalty:7
S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddHiddenKeyword$ CARDNAME assigns combat damage equal to its toughness rather than its power | Description$ Each creature you control assigns combat damage equal to its toughness rather than its power.
A:AB$ GainLife | Cost$ SubCounter<3/LOYALTY> | Planeswalker$ True | LifeAmount$ X | SpellDescription$ You gain life equal to the greatest toughness among creatures you control.
SVar:X:Count$GreatestToughness_Creature.YouCtrl
SVar:X:Count$Valid Creature.YouCtrl$GreatestToughness
SVar:NeedsToPlay:Creature.YouCtrl
AI:RemoveDeck:Random
DeckHas:Ability$LifeGain

View File

@@ -3,7 +3,7 @@ ManaCost:3 R W
Types:Legendary Planeswalker Huatli
Loyalty:3
A:AB$ GainLife | Cost$ AddCounter<2/LOYALTY> | Planeswalker$ True | LifeAmount$ GreatestPow | SpellDescription$ You gain life equal to the greatest power among creatures you control.
SVar:GreatestPow:Count$GreatestPower_Creature.YouCtrl
SVar:GreatestPow:Count$Valid Creature.YouCtrl$GreatestPower
A:AB$ Token | Cost$ AddCounter<0/LOYALTY> | Planeswalker$ True | TokenAmount$ 1 | TokenScript$ g_3_3_dinosaur_trample | TokenOwner$ You | SpellDescription$ Create a 3/3 green Dinosaur creature token with trample.
A:AB$ DealDamage | Cost$ SubCounter<X/LOYALTY> | NumDmg$ X | Planeswalker$ True | Ultimate$ True | ValidTgts$ Creature | TgtPrompt$ Select any number of target creatures | TargetMin$ 1 | TargetMax$ X | DividedAsYouChoose$ X | RememberDamaged$ True | SubAbility$ DBNoBlock | SpellDescription$ CARDNAME deals X damage divided as you choose among any number of target creatures. Creatures dealt damage this way can't block this turn.
SVar:DBNoBlock:DB$ Pump | KW$ HIDDEN CARDNAME can't block. | Defined$ Remembered | SubAbility$ DBCleanup | StackDescription$ Creatures dealt damage this way can't block this turn.

View File

@@ -5,6 +5,6 @@ PT:0/4
K:Partner:Proud Mentor
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigPump | TriggerDescription$ Whenever CARDNAME attacks, it gets +X/+0 until end of turn, where X is the greatest power among tapped creatures your opponents control.
SVar:TrigPump:DB$ Pump | Defined$ Self | NumAtt$ X
SVar:X:Count$GreatestPower_Creature.tapped+OppCtrl
SVar:X:Count$Valid Creature.tapped+OppCtrl$GreatestPower
DeckHints:Name$Proud Mentor
Oracle:Partner with Proud Mentor (When this creature enters the battlefield, target player may put Proud Mentor into their hand from their library, then shuffle.)\nWhenever Impetuous Protege attacks, it gets +X/+0 until end of turn, where X is the greatest power among tapped creatures your opponents control.

View File

@@ -4,7 +4,7 @@ Types:Creature Elemental
PT:0/0
K:Trample
K:etbCounter:P1P1:X:no Condition:CARDNAME enters the battlefield with X +1/+1 counters on it, where X is the total mana value of instant and sorcery cards in your graveyard.
SVar:X:Count$SumCMCGraveyard_Instant.YouOwn,Sorcery.YouOwn
SVar:X:Count$ValidGraveyard Instant.YouOwn,Sorcery.YouOwn$SumCMC
DeckHas:Ability$Counters
DeckNeeds:Type$Instant|Sorcery
AI:RemoveDeck:Random

View File

@@ -9,5 +9,5 @@ SVar:DBPump:DB$ Pump | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target cr
SVar:DBFight:DB$ Fight | Defined$ ParentTarget | ValidTgts$ Creature.YouDontCtrl | TgtPrompt$ Select target creature you don't control
SVar:X:Count$Kicked.0.1
SVar:Y:Count$Kicked.3.1
SVar:Z:Count$GreatestPower_Creature.TargetedPlayerCtrl
SVar:Z:Count$Valid Creature.TargetedPlayerCtrl$GreatestPower
Oracle:Kicker {2}{G}\nChoose one. If this spell was kicked, choose any number instead.\n• Put two +1/+1 counters on target creature.\n• Target player gains X life, where X is the greatest power among creatures they control.\n• Target creature you control fights target creature you don't control.

View File

@@ -2,6 +2,6 @@ Name:Kin-Tree Invocation
ManaCost:B G
Types:Sorcery
A:SP$ Token | Cost$ B G | TokenAmount$ 1 | TokenScript$ bg_x_x_spirit_warrior | TokenOwner$ You | TokenPower$ X | TokenToughness$ X | SpellDescription$ Create an X/X black and green Spirit Warrior creature token, where X is the greatest toughness among creatures you control.
SVar:X:Count$GreatestToughness_Creature.YouCtrl
SVar:X:Count$Valid Creature.YouCtrl$GreatestToughness
SVar:NeedsToPlay:Creature.YouCtrl
Oracle:Create an X/X black and green Spirit Warrior creature token, where X is the greatest toughness among creatures you control.

View File

@@ -3,10 +3,8 @@ ManaCost:5 W
Types:Creature Elephant Cleric
PT:4/6
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigLife | OptionalDecider$ You | TriggerDescription$ When CARDNAME enters the battlefield, you may have your life total become the total toughness of creatures you control.
SVar:TrigLife:DB$ PumpAll | ValidCards$ Creature.YouCtrl | RememberAllPumped$ True | SubAbility$ DBSetLife
SVar:DBSetLife:DB$ SetLife | Defined$ You | LifeAmount$ Y | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Y:Remembered$CardToughness
SVar:TrigLife:DB$ SetLife | Defined$ You | LifeAmount$ Y | SubAbility$ DBCleanup
SVar:Y:Count$Valid Creature.YouCtrl$SumToughness
A:AB$ Pump | Cost$ 5 W | NumAtt$ X | NumDef$ X | SpellDescription$ CARDNAME gets +X/+X until end of turn, where X is your life total.
SVar:X:Count$YourLifeTotal
AI:RemoveDeck:All

View File

@@ -5,6 +5,6 @@ PT:10/10
S:Mode$ ReduceCost | ValidCard$ Card.Self | Type$ Spell | Amount$ X | EffectZone$ All | Description$ This spell costs {X} less to cast, where X is the total mana value of noncreature artifacts you control.
A:AB$ ChangeZone | Cost$ Sac<2/Artifact> | Origin$ Graveyard | Destination$ Hand | ActivationZone$ Graveyard | SpellDescription$ Return CARDNAME from your graveyard to your hand.
SVar:DiscardMe:1
SVar:X:Count$SumCMC_Artifact.nonCreature+YouCtrl
SVar:X:Count$Valid Artifact.nonCreature+YouCtrl$SumCMC
SVar:AIPreference:SacCost$Artifact.token,Artifact.cmcEQ1,Artifact.cmcEQ2
Oracle:This spell costs {X} less to cast, where X is the total mana value of noncreature artifacts you control.\nSacrifice two artifacts: Return Metalwork Colossus from your graveyard to your hand.

View File

@@ -2,7 +2,7 @@ Name:Miming Slime
ManaCost:2 G
Types:Sorcery
A:SP$ Token | Cost$ 2 G | TokenAmount$ 1 | TokenScript$ g_x_x_ooze | TokenOwner$ You | TokenPower$ X | TokenToughness$ X | SpellDescription$ Create an X/X green Ooze creature token, where X is the greatest power among creatures you control.
SVar:X:Count$GreatestPower_Creature.YouCtrl
SVar:X:Count$Valid Creature.YouCtrl$GreatestPower
SVar:NeedsToPlay:Creature.YouCtrl
DeckHas:Ability$Token
Oracle:Create an X/X green Ooze creature token, where X is the greatest power among creatures you control.

View File

@@ -4,7 +4,7 @@ Types:Sorcery
A:SP$ DealDamage | Cost$ 3 G G | ValidTgts$ Creature | TgtPrompt$ Select target creature to distribute damage to | NumDmg$ OrigPower | TargetMin$ Min | TargetMax$ OrigPower | DividedAsYouChoose$ OrigPower | SpellDescription$ CARDNAME deals X damage divided as you choose among any number of target creatures, where X is the greatest power among creatures you control as you cast this spell.
T:Mode$ SpellCast | ValidCard$ Card.Self | Static$ True | Execute$ CountPowerAtCast
SVar:CountPowerAtCast:DB$ StoreSVar | SVar$ OrigPower | Type$ Count | Expression$ GreatestPower_Creature.YouCtrl
SVar:OrigPower:Count$GreatestPower_Creature.YouCtrl
SVar:OrigPower:Count$Valid Creature.YouCtrl$GreatestPower
SVar:Min:SVar$OrigPower/LimitMax.1
SVar:X:Count$GreatestPower_Creature.YouCtrl
Oracle:Monstrous Onslaught deals X damage divided as you choose among any number of target creatures, where X is the greatest power among creatures you control as you cast this spell.

View File

@@ -2,5 +2,5 @@ Name:Overwhelming Stampede
ManaCost:3 G G
Types:Sorcery
A:SP$ PumpAll | Cost$ 3 G G | ValidCards$ Creature.YouCtrl | NumAtt$ +X | NumDef$ +X | KW$ Trample | SpellDescription$ Until end of turn, creatures you control gain trample and get +X/+X, where X is the greatest power among creatures you control.
SVar:X:Count$GreatestPower_Creature.YouCtrl
SVar:X:Count$Valid Creature.YouCtrl$GreatestPower
Oracle:Until end of turn, creatures you control gain trample and get +X/+X, where X is the greatest power among creatures you control.

View File

@@ -4,6 +4,6 @@ Types:Creature Goat
PT:3/3
T:Mode$ Attacks | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever CARDNAME attacks, creatures you control gain trample and get +X/+X until end of turn, where X is the greatest power among creatures you control.
SVar:TrigPump:DB$ PumpAll | ValidCards$ Creature.YouCtrl | NumAtt$ X | NumDef$ X | KW$ Trample
SVar:X:Count$GreatestPower_Creature.YouCtrl
SVar:X:Count$Valid Creature.YouCtrl$GreatestPower
SVar:HasAttackEffect:TRUE
Oracle:Whenever Pathbreaker Ibex attacks, creatures you control gain trample and get +X/+X until end of turn, where X is the greatest power among creatures you control.

View File

@@ -4,6 +4,6 @@ Types:Creature Elf Druid
PT:3/2
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigEnergy | TriggerDescription$ When CARDNAME enters the battlefield, you get an amount of {E} (energy counters) equal to the greatest power among creatures you control.
SVar:TrigEnergy:DB$ PutCounter | Defined$ You | CounterType$ ENERGY | CounterNum$ X
SVar:X:Count$GreatestPower_Creature.YouCtrl
SVar:X:Count$Valid Creature.YouCtrl$GreatestPower
A:AB$ Pump | Cost$ PayEnergy<3> | ValidTgts$ Creature | TgtPrompt$ Select target creature | KW$ HIDDEN CARDNAME blocks each combat if able. | SpellDescription$ Target creature blocks this turn if able.
Oracle:When Peema Aether-Seer enters the battlefield, you get an amount of {E} (energy counters) equal to the greatest power among creatures you control.\nPay {E}{E}{E}: Target creature blocks this turn if able.

View File

@@ -5,7 +5,7 @@ T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | E
SVar:TrigBranch:DB$ Branch | BranchConditionSVar$ Y | BranchConditionSVarCompare$ GE1 | TrueSubAbility$ Draw | FalseSubAbility$ PutCounter
SVar:Draw:DB$ Draw | Defined$ You | NumCards$ 1
SVar:PutCounter:DB$ PutCounter | Choices$ Creature.YouCtrl | CounterType$ P1P1 | CounterNum$ 1
SVar:X:Count$GreatestPower_Creature
SVar:X:Count$Valid Creature$GreatestPower
SVar:Y:Count$Valid Creature.powerGEX+YouCtrl
DeckHas:Ability$Counters
Oracle:At the beginning of your upkeep, draw a card if you control a creature with the greatest power among creatures on the battlefield. Otherwise, put a +1/+1 counter on a creature you control.

View File

@@ -5,7 +5,7 @@ PT:1/1
K:etbCounter:P1P1:X:no Condition:CARDNAME enters the battlefield with X +1/+1 counters on it, where X is the greatest power among other creatures you control.
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDraw | TriggerDescription$ When CARDNAME enters the battlefield, draw cards equal to its power.
SVar:TrigDraw:DB$ Draw | Defined$ You | NumCards$ Y
SVar:X:Count$GreatestPower_Creature.YouCtrl
SVar:X:Count$Valid Creature.YouCtrl$GreatestPower
SVar:Y:TriggeredCard$CardPower
SVar:NeedsToPlayVar:X GE3
Oracle:Prime Speaker Zegana enters the battlefield with X +1/+1 counters on it, where X is the greatest power among other creatures you control.\nWhen Prime Speaker Zegana enters the battlefield, draw cards equal to its power.

View File

@@ -3,6 +3,6 @@ ManaCost:4 G
Types:Instant
A:SP$ Charm | Cost$ 4 G | Choices$ DBDraw,DBPumpAll
SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ X | SpellDescription$ Draw cards equal to the greatest power among non-Human creatures you control.
SVar:X:Count$GreatestPower_Creature.YouCtrl+nonHuman
SVar:X:Count$Valid Creature.YouCtrl+nonHuman$GreatestPower
SVar:DBPumpAll:DB$ PumpAll | ValidCards$ Creature.YouCtrl+nonHuman | NumAtt$ 3 | NumDef$ 3 | SpellDescription$ Non-Human creatures you control get +3/+3 until end of turn.
Oracle:Choose one —\n• Draw cards equal to the greatest power among non-Human creatures you control.\n• Non-Human creatures you control get +3/+3 until end of turn.

View File

@@ -2,6 +2,6 @@ Name:Rishkar's Expertise
ManaCost:4 G G
Types:Sorcery
A:SP$ Draw | Cost$ 4 G G | NumCards$ X | SubAbility$ DBPlay | SpellDescription$ Draw cards equal to the greatest power among creatures you control. You may cast a spell with mana value 5 or less from your hand without paying its mana cost.
SVar:X:Count$GreatestPower_Creature.YouCtrl
SVar:X:Count$Valid Creature.YouCtrl$GreatestPower
SVar:DBPlay:DB$ Play | Valid$ Card.nonLand+YouOwn | ValidSA$ Spell.cmcLE5 | ValidZone$ Hand | WithoutManaCost$ True | Amount$ 1 | Controller$ You | Optional$ True
Oracle:Draw cards equal to the greatest power among creatures you control.\nYou may cast a spell with mana value 5 or less from your hand without paying its mana cost.

View File

@@ -5,5 +5,5 @@ PT:0/4
K:Haste
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigPump | TriggerDescription$ Whenever CARDNAME attacks, it gets +X/+0 until end of turn, where X is the greatest power among creatures you control.
SVar:TrigPump:DB$ Pump | Defined$ Self | NumAtt$ X
SVar:X:Count$GreatestPower_Creature.YouCtrl
SVar:X:Count$Valid Creature.YouCtrl$GreatestPower
Oracle:Haste\nWhenever Rubblebelt Rioters attacks, it gets +X/+0 until end of turn, where X is the greatest power among creatures you control.

View File

@@ -7,5 +7,5 @@ SVar:TrigDraw:DB$ Draw | OptionalDecider$ TriggeredCardController | Defined$ Tri
SVar:Z:TriggeredCard$Valid Card.greatestPower
SVar:Y:Count$Valid Card.greatestPower
A:AB$ Mana | Cost$ G T | Produced$ Combo Any | Amount$ X | SpellDescription$ Add X mana in any combination of colors, where X is the greatest power among creatures you control.
SVar:X:Count$GreatestPower_Creature.YouCtrl
SVar:X:Count$Valid Creature.YouCtrl$GreatestPower
Oracle:Whenever another creature enters the battlefield, its controller may draw a card if its power is greater than each other creature's power.\n{G}, {T}: Add X mana in any combination of colors, where X is the greatest power among creatures you control.

View File

@@ -2,5 +2,5 @@ Name:Spell Rupture
ManaCost:1 U
Types:Instant
A:SP$ Counter | Cost$ 1 U | TargetType$ Spell | ValidTgts$ Card | UnlessCost$ X | UnlessPayer$ TargetedController | SpellDescription$ Counter target spell unless its controller pays {X}, where X is the greatest power among creatures you control.
SVar:X:Count$GreatestPower_Creature.YouCtrl
SVar:X:Count$Valid Creature.YouCtrl$GreatestPower
Oracle:Counter target spell unless its controller pays {X}, where X is the greatest power among creatures you control.

View File

@@ -2,5 +2,5 @@ Name:Sudden Insight
ManaCost:4 U U
Types:Instant
A:SP$ Draw | NumCards$ X | SpellDescription$ Draw a card for each different mana value among nonland cards in your graveyard.
SVar:X:Count$DifferentManaValueGraveyard Card.YouOwn+nonLand
SVar:X:Count$ValidGraveyard Card.YouOwn+nonLand$DifferentCMC
Oracle:Draw a card for each different mana value among nonland cards in your graveyard.

View File

@@ -10,6 +10,6 @@ SVar:DBExile:DB$ ChangeZoneAll | ChangeType$ Card.OppCtrl | Origin$ Graveyard |
SVar:DBToken:DB$ Token | TokenScript$ b_0_1_thrull | TokenAmount$ Z | SubAbility$ DBCleanup
SVar:X:Count$Compare Y GE1.2.1
SVar:Y:Count$Valid Card.IsCommander+YouCtrl
SVar:Z:Count$GreatestPowerExile_Creature.IsRemembered
SVar:Z:Count$ValidExile Creature.IsRemembered$GreatestPower
DeckHas:Ability$Token
Oracle:Choose one. If you control a commander as you cast this spell, you may choose both.\n• Each opponent sacrifices a creature they control with the greatest power.\n• Exile all cards from all opponents' graveyards, then create X 0/1 black Thrull creature tokens, where X is the greatest power among creature cards exiled this way.

View File

@@ -2,7 +2,7 @@ Name:The Great Henge
ManaCost:7 G G
Types:Legendary Artifact
S:Mode$ ReduceCost | ValidCard$ Card.Self | Type$ Spell | Amount$ X | EffectZone$ All | Description$ CARDNAME costs {X} less to cast, where X is the greatest power among creatures you control.
SVar:X:Count$GreatestPower_Creature.YouCtrl
SVar:X:Count$Valid Creature.YouCtrl$GreatestPower
A:AB$ Mana | Cost$ T | Produced$ G | Amount$ 2 | SubAbility$ DBGainLife | AILogic$ AtOppEOT | SpellDescription$ Add {G}{G}. You gain 2 life.
SVar:DBGainLife:DB$ GainLife | LifeAmount$ 2
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.nonToken+YouCtrl | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ Whenever a nontoken creature enters the battlefield under your control, put a +1/+1 counter on it and draw a card.

View File

@@ -2,5 +2,5 @@ Name:Traverse the Outlands
ManaCost:4 G
Types:Sorcery
A:SP$ ChangeZone | Cost$ 4 G | Origin$ Library | Destination$ Battlefield | ChangeType$ Land.Basic | ChangeNum$ X | Tapped$ True | SpellDescription$ Search your library for up to X basic land cards, where X is the greatest power among creatures you control. Put those cards onto the battlefield tapped, then shuffle.
SVar:X:Count$GreatestPower_Creature.YouCtrl
SVar:X:Count$Valid Creature.YouCtrl$GreatestPower
Oracle:Search your library for up to X basic land cards, where X is the greatest power among creatures you control. Put those cards onto the battlefield tapped, then shuffle.

View File

@@ -3,6 +3,6 @@ ManaCost:2 B
Types:Enchantment
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigCruelDiscard | TriggerDescription$ At the beginning of your upkeep, target opponent discards a card if you control the creature with the greatest power or tied for the greatest power.
SVar:TrigCruelDiscard:DB$ Discard | ValidTgts$ Opponent | NumCards$ 1 | Mode$ TgtChoose | ConditionPresent$ Creature | ConditionCompare$ GE1 | ConditionCheckSVar$ YourCruelty | ConditionSVarCompare$ GEOppsCruelty
SVar:YourCruelty:Count$GreatestPower_Creature.YouCtrl
SVar:OppsCruelty:Count$GreatestPower_Creature.YouDontCtrl
SVar:YourCruelty:Count$Valid Creature.YouCtrl$GreatestPower
SVar:OppsCruelty:Count$Valid Creature.YouDontCtrl$GreatestPower
Oracle:At the beginning of your upkeep, target opponent discards a card if you control the creature with the greatest power or tied for the greatest power.

View File

@@ -3,6 +3,6 @@ ManaCost:2 G
Types:Enchantment
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigFerociousDraw | TriggerDescription$ At the beginning of your upkeep, draw a card if you control the creature with the greatest power or tied for the greatest power.
SVar:TrigFerociousDraw:DB$ Draw | Defined$ You | NumCards$ 1 | ConditionPresent$ Creature | ConditionCompare$ GE1 | ConditionCheckSVar$ YourFerocity | ConditionSVarCompare$ GEOppsFerocity
SVar:YourFerocity:Count$GreatestPower_Creature.YouCtrl
SVar:OppsFerocity:Count$GreatestPower_Creature.YouDontCtrl
SVar:YourFerocity:Count$Valid Creature.YouCtrl$GreatestPower
SVar:OppsFerocity:Count$Valid Creature.YouDontCtrl$GreatestPower
Oracle:At the beginning of your upkeep, draw a card if you control the creature with the greatest power or tied for the greatest power.

View File

@@ -4,7 +4,7 @@ Types:Legendary Creature Human Warrior
PT:2/2
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigPump | TriggerDescription$ Whenever CARDNAME attacks, it gets +X/+X until end of turn, where X is the greatest power among other creatures you control.
SVar:TrigPump:DB$ Pump | Defined$ Self | NumAtt$ X | NumDef$ X
SVar:X:Count$GreatestPower_Creature.YouCtrl+Other
SVar:X:Count$Valid Creature.YouCtrl+Other$GreatestPower
SVar:HasAttackEffect:TRUE
DeckHints:Type$Creature
Oracle:Whenever Tuya Bearclaw attacks, it gets +X/+X until end of turn, where X is the greatest power among other creatures you control.