v2.5.0: targeted traps now have a max range of 8 tiles
This commit is contained in:
@@ -63,6 +63,10 @@ public class DisintegrationTrap extends Trap {
|
||||
closestDist = curDist;
|
||||
}
|
||||
}
|
||||
//max targeting range of 8 tiles
|
||||
if (closestDist > 8){
|
||||
target = null;
|
||||
}
|
||||
}
|
||||
|
||||
Heap heap = Dungeon.level.heaps.get(pos);
|
||||
|
||||
@@ -74,6 +74,10 @@ public class GrimTrap extends Trap {
|
||||
closestDist = curDist;
|
||||
}
|
||||
}
|
||||
//max targeting range of 8 tiles
|
||||
if (closestDist > 8){
|
||||
target = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (target != null) {
|
||||
|
||||
@@ -86,6 +86,10 @@ public class PoisonDartTrap extends Trap {
|
||||
closestDist = curDist;
|
||||
}
|
||||
}
|
||||
//max targeting range of 8 tiles
|
||||
if (closestDist > 8){
|
||||
target = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (target != null) {
|
||||
|
||||
@@ -71,6 +71,10 @@ public class WornDartTrap extends Trap {
|
||||
closestDist = curDist;
|
||||
}
|
||||
}
|
||||
//max targeting range of 8 tiles
|
||||
if (closestDist > 8){
|
||||
target = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (target != null) {
|
||||
|
||||
Reference in New Issue
Block a user