diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Vampiric.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Vampiric.java index bdc318a7d..f89023e65 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Vampiric.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Vampiric.java @@ -36,9 +36,10 @@ public class Vampiric extends Weapon.Enchantment { public int proc( Weapon weapon, Char attacker, Char defender, int damage ) { //heals for 0-10% of damage dealt, based on missing HP - float missingPercent = (attacker.HT - attacker.HP) / (float)defender.HT; - float healValue = missingPercent * 0.1f; - int healAmt = Math.round(healValue * damage); + float missingPercent = (attacker.HT - attacker.HP) / (float)attacker.HT; + float healPercent = missingPercent * 0.1f; + int healAmt = Math.round(healPercent * damage); + healAmt = Math.min( healAmt, attacker.HT - attacker.HP ); if (healAmt > 0) { 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 1f5e370cb..53110f9d8 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 @@ -967,7 +967,7 @@ items.spells.spell.no_magic=You can't cast spells while magic immune. items.spells.magicalinfusion.name=magical infusion items.spells.magicalinfusion.inv_title=Infuse an item items.spells.magicalinfusion.infuse=Your %s is infused with arcane energy! -items.spells.magicalinfusion.desc=This spell posses the same magical power as a scroll of upgrade, but in a more stable form.\n\nIn addition to upgrading an item as normal, it will never erase an enchantment on a weapon or a glyph on armor. +items.spells.magicalinfusion.desc=This spell possesses the same magical power as a scroll of upgrade, but in a more stable form.\n\nIn addition to upgrading an item as normal, it will never erase an enchantment on a weapon or a glyph on armor. items.spells.magicalporter.name=magical porter items.spells.magicalporter.inv_title=Port an item @@ -1153,7 +1153,7 @@ items.weapon.curses.friendly.name=friendly %s items.weapon.curses.friendly.desc=Friendly weapons are best suited for pacifists, occasionally triggering magic that makes it impossible to fight. items.weapon.curses.polarized.name=polarized %s -items.weapon.curses.polarized.desc=A polarized weapon is affected by magic that causes its attack to either deal 50% more damage, or not damage at all. +items.weapon.curses.polarized.desc=A polarized weapon is affected by magic that causes its attack to either deal 50% more damage, or no damage at all. items.weapon.curses.sacrificial.name=sacrificial %s items.weapon.curses.sacrificial.desc=Sacrificial weapons will demand blood from the wearer in return for attacking foes. The more healthy the wearer is, the more blood the curse will take.