From 403fe0e0268636501ac5ed0e2c7a49fd721af6c4 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 30 Oct 2014 13:50:39 -0400 Subject: [PATCH] v0.2.2: corrected sleep immunity interaction with magical sleep/drowsy --- .../shatteredpixeldungeon/actors/buffs/Drowsy.java | 2 +- .../shatteredpixeldungeon/actors/buffs/MagicalSleep.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java index ea3a2a643..e85712b31 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java @@ -29,7 +29,7 @@ public class Drowsy extends Buff { } public boolean attachTo( Char target ) { - if (super.attachTo(target)) { + if (super.attachTo(target) && !target.immunities().contains(Sleep.class)) { if (cooldown() == 0) spend(Random.Int(3, 6)); return true; diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicalSleep.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicalSleep.java index 9dbbf2ac4..fdf76d624 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicalSleep.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicalSleep.java @@ -30,7 +30,7 @@ public class MagicalSleep extends Buff { @Override public boolean attachTo( Char target ) { - if (super.attachTo( target )) { + if (super.attachTo( target ) && !target.immunities().contains(Sleep.class)) { if (target instanceof Hero) if (target.HP == target.HT) {