From ce7b34daad7187845623b49dcfe640d42151f01c Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 04:59:14 +0000 Subject: [PATCH] Bug Fixes. Fixed Irini Senger to only reduce white/green enchantment spells by 1 (Thanks Sloth). Added ButtonUtil.reset just after the game starts (Not sure if this fixed your bug Rob, because i wasn't sure what the bug was). Added a card property, CopiedSpell. With copiedspell, i made a few changes to cascade and storm and fixed Gelectrode (It used to trigger its ability at copied spells). Also made the popup for vengevine better. --- res/cards.txt | 3 +-- src/forge/Card.java | 8 ++++++++ src/forge/GameAction.java | 1 + src/forge/GameActionUtil.java | 20 ++++++++++++-------- src/forge/MagicStack.java | 2 +- 5 files changed, 23 insertions(+), 11 deletions(-) diff --git a/res/cards.txt b/res/cards.txt index 0bebe6b26cd..c8567d9ae8e 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -253,8 +253,7 @@ Irini Sengir Legendary Creature Vampire Dwarf White enchantment spells and green enchantment spells cost 2 more to cast. 2/2 -CostChange:All:More:2:Spell:white:Enchantment:NoSpecial -CostChange:All:More:2:Spell:green:Enchantment:NoSpecial +CostChange:All:More:2:Spell:white/green:Enchantment:OnlyOneBonus Hum of the Radix 2 G G diff --git a/src/forge/Card.java b/src/forge/Card.java index 1b81f492a02..060b4641bd6 100644 --- a/src/forge/Card.java +++ b/src/forge/Card.java @@ -42,6 +42,7 @@ public class Card extends MyObservable { private boolean sickness = true; //summoning sickness private boolean token = false; private boolean copiedToken = false; + private boolean copiedSpell = false; private boolean checkedPropagandaThisTurn = false; private boolean creatureAttackedThisCombat = false; private boolean creatureBlockedThisCombat = false; @@ -707,7 +708,14 @@ public class Card extends MyObservable { public boolean isCopiedToken() { return copiedToken; } + public void setCopiedSpell(boolean b) + { + copiedSpell = b; + } + public boolean isCopiedSpell() { + return copiedSpell; + } public void setExaltedBonus(boolean b) { exaltedBonus = b; } diff --git a/src/forge/GameAction.java b/src/forge/GameAction.java index 096a576a83c..a4f14da3851 100644 --- a/src/forge/GameAction.java +++ b/src/forge/GameAction.java @@ -1177,6 +1177,7 @@ public class GameAction { AllZone.Stack.reset();//this works, it clears the stack of Upkeep effects like Bitterblossom AllZone.InputControl.setInput(new Input_Mulligan()); Phase.GameBegins = 1; + ButtonUtil.reset(); }//newGame() //this is where the computer cheats diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index 5957b87690c..52508a85705 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -6,6 +6,8 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.Random; +import javax.swing.JOptionPane; + public class GameActionUtil { public static void executeUpkeepEffects() { @@ -453,7 +455,7 @@ public class GameActionUtil { Human_Nexus = Human_Nexus.getName("Maelstrom Nexus"); Computer_Nexus = Computer_Nexus.getName("Maelstrom Nexus"); if (Human_Nexus.size() > 0){ - if (Phase.PlayerSpellCount == 1) + if (Phase.PlayerSpellCount == 1 && !c.isCopiedSpell()) { for (int i=0;i 0){ - if (Phase.ComputerSpellCount == 1) + if (Phase.ComputerSpellCount == 1 && !c.isCopiedSpell()) { for (int i=0;i 0 && (c.getType().contains("Instant") || c.getType().contains("Sorcery"))) { + if(list.size() > 0 && (c.getType().contains("Instant") || c.getType().contains("Sorcery")) && !c.isCopiedSpell()) { for(int i = 0; i < list.size(); i++) { final Card card = list.get(i); diff --git a/src/forge/MagicStack.java b/src/forge/MagicStack.java index 023e45162ea..72a68d6c4e1 100644 --- a/src/forge/MagicStack.java +++ b/src/forge/MagicStack.java @@ -223,7 +223,7 @@ public class MagicStack extends MyObservable stack.add(0, sp); this.updateObservers(); - if(sp.isSpell()) + if(sp.isSpell() && !sp.getSourceCard().isCopiedSpell()) { Phase.StormCount = Phase.StormCount + 1; if(sp.getSourceCard().getController() == "Human") {