From fe9ac18f4411944c743cffd12ea790bed359b59c Mon Sep 17 00:00:00 2001 From: Agetian Date: Wed, 23 Sep 2015 06:40:35 +0000 Subject: [PATCH] - Support CARDNAME generalization in the optional prompt for AB Dig. --- .../src/main/java/forge/game/ability/effects/DigEffect.java | 2 +- forge-gui/res/cardsfolder/q/quest_for_ulas_temple.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/forge-game/src/main/java/forge/game/ability/effects/DigEffect.java b/forge-game/src/main/java/forge/game/ability/effects/DigEffect.java index e5c96301d8d..8b9c0418bfc 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/DigEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/DigEffect.java @@ -205,7 +205,7 @@ public class DigEffect extends SpellAbilityEffect { // Optional abilities that use a dialog box to prompt the user to skip the ability (e.g. Explorer's Scope, Quest for Ula's Temple) if (optional && mayBeSkipped && !valid.isEmpty()) { String prompt = !optionalAbilityPrompt.isEmpty() ? optionalAbilityPrompt : "Would you like to proceed with the optional ability for " + sa.getHostCard() + "?\n\n(" + sa.getDescription() + ")"; - if (!p.getController().confirmAction(sa, null, prompt)) { + if (!p.getController().confirmAction(sa, null, prompt.replace("CARDNAME", sa.getHostCard().getName()))) { return; } } diff --git a/forge-gui/res/cardsfolder/q/quest_for_ulas_temple.txt b/forge-gui/res/cardsfolder/q/quest_for_ulas_temple.txt index 704da256696..0f1300bc04b 100644 --- a/forge-gui/res/cardsfolder/q/quest_for_ulas_temple.txt +++ b/forge-gui/res/cardsfolder/q/quest_for_ulas_temple.txt @@ -3,7 +3,7 @@ ManaCost:U Types:Enchantment T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigDig | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ At the beginning of your upkeep, you may look at the top card of your library. If it's a creature card, you may reveal it and put a quest counter on Quest for CARDNAME. SVar:TrigDig:AB$ Dig | Cost$ 0 | DigNum$ 1 | DestinationZone$ Library | LibraryPosition$ 0 | LibraryPosition2$ 0 | SubAbility$ TrigDig2 -SVar:TrigDig2:DB$ Dig | Cost$ 0 | DigNum$ 1 | ChangeNum$ All | RevealValid$ Creature | ChangeValid$ Creature | Optional$ True | PromptToSkipOptionalAbility$ True | OptionalAbilityPrompt$ Would you like to reveal the creature and put a quest counter on Quest for Ula's Temple? | DestinationZone$ Library | LibraryPosition$ 0 | LibraryPosition2$ 0 | RememberChanged$ True | SubAbility$ DBPutCounter +SVar:TrigDig2:DB$ Dig | Cost$ 0 | DigNum$ 1 | ChangeNum$ All | RevealValid$ Creature | ChangeValid$ Creature | Optional$ True | PromptToSkipOptionalAbility$ True | OptionalAbilityPrompt$ Would you like to reveal the creature and put a quest counter on CARDNAME? | DestinationZone$ Library | LibraryPosition$ 0 | LibraryPosition2$ 0 | RememberChanged$ True | SubAbility$ DBPutCounter SVar:DBPutCounter:DB$ PutCounter | CounterType$ QUEST | CounterNum$ 1 | Defined$ Self | ConditionDefined$ Remembered | ConditionPresent$ Creature | ConditionCompare$ EQ1 | SubAbility$ DBCleanup T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ Player | Execute$ TrigChangeZone | OptionalDecider$ You | TriggerZones$ Battlefield | IsPresent$ Card.Self+counters_GE3_QUEST | PresentCompare$ EQ1 | TriggerDescription$ At the beginning of each end step, if there are three or more quest counters on Quest for CARDNAME, you may put a Kraken, Leviathan, Octopus, or Serpent creature card from your hand onto the battlefield. SVar:TrigChangeZone:AB$ ChangeZone | Cost$ 0 | Origin$ Hand | Destination$ Battlefield | ChangeType$ Creature.Kraken,Creature.Leviathan,Creature.Octopus,Creature.Serpent | ChangeNum$ 1 | Hidden$ True