diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Affection.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Affection.java index d9281869a..dfb80fe16 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Affection.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Affection.java @@ -42,7 +42,7 @@ public class Affection extends Glyph { if (Random.Int( level / 2 + 10 ) >= 9) { - int duration = Random.IntRange( 6, 12 ); + int duration = Random.IntRange( 8, 12 ); Buff.affect( attacker, Charm.class, duration ).object = defender.id(); attacker.sprite.centerEmitter().start( Speck.factory( Speck.HEART ), 0.2f, 5 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Chilling.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Chilling.java index 454166ce8..b030f59a9 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Chilling.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Chilling.java @@ -43,7 +43,14 @@ public class Chilling extends Weapon.Enchantment { if (Random.Int( level + 3 ) >= 2) { - Buff.affect( defender, Chill.class, 3f ); + //adds 3 turns of chill per proc, with a cap of 6 turns + float durationToAdd = 3f; + Chill existing = defender.buff(Chill.class); + if (existing != null){ + durationToAdd = Math.min(durationToAdd, 6f-existing.cooldown()); + } + + Buff.affect( defender, Chill.class, durationToAdd ); Splash.at( defender.sprite.center(), 0xFFB2D6FF, 5); } 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 8880990e8..12fd6615a 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 @@ -27,6 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite.Glowing; +import com.watabou.utils.Random; public class Vampiric extends Weapon.Enchantment { @@ -35,18 +36,22 @@ public class Vampiric extends Weapon.Enchantment { @Override public int proc( Weapon weapon, Char attacker, Char defender, int damage ) { - //heals for 2.5-15% of damage dealt, based on missing HP + //chance to heal scales from 5%-30% based on missing HP float missingPercent = (attacker.HT - attacker.HP) / (float)attacker.HT; - float healPercent = .025f + (missingPercent * 0.125f); - int healAmt = Math.round(healPercent * damage); - healAmt = Math.min( healAmt, attacker.HT - attacker.HP ); + float healChance = 0.05f + .25f*missingPercent; - if (healAmt > 0 && attacker.isAlive()) { - - attacker.HP += healAmt; - attacker.sprite.emitter().start( Speck.factory( Speck.HEALING ), 0.4f, 1 ); - attacker.sprite.showStatus( CharSprite.POSITIVE, Integer.toString( healAmt ) ); + if (Random.Float() < healChance){ + //heals for 50% of damage dealt + int healAmt = Math.round(damage * 0.5f); + + if (healAmt > 0 && attacker.isAlive()) { + + attacker.HP += healAmt; + attacker.sprite.emitter().start( Speck.factory( Speck.HEALING ), 0.4f, 1 ); + attacker.sprite.showStatus( CharSprite.POSITIVE, Integer.toString( healAmt ) ); + + } } return damage;