- Real fix for Padeem, needed to filter by Types CMC not just any permanents CMC

This commit is contained in:
Sol
2016-09-29 15:03:57 +00:00
parent ce10b34927
commit a3c82bbc74
5 changed files with 12 additions and 19 deletions

View File

@@ -4841,26 +4841,19 @@ public class Card extends GameEntity implements Comparable<Card> {
return false;
}
}
} else if (property.startsWith("greatestCMC")) {
} else if (property.startsWith("greatestCMC_")) {
CardCollectionView cards = game.getCardsIn(ZoneType.Battlefield);
if (property.contains("ControlledBy")) {
String prop = property.substring("greatestCMC_".length());
if (prop.contains("ControlledBy")) {
prop = prop.split("ControlledBy")[0];
FCollectionView<Player> p = AbilityUtils.getDefinedPlayers(source, property.split("ControlledBy")[1], null);
cards = CardLists.filterControlledBy(cards, p);
}
cards = CardLists.getType(cards, prop);
cards = CardLists.getCardsWithHighestCMC(cards);
if (!cards.contains(this)) {
return false;
}
}
for (final Card crd : cards) {
if (crd.isSplitCard()) {
if (crd.getCMC(Card.SplitCMCMode.LeftSplitCMC) > getCMC() || crd.getCMC(Card.SplitCMCMode.RightSplitCMC) > getCMC()) {
return false;
}
} else {
if (crd.getCMC() > getCMC()) {
return false;
}
}
}
} else if (property.startsWith("greatestRememberedCMC")) {
CardCollection cards = new CardCollection();
for (final Object o : source.getRemembered()) {

View File

@@ -1,7 +1,7 @@
Name:Favor of the Mighty
ManaCost:1 W
Types:Tribal Enchantment Giant
S:Mode$ Continuous | Affected$ Creature.greatestCMC | AddKeyword$ Protection from all colors | Description$ Each creature with the highest converted mana cost has protection from all colors.
S:Mode$ Continuous | Affected$ Creature.greatestCMC_Creature | AddKeyword$ Protection from all colors | Description$ Each creature with the highest converted mana cost has protection from all colors.
SVar:NonStackingEffect:True
SVar:RemRandomDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/favor_of_the_mighty.jpg

View File

@@ -5,6 +5,6 @@ PT:1/4
S:Mode$ Continuous | Affected$ Artifact.YouCtrl | AddKeyword$ Hexproof | Description$ Artifacts you control have hexproof.
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | CheckSVar$ X | SVarCompare$ GE1 | Execute$ TrigDraw | TriggerDescription$ At the beginning of your upkeep, if you control the artifact with the highest converted mana cost or tied for the highest converted mana cost, draw a card.
SVar:TrigDraw:AB$ Draw | Cost$ 0 | Defined$ You | NumCards$ 1
SVar:X:Count$Valid Artifact.greatestCMC+YouCtrl
SVar:X:Count$Valid Artifact.greatestCMC_Artifact+YouCtrl
SVar:Picture:http://www.wizards.com/global/images/magic/general/padeem_consul_of_innovation.jpg
Oracle:Artifacts you control have hexproof.\nAt the beginning of your upkeep, if you control the artifact with the highest converted mana cost or tied for the highest converted mana cost, draw a card.

View File

@@ -2,7 +2,7 @@ Name:Tariff
ManaCost:1 W
Types:Sorcery
A:SP$ RepeatEach | Cost$ 1 W | RepeatPlayers$ Player | RepeatSubAbility$ DBChooseCard | SpellDescription$ Each player sacrifices the creature he or she controls with the highest converted mana cost unless he or she pays that creature's mana cost. If two or more creatures a player controls are tied for highest cost, that player chooses one.
SVar:DBChooseCard:DB$ ChooseCard | Defined$ Player.IsRemembered | Choices$ Creature.greatestCMCControlledByRemembered | Mandatory$ True | SubAbility$ DBSac
SVar:DBChooseCard:DB$ ChooseCard | Defined$ Player.IsRemembered | Choices$ Creature.greatestCMC_CreatureControlledByRemembered | Mandatory$ True | SubAbility$ DBSac
SVar:DBSac:DB$ Sacrifice | Defined$ Player.IsRemembered | SacValid$ Card.ChosenCard | SacMessage$ the creature with the highest converted mana cost | UnlessCost$ ChosenManaCost | UnlessPayer$ Player.IsRemembered
SVar:Picture:http://www.wizards.com/global/images/magic/general/tariff.jpg
SVar:RemAIDeck:True

View File

@@ -1151,7 +1151,7 @@ public class HumanCostDecision extends CostDecisionMakerBase {
if (totalPower) {
final int i = Integer.parseInt(totalP);
final InputSelectCardsFromList inp = new InputSelectCardsFromList(controller, 0, typeList.size(), typeList);
inp.setMessage("Select a card to tap.");
inp.setMessage("Select a creature to tap.");
inp.setCancelAllowed(true);
inp.showAndWait();