merge latest trunk

This commit is contained in:
myk
2013-03-05 17:12:11 +00:00
12 changed files with 38 additions and 22 deletions

View File

@@ -5,7 +5,7 @@ PT:4/5
K:Flying K:Flying
T:Mode$ Attacks | TriggerZones$ Battlefield | ValidCard$ Card.Self | Execute$ Detain | TriggerDescription$ Whenever CARDNAME attacks, detain up to two target nonland permanents your opponents control. (Until your next turn, those permanents can't attack or block and their activated abilities can't be activated.) T:Mode$ Attacks | TriggerZones$ Battlefield | ValidCard$ Card.Self | Execute$ Detain | TriggerDescription$ Whenever CARDNAME attacks, detain up to two target nonland permanents your opponents control. (Until your next turn, those permanents can't attack or block and their activated abilities can't be activated.)
SVar:Detain:DB$ Pump | TargetMin$ 0 | TargetMax$ 2 | KW$ HIDDEN CARDNAME can't attack or block. & HIDDEN CARDNAME's activated abilities can't be activated. | IsCurse$ True | ValidTgts$ Permanent.nonLand+OppCtrl | TgtPrompt$ Select target nonland permanent your opponent controls to detain. | UntilYourNextTurn$ True SVar:Detain:DB$ Pump | TargetMin$ 0 | TargetMax$ 2 | KW$ HIDDEN CARDNAME can't attack or block. & HIDDEN CARDNAME's activated abilities can't be activated. | IsCurse$ True | ValidTgts$ Permanent.nonLand+OppCtrl | TgtPrompt$ Select target nonland permanent your opponent controls to detain. | UntilYourNextTurn$ True
SVar:PlayMain1:TRUE SVar:HasAttackEffect:TRUE
SVar:Picture:http://www.wizards.com/global/images/magic/general/archon_of_the_triumvirate.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/archon_of_the_triumvirate.jpg
Oracle:Flying\nWhenever Archon of the Triumvirate attacks, detain up to two target nonland permanents your opponents control. (Until your next turn, those permanents can't attack or block and their activated abilities can't be activated.) Oracle:Flying\nWhenever Archon of the Triumvirate attacks, detain up to two target nonland permanents your opponents control. (Until your next turn, those permanents can't attack or block and their activated abilities can't be activated.)
SetInfo:RTR Rare SetInfo:RTR Rare

View File

@@ -4,6 +4,7 @@ Types:Creature Ogre Rebel
PT:3/4 PT:3/4
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigTap | TriggerDescription$ Whenever CARDNAME attacks, you may tap up to two target creatures. T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigTap | TriggerDescription$ Whenever CARDNAME attacks, you may tap up to two target creatures.
SVar:TrigTap:AB$Tap | Cost$ 0 | TargetMin$ 0 | TargetMax$ 2 | ValidTgts$ Creature | TgtPrompt$ Select target creature SVar:TrigTap:AB$Tap | Cost$ 0 | TargetMin$ 0 | TargetMax$ 2 | ValidTgts$ Creature | TgtPrompt$ Select target creature
SVar:HasAttackEffect:TRUE
SVar:Picture:http://www.wizards.com/global/images/magic/general/cho_arrim_bruiser.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/cho_arrim_bruiser.jpg
Oracle:Whenever Cho-Arrim Bruiser attacks, you may tap up to two target creatures. Oracle:Whenever Cho-Arrim Bruiser attacks, you may tap up to two target creatures.
SetInfo:MMQ Rare SetInfo:MMQ Rare

View File

@@ -10,7 +10,6 @@ SVar:TrigTap:DB$ Tap | Cost$ 0 | ValidTgts$ Permanent | TgtPrompt$ Choose target
SVar:DBPump:DB$ Pump | Defined$ Targeted | Permanent$ True | KW$ HIDDEN This card doesn't untap during your next untap step. SVar:DBPump:DB$ Pump | Defined$ Targeted | Permanent$ True | KW$ HIDDEN This card doesn't untap during your next untap step.
SVar:TrigCounter:AB$ Counter | Cost$ 0 | Defined$ TriggeredSourceSA | UnlessCost$ 2 | UnlessPayer$ TriggeredSourceSAController SVar:TrigCounter:AB$ Counter | Cost$ 0 | Defined$ TriggeredSourceSA | UnlessCost$ 2 | UnlessPayer$ TriggeredSourceSAController
SVar:HasAttackEffect:TRUE SVar:HasAttackEffect:TRUE
SVar:PlayMain1:TRUE
SVar:Picture:http://www.wizards.com/global/images/magic/general/frost_titan.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/frost_titan.jpg
Oracle:Whenever Frost Titan becomes the target of a spell or ability an opponent controls, counter that spell or ability unless its controller pays {2}.\nWhenever Frost Titan enters the battlefield or attacks, tap target permanent. It doesn't untap during its controller's next untap step. Oracle:Whenever Frost Titan becomes the target of a spell or ability an opponent controls, counter that spell or ability unless its controller pays {2}.\nWhenever Frost Titan enters the battlefield or attacks, tap target permanent. It doesn't untap during its controller's next untap step.
SetInfo:M11 Mythic SetInfo:M11 Mythic

View File

@@ -4,8 +4,9 @@ Types:Enchantment
K:ETBReplacement:Other:TrigDiscard K:ETBReplacement:Other:TrigDiscard
SVar:TrigDiscard:DB$ Discard | Cost$ 0 | Mode$ Hand | SpellDescription$ As CARDNAME enters the battlefield, discard your hand. SVar:TrigDiscard:DB$ Discard | Cost$ 0 | Mode$ Hand | SpellDescription$ As CARDNAME enters the battlefield, discard your hand.
T:Mode$ Phase | Phase$ Draw | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDraw | TriggerDescription$ At the beginning of your draw step, draw an additional card. T:Mode$ Phase | Phase$ Draw | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDraw | TriggerDescription$ At the beginning of your draw step, draw an additional card.
SVar:TrigDraw:AB$Draw | Cost$ 0 | NumCards$ 1 SVar:TrigDraw:AB$ Draw | Cost$ 0 | NumCards$ 1
SVar:RemAIDeck:True SVar:NeedsToPlayVar:Y LE2
SVar:Y:Count$InYourHand
SVar:Picture:http://www.wizards.com/global/images/magic/general/heightened_awareness.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/heightened_awareness.jpg
Oracle:As Heightened Awareness enters the battlefield, discard your hand.\nAt the beginning of your draw step, draw an additional card. Oracle:As Heightened Awareness enters the battlefield, discard your hand.\nAt the beginning of your draw step, draw an additional card.
SetInfo:PCY Rare SetInfo:PCY Rare

View File

@@ -5,6 +5,7 @@ PT:3/3
K:Haste K:Haste
T:Mode$ Attacks | ValidCard$ Creature.YouCtrl | Execute$ TrigDealDamage | TriggerZones$ Battlefield | TriggerDescription$ Whenever a creature you control attacks, CARDNAME deals 1 damage to defending player. T:Mode$ Attacks | ValidCard$ Creature.YouCtrl | Execute$ TrigDealDamage | TriggerZones$ Battlefield | TriggerDescription$ Whenever a creature you control attacks, CARDNAME deals 1 damage to defending player.
SVar:TrigDealDamage:AB$DealDamage | Cost$ 0 | Defined$ DefendingPlayer | NumDmg$ 1 SVar:TrigDealDamage:AB$DealDamage | Cost$ 0 | Defined$ DefendingPlayer | NumDmg$ 1
SVar:HasAttackEffect:TRUE
SVar:Picture:http://www.wizards.com/global/images/magic/general/hellrider.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/hellrider.jpg
Oracle:Haste\nWhenever a creature you control attacks, Hellrider deals 1 damage to defending player. Oracle:Haste\nWhenever a creature you control attacks, Hellrider deals 1 damage to defending player.
SetInfo:DKA Rare SetInfo:DKA Rare

View File

@@ -4,6 +4,7 @@ Types:Instant
A:SP$ Pump | Cost$ 2 WU WU | ValidTgts$ Creature.nonLegendary | TgtPrompt$ Choose target nonlegendary creature | AILogic$ Pump | RememberObjects$ Targeted | SubAbility$ MirrorweaveClone | StackDescription$ None | SpellDescription$ Each other creature becomes a copy of target nonlegendary creature until end of turn. A:SP$ Pump | Cost$ 2 WU WU | ValidTgts$ Creature.nonLegendary | TgtPrompt$ Choose target nonlegendary creature | AILogic$ Pump | RememberObjects$ Targeted | SubAbility$ MirrorweaveClone | StackDescription$ None | SpellDescription$ Each other creature becomes a copy of target nonlegendary creature until end of turn.
SVar:MirrorweaveClone:DB$ RepeatEach | UseImprinted$ True | RepeatCards$ Creature.IsNotRemembered | RepeatSubAbility$ DBCopy | SubAbility$ DBCleanup SVar:MirrorweaveClone:DB$ RepeatEach | UseImprinted$ True | RepeatCards$ Creature.IsNotRemembered | RepeatSubAbility$ DBCopy | SubAbility$ DBCleanup
SVar:DBCopy:DB$ Clone | Defined$ Remembered | CloneTarget$ Imprinted | Duration$ UntilEndOfTurn SVar:DBCopy:DB$ Clone | Defined$ Remembered | CloneTarget$ Imprinted | Duration$ UntilEndOfTurn
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Picture:http://www.wizards.com/global/images/magic/general/mirrorweave.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/mirrorweave.jpg
Oracle:Each other creature becomes a copy of target nonlegendary creature until end of turn. Oracle:Each other creature becomes a copy of target nonlegendary creature until end of turn.
SetInfo:SHM Rare SetInfo:SHM Rare

View File

@@ -6891,6 +6891,13 @@ public class Card extends GameEntity implements Comparable<Card> {
else if (list.get(1) != this) { else if (list.get(1) != this) {
return false; return false;
} }
} else if (property.equals("ThisTurnCast")) {
for (final Card card : CardUtil.getThisTurnCast("Card", source)) {
if (this.equals(card)) {
return true;
}
}
return false;
} else if (property.startsWith("sharesTypeWith")) { } else if (property.startsWith("sharesTypeWith")) {
if (!this.sharesTypeWith(source)) { if (!this.sharesTypeWith(source)) {
return false; return false;
@@ -7523,7 +7530,8 @@ public class Card extends GameEntity implements Comparable<Card> {
} }
for (final String type : this.getType()) { for (final String type : this.getType()) {
if (type.equals("AllCreatureTypes") && c1.hasACreatureType()) { if (type.equals("AllCreatureTypes")
&& (c1.hasACreatureType() || c1.typeContains("AllCreatureTypes"))) {
return true; return true;
} }
if (forge.card.CardType.isACreatureType(type) && c1.isType(type)) { if (forge.card.CardType.isACreatureType(type) && c1.isType(type)) {

View File

@@ -290,15 +290,14 @@ public final class CardRulesPredicates {
boolean shouldContain; boolean shouldContain;
switch (this.field) { switch (this.field) {
case NAME: case NAME:
return this.op(card.getName(), this.operand); return op(card.getName(), this.operand);
case SUBTYPE: case SUBTYPE:
shouldContain = (this.getOperator() == StringOp.CONTAINS) || (this.getOperator() == StringOp.EQUALS); shouldContain = (this.getOperator() == StringOp.CONTAINS) || (this.getOperator() == StringOp.EQUALS);
return shouldContain == card.getType().subTypeContains(this.operand); return shouldContain == card.getType().subTypeContains(this.operand);
case ORACLE_TEXT: case ORACLE_TEXT:
shouldContain = (this.getOperator() == StringOp.CONTAINS) || (this.getOperator() == StringOp.EQUALS); return op(card.getOracleText(), operand);
return shouldContain == card.getOracleText().contains(this.operand);
case JOINED_TYPE: case JOINED_TYPE:
return this.op(card.getType().toString(), this.operand); return op(card.getType().toString(), operand);
default: default:
return false; return false;
} }

View File

@@ -156,7 +156,7 @@ public class ComputerUtilMana {
break; break;
} }
} }
} else if (costParts[nPart].contains("/")) { } else if (costParts[nPart].contains("2/")) {
colorChoice = costParts[nPart].replace("2/", ""); colorChoice = costParts[nPart].replace("2/", "");
} else if (costParts[nPart].length() > 1) { } else if (costParts[nPart].length() > 1) {
colorChoice = costParts[nPart].substring(0, 1); colorChoice = costParts[nPart].substring(0, 1);

View File

@@ -148,7 +148,9 @@ public class Upkeep extends Phase {
} }
}; };
upkeepAbility.setActivatingPlayer(c.getController());
upkeepAbility.setStackDescription(sb.toString()); upkeepAbility.setStackDescription(sb.toString());
upkeepAbility.setDescription(sb.toString());
game.getStack().addSimultaneousStackEntry(upkeepAbility); game.getStack().addSimultaneousStackEntry(upkeepAbility);
@@ -206,6 +208,7 @@ public class Upkeep extends Phase {
} }
} }
}; };
sacAbility.setActivatingPlayer(c.getController());
sacAbility.setStackDescription(sb.toString()); sacAbility.setStackDescription(sb.toString());
sacAbility.setDescription(sb.toString()); sacAbility.setDescription(sb.toString());
@@ -514,7 +517,9 @@ public class Upkeep extends Phase {
final StringBuilder sb = new StringBuilder(); final StringBuilder sb = new StringBuilder();
sb.append(abyss.getName()).append(" - destroy a nonartifact creature of your choice."); sb.append(abyss.getName()).append(" - destroy a nonartifact creature of your choice.");
sacrificeCreature.setActivatingPlayer(c.getController());
sacrificeCreature.setStackDescription(sb.toString()); sacrificeCreature.setStackDescription(sb.toString());
sacrificeCreature.setDescription(sb.toString());
game.getStack().addAndUnfreeze(sacrificeCreature); game.getStack().addAndUnfreeze(sacrificeCreature);
} // end for } // end for
} // The Abyss } // The Abyss
@@ -587,7 +592,9 @@ public class Upkeep extends Phase {
final StringBuilder sb = new StringBuilder(); final StringBuilder sb = new StringBuilder();
sb.append(c.getName()).append(" - destroy 1 creature with lowest power."); sb.append(c.getName()).append(" - destroy 1 creature with lowest power.");
ability.setActivatingPlayer(c.getController());
ability.setStackDescription(sb.toString()); ability.setStackDescription(sb.toString());
ability.setDescription(sb.toString());
game.getStack().addSimultaneousStackEntry(ability); game.getStack().addSimultaneousStackEntry(ability);
@@ -997,6 +1004,7 @@ public class Upkeep extends Phase {
sb.append(source).append(" - deals ").append(damage).append(" damage to ").append(player); sb.append(source).append(" - deals ").append(damage).append(" damage to ").append(player);
ability.setStackDescription(sb.toString()); ability.setStackDescription(sb.toString());
ability.setDescription(sb.toString()); ability.setDescription(sb.toString());
ability.setActivatingPlayer(surge.getController());
if (damage > 0) { if (damage > 0) {
game.getStack().addSimultaneousStackEntry(ability); game.getStack().addSimultaneousStackEntry(ability);
@@ -1084,6 +1092,7 @@ public class Upkeep extends Phase {
+ " taps X artifacts, creatures or lands he or she controls."); + " taps X artifacts, creatures or lands he or she controls.");
ability.setDescription(source.getName() + " - " + player ability.setDescription(source.getName() + " - " + player
+ " taps X artifacts, creatures or lands he or she controls."); + " taps X artifacts, creatures or lands he or she controls.");
ability.setActivatingPlayer(source.getController());
game.getStack().addSimultaneousStackEntry(ability); game.getStack().addSimultaneousStackEntry(ability);
@@ -1119,6 +1128,8 @@ public class Upkeep extends Phase {
sb.append(blaze.get(i)).append(" - has a blaze counter and deals 1 damage to "); sb.append(blaze.get(i)).append(" - has a blaze counter and deals 1 damage to ");
sb.append(player).append("."); sb.append(player).append(".");
ability.setStackDescription(sb.toString()); ability.setStackDescription(sb.toString());
ability.setDescription(sb.toString());
ability.setActivatingPlayer(source.getController());
game.getStack().addSimultaneousStackEntry(ability); game.getStack().addSimultaneousStackEntry(ability);

View File

@@ -88,10 +88,7 @@ public class SFilterUtil {
return Predicates.alwaysTrue(); return Predicates.alwaysTrue();
} }
String[] splitText = text String[] splitText = text.replaceAll(",", "").replaceAll(" ", " ").split(" ");
.replaceAll(",", "")
.replaceAll(" ", " ")
.toLowerCase().split(" ");
List<Predicate<CardRules>> terms = new ArrayList<Predicate<CardRules>>(); List<Predicate<CardRules>> terms = new ArrayList<Predicate<CardRules>>();
for (String s : splitText) { for (String s : splitText) {
@@ -99,9 +96,7 @@ public class SFilterUtil {
if (inName) { subands.add(CardRulesPredicates.name(StringOp.CONTAINS_IC, s)); } if (inName) { subands.add(CardRulesPredicates.name(StringOp.CONTAINS_IC, s)); }
if (inType) { subands.add(CardRulesPredicates.joinedType(StringOp.CONTAINS_IC, s)); } if (inType) { subands.add(CardRulesPredicates.joinedType(StringOp.CONTAINS_IC, s)); }
if (inText) { subands.add(CardRulesPredicates.rules(StringOp.CONTAINS_IC, s)); }
// rules cannot compare in ignore-case way
if (inText) { subands.add(CardRulesPredicates.rules(StringOp.CONTAINS, s)); }
terms.add(Predicates.or(subands)); terms.add(Predicates.or(subands));
} }

View File

@@ -130,16 +130,16 @@ public enum VSubmenuPlanechase implements IVSubmenu<CSubmenuPlanechase> {
deckChoosers.add(tempChooser); deckChoosers.add(tempChooser);
tempPanel.add(tempChooser, "span 1 2, w 44%!, gap 0 0 20px 20px, growy, pushy, wrap"); tempPanel.add(tempChooser, "span 1 2, w 55%!, gap 10px 10px 0px 10px, growy, pushy, wrap");
tempPanel.add(new FLabel.Builder().text("Select Planar deck:").build(), "flowy"); tempPanel.add(new FLabel.Builder().text("Select Planar deck:").build(), "gap 0px 0px 10px 10px, flowy");
tempPlanarDeckList = new FList(); tempPlanarDeckList = new FList();
tempPlanarDeckList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); tempPlanarDeckList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
JScrollPane scrPlanes = new FScrollPane(tempPlanarDeckList, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); JScrollPane scrPlanes = new FScrollPane(tempPlanarDeckList, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
tempPanel.add(scrPlanes, "h 90%!,wrap"); tempPanel.add(scrPlanes, "h 90%, gap 0px 10px 0px 10px, growy, pushy, wrap");
planarDeckLists.add(tempPlanarDeckList); planarDeckLists.add(tempPlanarDeckList);
playerPanels.add(tempPanel); playerPanels.add(tempPanel);