From 302bf62037b0a34f57c6c360821155ed8ce235a9 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 2 May 2019 18:22:48 -0400 Subject: [PATCH] v0.7.3: rebalanced elixir of aquatic restoration --- .../elixirs/ElixirOfAquaticRejuvenation.java | 19 ++++++++++++++----- .../messages/items/items.properties | 4 ++-- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/elixirs/ElixirOfAquaticRejuvenation.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/elixirs/ElixirOfAquaticRejuvenation.java index 0921786bb..00e8dd775 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/elixirs/ElixirOfAquaticRejuvenation.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/elixirs/ElixirOfAquaticRejuvenation.java @@ -33,6 +33,8 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.watabou.noosa.Image; import com.watabou.utils.Bundle; +import com.watabou.utils.GameMath; +import com.watabou.utils.Random; public class ElixirOfAquaticRejuvenation extends Elixir { @@ -43,7 +45,7 @@ public class ElixirOfAquaticRejuvenation extends Elixir { @Override public void apply(Hero hero) { - Buff.affect(hero, AquaHealing.class).set(hero.HT * 3); + Buff.affect(hero, AquaHealing.class).set(Math.round(hero.HT * 1.5f)); } @Override @@ -69,11 +71,18 @@ public class ElixirOfAquaticRejuvenation extends Elixir { public boolean act() { if (Dungeon.level.water[target.pos] && target.HP < target.HT){ - target.HP++; + float healAmt = GameMath.gate( 1, target.HT/50f, left ); + if (Random.Float() < (healAmt % 1)){ + healAmt = (float)Math.ceil(healAmt); + } else { + healAmt = (float)Math.floor(healAmt); + } + target.HP += healAmt; + left -= healAmt; target.sprite.emitter().burst( Speck.factory( Speck.HEALING ), 1 ); } - if (left-- <= 0){ + if (left <= 0){ detach(); } else { spend(TICK); @@ -101,7 +110,7 @@ public class ElixirOfAquaticRejuvenation extends Elixir { @Override public String desc() { - return Messages.get(this, "desc", left+1); + return Messages.get(this, "desc", left); } private static final String LEFT = "left"; @@ -126,7 +135,7 @@ public class ElixirOfAquaticRejuvenation extends Elixir { inputs = new Class[]{PotionOfHealing.class, GooBlob.class}; inQuantity = new int[]{1, 1}; - cost = 4; + cost = 6; output = ElixirOfAquaticRejuvenation.class; outQuantity = 1; diff --git a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties index 53110f9d8..0bb382299 100644 --- a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties +++ b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties @@ -591,9 +591,9 @@ items.potions.brews.wickedbrew.desc=This brew combines the properties of a toxic ###elixirs items.potions.elixirs.elixirofaquaticrejuvenation.name=elixir of aquatic rejuvenation -items.potions.elixirs.elixirofaquaticrejuvenation.desc=This elixir contains the remains of Goo enhanced with a healing potion. While it will not provide immediate healing, it will slowly restore your health while you are standing in water. +items.potions.elixirs.elixirofaquaticrejuvenation.desc=This elixir contains the remains of Goo enhanced with a healing potion. While it will not provide immediate healing, it will steadily restore a greater amount of health while you are standing in water. items.potions.elixirs.elixirofaquaticrejuvenation$aquahealing.name=Aquatic Healing -items.potions.elixirs.elixirofaquaticrejuvenation$aquahealing.desc=You have temporarily gained restorative properties similar to that of Goo.\n\nWhile standing in water, you will recover a single point of health per turn.\n\nturns left: %d. +items.potions.elixirs.elixirofaquaticrejuvenation$aquahealing.desc=You have temporarily gained restorative properties similar to that of Goo.\n\nWhile standing in water, you will recover a small amount of health per turn. The effect is paused when you are at full health or are out of water.\n\nhealing left: %d. items.potions.elixirs.elixirofdragonsblood.name=elixir of dragon's blood items.potions.elixirs.elixirofdragonsblood.desc=When consumed, this elixir will send fiery power coursing through the drinker's veins. This effect will make the drinker immune to fire, and allow them to set enemies aflame with physical attacks.