diff --git a/res/images/shopTest01.png b/res/images/shopTest01.png deleted file mode 100644 index 964d920..0000000 Binary files a/res/images/shopTest01.png and /dev/null differ diff --git a/res/images/shopTest02.png b/res/images/shopTest02.png deleted file mode 100644 index a548428..0000000 Binary files a/res/images/shopTest02.png and /dev/null differ diff --git a/src/de/teamteamteam/spacescooter/entity/item/ItemIncreaseDamage.java b/src/de/teamteamteam/spacescooter/entity/item/ItemIncreaseDamage.java index 49ed8e8..0d96517 100644 --- a/src/de/teamteamteam/spacescooter/entity/item/ItemIncreaseDamage.java +++ b/src/de/teamteamteam/spacescooter/entity/item/ItemIncreaseDamage.java @@ -17,7 +17,7 @@ public class ItemIncreaseDamage extends Item { if(player.getShootDamage() > 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: