From 2a78053176cadb5ae3db3244435639a82d679ddf Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 30 Oct 2014 14:34:34 -0400 Subject: [PATCH] v0.2.2: better dreamfoil interaction with the hero --- .../shatteredpixeldungeon/plants/Dreamfoil.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Dreamfoil.java b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Dreamfoil.java index 81009f679..c6b8ddd69 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Dreamfoil.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Dreamfoil.java @@ -20,9 +20,12 @@ package com.shatteredpixel.shatteredpixeldungeon.plants; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicalSleep; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfPurity; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; +import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; public class Dreamfoil extends Plant { @@ -42,6 +45,10 @@ public class Dreamfoil extends Plant { if (ch != null) { if (ch instanceof Mob) Buff.affect(ch, MagicalSleep.class); + else if (ch instanceof Hero){ + GLog.w("The poison isn't strong enough to put you to sleep, you are weakened instead."); + Buff.affect(ch, Weakness.class, Weakness.duration(ch)); + } } }