diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Charm.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Charm.java index 8d9250431..48a6b75ff 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Charm.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Charm.java @@ -74,8 +74,14 @@ public class Charm extends FlavourBuff { public String desc() { return Messages.get(this, "desc", dispTurns()); } - + + public boolean ignoreNextHit = false; + public void recover() { + if (ignoreNextHit){ + ignoreNextHit = false; + return; + } spend(-5f); if (cooldown() <= 0){ detach(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Terror.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Terror.java index 001e06678..8ab48718e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Terror.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Terror.java @@ -70,7 +70,13 @@ public class Terror extends FlavourBuff { return Messages.get(this, "desc", dispTurns()); } + public boolean ignoreNextHit = false; + public void recover() { + if (ignoreNextHit){ + ignoreNextHit = false; + return; + } spend(-5f); if (cooldown() <= 0){ detach(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Succubus.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Succubus.java index c3c8cca08..882fa52be 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Succubus.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Succubus.java @@ -86,8 +86,9 @@ public class Succubus extends Mob { sprite.emitter().burst( Speck.factory( Speck.HEALING ), 2 ); Sample.INSTANCE.play( Assets.Sounds.CHARMS ); } else if (Random.Int( 3 ) == 0) { - //attack will reduce by 5 turns, so effectively DURATION-5 turns - Buff.affect( enemy, Charm.class, Charm.DURATION ).object = id(); + Charm c = Buff.affect( enemy, Charm.class, Charm.DURATION/2f ); + c.object = id(); + c.ignoreNextHit = true; //so that the -5 duration from succubus hit is ignored enemy.sprite.centerEmitter().start( Speck.factory( Speck.HEART ), 0.2f, 5 ); Sample.INSTANCE.play( Assets.Sounds.CHARMS ); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Friendly.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Friendly.java index 84d7905f2..3d3dfc7ff 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Friendly.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/curses/Friendly.java @@ -41,8 +41,9 @@ public class Friendly extends Weapon.Enchantment { Buff.affect( attacker, Charm.class, Charm.DURATION ).object = defender.id(); attacker.sprite.centerEmitter().start( Speck.factory( Speck.HEART ), 0.2f, 5 ); - //5 turns will be reduced by the attack, so effectively lasts for Charm.DURATION-5 turns - Buff.affect( defender, Charm.class, Charm.DURATION ).object = attacker.id(); + Charm c = Buff.affect( defender, Charm.class, Charm.DURATION/2 ); + c.ignoreNextHit = true; + c.object = attacker.id(); defender.sprite.centerEmitter().start( Speck.factory( Speck.HEART ), 0.2f, 5 ); }