From 453d83ea67fb0684eef90aaf9c46b784a9ba6ae1 Mon Sep 17 00:00:00 2001 From: tool4ever Date: Fri, 7 Oct 2022 18:25:04 +0200 Subject: [PATCH] Few fixes (#1649) --- .../main/java/forge/game/ability/effects/PermanentEffect.java | 3 +-- .../main/java/forge/game/trigger/TriggerAbilityTriggered.java | 2 +- forge-gui/res/cardsfolder/d/detention_sphere.txt | 2 +- .../cardsfolder/t/the_dragon_kami_reborn_dragon_kamis_egg.txt | 2 +- forge-gui/res/cardsfolder/upcoming/anrakyr_the_traveller.txt | 2 +- forge-gui/res/cardsfolder/z/zurs_weirding.txt | 2 +- 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/forge-game/src/main/java/forge/game/ability/effects/PermanentEffect.java b/forge-game/src/main/java/forge/game/ability/effects/PermanentEffect.java index e985b309554..0fa36f48e1c 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/PermanentEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/PermanentEffect.java @@ -4,7 +4,6 @@ import java.util.Collections; import java.util.Map; import com.google.common.collect.Lists; -import com.google.common.collect.Maps; import forge.game.Game; import forge.game.ability.AbilityKey; @@ -34,7 +33,7 @@ public class PermanentEffect extends SpellAbilityEffect { CardCollectionView lastStateBattlefield = game.copyLastStateBattlefield(); CardCollectionView lastStateGraveyard = game.copyLastStateGraveyard(); - Map moveParams = Maps.newEnumMap(AbilityKey.class); + Map moveParams = AbilityKey.newMap(); moveParams.put(AbilityKey.LastStateBattlefield, lastStateBattlefield); moveParams.put(AbilityKey.LastStateGraveyard, lastStateGraveyard); diff --git a/forge-game/src/main/java/forge/game/trigger/TriggerAbilityTriggered.java b/forge-game/src/main/java/forge/game/trigger/TriggerAbilityTriggered.java index 715a2b1b5fc..e3fa7bf0946 100644 --- a/forge-game/src/main/java/forge/game/trigger/TriggerAbilityTriggered.java +++ b/forge-game/src/main/java/forge/game/trigger/TriggerAbilityTriggered.java @@ -114,7 +114,7 @@ public class TriggerAbilityTriggered extends Trigger { Map newRunParams = AbilityKey.newMap(); newRunParams.put(AbilityKey.Mode, regtrig.getMode().toString()); if (regtrig.getMode() == TriggerType.ChangesZone) { - newRunParams.put(AbilityKey.Destination, runParams.get(AbilityKey.Destination)); + newRunParams.put(AbilityKey.Destination, runParams.getOrDefault(AbilityKey.Destination, "")); newRunParams.put(AbilityKey.Cause, ImmutableList.of(runParams.get(AbilityKey.Card))); } else if (regtrig.getMode() == TriggerType.ChangesZoneAll) { final CardZoneTable table = (CardZoneTable) runParams.get(AbilityKey.Cards); diff --git a/forge-gui/res/cardsfolder/d/detention_sphere.txt b/forge-gui/res/cardsfolder/d/detention_sphere.txt index e07a1a79166..9c96f30c077 100644 --- a/forge-gui/res/cardsfolder/d/detention_sphere.txt +++ b/forge-gui/res/cardsfolder/d/detention_sphere.txt @@ -3,7 +3,7 @@ ManaCost:1 W U Types:Enchantment T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | OptionalDecider$ You | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, you may exile target nonland permanent not named CARDNAME and all other permanents with the same name as that permanent. SVar:TrigExile:DB$ Pump | ValidTgts$ Permanent.nonLand+notnamedDetention Sphere | TgtPrompt$ Choose target nonland permanent not named Detention Sphere | SubAbility$ DBChangeZoneAll -SVar:DBChangeZoneAll:DB$ ChangeZoneAll | ChangeType$ TargetedCard.Self,Remembered.sameName+NotDefinedTargeted | Origin$ Battlefield | Destination$ Exile | RememberChanged$ True +SVar:DBChangeZoneAll:DB$ ChangeZoneAll | ChangeType$ Targeted.sameName | Origin$ Battlefield | Destination$ Exile | RememberChanged$ True T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigReturn | TriggerDescription$ When CARDNAME leaves the battlefield, return the exiled cards to the battlefield under their owner's control. SVar:TrigReturn:DB$ ChangeZoneAll | ChangeType$ Card.IsRemembered | Origin$ Exile | Destination$ Battlefield SVar:OblivionRing:TRUE diff --git a/forge-gui/res/cardsfolder/t/the_dragon_kami_reborn_dragon_kamis_egg.txt b/forge-gui/res/cardsfolder/t/the_dragon_kami_reborn_dragon_kamis_egg.txt index febe5bab692..99332fec6a5 100644 --- a/forge-gui/res/cardsfolder/t/the_dragon_kami_reborn_dragon_kamis_egg.txt +++ b/forge-gui/res/cardsfolder/t/the_dragon_kami_reborn_dragon_kamis_egg.txt @@ -19,7 +19,7 @@ Colors:green Types:Enchantment Creature Egg PT:0/1 T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self,Dragon.YouCtrl | Execute$ TrigPlay | TriggerDescription$ Whenever CARDNAME or a Dragon you control dies, you may cast a creature spell from among cards you own in exile with hatching counters on them without paying its mana cost. -SVar:TrigPlay:DB$ Play | Valid$ Creature.YouOwn+counters_GE1_HATCHING | ValidZone$ Exile | Controller$ You | WithoutManaCost$ True | Optional$ True +SVar:TrigPlay:DB$ Play | Valid$ Creature.YouOwn+counters_GE1_HATCHING | ValidSA$ Spell.Creature | ValidZone$ Exile | Controller$ You | WithoutManaCost$ True | Optional$ True SVar:SacMe:5 DeckHints:Type$Dragon Oracle:Whenever Dragon-Kami's Egg or a Dragon you control dies, you may cast a creature spell from among cards you own in exile with hatching counters on them without paying its mana cost. diff --git a/forge-gui/res/cardsfolder/upcoming/anrakyr_the_traveller.txt b/forge-gui/res/cardsfolder/upcoming/anrakyr_the_traveller.txt index 25f1856d56c..a44394f35e0 100644 --- a/forge-gui/res/cardsfolder/upcoming/anrakyr_the_traveller.txt +++ b/forge-gui/res/cardsfolder/upcoming/anrakyr_the_traveller.txt @@ -3,7 +3,7 @@ ManaCost:4 B Types:Legendary Artifact Creature Necron PT:4/4 T:Mode$ Attacks | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigCast | OptionalDecider$ You | TriggerDescription$ Whenever CARDNAME attacks, you may cast an artifact spell from your hand or graveyard by paying life equal to its mana value rather than paying its mana cost. -SVar:TrigCast:DB$ Play | ValidZone$ Hand | Valid$ Artifact.YouOwn | ValidSA$ Spell | Controller$ You | ValidZone$ Hand,Graveyard | Optional$ True | Amount$ 1 | PlayCost$ PayLife +SVar:TrigCast:DB$ Play | ValidZone$ Hand,Graveyard | Valid$ Artifact.YouOwn | ValidSA$ Spell | Controller$ You | Optional$ True | Amount$ 1 | PlayCost$ PayLife SVar:HasAttackEffect:TRUE DeckHas:Ability$Graveyard DeckHints:Type$Artifact diff --git a/forge-gui/res/cardsfolder/z/zurs_weirding.txt b/forge-gui/res/cardsfolder/z/zurs_weirding.txt index b533e449797..14018603d6d 100644 --- a/forge-gui/res/cardsfolder/z/zurs_weirding.txt +++ b/forge-gui/res/cardsfolder/z/zurs_weirding.txt @@ -5,7 +5,7 @@ S:Mode$ Continuous | AffectedZone$ Hand | MayLookAt$ Player | Description$ Playe R:Event$ Draw | ActiveZones$ Battlefield | ValidPlayer$ Player | ReplaceWith$ RevealTop | Description$ If a player would draw a card, they reveal it instead. Then any other player may pay 2 life. If a player does, put that card into its owner's graveyard. Otherwise, that player draws a card. SVar:RevealTop:DB$ PeekAndReveal | Defined$ ReplacedPlayer | NoPeek$ True | SubAbility$ DBMill SVar:DBMill:DB$ Dig | Defined$ ReplacedPlayer | DestinationZone$ Graveyard | SubAbility$ DBDraw | UnlessPayer$ NonReplacedPlayer | UnlessCost$ PayLife<2> | UnlessSwitched$ True | UnlessResolveSubs$ WhenNotPaid | StackDescription$ None -SVar:DBDraw:DB$ Draw | Defined$ ReplacedPlayer | NumCards$ 1 | SubAbility$ DBReset | StackDescription$ that player draws a card +SVar:DBDraw:DB$ Draw | Defined$ ReplacedPlayer | NumCards$ 1 | StackDescription$ that player draws a card SVar:NonStackingEffect:True AI:RemoveDeck:All Oracle:Players play with their hands revealed.\nIf a player would draw a card, they reveal it instead. Then any other player may pay 2 life. If a player does, put that card into its owner's graveyard. Otherwise, that player draws a card.