From 317e418c141af83b60c949b91f59b49ef2f05ac0 Mon Sep 17 00:00:00 2001 From: Sosch Date: Tue, 16 Dec 2014 18:35:35 +0100 Subject: [PATCH] The price of the shop items will rise, if you buy it. Balancing: decrease the value of the ItemIncreaseDamage and the shop item "damage". --- res/images/shopTest01.png | Bin 1121 -> 0 bytes res/images/shopTest02.png | Bin 1436 -> 0 bytes .../entity/item/ItemIncreaseDamage.java | 2 +- .../spacescooter/gui/ShopOffer.java | 27 ++++++++++++---- .../spacescooter/screen/ShopScreen.java | 30 +++++++++--------- 5 files changed, 37 insertions(+), 22 deletions(-) delete mode 100644 res/images/shopTest01.png delete mode 100644 res/images/shopTest02.png diff --git a/res/images/shopTest01.png b/res/images/shopTest01.png deleted file mode 100644 index 964d920c46f39825350e231b74a632df6ab39164..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1121 zcmV-n1fKheP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i^+{ z3p)^LVR2Fb000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}000BLNkl(1DxQ%Gk}x_;fS;n z2{~|y5{Po}Dg>n9gLmyX+4gjCn40m}>+#xQNl9bb(S_rE?Gwv+dPdw@1P_iW9^ zlCAw$2q^nN2RH$4+xI5v*qRqW7nmSCL5Z6P(8{Q90$%|i znFAeQpFk`01Fq)^(~2(bSNkP6NTWm?M2MUMPk@Oza2NOy!5xKd-Mk5JN?5T{0e!%Z|A%LDLRqPF-xk3vqF+q5a620xc z4txWA0bC{ELqCwclR>Z(PBph19GIVn6ng}G*CQ<{T4fyA5>GxpFq(pmj%X5Z?~aRz+2 z0Gc9Yo^Km@6B4yrxmYm)w?RL+Xpwb=NZzFJRS3LsacAjrq4eWC{i_`KzeSfh@M|p% zJM}JK)%MrShK2o7)@a1q^8h$@z?ase2PG!rm%93Y&$i4Xmy(@S zV|ir1fLHT3)Z4RImWt06wtE`7^uwHQfy#*qZCM=Z5Kct=q9!c05{Y nB*$y^90R`qkC$3cW5oXgN;AV3<+V7R00000NkvXXu0mjfE0Fy1 diff --git a/res/images/shopTest02.png b/res/images/shopTest02.png deleted file mode 100644 index a548428dc184e3ba9334e23f6ebf51722cf513fb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1436 zcmV;N1!MY&P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i^+{ z3p)au*Z>*;000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}000E{Nkl&!6vsd3y*sbG8QLMCZ)hr+@*`p)F_aQh6ILYRj(>mzcDgh%x^ST@U6`o< zfF`Uk`~kWG7Q}?aB57bjC=dvYhyzm%)6)0o>wWjQnD@q^KZaHzoaAoayXV*UoO^!2 z=4b-A4Cp%Na(-vSWcvN|N?u7b-K$P3zyk0#Q0c=`$?wF#pm?$%h}K2t3X2Tmfz(oEBe3`|0XMK!Gwa2880tf@XRIcwdaXF}QP(pc)i6 zT`oj=com@n97x+K3lA1hs};@k7xCnhIvoTO;C_zKnqKb*J_Du@7Emg{-mn%1lb=j7 zGBrY$W~fzFw3lB6L5zqW_%x@R%zQUP@;FI>I|z#?gTOTKHE?6S90-9a;H{2)2&0ht zdv#YoR+rkLn%LChtdq4M^^AuJ48c&KbJymyalR2Gtz>^8t4Bwd{O6>2vK2TEj26l# zKb>U!)Hq=+#AQyhXBjSaxaHL+OEc_}#SeU0!k6-`<7G{x8(2#e4>en@{Te& z5>?<`U<~C3%AB9)@EGv17}*^ThkpH7-Sv2mO)O|faX;n7e|3smc9_sm-BYDhDQVn{ zHGUMEY$+SUQ9=0$__IJ@5I8V?x zmzS5$DIg500V7i*)DG3el#SS=6Z02&zAh4(ViSug8>t)~_ND>8&r9eS z(8=U9Pd4HIlh83FwPa~ld>zZ{&Ab8L>8XWIt%|cwikSZ|-37mbvktYYbShW{H~`?S zbYhm6kaW@lJD`F$yD&G&w;^OOOu z<`YViwo{tZO@g67!&-<5jbzJNrzmX#i7s-!;Fo-CZ1wTI$26y#lD1Rw$!Hq5U6`~B zIFUY0x3{jgh?}uS6OmN+RK+cIdOfnqP$-xI!=~~OOrzWf4%pa6bJymGn=#QuM0HP<4I{DA^KWLDJu^$vN&s#FUy3h3 zh%XP+sWSli-2PBJxumL#C?u_f#`y-r2ZsSPj6zJsh-SKea!SX08(VE%ZP7T_kjD8& zp&W!o5xJz9KFsq<{1w*k0!{$K05-PdNN990l5M-Ui5NkQ;04~QV?x8g)&bgg@|bsE z@71t?c4EI?FDSB;Vk}Qu$==3=MlgJEm~=kf=vXd|3yn_9SC8dMzvl4#V&e1&@YN<3 z6Az$gG5G`dyx(H-+E+7Pw4913;1!{W)fSMo~#bvu^)b<+wkx1kbAu5+xZ90>aWV 25) { return; } else { - player.setShootDamage(player.getShootDamage()+5); + player.setShootDamage(player.getShootDamage()+1); } } diff --git a/src/de/teamteamteam/spacescooter/gui/ShopOffer.java b/src/de/teamteamteam/spacescooter/gui/ShopOffer.java index 0a02f27..88e75ce 100644 --- a/src/de/teamteamteam/spacescooter/gui/ShopOffer.java +++ b/src/de/teamteamteam/spacescooter/gui/ShopOffer.java @@ -10,18 +10,26 @@ public class ShopOffer extends Entity { private String offer; private int bought; - private int max; + private final int max = 15; + private final int price; + private int currentPrice; + private ImageEntity displayPrice; - public ShopOffer(int x, int y, int max, int bought, String offer) { + public ShopOffer(int x, int y, int bought, String offer, int price) { super(x, y); this.offer = offer; this.bought = bought; - this.max = max; + this.price = price; + if(bought == 0) this.currentPrice = price; + else this.currentPrice = (int) (price+(price*bought*1.36)); + this.displayPrice = new ImageEntity(185, y+20, null); + if(this.bought= 5 && damage.getBought() < damage.getMax()){ - damage.buy(); - PlayerSession.addBaseShotDamage(5); + if(PlayerSession.getCredits() >= damage.getCurrentPrice() && damage.getBought() < damage.getMax()){ + PlayerSession.addBaseShotDamage(2); PlayerSession.incrementBaseShotUpgradesBought(); - PlayerSession.removeCredits(5); + PlayerSession.removeCredits(damage.getCurrentPrice()); + damage.buy(); } break; case 1: - if(PlayerSession.getCredits() >= 10 && shield.getBought() < shield.getMax()){ - shield.buy(); + if(PlayerSession.getCredits() >= shield.getCurrentPrice() && shield.getBought() < shield.getMax()){ PlayerSession.addBaseShieldPoints(10); PlayerSession.incrementBaseShieldUpgradesBought(); - PlayerSession.removeCredits(10); + PlayerSession.removeCredits(shield.getCurrentPrice()); + shield.buy(); } break; case 2: - if(PlayerSession.getCredits() >= 10 && life.getBought() < life.getMax()){ - life.buy(); + if(PlayerSession.getCredits() >= life.getCurrentPrice() && life.getBought() < life.getMax()){ PlayerSession.addBaseHealthPoints(10); PlayerSession.incrementBaseHealthUpgradesBought(); - PlayerSession.removeCredits(10); + PlayerSession.removeCredits(life.getCurrentPrice()); + life.buy(); } break; case 3: