v2.5.0: further tweaked targeting trap max range
This commit is contained in:
@@ -63,8 +63,8 @@ public class DisintegrationTrap extends Trap {
|
||||
closestDist = curDist;
|
||||
}
|
||||
}
|
||||
//max targeting range of 8 tiles
|
||||
if (closestDist > 8){
|
||||
//can't target beyond view distance, with a min of 6 (torch range)
|
||||
if (closestDist > Math.max(6, Dungeon.level.viewDistance)){
|
||||
target = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,8 +74,8 @@ public class GrimTrap extends Trap {
|
||||
closestDist = curDist;
|
||||
}
|
||||
}
|
||||
//max targeting range of 8 tiles
|
||||
if (closestDist > 8){
|
||||
//can't target beyond view distance, with a min of 6 (torch range)
|
||||
if (closestDist > Math.max(6, Dungeon.level.viewDistance)){
|
||||
target = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,8 +86,8 @@ public class PoisonDartTrap extends Trap {
|
||||
closestDist = curDist;
|
||||
}
|
||||
}
|
||||
//max targeting range of 8 tiles
|
||||
if (closestDist > 8){
|
||||
//can't target beyond view distance, with a min of 6 (torch range)
|
||||
if (closestDist > Math.max(6, Dungeon.level.viewDistance)){
|
||||
target = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,8 +71,8 @@ public class WornDartTrap extends Trap {
|
||||
closestDist = curDist;
|
||||
}
|
||||
}
|
||||
//max targeting range of 8 tiles
|
||||
if (closestDist > 8){
|
||||
//can't target beyond view distance, with a min of 6 (torch range)
|
||||
if (closestDist > Math.max(6, Dungeon.level.viewDistance)){
|
||||
target = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user