v0.3.3: added some safety checks to cursed wands spawning plants

This commit is contained in:
Evan Debenham 2015-12-16 02:51:42 -05:00
parent d2b2771f32
commit 3b2def76fd

View File

@ -214,7 +214,14 @@ public class CursedWand {
if (Actor.findChar(pos) != null && bolt.dist > 1) {
pos = bolt.path.get(bolt.dist - 1);
}
if (pos == Terrain.EMPTY ||
pos == Terrain.EMBERS ||
pos == Terrain.EMPTY_DECO ||
pos == Terrain.GRASS ||
pos == Terrain.HIGH_GRASS) {
Dungeon.level.plant((Plant.Seed) Generator.random(Generator.Category.SEED), pos);
}
wand.wandUsed();
}
});