v2.5.0: targeted traps now have a max range of 8 tiles

This commit is contained in:
Evan Debenham
2024-06-26 15:23:36 -04:00
parent 60c56a1253
commit afcafa5e43
4 changed files with 16 additions and 0 deletions

View File

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

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {