|
LazyLib | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.lazywizard.lazylib.combat.WeaponUtils
public class WeaponUtils
Contains methods that deal with weapons and weapon arcs.
Method Summary | |
---|---|
static float |
calculateActualDamage(float baseDamage,
com.fs.starfarer.api.combat.WeaponAPI weapon)
Calculates the damage done by a weapon after MutableShipStats are applied. |
static float |
calculateDamagePerBurst(com.fs.starfarer.api.combat.WeaponAPI weapon)
Calculates the damage done per burst by a weapon after MutableShipStats are applied. |
static float |
calculateDamagePerSecond(com.fs.starfarer.api.combat.WeaponAPI weapon)
Calculates the damage done per second by a weapon after MutableShipStats are applied. |
static float |
calculateDamagePerShot(com.fs.starfarer.api.combat.WeaponAPI weapon)
Calculates the damage done per shot by a weapon after MutableShipStats are applied. |
static float |
getTimeToAim(com.fs.starfarer.api.combat.WeaponAPI weapon,
org.lwjgl.util.vector.Vector2f aimAt)
Calculate how long it would take to turn a WeaponAPI to aim at a location. |
static boolean |
isWithinArc(com.fs.starfarer.api.combat.CombatEntityAPI entity,
com.fs.starfarer.api.combat.WeaponAPI weapon)
Checks if a CombatEntityAPI is within the arc and range of a WeaponAPI . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static float calculateActualDamage(float baseDamage, com.fs.starfarer.api.combat.WeaponAPI weapon)
baseDamage
- The base damage of this weapon.weapon
- The WeaponAPI
to check for bonuses on.
weapon
after bonuses are applied.public static float calculateDamagePerShot(com.fs.starfarer.api.combat.WeaponAPI weapon)
weapon
- The weapon to check.
weapon
per shot, after bonuses.public static float calculateDamagePerSecond(com.fs.starfarer.api.combat.WeaponAPI weapon)
weapon
- The weapon to check.
weapon
per second, after bonuses.public static float calculateDamagePerBurst(com.fs.starfarer.api.combat.WeaponAPI weapon)
weapon
- The weapon to check.
weapon
per burst, after bonuses.public static boolean isWithinArc(com.fs.starfarer.api.combat.CombatEntityAPI entity, com.fs.starfarer.api.combat.WeaponAPI weapon)
CombatEntityAPI
is within the arc and range of a WeaponAPI
.
entity
- The CombatEntityAPI
to check if weapon
is aimed at.weapon
- The WeaponAPI
to test against.
true
if in arc and in range, false
otherwise.public static float getTimeToAim(com.fs.starfarer.api.combat.WeaponAPI weapon, org.lwjgl.util.vector.Vector2f aimAt)
WeaponAPI
to aim at a location.
weapon
- The WeaponAPI
to turn.aimAt
- The Vector2f
to aim at.
weapon
.
|
LazyLib | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |