From f4f1f9f93010dcf4075f765971319960544c3cb8 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 27 Oct 2014 10:34:15 -0400 Subject: [PATCH] v0.2.2: refactored fetid rat immunity to stench gas --- .../shatteredpixeldungeon/actors/blobs/StenchGas.java | 4 +--- .../shatteredpixeldungeon/actors/mobs/npcs/Ghost.java | 10 ++++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/StenchGas.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/StenchGas.java index 76ca1900a..e25a879a9 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/StenchGas.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/StenchGas.java @@ -4,7 +4,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; -import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Ghost; import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; @@ -20,8 +19,7 @@ public class StenchGas extends Blob { Char ch; for (int i=0; i < LENGTH; i++) { if (cur[i] > 0 && (ch = Actor.findChar(i)) != null) { - if (!(ch instanceof Ghost.FetidRat)) - Buff.prolong(ch, Paralysis.class, Paralysis.duration(ch)/5); + Buff.prolong(ch, Paralysis.class, Paralysis.duration(ch)/5); } } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java index 0255bd577..f8ea9e2ca 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java @@ -443,6 +443,16 @@ public class Ghost extends NPC { "The rat carries a cloud of horrible stench with it, it's overpoweringly strong up close.\n\n" + "Dark ooze dribbles from the rat's mouth, it eats through the floor but seems to dissolve in water."; } + + private static final HashSet> IMMUNITIES = new HashSet>(); + static { + IMMUNITIES.add( StenchGas.class ); + } + + @Override + public HashSet> immunities() { + return IMMUNITIES; + } }