v3.1.0: slightly upped range on targeted traps, for consistency with FOV
This commit is contained in:
@@ -55,7 +55,8 @@ public class DisintegrationTrap extends Trap {
|
|||||||
|
|
||||||
//find the closest char that can be aimed at
|
//find the closest char that can be aimed at
|
||||||
//can't target beyond view distance, with a min of 6 (torch range)
|
//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){
|
if (target == null){
|
||||||
float closestDist = Float.MAX_VALUE;
|
float closestDist = Float.MAX_VALUE;
|
||||||
for (Char ch : Actor.chars()){
|
for (Char ch : Actor.chars()){
|
||||||
|
|||||||
@@ -66,7 +66,8 @@ public class GrimTrap extends Trap {
|
|||||||
|
|
||||||
//find the closest char that can be aimed at
|
//find the closest char that can be aimed at
|
||||||
//can't target beyond view distance, with a min of 6 (torch range)
|
//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){
|
if (target == null){
|
||||||
float closestDist = Float.MAX_VALUE;
|
float closestDist = Float.MAX_VALUE;
|
||||||
for (Char ch : Actor.chars()){
|
for (Char ch : Actor.chars()){
|
||||||
|
|||||||
@@ -80,7 +80,8 @@ public class PoisonDartTrap extends Trap {
|
|||||||
|
|
||||||
//find the closest char that can be aimed at
|
//find the closest char that can be aimed at
|
||||||
//can't target beyond view distance, with a min of 6 (torch range)
|
//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){
|
if (target == null){
|
||||||
float closestDist = Float.MAX_VALUE;
|
float closestDist = Float.MAX_VALUE;
|
||||||
for (Char ch : Actor.chars()){
|
for (Char ch : Actor.chars()){
|
||||||
|
|||||||
@@ -66,7 +66,8 @@ public class WornDartTrap extends Trap {
|
|||||||
|
|
||||||
//find the closest char that can be aimed at
|
//find the closest char that can be aimed at
|
||||||
//can't target beyond view distance, with a min of 6 (torch range)
|
//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){
|
if (target == null){
|
||||||
float closestDist = Float.MAX_VALUE;
|
float closestDist = Float.MAX_VALUE;
|
||||||
for (Char ch : Actor.chars()){
|
for (Char ch : Actor.chars()){
|
||||||
|
|||||||
Reference in New Issue
Block a user