V0.2.1: Added new blob effect for Fetid Rat
This commit is contained in:
parent
bba30b473f
commit
d8208e5423
|
@ -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 java.util.HashSet;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Fire;
|
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.Burning;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Ooze;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Ooze;
|
||||||
|
@ -402,7 +403,7 @@ public class Ghost extends Mob.NPC {
|
||||||
@Override
|
@Override
|
||||||
public int defenseProc( Char enemy, int damage ) {
|
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);
|
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" +
|
"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.";
|
"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 {
|
public static class GnollTrickster extends Gnoll {
|
||||||
|
|
|
@ -56,7 +56,8 @@ public class Speck extends Image {
|
||||||
public static final int TOXIC = 107;
|
public static final int TOXIC = 107;
|
||||||
public static final int PARALYSIS = 108;
|
public static final int PARALYSIS = 108;
|
||||||
public static final int DUST = 109;
|
public static final int DUST = 109;
|
||||||
public static final int FORGE = 110;
|
public static final int STENCH = 110;
|
||||||
|
public static final int FORGE = 111;
|
||||||
|
|
||||||
private static final int SIZE = 7;
|
private static final int SIZE = 7;
|
||||||
|
|
||||||
|
@ -100,6 +101,7 @@ public class Speck extends Image {
|
||||||
case TOXIC:
|
case TOXIC:
|
||||||
case PARALYSIS:
|
case PARALYSIS:
|
||||||
case DUST:
|
case DUST:
|
||||||
|
case STINK:
|
||||||
frame( film.get( STEAM ) );
|
frame( film.get( STEAM ) );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -279,6 +281,13 @@ public class Speck extends Image {
|
||||||
speed.polar( Random.Float( 2 * 3.1415926f ), Random.Float( 16, 48 ) );
|
speed.polar( Random.Float( 2 * 3.1415926f ), Random.Float( 16, 48 ) );
|
||||||
lifespan = 0.5f;
|
lifespan = 0.5f;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case STENCH:
|
||||||
|
hardlight( 0x383825 );
|
||||||
|
angularSpeed = -30;
|
||||||
|
angle = Random.Float( 360 );
|
||||||
|
lifespan = Random.Float( 1f, 3f );
|
||||||
|
break;
|
||||||
|
|
||||||
case COIN:
|
case COIN:
|
||||||
speed.polar( -PointF.PI * Random.Float( 0.3f, 0.7f ), Random.Float( 48, 96 ) );
|
speed.polar( -PointF.PI * Random.Float( 0.3f, 0.7f ), Random.Float( 48, 96 ) );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user