From ed0af0faee1589e2b6dc506af7fb838fddb45946 Mon Sep 17 00:00:00 2001 From: magenoxx Date: Wed, 18 Jul 2012 10:15:50 +0400 Subject: [PATCH] Added skip-all-turns-and-actions feature. Bound to F9. --- .../main/java/mage/client/game/GamePanel.java | 11 +++++++++++ .../src/mage/player/human/HumanPlayer.java | 7 +++++++ Mage.Server/plugins/mage-player-human.jar | Bin 13562 -> 13603 bytes Mage/src/mage/game/GameImpl.java | 11 +++-------- Mage/src/mage/players/Player.java | 5 +++++ Mage/src/mage/players/PlayerImpl.java | 12 ++++++++++++ 6 files changed, 38 insertions(+), 8 deletions(-) diff --git a/Mage.Client/src/main/java/mage/client/game/GamePanel.java b/Mage.Client/src/main/java/mage/client/game/GamePanel.java index b715441ee3..685d7195c1 100644 --- a/Mage.Client/src/main/java/mage/client/game/GamePanel.java +++ b/Mage.Client/src/main/java/mage/client/game/GamePanel.java @@ -739,6 +739,17 @@ public class GamePanel extends javax.swing.JPanel { } }); + KeyStroke ks8 = KeyStroke.getKeyStroke(KeyEvent.VK_F9, 0); + this.getInputMap(c).put(ks8, "F9_PRESS"); + this.getActionMap().put("F9_PRESS", new AbstractAction() { + @Override + public void actionPerformed(ActionEvent actionEvent) { + if (feedbackPanel != null && FeedbackMode.SELECT.equals(feedbackPanel.getMode())) { + session.sendPlayerInteger(gameId, -9999); + } + } + }); + KeyStroke ksAltShift = KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.ALT_MASK); this.getInputMap(c).put(ksAltShift, "ENLARGE"); this.getActionMap().put("ENLARGE", new AbstractAction() { diff --git a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java index 9787e20d49..d863a522bc 100644 --- a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java @@ -371,6 +371,10 @@ public class HumanPlayer extends PlayerImpl { public boolean priority(Game game) { passed = false; if (!abort) { + if (passedAllTurns) { + pass(); + return false; + } if (passedTurn && game.getStack().isEmpty()) { pass(); return false; @@ -382,6 +386,9 @@ public class HumanPlayer extends PlayerImpl { pass(); return false; } else if (response.getInteger() != null) { + if (response.getInteger() == -9999) { + passedAllTurns = true; + } pass(); passedTurn = true; return false; diff --git a/Mage.Server/plugins/mage-player-human.jar b/Mage.Server/plugins/mage-player-human.jar index f55588656b2a09c2bbd06b609a3e4aeda9287b8e..bcd7b9afe29b8e9b48965463932b9d38d53a509e 100644 GIT binary patch delta 11221 zcmZ{qb8y~G*zaSfv2ELGoHVx4*l6thg2oN+*t}!gZfx6)*~V#dp68kKzBA{KvopJ& z-MO@L?VtO7u`RMgRaJn7L4x>qEX&^|qEbUI{R8fl|1e4ZAFk>C1&9EW1>+xzY1`!X z-Y`HwINL%%P=QRCa6mhp7(lllqPM2>@lZiRNb{cR|{7~b*`XlT6v zQN7BKCq6fPjT4q49giPGS=&i~e&ZHv+NVJFcO~zIKT-t*(hVfN7x&)q$0H*wCnN+m z*4wy~dCEK;es{xEaJzCkj88yW|3<1|B;UqHiCyr>0A3TR@frL!)zjDo=)TZNI z-tcGQ&3$SR1zagpVTng>XXJ#eGkI-jdUI3yK08 zbjsX^*~9`m(+BSy!hijpNd8IjZ!+^|wY@atL;O6$(Q9eojX#O3=!s*P4v&jP;b}xY z*NZ?j)olmKDW|VY<5D}Wq_(SyR$Nuf5cXk@mg1tSQ}x3b4+=Wx zp{;$vO}Cb>xm3U}(D5Bw?4__%&I~)=(_z@A8-^(BFD=9U()gp2x8Iz-U53Vq zk_OBKZ`r-?11fpr3eSTn%$VpdI6&um!pf5^sEgMC1+?NabN{(Lafk1w?CZ-Zm;GYw zXCJHsC+AyDo;nCH}k?bR88cTkUXJ32 z9>%Nz-C64fg16L8r9A)C(#=8W+=Jzhy3_YK)Hffe?!I`u=i4NTuU7iTdn1+M{;2cl z)#3gm{>P8k{c?f5d!^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&TVQ<`S2`XeNo*03bw7o(sVf>`VD3%R`K?o5_XpEl^P@cx0%%V{a2v=FMk8W7rCG1V z7%fx@J=3aj%?dj*uu3}$WY-pGEwE5s5D-R_Vmr8dJlG zzOe5WwC_#nU7O;aE}u&h+j48-^Uj|+uc(X>P9wMu*aUrnq^Yyi9F z42G|+Jfk(fx&3qXXT;~}_7ya25cm&!d4DRQ#M?o%HM^_Me`Mfb`;Ueky#Fzk zL-_yWYu)AeLiRtWD^dzHw> implements Game, Serializable { @@ -462,6 +456,7 @@ public abstract class GameImpl> implements Game, Serializa fireInformEvent("Turn " + Integer.toString(state.getTurnNum())); if (checkStopOnTurnOption()) return; state.setActivePlayerId(player.getId()); + player.becomesActivePlayer(); state.getTurn().play(this, player.getId()); if (isPaused() || isGameOver()) break; diff --git a/Mage/src/mage/players/Player.java b/Mage/src/mage/players/Player.java index 60a79475de..cbc9eeaebd 100644 --- a/Mage/src/mage/players/Player.java +++ b/Mage/src/mage/players/Player.java @@ -256,4 +256,9 @@ public interface Player extends MageItem, Copyable { public List getAttachments(); public boolean addAttachment(UUID permanentId, Game game); public boolean removeAttachment(UUID permanentId, Game game); + + /** + * Signals that the player becomes active player in this turn. + */ + public void becomesActivePlayer(); } diff --git a/Mage/src/mage/players/PlayerImpl.java b/Mage/src/mage/players/PlayerImpl.java index c379e4ebf9..de1a17c61d 100644 --- a/Mage/src/mage/players/PlayerImpl.java +++ b/Mage/src/mage/players/PlayerImpl.java @@ -97,6 +97,11 @@ public abstract class PlayerImpl> implements Player, Ser protected ManaPool manaPool; protected boolean passed; protected boolean passedTurn; + /** + * This indicates that player passed all turns until his own turn starts. + * Note! This differs from passedTurn as it doesn't care about spells and abilities in the stack and will pass them as well. + */ + protected boolean passedAllTurns; protected boolean left; protected RangeOfInfluence range; protected Set inRange = new HashSet(); @@ -152,6 +157,7 @@ public abstract class PlayerImpl> implements Player, Ser this.manaPool = player.manaPool.copy(); this.passed = player.passed; this.passedTurn = player.passedTurn; + this.passedAllTurns = player.passedAllTurns; this.left = player.left; this.range = player.range; this.canGainLife = player.canGainLife; @@ -188,6 +194,7 @@ public abstract class PlayerImpl> implements Player, Ser this.left = false; this.passed = false; this.passedTurn = false; + this.passedAllTurns = false; this.canGainLife = true; this.canLoseLife = true; game.getState().getWatchers().add(new BloodthirstWatcher(playerId)); @@ -1445,4 +1452,9 @@ public abstract class PlayerImpl> implements Player, Ser public boolean autoLoseGame() { return false; } + + @Override + public void becomesActivePlayer() { + this.passedAllTurns = false; + } }