Starsector API
Loading...
Searching...
No Matches
com.fs.starfarer.api.combat.DamagingProjectileAPI Interface Reference
Inheritance diagram for com.fs.starfarer.api.combat.DamagingProjectileAPI:
[legend]
Collaboration diagram for com.fs.starfarer.api.combat.DamagingProjectileAPI:
[legend]

Public Member Functions

DamageType getDamageType ()
 
float getDamageAmount ()
 
float getBaseDamageAmount ()
 
float getEmpAmount ()
 
void setDamageAmount (float damage)
 
WeaponAPI getWeapon ()
 
boolean didDamage ()
 
CombatEntityAPI getDamageTarget ()
 
String getProjectileSpecId ()
 
ShipAPI getSource ()
 
void setSource (ShipAPI source)
 
boolean isFading ()
 
ProjectileSpawnType getSpawnType ()
 
float getElapsed ()
 
DamageAPI getDamage ()
 
boolean isFromMissile ()
 
void setFromMissile (boolean fromMissile)
 
void removeDamagedAlready (CombatEntityAPI c)
 
void addDamagedAlready (CombatEntityAPI c)
 
float getMoveSpeed ()
 
Vector2f getSpawnLocation ()
 
ProjectileSpecAPI getProjectileSpec ()
 
float getBrightness ()
 
Vector2f getTailEnd ()
 
List< CombatEntityAPIgetDamagedAlready ()
 
- Public Member Functions inherited from com.fs.starfarer.api.combat.CombatEntityAPI
Vector2f getLocation ()
 
Vector2f getVelocity ()
 
float getFacing ()
 
void setFacing (float facing)
 
float getAngularVelocity ()
 
void setAngularVelocity (float angVel)
 
int getOwner ()
 
void setOwner (int owner)
 
float getCollisionRadius ()
 
CollisionClass getCollisionClass ()
 
void setCollisionClass (CollisionClass collisionClass)
 
float getMass ()
 
void setMass (float mass)
 
BoundsAPI getExactBounds ()
 
ShieldAPI getShield ()
 
float getHullLevel ()
 
float getHitpoints ()
 
float getMaxHitpoints ()
 
void setCollisionRadius (float radius)
 
Object getAI ()
 
boolean isExpired ()
 
void setCustomData (String key, Object data)
 
void removeCustomData (String key)
 
Map< String, Object > getCustomData ()
 
void setHitpoints (float hitpoints)
 

Detailed Description

Definition at line 10 of file DamagingProjectileAPI.java.

Member Function Documentation

◆ addDamagedAlready()

void com.fs.starfarer.api.combat.DamagingProjectileAPI.addDamagedAlready ( CombatEntityAPI  c)

Only supported by damaging explosions, not other types of projectiles.

Parameters
c

◆ didDamage()

boolean com.fs.starfarer.api.combat.DamagingProjectileAPI.didDamage ( )

Whether the projectile already did its damage and is now fading out.

Returns

Implemented in com.fs.starfarer.api.combat.MissileAPI.

◆ getBaseDamageAmount()

float com.fs.starfarer.api.combat.DamagingProjectileAPI.getBaseDamageAmount ( )

Does not include damage reduction from projectile fading out or having done damage

Returns

◆ getBrightness()

float com.fs.starfarer.api.combat.DamagingProjectileAPI.getBrightness ( )

◆ getDamage()

DamageAPI com.fs.starfarer.api.combat.DamagingProjectileAPI.getDamage ( )

◆ getDamageAmount()

float com.fs.starfarer.api.combat.DamagingProjectileAPI.getDamageAmount ( )

◆ getDamagedAlready()

List< CombatEntityAPI > com.fs.starfarer.api.combat.DamagingProjectileAPI.getDamagedAlready ( )

◆ getDamageTarget()

CombatEntityAPI com.fs.starfarer.api.combat.DamagingProjectileAPI.getDamageTarget ( )
Returns
What the damage was dealt to, once didDamage() returns true. Can be null.

◆ getDamageType()

DamageType com.fs.starfarer.api.combat.DamagingProjectileAPI.getDamageType ( )

◆ getElapsed()

float com.fs.starfarer.api.combat.DamagingProjectileAPI.getElapsed ( )

Time the projectile has been alive.

Returns

◆ getEmpAmount()

float com.fs.starfarer.api.combat.DamagingProjectileAPI.getEmpAmount ( )

◆ getMoveSpeed()

float com.fs.starfarer.api.combat.DamagingProjectileAPI.getMoveSpeed ( )

◆ getProjectileSpec()

ProjectileSpecAPI com.fs.starfarer.api.combat.DamagingProjectileAPI.getProjectileSpec ( )

◆ getProjectileSpecId()

String com.fs.starfarer.api.combat.DamagingProjectileAPI.getProjectileSpecId ( )

◆ getSource()

ShipAPI com.fs.starfarer.api.combat.DamagingProjectileAPI.getSource ( )

Generally a ShipAPI for the ship that ultimately fired this weapon. Can be null.

Projectiles can't hit their source, except for fizzled-out missiles.

Returns

◆ getSpawnLocation()

Vector2f com.fs.starfarer.api.combat.DamagingProjectileAPI.getSpawnLocation ( )

◆ getSpawnType()

ProjectileSpawnType com.fs.starfarer.api.combat.DamagingProjectileAPI.getSpawnType ( )

◆ getTailEnd()

Vector2f com.fs.starfarer.api.combat.DamagingProjectileAPI.getTailEnd ( )

Only non-null for "moving ray" and "ballistic projectile" type projectiles, not missiles/plasma shots/etc.

Returns

◆ getWeapon()

WeaponAPI com.fs.starfarer.api.combat.DamagingProjectileAPI.getWeapon ( )
Returns
Weapon that fired this projectile. Can be null (for example, if spawned without one via the API).

◆ isFading()

boolean com.fs.starfarer.api.combat.DamagingProjectileAPI.isFading ( )
Returns
whether the projectile has started fading out due to exceeding its maximum range.

◆ isFromMissile()

boolean com.fs.starfarer.api.combat.DamagingProjectileAPI.isFromMissile ( )

◆ removeDamagedAlready()

void com.fs.starfarer.api.combat.DamagingProjectileAPI.removeDamagedAlready ( CombatEntityAPI  c)

Only supported by damaging explosions, not other types of projectiles.

Parameters
c

◆ setDamageAmount()

void com.fs.starfarer.api.combat.DamagingProjectileAPI.setDamageAmount ( float  damage)

◆ setFromMissile()

void com.fs.starfarer.api.combat.DamagingProjectileAPI.setFromMissile ( boolean  fromMissile)

Should be set to true for BALLISTIC, BALLISTIC_AS_BEAM, and PLASMA_SHOT projectiles spawned from a missile. Needed for incoming damage evaluation AI to function properly in these cases.

Parameters
fromMissile

◆ setSource()

void com.fs.starfarer.api.combat.DamagingProjectileAPI.setSource ( ShipAPI  source)

The documentation for this interface was generated from the following file: