v0.2.2: gas changes

This commit is contained in:
Evan Debenham 2014-10-30 21:17:44 -04:00
parent 9170e6b11a
commit 290bfca157
2 changed files with 5 additions and 21 deletions

View File

@ -49,26 +49,6 @@ public class ToxicGas extends Blob implements Hero.Doom {
ch.damage( damage, this ); ch.damage( damage, this );
} }
} }
Blob blob = Dungeon.level.blobs.get( ParalyticGas.class );
if (blob != null) {
int par[] = blob.cur;
for (int i=0; i < LENGTH; i++) {
int t = cur[i];
int p = par[i];
if (p >= t) {
volume -= t;
cur[i] = 0;
} else {
blob.volume -= p;
par[i] = 0;
}
}
}
} }
@Override @Override

View File

@ -17,6 +17,8 @@
*/ */
package com.shatteredpixel.shatteredpixeldungeon.items.potions; package com.shatteredpixel.shatteredpixeldungeon.items.potions;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ConfusionGas;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.StenchGas;
import com.watabou.noosa.audio.Sample; import com.watabou.noosa.audio.Sample;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
@ -53,7 +55,9 @@ public class PotionOfPurity extends Potion {
Blob[] blobs = { Blob[] blobs = {
Dungeon.level.blobs.get( ToxicGas.class ), Dungeon.level.blobs.get( ToxicGas.class ),
Dungeon.level.blobs.get( ParalyticGas.class ) Dungeon.level.blobs.get( ParalyticGas.class ),
Dungeon.level.blobs.get( ConfusionGas.class ),
Dungeon.level.blobs.get( StenchGas.class )
}; };
for (int j=0; j < blobs.length; j++) { for (int j=0; j < blobs.length; j++) {