-
- All Implemented Interfaces:
public final class AGCUtilsKt
-
-
Field Summary
Fields Modifier and Type Field Description public final static FloatdegToRadpublic final static FloatbignessFrigatepublic final static FloatbignessDestroyerpublic final static FloatbignessCruiserpublic final static FloatbignessCapitalpublic final static FloatbignessFighter
-
Method Summary
Modifier and Type Method Description final static BooleanisPD(WeaponAPI weapon)final static BooleanisAimable(WeaponAPI weapon)final static BooleanisInvalid(AutofireAIPlugin aiPlugin)final static FloatammoLevel(WeaponAPI weapon)final static BooleanisBig(ShipAPI ship)final static BooleanisSmall(ShipAPI ship)final static Floatbigness(ShipAPI ship)final static BooleanisHostile(CombatEntityAPI entity)final static Vector2fgetNeutralPosition(WeaponAPI weapon)final static BooleanisOpportuneTarget(FiringSolution solution, WeaponAPI weapon)final static FloatcomputeShieldFactor(CombatEntityAPI tgtShip, WeaponAPI weapon, Float ttt)final static FloatcomputeFluxBasedShieldFactor(CombatEntityAPI tgtShip)final static FloatcomputeShieldFacingFactor(CombatEntityAPI tgtShip, WeaponAPI weapon, Float ttt)final static FloatcomputeTimeToTravel(WeaponAPI weapon, Vector2f tgt, Float leadingFactor)final static FloatcomputeRemainingChargeUpTime(WeaponAPI weapon)final static FloatgetAverageArmor(ArmorGridAPI armor)final static FloatcomputeEffectiveCellRadius(ShipAPI ship, Float impactAngleDeg)effective ship radius measured in armor grid cells final static FloatcomputeInnerCellRatio(ShipAPI ship, Float impactAngleDeg)ratio of inner (i.e. final static FloatcomputeOuterLayerArmorInImpactArea(WeaponAPI weapon, CombatEntityAPI ship, Vector2f predictedLocation)final static FloatcomputeWeaponEffectivenessVsArmor(WeaponAPI weapon, Float armor)final static FloatgetMaxArmor(ArmorGridAPI armor)final static Vector2fpredictImpactLocationInTgtCoordinates(CombatEntityAPI target, WeaponAPI firingWeapon, Vector2f predictedLocation)returns the location where the shot is predicted to impact, transformed to be relative to the current target position, under the assumption that the target is approximately circular final static FloatpredictEffectiveArmorAtImpact(CombatEntityAPI target, WeaponAPI firingWeapon, Vector2f predictedLocation)final static FloatcomputeEffectiveArmorAroundIndex(ArmorGridAPI armor, Integer x, Integer y)final static BooleanisValidPDTargetForWeapon(CombatEntityAPI target, WeaponAPI weapon)final static Vector2fvectorFromAngleDeg(Float angle)final static FloatdegFromVector(Vector2f vec)final static StringmapBooleanToSpecificString(Boolean boolValue, String trueString, String falseString)final static ShipAPIdetermineUniversalShipTarget(ShipAPI $self)final static FloatangularDistanceFromWeapon(Vector2f entity, WeaponAPI weapon)final static FloatlinearDistanceFromWeapon(Vector2f entity, WeaponAPI weapon)final static BooleandetermineIfShotWillHit(Vector2f entity, Float collRadius, WeaponAPI weapon, Vector2f aimPoint)final static FloateffectiveCollRadius(CombatEntityAPI entity)-
-
Method Detail
-
getNeutralPosition
final static Vector2f getNeutralPosition(WeaponAPI weapon)
-
isOpportuneTarget
final static Boolean isOpportuneTarget(FiringSolution solution, WeaponAPI weapon)
-
computeShieldFactor
final static Float computeShieldFactor(CombatEntityAPI tgtShip, WeaponAPI weapon, Float ttt)
-
computeFluxBasedShieldFactor
final static Float computeFluxBasedShieldFactor(CombatEntityAPI tgtShip)
-
computeShieldFacingFactor
final static Float computeShieldFacingFactor(CombatEntityAPI tgtShip, WeaponAPI weapon, Float ttt)
-
computeTimeToTravel
final static Float computeTimeToTravel(WeaponAPI weapon, Vector2f tgt, Float leadingFactor)
-
computeRemainingChargeUpTime
final static Float computeRemainingChargeUpTime(WeaponAPI weapon)
-
getAverageArmor
final static Float getAverageArmor(ArmorGridAPI armor)
-
computeEffectiveCellRadius
final static Float computeEffectiveCellRadius(ShipAPI ship, Float impactAngleDeg)
effective ship radius measured in armor grid cells
-
computeInnerCellRatio
final static Float computeInnerCellRatio(ShipAPI ship, Float impactAngleDeg)
ratio of inner (i.e. unreachable) armor grid cells to total cells from given direction
-
computeOuterLayerArmorInImpactArea
final static Float computeOuterLayerArmorInImpactArea(WeaponAPI weapon, CombatEntityAPI ship, Vector2f predictedLocation)
-
computeWeaponEffectivenessVsArmor
final static Float computeWeaponEffectivenessVsArmor(WeaponAPI weapon, Float armor)
-
getMaxArmor
final static Float getMaxArmor(ArmorGridAPI armor)
-
predictImpactLocationInTgtCoordinates
final static Vector2f predictImpactLocationInTgtCoordinates(CombatEntityAPI target, WeaponAPI firingWeapon, Vector2f predictedLocation)
returns the location where the shot is predicted to impact, transformed to be relative to the current target position, under the assumption that the target is approximately circular
- Parameters:
predictedLocation- : location where the target will be at the time the shot is estimated to connect
-
predictEffectiveArmorAtImpact
final static Float predictEffectiveArmorAtImpact(CombatEntityAPI target, WeaponAPI firingWeapon, Vector2f predictedLocation)
-
computeEffectiveArmorAroundIndex
final static Float computeEffectiveArmorAroundIndex(ArmorGridAPI armor, Integer x, Integer y)
-
isValidPDTargetForWeapon
final static Boolean isValidPDTargetForWeapon(CombatEntityAPI target, WeaponAPI weapon)
-
vectorFromAngleDeg
final static Vector2f vectorFromAngleDeg(Float angle)
-
degFromVector
final static Float degFromVector(Vector2f vec)
-
mapBooleanToSpecificString
final static String mapBooleanToSpecificString(Boolean boolValue, String trueString, String falseString)
-
determineUniversalShipTarget
final static ShipAPI determineUniversalShipTarget(ShipAPI $self)
-
angularDistanceFromWeapon
final static Float angularDistanceFromWeapon(Vector2f entity, WeaponAPI weapon)
- Parameters:
entity- : Relative coordinates (velocity-compensated)
-
linearDistanceFromWeapon
final static Float linearDistanceFromWeapon(Vector2f entity, WeaponAPI weapon)
-
determineIfShotWillHit
final static Boolean determineIfShotWillHit(Vector2f entity, Float collRadius, WeaponAPI weapon, Vector2f aimPoint)
- Parameters:
entity- : In relative coordinatescollRadius- : Include any tolerances in hereaimPoint- : Point the weapon is aiming at, deduced from current weapon facing if not providedThe calculation is done by finding the minimum point of function f(x)=distSquared(aimPoint * x, entity).
-
effectiveCollRadius
final static Float effectiveCollRadius(CombatEntityAPI entity)
-
-
-
-