use of com.watabou.pixeldungeon.actors.blobs.Fire in project pixel-dungeon by watabou.
the class PotionOfFrost method shatter.
@Override
public void shatter(int cell) {
PathFinder.buildDistanceMap(cell, BArray.not(Level.losBlocking, null), DISTANCE);
Fire fire = (Fire) Dungeon.level.blobs.get(Fire.class);
boolean visible = false;
for (int i = 0; i < Level.LENGTH; i++) {
if (PathFinder.distance[i] < Integer.MAX_VALUE) {
visible = Freezing.affect(i, fire) || visible;
}
}
if (visible) {
splash(cell);
Sample.INSTANCE.play(Assets.SND_SHATTER);
setKnown();
}
}
use of com.watabou.pixeldungeon.actors.blobs.Fire in project pixel-dungeon by watabou.
the class Icecap method activate.
@Override
public void activate(Char ch) {
super.activate(ch);
PathFinder.buildDistanceMap(pos, BArray.not(Level.losBlocking, null), 1);
Fire fire = (Fire) Dungeon.level.blobs.get(Fire.class);
for (int i = 0; i < Level.LENGTH; i++) {
if (PathFinder.distance[i] < Integer.MAX_VALUE) {
Freezing.affect(i, fire);
}
}
}
Aggregations