diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicalSleep.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicalSleep.java index c9dbc4632..575ecd983 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicalSleep.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicalSleep.java @@ -38,14 +38,16 @@ public class MagicalSleep extends Buff { target.paralysed++; - if (target instanceof Hero) { + if (target.alignment == Char.Alignment.ALLY) { if (target.HP == target.HT) { - GLog.i(Messages.get(this, "toohealthy")); + if (target instanceof Hero) GLog.i(Messages.get(this, "toohealthy")); detach(); } else { - GLog.i(Messages.get(this, "fallasleep")); + if (target instanceof Hero) GLog.i(Messages.get(this, "fallasleep")); } - } else if (target instanceof Mob) { + } + + if (target instanceof Mob) { ((Mob) target).state = ((Mob) target).SLEEPING; } @@ -61,11 +63,11 @@ public class MagicalSleep extends Buff { detach(); return true; } - if (target instanceof Hero) { + if (target.alignment == Char.Alignment.ALLY) { target.HP = Math.min(target.HP+1, target.HT); - ((Hero) target).resting = true; + if (target instanceof Hero) ((Hero) target).resting = true; if (target.HP == target.buff(Regeneration.class).regencap()) { - GLog.p(Messages.get(this, "wakeup")); + if (target instanceof Hero) GLog.p(Messages.get(this, "wakeup")); detach(); } } 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 a64f498b8..b1b7ef746 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 @@ -890,7 +890,7 @@ items.scrolls.scrollofidentify.desc=This scroll permanently reveals all of the s items.scrolls.scrolloflullaby.name=scroll of lullaby items.scrolls.scrolloflullaby.sooth=The scroll utters a soothing melody. You feel very sleepy. -items.scrolls.scrolloflullaby.desc=Reading this scroll emits a soothing melody which will lull all who hear it into a deep magical sleep. +items.scrolls.scrolloflullaby.desc=Reading this scroll emits a soothing melody which will lull all who hear it into a deep magical sleep. For the reader and their allies the sleep is restorative. items.scrolls.scrollofmagicmapping.name=scroll of magic mapping items.scrolls.scrollofmagicmapping.layout=You are now aware of the level layout.