diff --git a/res/cardsfolder/a/archon_of_the_triumvirate.txt b/res/cardsfolder/a/archon_of_the_triumvirate.txt index f9c552c5c7a..4fa1f1288b3 100644 --- a/res/cardsfolder/a/archon_of_the_triumvirate.txt +++ b/res/cardsfolder/a/archon_of_the_triumvirate.txt @@ -5,7 +5,7 @@ PT:4/5 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.) 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 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 \ No newline at end of file diff --git a/res/cardsfolder/c/cho_arrim_bruiser.txt b/res/cardsfolder/c/cho_arrim_bruiser.txt index 0930a9ca01e..0931824ba32 100644 --- a/res/cardsfolder/c/cho_arrim_bruiser.txt +++ b/res/cardsfolder/c/cho_arrim_bruiser.txt @@ -4,6 +4,7 @@ Types:Creature Ogre Rebel PT:3/4 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:HasAttackEffect:TRUE 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. SetInfo:MMQ Rare \ No newline at end of file diff --git a/res/cardsfolder/f/frost_titan.txt b/res/cardsfolder/f/frost_titan.txt index 84edd8dc610..6ed3a57c71d 100644 --- a/res/cardsfolder/f/frost_titan.txt +++ b/res/cardsfolder/f/frost_titan.txt @@ -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:TrigCounter:AB$ Counter | Cost$ 0 | Defined$ TriggeredSourceSA | UnlessCost$ 2 | UnlessPayer$ TriggeredSourceSAController SVar:HasAttackEffect:TRUE -SVar:PlayMain1:TRUE 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. SetInfo:M11 Mythic diff --git a/res/cardsfolder/h/heightened_awareness.txt b/res/cardsfolder/h/heightened_awareness.txt index aa4d6112f01..e7c6c4846fe 100644 --- a/res/cardsfolder/h/heightened_awareness.txt +++ b/res/cardsfolder/h/heightened_awareness.txt @@ -4,8 +4,9 @@ Types:Enchantment K:ETBReplacement:Other:TrigDiscard 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. -SVar:TrigDraw:AB$Draw | Cost$ 0 | NumCards$ 1 -SVar:RemAIDeck:True +SVar:TrigDraw:AB$ Draw | Cost$ 0 | NumCards$ 1 +SVar:NeedsToPlayVar:Y LE2 +SVar:Y:Count$InYourHand 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. SetInfo:PCY Rare \ No newline at end of file diff --git a/res/cardsfolder/h/hellrider.txt b/res/cardsfolder/h/hellrider.txt index 0e90c7b8eb1..0d4732b2114 100644 --- a/res/cardsfolder/h/hellrider.txt +++ b/res/cardsfolder/h/hellrider.txt @@ -5,6 +5,7 @@ PT:3/3 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. 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 Oracle:Haste\nWhenever a creature you control attacks, Hellrider deals 1 damage to defending player. SetInfo:DKA Rare \ No newline at end of file diff --git a/res/cardsfolder/m/mirrorweave.txt b/res/cardsfolder/m/mirrorweave.txt index 92346f74b7e..17a2b44e61e 100644 --- a/res/cardsfolder/m/mirrorweave.txt +++ b/res/cardsfolder/m/mirrorweave.txt @@ -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. SVar:MirrorweaveClone:DB$ RepeatEach | UseImprinted$ True | RepeatCards$ Creature.IsNotRemembered | RepeatSubAbility$ DBCopy | SubAbility$ DBCleanup 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 Oracle:Each other creature becomes a copy of target nonlegendary creature until end of turn. SetInfo:SHM Rare \ No newline at end of file diff --git a/src/main/java/forge/Card.java b/src/main/java/forge/Card.java index c1ff4e33cb9..f7f3f997335 100644 --- a/src/main/java/forge/Card.java +++ b/src/main/java/forge/Card.java @@ -6891,6 +6891,13 @@ public class Card extends GameEntity implements Comparable { else if (list.get(1) != this) { 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")) { if (!this.sharesTypeWith(source)) { return false; @@ -7523,7 +7530,8 @@ public class Card extends GameEntity implements Comparable { } for (final String type : this.getType()) { - if (type.equals("AllCreatureTypes") && c1.hasACreatureType()) { + if (type.equals("AllCreatureTypes") + && (c1.hasACreatureType() || c1.typeContains("AllCreatureTypes"))) { return true; } if (forge.card.CardType.isACreatureType(type) && c1.isType(type)) { diff --git a/src/main/java/forge/card/CardRulesPredicates.java b/src/main/java/forge/card/CardRulesPredicates.java index 35b5c0d6d62..87545fe01fe 100644 --- a/src/main/java/forge/card/CardRulesPredicates.java +++ b/src/main/java/forge/card/CardRulesPredicates.java @@ -290,15 +290,14 @@ public final class CardRulesPredicates { boolean shouldContain; switch (this.field) { case NAME: - return this.op(card.getName(), this.operand); + return op(card.getName(), this.operand); case SUBTYPE: shouldContain = (this.getOperator() == StringOp.CONTAINS) || (this.getOperator() == StringOp.EQUALS); return shouldContain == card.getType().subTypeContains(this.operand); case ORACLE_TEXT: - shouldContain = (this.getOperator() == StringOp.CONTAINS) || (this.getOperator() == StringOp.EQUALS); - return shouldContain == card.getOracleText().contains(this.operand); + return op(card.getOracleText(), operand); case JOINED_TYPE: - return this.op(card.getType().toString(), this.operand); + return op(card.getType().toString(), operand); default: return false; } diff --git a/src/main/java/forge/game/ai/ComputerUtilMana.java b/src/main/java/forge/game/ai/ComputerUtilMana.java index c7f4542b3d1..cf8f1572d65 100644 --- a/src/main/java/forge/game/ai/ComputerUtilMana.java +++ b/src/main/java/forge/game/ai/ComputerUtilMana.java @@ -138,7 +138,7 @@ public class ComputerUtilMana { } else { m.setExpressChoice("0"); } - } + } // check if ability produces any color else if (m.isAnyMana()) { String colorChoice = costParts[nPart]; @@ -156,7 +156,7 @@ public class ComputerUtilMana { break; } } - } else if (costParts[nPart].contains("/")) { + } else if (costParts[nPart].contains("2/")) { colorChoice = costParts[nPart].replace("2/", ""); } else if (costParts[nPart].length() > 1) { colorChoice = costParts[nPart].substring(0, 1); diff --git a/src/main/java/forge/game/phase/Upkeep.java b/src/main/java/forge/game/phase/Upkeep.java index 451c7113917..7dc959f3192 100644 --- a/src/main/java/forge/game/phase/Upkeep.java +++ b/src/main/java/forge/game/phase/Upkeep.java @@ -148,7 +148,9 @@ public class Upkeep extends Phase { } }; + upkeepAbility.setActivatingPlayer(c.getController()); upkeepAbility.setStackDescription(sb.toString()); + upkeepAbility.setDescription(sb.toString()); game.getStack().addSimultaneousStackEntry(upkeepAbility); @@ -206,6 +208,7 @@ public class Upkeep extends Phase { } } }; + sacAbility.setActivatingPlayer(c.getController()); sacAbility.setStackDescription(sb.toString()); sacAbility.setDescription(sb.toString()); @@ -514,7 +517,9 @@ public class Upkeep extends Phase { final StringBuilder sb = new StringBuilder(); sb.append(abyss.getName()).append(" - destroy a nonartifact creature of your choice."); + sacrificeCreature.setActivatingPlayer(c.getController()); sacrificeCreature.setStackDescription(sb.toString()); + sacrificeCreature.setDescription(sb.toString()); game.getStack().addAndUnfreeze(sacrificeCreature); } // end for } // The Abyss @@ -587,7 +592,9 @@ public class Upkeep extends Phase { final StringBuilder sb = new StringBuilder(); sb.append(c.getName()).append(" - destroy 1 creature with lowest power."); + ability.setActivatingPlayer(c.getController()); ability.setStackDescription(sb.toString()); + ability.setDescription(sb.toString()); 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); ability.setStackDescription(sb.toString()); ability.setDescription(sb.toString()); + ability.setActivatingPlayer(surge.getController()); if (damage > 0) { game.getStack().addSimultaneousStackEntry(ability); @@ -1084,6 +1092,7 @@ public class Upkeep extends Phase { + " taps X artifacts, creatures or lands he or she controls."); ability.setDescription(source.getName() + " - " + player + " taps X artifacts, creatures or lands he or she controls."); + ability.setActivatingPlayer(source.getController()); 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(player).append("."); ability.setStackDescription(sb.toString()); + ability.setDescription(sb.toString()); + ability.setActivatingPlayer(source.getController()); game.getStack().addSimultaneousStackEntry(ability); diff --git a/src/main/java/forge/gui/deckeditor/SFilterUtil.java b/src/main/java/forge/gui/deckeditor/SFilterUtil.java index 347802341b8..5e097ad6c52 100644 --- a/src/main/java/forge/gui/deckeditor/SFilterUtil.java +++ b/src/main/java/forge/gui/deckeditor/SFilterUtil.java @@ -88,20 +88,15 @@ public class SFilterUtil { return Predicates.alwaysTrue(); } - String[] splitText = text - .replaceAll(",", "") - .replaceAll(" ", " ") - .toLowerCase().split(" "); + String[] splitText = text.replaceAll(",", "").replaceAll(" ", " ").split(" "); List> terms = new ArrayList>(); for (String s : splitText) { List> subands = new ArrayList>(); - 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)); } - - // rules cannot compare in ignore-case way - if (inText) { subands.add(CardRulesPredicates.rules(StringOp.CONTAINS, s)); } + if (inText) { subands.add(CardRulesPredicates.rules(StringOp.CONTAINS_IC, s)); } terms.add(Predicates.or(subands)); } diff --git a/src/main/java/forge/gui/home/variant/VSubmenuPlanechase.java b/src/main/java/forge/gui/home/variant/VSubmenuPlanechase.java index 508f1f7a973..d69160e7815 100644 --- a/src/main/java/forge/gui/home/variant/VSubmenuPlanechase.java +++ b/src/main/java/forge/gui/home/variant/VSubmenuPlanechase.java @@ -130,16 +130,16 @@ public enum VSubmenuPlanechase implements IVSubmenu { 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.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); 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); playerPanels.add(tempPanel);