v1.1.0: fixed immovable characters being able to be tele'd in some cases
This commit is contained in:
parent
a6097190d3
commit
a2fcd04768
|
@ -97,6 +97,11 @@ public class ScrollOfTeleportation extends Scroll {
|
||||||
return teleportInNonRegularLevel( ch, false );
|
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 count = 20;
|
||||||
int pos;
|
int pos;
|
||||||
do {
|
do {
|
||||||
|
@ -204,6 +209,11 @@ public class ScrollOfTeleportation extends Scroll {
|
||||||
//prefers not seen(optional) > not visible > visible
|
//prefers not seen(optional) > not visible > visible
|
||||||
public static boolean teleportInNonRegularLevel(Char ch, boolean preferNotSeen ){
|
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> visibleValid = new ArrayList<>();
|
||||||
ArrayList<Integer> notVisibleValid = new ArrayList<>();
|
ArrayList<Integer> notVisibleValid = new ArrayList<>();
|
||||||
ArrayList<Integer> notSeenValid = new ArrayList<>();
|
ArrayList<Integer> notSeenValid = new ArrayList<>();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user