v0.7.0: adjusted bomb alchemy recipe and buffed healing bombs

This commit is contained in:
Evan Debenham 2018-08-22 23:22:31 -04:00
parent e0d55c45bb
commit ea1125d788
3 changed files with 13 additions and 18 deletions

View File

@ -148,6 +148,7 @@ public abstract class Recipe {
private static Recipe[] twoIngredientRecipes = new Recipe[]{ private static Recipe[] twoIngredientRecipes = new Recipe[]{
new Blandfruit.CookFruit(), new Blandfruit.CookFruit(),
new TippedDart.TipDart(), new TippedDart.TipDart(),
new Bomb.EnhanceBomb(),
new ElixirOfDragonsBlood.Recipe(), new ElixirOfDragonsBlood.Recipe(),
new ElixirOfEarthenPower.Recipe(), new ElixirOfEarthenPower.Recipe(),
new ElixirOfToxicEssence.Recipe(), new ElixirOfToxicEssence.Recipe(),
@ -167,7 +168,6 @@ public abstract class Recipe {
new Potion.SeedToPotion(), new Potion.SeedToPotion(),
new ExoticPotion.PotionToExotic(), new ExoticPotion.PotionToExotic(),
new ExoticScroll.ScrollToExotic(), new ExoticScroll.ScrollToExotic(),
new Bomb.EnhanceBomb(),
new StewedMeat.threeMeat(), new StewedMeat.threeMeat(),
new Feast.Recipe() new Feast.Recipe()
}; };

View File

@ -42,10 +42,8 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMirrorImag
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRage; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRage;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRemoveCurse; 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.Languages;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
@ -313,33 +311,30 @@ public class Bomb extends Item {
private static final HashMap<Class<?extends Bomb>, Integer> bombCosts = new HashMap<>(); private static final HashMap<Class<?extends Bomb>, Integer> bombCosts = new HashMap<>();
static { static {
bombCosts.put(Firebomb.class, 0); bombCosts.put(Firebomb.class, 2);
bombCosts.put(FrostBomb.class, 0); bombCosts.put(FrostBomb.class, 1);
bombCosts.put(HealingBomb.class, 0); bombCosts.put(HealingBomb.class, 5);
bombCosts.put(Flashbang.class, 0); bombCosts.put(Flashbang.class, 3);
bombCosts.put(ShockBomb.class, 0); bombCosts.put(ShockBomb.class, 3);
bombCosts.put(HolyBomb.class, 0); bombCosts.put(HolyBomb.class, 5);
bombCosts.put(WoollyBomb.class, 0); bombCosts.put(WoollyBomb.class, 1);
bombCosts.put(Noisemaker.class, 0); bombCosts.put(Noisemaker.class, 2);
} }
@Override @Override
public boolean testIngredients(ArrayList<Item> ingredients) { public boolean testIngredients(ArrayList<Item> ingredients) {
boolean seedOrStone = false;
boolean bomb = false; boolean bomb = false;
boolean ingredient = false; boolean ingredient = false;
for (Item i : ingredients){ for (Item i : ingredients){
if (i instanceof Plant.Seed || i instanceof Runestone){ if (i.getClass().equals(Bomb.class)){
seedOrStone = true;
} else if (i.getClass().equals(Bomb.class)){
bomb = true; bomb = true;
} else if (validIngredients.containsKey(i.getClass())){ } else if (validIngredients.containsKey(i.getClass())){
ingredient = true; ingredient = true;
} }
} }
return seedOrStone && bomb && ingredient; return bomb && ingredient;
} }
@Override @Override

View File

@ -59,8 +59,8 @@ public class HealingBomb extends Bomb {
if (PathFinder.distance[i] < Integer.MAX_VALUE) { if (PathFinder.distance[i] < Integer.MAX_VALUE) {
Char ch = Actor.findChar(i); Char ch = Actor.findChar(i);
if (ch != null){ if (ch != null){
//same as a healing dart //same as a healing potion
Buff.affect( ch, Healing.class ).setHeal((int)(0.5f*ch.HT + 30), 0.25f, 0); Buff.affect( ch, Healing.class ).setHeal((int)(0.8f*ch.HT + 14), 0.25f, 0);
PotionOfHealing.cure( ch ); PotionOfHealing.cure( ch );
} }
} }