v0.2.4: potions of liquid flame now work in a 3x3 grid instead of 1x1, all potions now put out flames at the tile they are thrown.
This commit is contained in:
+17
-1
@@ -18,6 +18,10 @@
|
||||
package com.shatteredpixel.shatteredpixeldungeon.items.potions;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.FlameParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
|
||||
@@ -40,7 +44,19 @@ public class PotionOfLiquidFlame extends Potion {
|
||||
Sample.INSTANCE.play( Assets.SND_SHATTER );
|
||||
}
|
||||
|
||||
GameScene.add( Blob.seed( cell, 2, Fire.class ) );
|
||||
for (int offset : Level.NEIGHBOURS9){
|
||||
if (Level.flamable[cell+offset]
|
||||
|| Actor.findChar(cell+offset) != null
|
||||
|| Dungeon.level.heaps.get(cell+offset) != null) {
|
||||
|
||||
GameScene.add(Blob.seed(cell + offset, 2, Fire.class));
|
||||
|
||||
} else {
|
||||
|
||||
CellEmitter.get(cell+offset).burst(FlameParticle.FACTORY, 2);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user