v0.2.2: refactored immunity to gasses
This commit is contained in:
parent
6810d0adef
commit
e02222495c
|
@ -33,7 +33,8 @@ public class ConfusionGas extends Blob {
|
|||
Char ch;
|
||||
for (int i=0; i < LENGTH; i++) {
|
||||
if (cur[i] > 0 && (ch = Actor.findChar( i )) != null) {
|
||||
Buff.prolong( ch, Vertigo.class, 1 );
|
||||
if (!ch.immunities().contains(this.getClass()))
|
||||
Buff.prolong( ch, Vertigo.class, 1 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,8 @@ public class ParalyticGas extends Blob {
|
|||
Char ch;
|
||||
for (int i=0; i < LENGTH; i++) {
|
||||
if (cur[i] > 0 && (ch = Actor.findChar( i )) != null) {
|
||||
Buff.prolong( ch, Paralysis.class, Paralysis.duration( ch ) );
|
||||
if (!ch.immunities().contains(this.getClass()))
|
||||
Buff.prolong( ch, Paralysis.class, Paralysis.duration( ch ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,8 @@ public class StenchGas extends Blob {
|
|||
Char ch;
|
||||
for (int i=0; i < LENGTH; i++) {
|
||||
if (cur[i] > 0 && (ch = Actor.findChar(i)) != null) {
|
||||
Buff.prolong(ch, Paralysis.class, Paralysis.duration(ch)/5);
|
||||
if (!ch.immunities().contains(this.getClass()))
|
||||
Buff.prolong( ch, Paralysis.class, Paralysis.duration( ch )/5 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ConfusionGas;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ParalyticGas;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.StenchGas;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
|
@ -40,7 +41,7 @@ public class GasesImmunity extends FlavourBuff {
|
|||
|
||||
public static final HashSet<Class<?>> IMMUNITIES = new HashSet<Class<?>>();
|
||||
static {
|
||||
IMMUNITIES.add( Paralysis.class );
|
||||
IMMUNITIES.add( ParalyticGas.class );
|
||||
IMMUNITIES.add( ToxicGas.class );
|
||||
IMMUNITIES.add( ConfusionGas.class );
|
||||
IMMUNITIES.add( StenchGas.class );
|
||||
|
|
Loading…
Reference in New Issue
Block a user