SafespotOptions
Immutable options for PvP safespot queries.
Final classRLPlugins API
public final class SafespotOptionsThe default values mirror the original local PK API behaviour: inspect a 15-tile radius around the focused player, classify tiles at distance 0..10 separately from tiles at 11+, and use line of sight from the opponent to decide whether a tile is safe.
Members
Constructors
- newSafespotOptions(int, int, int, int, int, boolean)
Creates PvP safespot options.
Methods
- SafespotOptionsdefaults()
Returns the default PvP safespot options.
- intgetAttackRange()
Maximum distance at which a tile can attack the focused target.
- intgetCloseDistanceMax()
Maximum target distance for the close safespot bucket.
- intgetLongDistanceMin()
Minimum target distance for the long-distance safespot bucket.
- intgetMaxPathDistance()
Maximum BFS distance used for closest-safespot reachability checks.
- intgetSearchRadius()
Radius around the target player to inspect.
- booleanisIncludeTargetTileWhenFrozen()
Returns whether standing under a frozen target is allowed as a close safespot.
- SafespotOptionswithAttackRange(int)
With attack range.
- SafespotOptionswithCloseDistanceMax(int)
With close distance max.
- SafespotOptionswithIncludeTargetTileWhenFrozen(boolean)
With include target tile when frozen.
- SafespotOptionswithLongDistanceMin(int)
With long distance min.
- SafespotOptionswithMaxPathDistance(int)
With max path distance.
- SafespotOptionswithSearchRadius(int)
With search radius.
SafespotOptions(int, int, int, int, int, boolean)
public SafespotOptions(int searchRadius, int closeDistanceMax, int longDistanceMin, int attackRange, int maxPathDistance, boolean includeTargetTileWhenFrozen)Creates PvP safespot options.
Parameters
searchRadius- Radius around the opponent to inspect.
closeDistanceMax- Maximum distance for the
0..10safespot bucket. longDistanceMin- Minimum distance for the
10+safespot bucket. attackRange- Maximum distance for a visible attack tile.
maxPathDistance- Maximum BFS distance used when choosing the closest reachable safespot.
includeTargetTileWhenFrozen- Whether the opponent's own tile is considered safe while that opponent is frozen.
defaults()static
public static SafespotOptions defaults()Returns the default PvP safespot options.
Returns
Default options.
getAttackRange()
public int getAttackRange()Maximum distance at which a tile can attack the focused target.
Returns
Attack range in tiles.
getCloseDistanceMax()
public int getCloseDistanceMax()Maximum target distance for the close safespot bucket.
Returns
Maximum close distance.
getLongDistanceMin()
public int getLongDistanceMin()Minimum target distance for the long-distance safespot bucket.
Returns
Minimum long-distance bucket distance.
getMaxPathDistance()
public int getMaxPathDistance()Maximum BFS distance used for closest-safespot reachability checks.
Returns
Maximum path distance in tiles.
getSearchRadius()
public int getSearchRadius()Radius around the target player to inspect.
Returns
Search radius in tiles.
isIncludeTargetTileWhenFrozen()
public boolean isIncludeTargetTileWhenFrozen()Returns whether standing under a frozen target is allowed as a close safespot.
Returns
true when the target tile can be emitted while frozen.
withAttackRange(int)
public SafespotOptions withAttackRange(int value)With attack range.
Parameters
value- Value.
withCloseDistanceMax(int)
public SafespotOptions withCloseDistanceMax(int value)With close distance max.
Parameters
value- Value.
withIncludeTargetTileWhenFrozen(boolean)
public SafespotOptions withIncludeTargetTileWhenFrozen(boolean value)With include target tile when frozen.
Parameters
value- Value.
withLongDistanceMin(int)
public SafespotOptions withLongDistanceMin(int value)With long distance min.
Parameters
value- Value.
withMaxPathDistance(int)
public SafespotOptions withMaxPathDistance(int value)With max path distance.
Parameters
value- Value.
withSearchRadius(int)
public SafespotOptions withSearchRadius(int value)With search radius.
Parameters
value- Value.
Also allowed
Every class has these, as in plain Java.
equals, toString