v1.1.0: fixed immovable characters being able to be tele'd in some cases
This commit is contained in:
parent
a6097190d3
commit
a2fcd04768
|
@ -96,6 +96,11 @@ public class ScrollOfTeleportation extends Scroll {
|
|||
if (!(Dungeon.level instanceof RegularLevel)){
|
||||
return teleportInNonRegularLevel( ch, false );
|
||||
}
|
||||
|
||||
if (Char.hasProp(ch, Char.Property.IMMOVABLE)){
|
||||
GLog.w( Messages.get(ScrollOfTeleportation.class, "no_tele") );
|
||||
return false;
|
||||
}
|
||||
|
||||
int count = 20;
|
||||
int pos;
|
||||
|
@ -204,6 +209,11 @@ public class ScrollOfTeleportation extends Scroll {
|
|||
//prefers not seen(optional) > not visible > visible
|
||||
public static boolean teleportInNonRegularLevel(Char ch, boolean preferNotSeen ){
|
||||
|
||||
if (Char.hasProp(ch, Char.Property.IMMOVABLE)){
|
||||
GLog.w( Messages.get(ScrollOfTeleportation.class, "no_tele") );
|
||||
return false;
|
||||
}
|
||||
|
||||
ArrayList<Integer> visibleValid = new ArrayList<>();
|
||||
ArrayList<Integer> notVisibleValid = new ArrayList<>();
|
||||
ArrayList<Integer> notSeenValid = new ArrayList<>();
|
||||
|
|
Loading…
Reference in New Issue
Block a user