v0.2.2: refactored fetid rat immunity to stench gas

This commit is contained in:
Evan Debenham 2014-10-27 10:34:15 -04:00
parent a0be7b2188
commit f4f1f9f930
2 changed files with 11 additions and 3 deletions

View File

@ -4,7 +4,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; 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.BlobEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
@ -20,8 +19,7 @@ public class StenchGas extends Blob {
Char ch; Char ch;
for (int i=0; i < LENGTH; i++) { for (int i=0; i < LENGTH; i++) {
if (cur[i] > 0 && (ch = Actor.findChar(i)) != null) { 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);
} }
} }
} }

View File

@ -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" + "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."; "Dark ooze dribbles from the rat's mouth, it eats through the floor but seems to dissolve in water.";
} }
private static final HashSet<Class<?>> IMMUNITIES = new HashSet<Class<?>>();
static {
IMMUNITIES.add( StenchGas.class );
}
@Override
public HashSet<Class<?>> immunities() {
return IMMUNITIES;
}
} }