v2.5.0: further tweaked targeting trap max range

This commit is contained in:
Evan Debenham
2024-06-30 14:01:09 -04:00
parent 0ac18035de
commit 0c889a8a9b
4 changed files with 8 additions and 8 deletions

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}