From b04cadcbf410fab7222161872c357c27eb11a176 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 2 Nov 2015 12:00:37 -0500 Subject: [PATCH] v0.3.2: fixed a bug that coul cause the wandmaker to spawn twice or more. --- .../shatteredpixeldungeon/actors/mobs/npcs/Wandmaker.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Wandmaker.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Wandmaker.java index 0fef6368e..1386be55a 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Wandmaker.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Wandmaker.java @@ -326,8 +326,7 @@ public class Wandmaker extends NPC { } public static boolean spawn( PrisonLevel level, Room room, Collection rooms ) { - if (!spawned && Dungeon.depth > 6 && Random.Int( 10 - Dungeon.depth ) == 0 - || type != 0) { + if (!spawned && (type != 0 || (Dungeon.depth > 6 && Random.Int( 10 - Dungeon.depth ) == 0))) { // decide between 1,2, or 3 for quest type. // but if the no herbalism challenge is enabled, only pick 1 or 2, no rotberry. if (type == 0) type = Random.Int(Dungeon.isChallenged(Challenges.NO_HERBALISM) ? 2 : 3)+1;