V0.2.1: Corrected bug involving failed item placement with Wandmaker quest (bug is also present with ghost, will be fixed in ghost quest overhaul shortly)

This commit is contained in:
Evan Debenham 2014-10-03 15:56:47 -04:00
parent ba8d158ba7
commit 6c818ec0b1
2 changed files with 16 additions and 8 deletions

View File

@ -133,11 +133,12 @@ public class Wandmaker extends Mob.NPC {
}
} else {
tell( Quest.alternative ? TXT_DUST1 : TXT_BERRY1 );
Quest.given = true;
Quest.placeItem();
if (Quest.given)
tell(Quest.alternative ? TXT_DUST1 : TXT_BERRY1);
Journal.add( Journal.Feature.WANDMAKER );
}
}
@ -288,9 +289,12 @@ public class Wandmaker extends Mob.NPC {
pos = Dungeon.level.randomRespawnCell();
}
if (pos != -1) {
Heap heap = Dungeon.level.drop(new CorpseDust(), pos);
heap.type = Heap.Type.SKELETON;
heap.sprite.link();
given = true;
}
}
} else {
@ -299,7 +303,11 @@ public class Wandmaker extends Mob.NPC {
while (Dungeon.level.heaps.get( shrubPos ) != null) {
shrubPos = Dungeon.level.randomRespawnCell();
}
if (shrubPos != -1) {
Dungeon.level.plant(new Rotberry.Seed(), shrubPos);
given = true;
}
}
}

View File

@ -551,7 +551,7 @@ public abstract class RegularLevel extends Level {
while (true) {
if (++count > 10) {
if (++count > 30) {
return -1;
}