From 62bc1b4ecd0523ceabc11d5074c9f0c6cb57f170 Mon Sep 17 00:00:00 2001 From: TRT <> Date: Wed, 5 Jan 2022 11:57:27 +0100 Subject: [PATCH] Fix optional Mill --- .../src/main/java/forge/game/ability/effects/MillEffect.java | 3 ++- forge-gui/res/cardsfolder/c/crawling_infestation.txt | 4 ++-- forge-gui/res/cardsfolder/c/crawling_sensation.txt | 4 ++-- forge-gui/res/cardsfolder/c/crop_sigil.txt | 4 ++-- forge-gui/res/cardsfolder/s/shard_of_broken_glass.txt | 4 ++-- forge-gui/res/cardsfolder/w/world_shaper.txt | 4 ++-- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/forge-game/src/main/java/forge/game/ability/effects/MillEffect.java b/forge-game/src/main/java/forge/game/ability/effects/MillEffect.java index dc598e57368..0f48038a96c 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/MillEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/MillEffect.java @@ -40,7 +40,8 @@ public class MillEffect extends SpellAbilityEffect { if (!sa.usesTargeting() || p.canBeTargetedBy(sa)) { if (sa.hasParam("Optional")) { final String prompt = TextUtil.concatWithSpace(Localizer.getInstance().getMessage("lblDoYouWantPutLibraryCardsTo", destination.getTranslatedName())); - if (!p.getController().confirmAction(sa, null, prompt)) { + // CR 701.13b + if (numCards > p.getZone(ZoneType.Library).size() || !p.getController().confirmAction(sa, null, prompt)) { continue; } } diff --git a/forge-gui/res/cardsfolder/c/crawling_infestation.txt b/forge-gui/res/cardsfolder/c/crawling_infestation.txt index 8c866bf3333..883d271caeb 100644 --- a/forge-gui/res/cardsfolder/c/crawling_infestation.txt +++ b/forge-gui/res/cardsfolder/c/crawling_infestation.txt @@ -1,8 +1,8 @@ Name:Crawling Infestation ManaCost:2 G Types:Enchantment -T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigMill | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ At the beginning of your upkeep, you may mill two cards. (You may put the top two cards of your library into your graveyard.) -SVar:TrigMill:DB$ Mill | NumCards$ 2 | Defined$ You +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigMill | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, you may mill two cards. (You may put the top two cards of your library into your graveyard.) +SVar:TrigMill:DB$ Mill | NumCards$ 2 | Defined$ You | Optional$ True T:Mode$ ChangesZoneAll | ValidCards$ Creature.YouOwn+nonToken | Origin$ Any | Destination$ Graveyard | TriggerZones$ Battlefield | ActivationLimit$ 1 | PlayerTurn$ True | Execute$ TrigToken | TriggerDescription$ Whenever one or more creature cards are put into your graveyard from anywhere during your turn, create a 1/1 green Insect creature token. This ability triggers only once each turn. SVar:TrigToken:DB$ Token | TokenScript$ g_1_1_insect DeckHas:Ability$Mill & Ability$Token diff --git a/forge-gui/res/cardsfolder/c/crawling_sensation.txt b/forge-gui/res/cardsfolder/c/crawling_sensation.txt index 5fd0ff6d081..c83c8896e00 100644 --- a/forge-gui/res/cardsfolder/c/crawling_sensation.txt +++ b/forge-gui/res/cardsfolder/c/crawling_sensation.txt @@ -1,8 +1,8 @@ Name:Crawling Sensation ManaCost:2 G Types:Enchantment -T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigMill | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ At the beginning of your upkeep, you may mill two cards. -SVar:TrigMill:DB$ Mill | NumCards$ 2 | Defined$ You +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigMill | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, you may mill two cards. +SVar:TrigMill:DB$ Mill | NumCards$ 2 | Defined$ You | Optional$ True T:Mode$ ChangesZone | ValidCard$ Land.YouOwn | Origin$ Any | Destination$ Graveyard | TriggerZones$ Battlefield | ActivationLimit$ 1 | Execute$ TrigToken | TriggerDescription$ Whenever one or more land cards are put into your graveyard from anywhere for the first time each turn, create a 1/1 green Insect creature token. SVar:TrigToken:DB$ Token | TokenAmount$ 1 | TokenScript$ g_1_1_insect | TokenOwner$ You DeckHints:Ability$Delirium diff --git a/forge-gui/res/cardsfolder/c/crop_sigil.txt b/forge-gui/res/cardsfolder/c/crop_sigil.txt index 09b332e805e..7b3ca982d6f 100644 --- a/forge-gui/res/cardsfolder/c/crop_sigil.txt +++ b/forge-gui/res/cardsfolder/c/crop_sigil.txt @@ -1,8 +1,8 @@ Name:Crop Sigil ManaCost:G Types:Enchantment -T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigMill | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ At the beginning of your upkeep, you may mill a card. -SVar:TrigMill:DB$ Mill | NumCards$ 1 | Defined$ You +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigMill | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, you may mill a card. +SVar:TrigMill:DB$ Mill | NumCards$ 1 | Defined$ You | Optional$ True A:AB$ ChangeZone | Cost$ 2 G Sac<1/CARDNAME> | Origin$ Graveyard | Destination$ Hand | TgtPrompt$ Select target creature card in your graveyard | TargetMin$ 0 | TargetMax$ 1 | ValidTgts$ Creature.YouOwn | SubAbility$ DBReturn | Activation$ Delirium | PrecostDesc$ Delirium — | SpellDescription$ Return up to one target creature card and up to one target land card from your graveyard to your hand. Activate only if there are four or more card types among cards in your graveyard. SVar:DBReturn:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | TargetMin$ 0 | TargetMax$ 1 | ValidTgts$ Land.YouOwn | TgtPrompt$ Select target land card in your graveyard DeckHints:Ability$Graveyard & Ability$Discard diff --git a/forge-gui/res/cardsfolder/s/shard_of_broken_glass.txt b/forge-gui/res/cardsfolder/s/shard_of_broken_glass.txt index d75713ffa71..7154b417a4f 100644 --- a/forge-gui/res/cardsfolder/s/shard_of_broken_glass.txt +++ b/forge-gui/res/cardsfolder/s/shard_of_broken_glass.txt @@ -2,7 +2,7 @@ Name:Shard of Broken Glass ManaCost:1 Types:Artifact Equipment S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddPower$ 1 | Description$ Equipped creature gets +1/+0. -T:Mode$ Attacks | ValidCard$ Card.EquippedBy | Execute$ TrigMill | OptionalDecider$ You | TriggerDescription$ Whenever equipped creature attacks, you may mill two cards. -SVar:TrigMill:DB$ Mill | NumCards$ 2 | Defined$ You +T:Mode$ Attacks | ValidCard$ Card.EquippedBy | Execute$ TrigMill | TriggerDescription$ Whenever equipped creature attacks, you may mill two cards. +SVar:TrigMill:DB$ Mill | NumCards$ 2 | Defined$ You | Optional$ True K:Equip:1 Oracle:Equipped creature gets +1/+0.\nWhenever equipped creature attacks, you may mill two cards.\nEquip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) diff --git a/forge-gui/res/cardsfolder/w/world_shaper.txt b/forge-gui/res/cardsfolder/w/world_shaper.txt index 50d2ed00ed9..e4304fad90a 100644 --- a/forge-gui/res/cardsfolder/w/world_shaper.txt +++ b/forge-gui/res/cardsfolder/w/world_shaper.txt @@ -2,8 +2,8 @@ Name:World Shaper ManaCost:3 G Types:Creature Merfolk Shaman PT:3/3 -T:Mode$ Attacks | ValidCard$ Card.Self | OptionalDecider$ You | Execute$ TrigMill | TriggerDescription$ Whenever CARDNAME attacks, you may mill three cards. -SVar:TrigMill:DB$ Mill | NumCards$ 3 | Defined$ You +T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigMill | TriggerDescription$ Whenever CARDNAME attacks, you may mill three cards. +SVar:TrigMill:DB$ Mill | NumCards$ 3 | Defined$ You | Optional$ True T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZoneAll | TriggerController$ TriggeredCardController | TriggerDescription$ When World Shaper dies, put all land cards from your graveyard onto the battlefield tapped. SVar:TrigChangeZoneAll:DB$ ChangeZoneAll | ChangeType$ Land.YouCtrl | Origin$ Graveyard | Destination$ Battlefield | Tapped$ True DeckHints:Ability$Graveyard