v0.3.3: added some safety checks to cursed wands spawning plants
This commit is contained in:
parent
d2b2771f32
commit
3b2def76fd
|
@ -214,7 +214,14 @@ public class CursedWand {
|
||||||
if (Actor.findChar(pos) != null && bolt.dist > 1) {
|
if (Actor.findChar(pos) != null && bolt.dist > 1) {
|
||||||
pos = bolt.path.get(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);
|
Dungeon.level.plant((Plant.Seed) Generator.random(Generator.Category.SEED), pos);
|
||||||
|
}
|
||||||
wand.wandUsed();
|
wand.wandUsed();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user