v0.7.0: fixed a crash caused by flashbangs

This commit is contained in:
Evan Debenham 2018-08-07 19:56:27 -04:00
parent 9337d28948
commit 0c59efd5f3

View File

@ -58,7 +58,7 @@ public class Flashbang extends Bomb {
//FIXME currently has somewhat odd behaviour, as FOV is updated at the start of a turn.
Level l = Dungeon.level;
for (Char ch : Actor.chars()){
if (ch.fieldOfView[cell]){
if (ch.fieldOfView != null && ch.fieldOfView[cell]){
int power = 10 - l.distance(ch.pos, cell);
if (power > 0){
Buff.prolong(ch, Blindness.class, power);