From 0e4c0b6499b72f17a59442db1d54ef126b834c97 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 12 Apr 2016 21:35:45 -0400 Subject: [PATCH] v0.3.5: ghost now returns to the hero quickly after finishing its quest --- .../actors/mobs/npcs/Ghost.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java index 087af17cf..d9b3efac5 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java @@ -76,7 +76,14 @@ public class Ghost extends NPC { Sample.INSTANCE.load( Assets.SND_GHOST ); } - + + @Override + protected boolean act() { + if (Quest.completed()) + target = Dungeon.hero.pos; + return super.act(); + } + @Override public int defenseSkill( Char enemy ) { return 1000; @@ -84,7 +91,7 @@ public class Ghost extends NPC { @Override public float speed() { - return 0.5f; + return Quest.completed() ? 2f : 0.5f; } @Override @@ -318,10 +325,6 @@ public class Ghost extends NPC { public static void process() { if (spawned && given && !processed && (depth == Dungeon.depth)) { GLog.n( Messages.get(Ghost.class, "find_me") ); - for (Mob m : Dungeon.level.mobs){ - if (m instanceof Ghost) - m.beckon(Dungeon.hero.pos); - } Sample.INSTANCE.play( Assets.SND_GHOST ); processed = true; Generator.Category.ARTIFACT.probs[10] = 1; //flags the dried rose as spawnable.