From 8244010821152cb27d209bdd17e6bc3a03e78f80 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 15 Aug 2014 00:41:16 -0400 Subject: [PATCH] V0.1.1: cleaned up drowsy messages --- .../shatteredpixeldungeon/actors/buffs/Drowsy.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java index 3ea3452bd..c6a76570e 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java @@ -35,10 +35,18 @@ public class Drowsy extends Buff { @Override public boolean act(){ if (placed) { - Buff.affect(target, MagicalSleep.class); + if (target instanceof Hero) - GLog.i("You fall into a deep magical sleep."); - detach(); + if (target.HP == target.HT) { + GLog.i("You are too healthy, and resist the urge to sleep."); + detach(); + } else { + GLog.i("You fall into a deep magical sleep."); + Buff.affect(target, MagicalSleep.class); + detach(); + } + else + Buff.affect(target, MagicalSleep.class); return true; } else { placed = true;