From c63539188c23b1d6a8b4e9a437cf567704d97d34 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 26 Jul 2024 15:08:44 -0400 Subject: [PATCH] v2.5.0: adjusted feather fall, now only has 1 output quantity but falling no longer cancels effect --- core/src/main/assets/messages/items/items.properties | 4 ++-- .../items/potions/elixirs/ElixirOfFeatherFall.java | 11 +++++++++-- .../shatteredpixeldungeon/levels/features/Chasm.java | 2 +- .../shatteredpixeldungeon/ui/QuickRecipe.java | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/core/src/main/assets/messages/items/items.properties b/core/src/main/assets/messages/items/items.properties index 62dbd7ffc..5ef06276b 100644 --- a/core/src/main/assets/messages/items/items.properties +++ b/core/src/main/assets/messages/items/items.properties @@ -764,9 +764,9 @@ items.potions.elixirs.elixirofdragonsblood.desc=When consumed, this elixir will items.potions.elixirs.elixiroffeatherfall.name=elixir of feather fall items.potions.elixirs.elixiroffeatherfall.light=You feel light as a feather! -items.potions.elixirs.elixiroffeatherfall.desc=This elixir offers a weaker but more controlled levitation effect, allowing the drinker to fall great distances without harm for a short time. Each use of the elixir will only provide enough protection for one chasm. +items.potions.elixirs.elixiroffeatherfall.desc=This elixir offers a weaker but more controlled levitation effect, allowing the drinker to fall great distances without harm for a little while. items.potions.elixirs.elixiroffeatherfall$featherbuff.name=feather fall -items.potions.elixirs.elixiroffeatherfall$featherbuff.desc=You are under the effects of a feather fall elixir, allowing you to fall into a chasm without taking damage! This effect will expire when it is used, or after a bit of time passes.\n\nTurns remaining: %s. +items.potions.elixirs.elixiroffeatherfall$featherbuff.desc=You are under the effects of a feather fall elixir, allowing you to fall into chasms without taking damage!\n\nTurns remaining: %s. items.potions.elixirs.elixirofhoneyedhealing.name=elixir of honeyed healing items.potions.elixirs.elixirofhoneyedhealing.desc=This elixir combines healing with the sweetness of honey. When drank, it will apply the same effect as a potion of healing and satisfy a small amount of hunger, but it can also be thrown to heal an ally.\n\nCreatures with an affinity for honey might be pacified if this item is used on them. diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/elixirs/ElixirOfFeatherFall.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/elixirs/ElixirOfFeatherFall.java index 60bcb1b5e..8bfce468f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/elixirs/ElixirOfFeatherFall.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/elixirs/ElixirOfFeatherFall.java @@ -54,6 +54,13 @@ public class ElixirOfFeatherFall extends Elixir { type = buffType.POSITIVE; } + public void processFall(){ + spend(-10f); + if (cooldown() <= 0) { + detach(); + } + } + public static final float DURATION = 50f; @Override @@ -84,13 +91,13 @@ public class ElixirOfFeatherFall extends Elixir { public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe.SimpleRecipe { - private static final int OUT_QUANTITY = 2; + private static final int OUT_QUANTITY = 1; { inputs = new Class[]{PotionOfLevitation.class}; inQuantity = new int[]{1}; - cost = 16; + cost = 10; output = ElixirOfFeatherFall.class; outQuantity = OUT_QUANTITY; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/features/Chasm.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/features/Chasm.java index 9353523be..18f92220e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/features/Chasm.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/features/Chasm.java @@ -134,7 +134,7 @@ public class Chasm implements Hero.Doom { if (b != null){ hero.sprite.emitter().burst( Speck.factory( Speck.JET ), 20); - b.detach(); + b.processFall(); return; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickRecipe.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickRecipe.java index 05bc7d248..ea0988012 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickRecipe.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickRecipe.java @@ -370,8 +370,8 @@ public class QuickRecipe extends Component { result.add(new QuickRecipe(new ElixirOfIcyTouch.Recipe())); result.add(new QuickRecipe(new ElixirOfToxicEssence.Recipe())); result.add(new QuickRecipe(new ElixirOfDragonsBlood.Recipe())); - result.add(new QuickRecipe(new ElixirOfMight.Recipe())); result.add(new QuickRecipe(new ElixirOfFeatherFall.Recipe())); + result.add(new QuickRecipe(new ElixirOfMight.Recipe())); return result; case 8: result.add(new QuickRecipe(new UnstableSpell.Recipe(), new ArrayList<>(Arrays.asList(new Scroll.PlaceHolder(), new Runestone.PlaceHolder())), new UnstableSpell()));