v0.2.4: made potions susceptible to cold, refactored a bit of buff logic.
This commit is contained in:
@@ -35,22 +35,25 @@ public class PotionOfFrost extends Potion {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void shatter( int cell ) {
|
||||
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) {
|
||||
Freezing.affect( i, fire );
|
||||
visible = Freezing.affect( i, fire ) || visible;
|
||||
}
|
||||
}
|
||||
|
||||
splash( cell );
|
||||
Sample.INSTANCE.play( Assets.SND_SHATTER );
|
||||
|
||||
setKnown();
|
||||
|
||||
if (visible) {
|
||||
splash( cell );
|
||||
Sample.INSTANCE.play( Assets.SND_SHATTER );
|
||||
|
||||
setKnown();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user