From 80b498f044c92f1d3900586debecda1377b86aae Mon Sep 17 00:00:00 2001 From: spjspj Date: Mon, 26 Sep 2016 02:45:20 +1000 Subject: [PATCH 1/5] spjspj - Energy.png resource --- Mage.Client/src/main/resources/info/energy.png | Bin 0 -> 6475 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Mage.Client/src/main/resources/info/energy.png diff --git a/Mage.Client/src/main/resources/info/energy.png b/Mage.Client/src/main/resources/info/energy.png new file mode 100644 index 0000000000000000000000000000000000000000..5cdfba5dc49f5b205fbb3f0d127bf2035813afe8 GIT binary patch literal 6475 zcmZ9RWmHt(8}AP_v^0X$&?Px^NS7cf0!o7df`oJq&47}Ebcg(q?hcXeh5=#7L5A)U z?)=w%b?-WBpJ(syUZ3weFZSNgv-XMB)m9@Wct!vK0I`O;vOYTMpxY}v5c-Y0myAUR zY&(Tl3II?OPk3*IgC2uz)b(EhfFB0{1cw8_Em{iR1prS$0NAqx0I4(pc)z7Bq&aat)AGoK05XoOe+_y8?0FE`z!l~eYQ->M7qEE z()l5k&!Ig@(h%i*x#Pg{QD=N>#@qYDlc&Dcn!Im0=L;P43Ew_R4^gtCkN*CBsI;t1 z;k_X{{8^@)S8!V-NFqgxIbAES3rZ*EV*KSHj+kcuubPDmeaFARUDR6KlrnvbDfJ8- zj)=S5pUd*cG5=gjS9pS*bRuFZ5V4+b<>Be2$P;ZZ61i8#^V+a~Qr9A?e}`jsZmzJh z^NDCfgQ>y0__B<*B4Q$WC6$ad!!*`ZR0)ZAV7yVH3HSBpC&KAOdu1pDTx>d>X!<`9 z@H9MTaxy&7OIy_(`a%ej+LxS@zYO)Au;t6O8iUj zfY4O09{wYM&7eD9krnA)OW*i3i*g$Cg~_apN{aXaOu`0FM+K z51*85@jctjVF*T5VIVsvxruF^Sek72A_I$3`5Fw-!sxW1%JC`81o}D+>b`3@DKQZh zg?WCK1)XGt&|vNV6$;2BeHNwkO-Kd}l1D$6f*YMOLj;~{#wHWzkP_IO2rb58eW=SE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ZQrS$2UVf3d+=@>smQ+qD zt~lCQisboIagXNYx?)> zi(stkBhS^if8%Y=;x#qgA$W6x+q@|-bdqV`y>-Ou5Vg6r>TeoJjkuY>LP#IA2Iiug z8Sa8`^2iYPlnPEp} zUJF6EhruC8EIjaQX%-XEg&<-$hAUSJ%6Qe^bjJ7Cs;tJJXg_E%%lQ_Upc#vR5waO4 z4W+RSIh!+TRpkE2ofG)$q}|J1I@j%zHl)oa{g@b7b3>Al(758#%Y5i>a(QdZ0+Q#x1nvo~kPX;&D>S(5&hRI3(& zT{ph|AFH}LW8m--FtP>KZ{0&Y9Ai(JGKVfj`OzZcV!`M@PR?29K>oBcth{Jz zuk2-G5dy~UYwZXzGBT`9N@5DQ?g@)TJ>jXjxFh~jIcs4eZ>hOgXAA`N7VwhrApSS8 z{Ojj<&y<=L7Ru!@809N*3v)2`nUloLsLzH!VxE$o_*>TYx1xV6uzRQ&d)QieyqB{1 z{2m4=K0!%7VX@bO!csyIDToNKkf4;Hpebvs@BagQa Date: Mon, 26 Sep 2016 02:50:37 +1000 Subject: [PATCH 2/5] spjspj - experience.png resource (candidate for a more gooderer one..) --- .../src/main/resources/info/experience.png | Bin 0 -> 4445 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Mage.Client/src/main/resources/info/experience.png diff --git a/Mage.Client/src/main/resources/info/experience.png b/Mage.Client/src/main/resources/info/experience.png new file mode 100644 index 0000000000000000000000000000000000000000..180ef0f47a9727ee8ea27ed254d63004d6f4f23f GIT binary patch literal 4445 zcmZXY2Q*w;+s6;a7^1fz${>2wh;A@Z2EiC4q6MS(UPfn>(R+zr!$b%ol1LCCN<@tk zf*X>nccSynUGKWzx4!kReRf%U|NhU}>sik(=ird~T2vHl6aWBFX(QB8gc?rB@(?hg zjBdJI2LK{==ll1O&S*3M2xg$It);yDynXEHt*!gNiU?8o1fmiWl2O(wBVC`nh5#^b zpqDh2hzJG^unM;lCIO!Wq(srFKbayeh!sk^>BV=GF$Y*vQFY7CG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`@L?(HOYJfa z{#d-wo0W`+g1|;OQQANl;oS81A>2gb{#-B`=%mA-h7Fv~v2P6E&)e;7XtLhjYh7muPQ7f+*k&VxaaaxCSjr+1JoYOn_*NbA{5S}$F zg`1(t2a44CH*je8`B{?+!d9794T)XuOQ=cPk^d$@5tKUcp>Rc3NuOdV_9JCEBC|a3 zDr;#W&uN-+T%fk^anO}X(FDWKlDP)ux+QPwdW0qgT1muxMG zK@CdTpueMn{N|`nKbwjljnkf6MS%NCW`mg%;XG~mCBO5$oR48sjqQ8c8;g3b4{;W+ zG;0EdFw!a6u#UqF)Y3cVRvdAviQ{rxgtX^RZ}tRB1CP9sj){0YSpG1H%f>|Ws<8NqS|oZEf6s`%JRnSPd;;rI`H9t4#k9@n8+3`$8~LkajAlrI+q$8S%l5wb^r?C)zQnYPtRIcyd|BoR zJ0XJj#EqF%3?+G0Ym6_e?Kbo*lWP15D)r*knLx$cFQTqklUr3(7O)kftSDjKZ)#Pv z(t#hI_QkSu3%YeD%8Ns2~c- zFaiD7gq^)F+Q-?;&)L%h_>T&u1&0a}tjGzye7F9Gz;ge~y4!g8JJ_K8{C(_w{tJ#y hj~yq#Z2t>;+S$AP7v*=$ZInO(+8X-m4RGt|{{g2u4_yEN literal 0 HcmV?d00001 From 5671ab8ff7943b663ade2f45ea196af9f9f66e7e Mon Sep 17 00:00:00 2001 From: spjspj Date: Mon, 26 Sep 2016 02:58:59 +1000 Subject: [PATCH 3/5] spjspj - Add in energy/experience counters --- .../java/mage/client/game/PlayAreaPanel.java | 2 +- .../java/mage/client/game/PlayerPanelExt.java | 54 +++++++++++++++++-- 2 files changed, 50 insertions(+), 6 deletions(-) diff --git a/Mage.Client/src/main/java/mage/client/game/PlayAreaPanel.java b/Mage.Client/src/main/java/mage/client/game/PlayAreaPanel.java index e8001fee6c..09de6a3d55 100644 --- a/Mage.Client/src/main/java/mage/client/game/PlayAreaPanel.java +++ b/Mage.Client/src/main/java/mage/client/game/PlayAreaPanel.java @@ -81,7 +81,7 @@ public class PlayAreaPanel extends javax.swing.JPanel { private JCheckBoxMenuItem allowViewHandCardsMenuItem; private JCheckBoxMenuItem holdPriorityMenuItem; - public static final int PANEL_HEIGHT = 242; + public static final int PANEL_HEIGHT = 262; public static final int PANEL_HEIGHT_SMALL = 190; /** diff --git a/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java b/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java index fc494cdbe2..621dcd1208 100644 --- a/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java +++ b/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java @@ -106,8 +106,8 @@ public class PlayerPanelExt extends javax.swing.JPanel { private static final String DEFAULT_AVATAR_PATH = "/avatars/" + DEFAULT_AVATAR_ID + ".jpg"; private static final int PANEL_WIDTH = 94; - private static final int PANEL_HEIGHT = 242; - private static final int PANEL_HEIGHT_SMALL = 212; + private static final int PANEL_HEIGHT = 262; + private static final int PANEL_HEIGHT_SMALL = 232; private static final int MANA_LABEL_SIZE_HORIZONTAL = 20; private static final Border GREEN_BORDER = new LineBorder(Color.green, 3); @@ -193,6 +193,8 @@ public class PlayerPanelExt extends javax.swing.JPanel { } lifeLabel.setText(Integer.toString(playerLife)); poisonLabel.setText(Integer.toString(player.getCounters().getCount(CounterType.POISON))); + energyLabel.setText(Integer.toString(player.getCounters().getCount(CounterType.ENERGY))); + experienceLabel.setText(Integer.toString(player.getCounters().getCount(CounterType.EXPERIENCE))); handLabel.setText(Integer.toString(player.getHandCount())); int libraryCards = player.getLibraryCount(); if (libraryCards > 99) { @@ -380,6 +382,8 @@ public class PlayerPanelExt extends javax.swing.JPanel { lifeLabel = new JLabel(); handLabel = new JLabel(); poisonLabel = new JLabel(); + energyLabel = new JLabel(); + experienceLabel = new JLabel(); graveLabel = new JLabel(); libraryLabel = new JLabel(); setOpaque(false); @@ -454,7 +458,7 @@ public class PlayerPanelExt extends javax.swing.JPanel { } }); - // Grave count and open graveyard button + // Grave count and open graveyard button r = new Rectangle(21, 21); graveLabel.setToolTipText("Card Types: 0"); Image imageGrave = ImageHelper.getImageFromResources("/info/grave.png"); @@ -501,8 +505,8 @@ public class PlayerPanelExt extends javax.swing.JPanel { }); zonesPanel = new JPanel(); - zonesPanel.setPreferredSize(new Dimension(100, 20)); - zonesPanel.setSize(100, 20); + zonesPanel.setPreferredSize(new Dimension(100, 60)); + zonesPanel.setSize(100, 60); zonesPanel.setLayout(null); zonesPanel.setOpaque(false); @@ -524,6 +528,41 @@ public class PlayerPanelExt extends javax.swing.JPanel { cheat.setBounds(28, 0, 25, 21); zonesPanel.add(cheat); + energyExperiencePanel = new JPanel(); + energyExperiencePanel.setPreferredSize(new Dimension(100, 20)); + energyExperiencePanel.setSize(100, 20); + energyExperiencePanel.setLayout(null); + energyExperiencePanel.setOpaque(false); + + // Energy count + energyLabel.setText("0"); + r = new Rectangle(18, 18); + energyLabel.setToolTipText("Energy"); + Image imageEnergy = ImageHelper.getImageFromResources("/info/energy.png"); + BufferedImage resizedEnergy = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(imageEnergy, BufferedImage.TYPE_INT_ARGB), r); + energy = new ImagePanel(resizedEnergy, ImagePanel.ACTUAL); + energy.setToolTipText("Energy"); + energy.setOpaque(false); + + // Experience count + experienceLabel.setText("0"); + r = new Rectangle(18, 18); + experienceLabel.setToolTipText("Experience"); + Image imageExperience = ImageHelper.getImageFromResources("/info/experience.png"); + BufferedImage resizedExperience = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(imageExperience, BufferedImage.TYPE_INT_ARGB), r); + experience = new ImagePanel(resizedExperience, ImagePanel.ACTUAL); + experience.setToolTipText("Experience"); + experience.setOpaque(false); + + energy.setBounds(5, 22, 21, 21); + zonesPanel.add(energy); + energyLabel.setBounds(27, 22, 21, 21); + zonesPanel.add(energyLabel); + experience.setBounds(48, 22, 21, 21); + zonesPanel.add(experience); + experienceLabel.setBounds(69, 22, 21, 21); + zonesPanel.add(experienceLabel); + btnPlayer = new JButton(); btnPlayer.setText("Player"); btnPlayer.setVisible(false); @@ -895,6 +934,8 @@ public class PlayerPanelExt extends javax.swing.JPanel { private JButton btnPlayer; private ImagePanel life; private ImagePanel poison; + private ImagePanel energy; + private ImagePanel experience; private ImagePanel hand; private HoverButton grave; private HoverButton library; @@ -906,6 +947,8 @@ public class PlayerPanelExt extends javax.swing.JPanel { private JLabel handLabel; private JLabel libraryLabel; private JLabel poisonLabel; + private JLabel energyLabel; + private JLabel experienceLabel; private JLabel graveLabel; private JLabel exileLabel; private boolean changedFontLibrary; @@ -914,6 +957,7 @@ public class PlayerPanelExt extends javax.swing.JPanel { private boolean changedFontExile; private JPanel zonesPanel; + private JPanel energyExperiencePanel; private HoverButton exileZone; private HoverButton commandZone; private HoverButton enchantPlayerViewZone; From d259efc09320477aaa0ae3b63462bf66c2e79368 Mon Sep 17 00:00:00 2001 From: spjspj Date: Mon, 26 Sep 2016 03:01:35 +1000 Subject: [PATCH 4/5] spjspj - Add in energy/experience counters --- Mage.Client/src/main/java/mage/client/game/PlayAreaPanel.java | 2 +- Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Mage.Client/src/main/java/mage/client/game/PlayAreaPanel.java b/Mage.Client/src/main/java/mage/client/game/PlayAreaPanel.java index 09de6a3d55..d98059645c 100644 --- a/Mage.Client/src/main/java/mage/client/game/PlayAreaPanel.java +++ b/Mage.Client/src/main/java/mage/client/game/PlayAreaPanel.java @@ -81,7 +81,7 @@ public class PlayAreaPanel extends javax.swing.JPanel { private JCheckBoxMenuItem allowViewHandCardsMenuItem; private JCheckBoxMenuItem holdPriorityMenuItem; - public static final int PANEL_HEIGHT = 262; + public static final int PANEL_HEIGHT = 263; public static final int PANEL_HEIGHT_SMALL = 190; /** diff --git a/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java b/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java index 621dcd1208..1ce935228f 100644 --- a/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java +++ b/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java @@ -543,7 +543,6 @@ public class PlayerPanelExt extends javax.swing.JPanel { energy = new ImagePanel(resizedEnergy, ImagePanel.ACTUAL); energy.setToolTipText("Energy"); energy.setOpaque(false); - // Experience count experienceLabel.setText("0"); r = new Rectangle(18, 18); From f18e4b66f1b66683d6100b56aa83c5df835dfa98 Mon Sep 17 00:00:00 2001 From: Styxo Date: Sun, 25 Sep 2016 19:38:40 +0200 Subject: [PATCH 5/5] Little refactor of PermanentHasCounterCondition --- .../sets/riseoftheeldrazi/ChampionsDrake.java | 5 ++--- .../common/PermanentHasCounterCondition.java | 19 ++++++++----------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/ChampionsDrake.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/ChampionsDrake.java index 61c44ebdd8..1fcbecd2d8 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/ChampionsDrake.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/ChampionsDrake.java @@ -36,12 +36,11 @@ import mage.abilities.condition.common.PermanentHasCounterCondition; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.counters.CounterType; -import mage.filter.common.FilterCreaturePermanent; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.common.SimpleStaticAbility; import mage.constants.Zone; - +import mage.filter.common.FilterControlledCreaturePermanent; /** * @@ -64,7 +63,7 @@ public class ChampionsDrake extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Champion's Drake gets +3/+3 as long as you control a creature with three or more level counters on it. - ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(3, 3, Duration.WhileOnBattlefield), new PermanentHasCounterCondition(CounterType.LEVEL, 2, new FilterCreaturePermanent(), PermanentHasCounterCondition.CountType.MORE_THAN), rule); + ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(3, 3, Duration.WhileOnBattlefield), new PermanentHasCounterCondition(CounterType.LEVEL, 2, new FilterControlledCreaturePermanent(), PermanentHasCounterCondition.CountType.MORE_THAN), rule); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); } diff --git a/Mage/src/main/java/mage/abilities/condition/common/PermanentHasCounterCondition.java b/Mage/src/main/java/mage/abilities/condition/common/PermanentHasCounterCondition.java index b20f5d4b77..16d45219dc 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/PermanentHasCounterCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/PermanentHasCounterCondition.java @@ -41,9 +41,10 @@ import java.util.List; */ public class PermanentHasCounterCondition implements Condition { - public static enum CountType {MORE_THAN, FEWER_THAN, EQUAL_TO} + public static enum CountType { + MORE_THAN, FEWER_THAN, EQUAL_TO + }; - ; private CounterType counterType; private int amount; private FilterPermanent filter; @@ -62,30 +63,26 @@ public class PermanentHasCounterCondition implements Condition { @Override public boolean apply(Game game, Ability source) { - boolean conditionApplies = false; - List permanents = game.getBattlefield().getAllActivePermanents(this.filter, source.getControllerId(), game); + List permanents = game.getBattlefield().getActivePermanents(this.filter, source.getControllerId(), game); for (Permanent permanent : permanents) { switch (this.type) { case FEWER_THAN: if (permanent.getCounters(game).getCount(this.counterType) < this.amount) { - conditionApplies = true; - break; + return true; } break; case MORE_THAN: if (permanent.getCounters(game).getCount(this.counterType) > this.amount) { - conditionApplies = true; - break; + return true; } break; case EQUAL_TO: if (permanent.getCounters(game).getCount(this.counterType) == this.amount) { - conditionApplies = true; - break; + return true; } break; } } - return conditionApplies; + return false; } }