V0.2.1: Added new blob effect for Fetid Rat
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
package com.shatteredpixel.shatteredpixeldungeon.actors.blobs;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* Created by debenhame on 08/10/2014.
|
||||
*/
|
||||
public class StenchGas extends Blob {
|
||||
|
||||
@Override
|
||||
protected void evolve() {
|
||||
super.evolve();
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void use( BlobEmitter emitter ) {
|
||||
super.use( emitter );
|
||||
|
||||
emitter.pour( Speck.factory(Speck.STENCH), 0.6f );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String tileDesc() {
|
||||
return "A cloud of fetid stench is swirling here.";
|
||||
}
|
||||
} {
|
||||
}
|
||||
@@ -20,6 +20,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs;
|
||||
import java.util.HashSet;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Fire;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.StenchGas;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Ooze;
|
||||
@@ -402,7 +403,7 @@ public class Ghost extends Mob.NPC {
|
||||
@Override
|
||||
public int defenseProc( Char enemy, int damage ) {
|
||||
|
||||
GameScene.add( Blob.seed( pos, 20, ParalyticGas.class ) );
|
||||
GameScene.add( Blob.seed( pos, 20, StenchGas.class ) );
|
||||
|
||||
return super.defenseProc(enemy, damage);
|
||||
}
|
||||
@@ -423,16 +424,6 @@ public class Ghost extends Mob.NPC {
|
||||
"The rat carries a cloud of horrible stench with it, it's overpoweringly strong up close.\n\n" +
|
||||
"Dark ooze drips from the rat's teeth, it eats through the floor but seems to dissolve in water.";
|
||||
}
|
||||
|
||||
private static final HashSet<Class<?>> IMMUNITIES = new HashSet<Class<?>>();
|
||||
static {
|
||||
IMMUNITIES.add( Paralysis.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashSet<Class<?>> immunities() {
|
||||
return IMMUNITIES;
|
||||
}
|
||||
}
|
||||
|
||||
public static class GnollTrickster extends Gnoll {
|
||||
|
||||
Reference in New Issue
Block a user