From ea1125d788d4d71cb83a03f7cdaa4b858c09ce1f Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 22 Aug 2018 23:22:31 -0400 Subject: [PATCH] v0.7.0: adjusted bomb alchemy recipe and buffed healing bombs --- .../shatteredpixeldungeon/items/Recipe.java | 2 +- .../items/bombs/Bomb.java | 25 ++++++++----------- .../items/bombs/HealingBomb.java | 4 +-- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Recipe.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Recipe.java index c8c9c7639..80849e471 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Recipe.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Recipe.java @@ -148,6 +148,7 @@ public abstract class Recipe { private static Recipe[] twoIngredientRecipes = new Recipe[]{ new Blandfruit.CookFruit(), new TippedDart.TipDart(), + new Bomb.EnhanceBomb(), new ElixirOfDragonsBlood.Recipe(), new ElixirOfEarthenPower.Recipe(), new ElixirOfToxicEssence.Recipe(), @@ -167,7 +168,6 @@ public abstract class Recipe { new Potion.SeedToPotion(), new ExoticPotion.PotionToExotic(), new ExoticScroll.ScrollToExotic(), - new Bomb.EnhanceBomb(), new StewedMeat.threeMeat(), new Feast.Recipe() }; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/Bomb.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/Bomb.java index 0a124eccb..5cb69f907 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/Bomb.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/Bomb.java @@ -42,10 +42,8 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMirrorImag import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRage; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRemoveCurse; -import com.shatteredpixel.shatteredpixeldungeon.items.stones.Runestone; import com.shatteredpixel.shatteredpixeldungeon.messages.Languages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; -import com.shatteredpixel.shatteredpixeldungeon.plants.Plant; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; @@ -313,33 +311,30 @@ public class Bomb extends Item { private static final HashMap, Integer> bombCosts = new HashMap<>(); static { - bombCosts.put(Firebomb.class, 0); - bombCosts.put(FrostBomb.class, 0); - bombCosts.put(HealingBomb.class, 0); - bombCosts.put(Flashbang.class, 0); - bombCosts.put(ShockBomb.class, 0); - bombCosts.put(HolyBomb.class, 0); - bombCosts.put(WoollyBomb.class, 0); - bombCosts.put(Noisemaker.class, 0); + bombCosts.put(Firebomb.class, 2); + bombCosts.put(FrostBomb.class, 1); + bombCosts.put(HealingBomb.class, 5); + bombCosts.put(Flashbang.class, 3); + bombCosts.put(ShockBomb.class, 3); + bombCosts.put(HolyBomb.class, 5); + bombCosts.put(WoollyBomb.class, 1); + bombCosts.put(Noisemaker.class, 2); } @Override public boolean testIngredients(ArrayList ingredients) { - boolean seedOrStone = false; boolean bomb = false; boolean ingredient = false; for (Item i : ingredients){ - if (i instanceof Plant.Seed || i instanceof Runestone){ - seedOrStone = true; - } else if (i.getClass().equals(Bomb.class)){ + if (i.getClass().equals(Bomb.class)){ bomb = true; } else if (validIngredients.containsKey(i.getClass())){ ingredient = true; } } - return seedOrStone && bomb && ingredient; + return bomb && ingredient; } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/HealingBomb.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/HealingBomb.java index 7f54a9427..fc9054d62 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/HealingBomb.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/HealingBomb.java @@ -59,8 +59,8 @@ public class HealingBomb extends Bomb { if (PathFinder.distance[i] < Integer.MAX_VALUE) { Char ch = Actor.findChar(i); if (ch != null){ - //same as a healing dart - Buff.affect( ch, Healing.class ).setHeal((int)(0.5f*ch.HT + 30), 0.25f, 0); + //same as a healing potion + Buff.affect( ch, Healing.class ).setHeal((int)(0.8f*ch.HT + 14), 0.25f, 0); PotionOfHealing.cure( ch ); } }