diff --git a/src/forge/CardFactory.java b/src/forge/CardFactory.java index d637027c9fe..94368035176 100644 --- a/src/forge/CardFactory.java +++ b/src/forge/CardFactory.java @@ -14080,7 +14080,6 @@ public class CardFactory implements NewConstants { }//*************** END ************ END ************************** */ - //*************** START *********** START ************************** else if(cardName.equals("Nameless Inversion")) { diff --git a/src/forge/CardFactory_Planeswalkers.java b/src/forge/CardFactory_Planeswalkers.java index 3686cce4366..d6c9fb3dfce 100644 --- a/src/forge/CardFactory_Planeswalkers.java +++ b/src/forge/CardFactory_Planeswalkers.java @@ -1983,7 +1983,7 @@ class CardFactory_Planeswalkers { card2.addSpellAbility(new Spell_Permanent(card2)); card2.addComesIntoPlayCommand(CardFactoryUtil.entersBattleFieldWithCounters(card2, Counters.LOYALTY, 3)); - //ability 1: destroy target noncreature permanent + final SpellAbility ability1 = new Ability(card2, "0") { public void resolve() diff --git a/src/forge/CombatUtil.java b/src/forge/CombatUtil.java index 48ff723082b..381528f24a4 100644 --- a/src/forge/CombatUtil.java +++ b/src/forge/CombatUtil.java @@ -504,7 +504,7 @@ public class CombatUtil //loop through attackers for(int i = 0; i < attack.length; i++) { - GameActionUtil.executeExaltedEffects2(attack[i], AllZone.Combat); + //GameActionUtil.executeExaltedEffects2(attack[i], AllZone.Combat); //checkDeclareAttackers(attack[i]); attackerName = attack[i].getName(); if (attack[i].isFaceDown()) @@ -559,7 +559,8 @@ public class CombatUtil //loop through attackers for(int i = 0; i < attack.length; i++) { - GameActionUtil.executeExaltedEffects2(attack[i], AllZone.pwCombat); + //GameActionUtil.executeExaltedEffects2(attack[i], AllZone.pwCombat); + //checkDeclareAttackers(attack[i]); attackerName = attack[i].getName(); if (attack[i].isFaceDown()) @@ -2004,4 +2005,99 @@ public class CombatUtil a.setCreatureGotBlockedThisTurn(true); } + + public static void executeExaltedAbility(Card c, int magnitude) + { + final Card crd = c; + final int n = magnitude; + Ability ability = new Ability(c,"0") + { + public void resolve() + { + final Command untilEOT = new Command() + { + private static final long serialVersionUID = 1497565871061029469L; + + public void execute() + { + if(AllZone.GameAction.isCardInPlay(crd)) + { + crd.addTempAttackBoost(-n); + crd.addTempDefenseBoost(-n); + } + } + };//Command + + if(AllZone.GameAction.isCardInPlay(crd)) + { + crd.addTempAttackBoost(n); + crd.addTempDefenseBoost(n); + + AllZone.EndOfTurn.addUntil(untilEOT); + } + }//resolve + + };//ability + ability.setStackDescription(c +" - (Exalted) gets +" +n +"/+" +n +" until EOT."); + AllZone.Stack.add(ability); + + if (GameActionUtil.isRafiqInPlay(c.getController())) + { + Ability ability2 = new Ability(c,"0") + { + public void resolve() + { + final Command untilEOT = new Command() + { + private static final long serialVersionUID = -8943526706248389725L; + + public void execute() + { + if(AllZone.GameAction.isCardInPlay(crd)) + crd.removeExtrinsicKeyword("Double Strike"); + } + };//Command + + if(AllZone.GameAction.isCardInPlay(crd)) + { + crd.addExtrinsicKeyword("Double Strike"); + AllZone.EndOfTurn.addUntil(untilEOT); + } + }//resolve + + };//ability2 + ability2.setStackDescription(c +" - (Exalted) gets Double Strike until EOT."); + AllZone.Stack.add(ability2); + } + + if (GameActionUtil.getBattleGraceAngels(c.getController()) > 0) + { + Ability ability3 = new Ability(c,"0") + { + public void resolve() + { + final Command untilEOT = new Command() + { + private static final long serialVersionUID = -8154692281049657338L; + + public void execute() + { + if(AllZone.GameAction.isCardInPlay(crd)) + crd.removeExtrinsicKeyword("Lifelink"); + } + };//Command + + if(AllZone.GameAction.isCardInPlay(crd)) + { + crd.addExtrinsicKeyword("Lifelink"); + AllZone.EndOfTurn.addUntil(untilEOT); + } + }//resolve + + };//ability2 + ability3.setStackDescription(c +" - (Exalted) gets Lifelink until EOT."); + AllZone.Stack.add(ability3); + } + } + }//Class CombatUtil \ No newline at end of file diff --git a/src/forge/EndOfTurn.java b/src/forge/EndOfTurn.java index cf095dd90e8..2d149d06dcb 100644 --- a/src/forge/EndOfTurn.java +++ b/src/forge/EndOfTurn.java @@ -33,7 +33,7 @@ public class EndOfTurn implements java.io.Serializable AllZone.GameAction.sacrifice(sacrifice.get(i)); } - GameActionUtil.removeExaltedEffects(); + //GameActionUtil.removeExaltedEffects(); GameActionUtil.removeAttackedBlockedThisTurn(); AllZone.StaticEffects.rePopulateStateBasedList(); diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index 5be9e27bc8b..4dc0e0e830c 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -2995,6 +2995,8 @@ public class GameActionUtil } } + + /* public static void executeExaltedEffects2(Card c, Combat combats) { boolean exalted = false; @@ -3101,7 +3103,8 @@ public class GameActionUtil } } - + */ + /* public static void removeExaltedEffects() // at EOT { PlayerZone playerZone = AllZone.getZone(Constant.Zone.Play, @@ -3138,7 +3141,7 @@ public class GameActionUtil } } } - + */ public static boolean isRafiqInPlay(String player) { PlayerZone playerZone = AllZone.getZone(Constant.Zone.Play, player); @@ -16141,7 +16144,7 @@ public class GameActionUtil commands.put("Meddling_Mage", Meddling_Mage); commands.put("Gaddock_Teeg", Gaddock_Teeg); commands.put("Iona_Shield_of_Emeria", Iona_Shield_of_Emeria); - System.out.println("size of commands: " + commands.size()); + //System.out.println("size of commands: " + commands.size()); } diff --git a/src/forge/GuiDisplay3.java b/src/forge/GuiDisplay3.java index 28794d5bfb8..2d2f4a91e2d 100644 --- a/src/forge/GuiDisplay3.java +++ b/src/forge/GuiDisplay3.java @@ -570,6 +570,11 @@ public class GuiDisplay3 extends JFrame implements Display, NewConstants, NewCon counterText.append(c.getCounters(Counters.SPORE)); counterText.append("\r\n"); } + if(c.getCounters(Counters.TIME) != 0) { + counterText.append("Time counters: "); + counterText.append(c.getCounters(Counters.TIME)); + counterText.append("\r\n"); + } String chosenTypeText = ""; if(c.getChosenType() != "") chosenTypeText = "(chosen type: " + c.getChosenType() + ")"; @@ -1259,7 +1264,7 @@ public class GuiDisplay3 extends JFrame implements Display, NewConstants, NewCon */ cardImagePanel.setScalingBlur(false); //use blured image if scaling down more than 50% - cardImagePanel.setScaleLarger(false); //upscale if needed true + //cardImagePanel.setScaleLarger(false); //upscale if needed true cardImagePanel.setScalingType(ScalingType.bicubic); // type of scaling bicubic has good quality / speed ratio cardImagePanel.setScalingMultiPassType(MultipassType.none); diff --git a/src/forge/InputControl.java b/src/forge/InputControl.java index b6314713b18..b070316be51 100644 --- a/src/forge/InputControl.java +++ b/src/forge/InputControl.java @@ -88,7 +88,23 @@ import java.util.*; { CardList list = new CardList(); list.addAll(AllZone.Combat.getAttackers()); - //list.addAll(AllZone.pwCombat.getAttackers()); + list.addAll(AllZone.pwCombat.getAttackers()); + + //check for exalted: + if (list.size() == 1) + { + String attackingPlayer = AllZone.Combat.getAttackingPlayer(); + PlayerZone play = AllZone.getZone(Constant.Zone.Play, attackingPlayer); + CardList exalted = new CardList(play.getCards()); + exalted = exalted.filter(new CardListFilter(){ + public boolean addCard(Card c) + { + return c.getKeyword().contains("Exalted"); + } + }); + if (exalted.size() > 0) + CombatUtil.executeExaltedAbility(list.get(0), exalted.size()); + } for (Card c : list) CombatUtil.checkPropagandaEffects(c); @@ -301,7 +317,23 @@ import java.util.*; { CardList list = new CardList(); list.addAll(AllZone.Combat.getAttackers()); - //list.addAll(AllZone.pwCombat.getAttackers()); + list.addAll(AllZone.pwCombat.getAttackers()); + + //check for exalted: + if (list.size() == 1) + { + String attackingPlayer = AllZone.Combat.getAttackingPlayer(); + PlayerZone play = AllZone.getZone(Constant.Zone.Play, attackingPlayer); + CardList exalted = new CardList(play.getCards()); + exalted = exalted.filter(new CardListFilter(){ + public boolean addCard(Card c) + { + return c.getKeyword().contains("Exalted"); + } + }); + if (exalted.size() > 0) + CombatUtil.executeExaltedAbility(list.get(0), exalted.size()); + } for (Card c : list) {