v0.2.2: refactored immunity to gasses
This commit is contained in:
parent
6810d0adef
commit
e02222495c
|
@ -33,6 +33,7 @@ public class ConfusionGas 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.immunities().contains(this.getClass()))
|
||||||
Buff.prolong( ch, Vertigo.class, 1 );
|
Buff.prolong( ch, Vertigo.class, 1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@ public class ParalyticGas 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.immunities().contains(this.getClass()))
|
||||||
Buff.prolong( ch, Paralysis.class, Paralysis.duration( ch ) );
|
Buff.prolong( ch, Paralysis.class, Paralysis.duration( ch ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,8 @@ 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) {
|
||||||
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;
|
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ConfusionGas;
|
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.StenchGas;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||||
|
@ -40,7 +41,7 @@ public class GasesImmunity extends FlavourBuff {
|
||||||
|
|
||||||
public static final HashSet<Class<?>> IMMUNITIES = new HashSet<Class<?>>();
|
public static final HashSet<Class<?>> IMMUNITIES = new HashSet<Class<?>>();
|
||||||
static {
|
static {
|
||||||
IMMUNITIES.add( Paralysis.class );
|
IMMUNITIES.add( ParalyticGas.class );
|
||||||
IMMUNITIES.add( ToxicGas.class );
|
IMMUNITIES.add( ToxicGas.class );
|
||||||
IMMUNITIES.add( ConfusionGas.class );
|
IMMUNITIES.add( ConfusionGas.class );
|
||||||
IMMUNITIES.add( StenchGas.class );
|
IMMUNITIES.add( StenchGas.class );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user