v0.9.2b: added path validation and fixed FOW bugs with ally warp
This commit is contained in:
parent
59ffaa1b8c
commit
b2fefa256f
|
@ -84,7 +84,9 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.features.Chasm;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.features.Door;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.features.Door;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.GrimTrap;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.GrimTrap;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.utils.BArray;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.watabou.noosa.audio.Sample;
|
import com.watabou.noosa.audio.Sample;
|
||||||
import com.watabou.utils.Bundlable;
|
import com.watabou.utils.Bundlable;
|
||||||
|
@ -191,9 +193,14 @@ public abstract class Char extends Actor {
|
||||||
|
|
||||||
//warp instantly with allies in this case
|
//warp instantly with allies in this case
|
||||||
if (Dungeon.hero.hasTalent(Talent.ALLY_WARP)){
|
if (Dungeon.hero.hasTalent(Talent.ALLY_WARP)){
|
||||||
|
PathFinder.buildDistanceMap(c.pos, BArray.or(Dungeon.level.passable, Dungeon.level.avoid, null));
|
||||||
|
if (PathFinder.distance[pos] == Integer.MAX_VALUE){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
ScrollOfTeleportation.appear(this, Dungeon.hero.pos);
|
ScrollOfTeleportation.appear(this, Dungeon.hero.pos);
|
||||||
ScrollOfTeleportation.appear(Dungeon.hero, curPos);
|
ScrollOfTeleportation.appear(Dungeon.hero, curPos);
|
||||||
Dungeon.observe();
|
Dungeon.observe();
|
||||||
|
GameScene.updateFog();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user