v3.1.0: slightly upped range on targeted traps, for consistency with FOV

This commit is contained in:
Evan Debenham
2025-05-12 13:54:14 -04:00
parent cda9aec937
commit f2010a7dea
4 changed files with 8 additions and 4 deletions

View File

@@ -55,7 +55,8 @@ public class DisintegrationTrap extends Trap {
//find the closest char that can be aimed at
//can't target beyond view distance, with a min of 6 (torch range)
int range = Math.max(6, Dungeon.level.viewDistance);
//add 0.5 for better consistency with vision radius shape
float range = Math.max(6, Dungeon.level.viewDistance)+0.5f;
if (target == null){
float closestDist = Float.MAX_VALUE;
for (Char ch : Actor.chars()){

View File

@@ -66,7 +66,8 @@ public class GrimTrap extends Trap {
//find the closest char that can be aimed at
//can't target beyond view distance, with a min of 6 (torch range)
int range = Math.max(6, Dungeon.level.viewDistance);
//add 0.5 for better consistency with vision radius shape
float range = Math.max(6, Dungeon.level.viewDistance)+0.5f;
if (target == null){
float closestDist = Float.MAX_VALUE;
for (Char ch : Actor.chars()){

View File

@@ -80,7 +80,8 @@ public class PoisonDartTrap extends Trap {
//find the closest char that can be aimed at
//can't target beyond view distance, with a min of 6 (torch range)
int range = Math.max(6, Dungeon.level.viewDistance);
//add 0.5 for better consistency with vision radius shape
float range = Math.max(6, Dungeon.level.viewDistance)+0.5f;
if (target == null){
float closestDist = Float.MAX_VALUE;
for (Char ch : Actor.chars()){

View File

@@ -66,7 +66,8 @@ public class WornDartTrap extends Trap {
//find the closest char that can be aimed at
//can't target beyond view distance, with a min of 6 (torch range)
int range = Math.max(6, Dungeon.level.viewDistance);
//add 0.5 for better consistency with vision radius shape
float range = Math.max(6, Dungeon.level.viewDistance)+0.5f;
if (target == null){
float closestDist = Float.MAX_VALUE;
for (Char ch : Actor.chars()){