CombatDrones
extends AbstractWeapon
in package
uses
ForcesTrait
Table of Contents
Constants
- MAX_CDS_RAND = 54
- PLANET_DAMAGE_MOD = 0.2
- Reduce the damage done to planets by this factor
Properties
- $accuracy : int
- $amount : int
- $armourDamage : int
- $damageRollover : bool
- $name : string
- $shieldDamage : int
Methods
- __construct() : mixed
- canShootForces() : bool
- canShootPlanets() : bool
- canShootPorts() : bool
- canShootTraders() : bool
- getAmount() : int
- Returns the amount of this type of force.
- getArmourDamage() : int
- getBaseAccuracy() : int
- getDamage() : WeaponDamageData
- getModifiedAccuracy() : float
- getModifiedAccuracyAgainstForces() : float
- getModifiedAccuracyAgainstPlanet() : float
- getModifiedAccuracyAgainstPlayer() : float
- getModifiedAccuracyAgainstPort() : float
- getModifiedDamageAgainstForces() : WeaponDamageData
- getModifiedDamageAgainstPlanet() : WeaponDamageData
- getModifiedDamageAgainstPlayer() : WeaponDamageData
- getModifiedDamageAgainstPort() : WeaponDamageData
- getModifiedForceAccuracyAgainstPlayer() : float
- getModifiedForceDamageAgainstPlayer() : WeaponDamageData
- getModifiedPlanetDamageAgainstPlayer() : WeaponDamageData
- getModifiedPortDamageAgainstPlayer() : WeaponDamageData
- getName() : string
- getShieldDamage() : int
- isDamageRollover() : bool
- shootForces() : ForceTakenDamageData, KillResults?: array{}}
- shootPlanet() : TakenDamageData, KillResults?: array{}}
- shootPlayer() : TakenDamageData, KillResults?: array{DeadExp: int, KillerExp: int, KillerCredits: int}}
- shootPlayerAsForce() : TakenDamageData, KillResults?: array{DeadExp: int, LostCredits: int}}
- shootPlayerAsPlanet() : TakenDamageData, KillResults?: array{DeadExp: int, LostCredits: int}}
- shootPlayerAsPort() : TakenDamageData, KillResults?: array{DeadExp: int, LostCredits: int}}
- shootPort() : TakenDamageData, KillResults?: array{}}
- doForceDamageToPlayer() : TakenDamageData, KillResults?: array{DeadExp: int, LostCredits: int}}
- doPlanetDamageToPlayer() : TakenDamageData, KillResults?: array{DeadExp: int, LostCredits: int}}
- doPlayerDamageToForce() : ForceTakenDamageData, KillResults?: array{}}
- doPlayerDamageToPlanet() : TakenDamageData, KillResults?: array{}}
- doPlayerDamageToPlayer() : TakenDamageData, KillResults?: array{DeadExp: int, KillerExp: int, KillerCredits: int}}
- doPlayerDamageToPort() : TakenDamageData, KillResults?: array{}}
- doPortDamageToPlayer() : TakenDamageData, KillResults?: array{DeadExp: int, LostCredits: int}}
- getModifiedAccuracyAgainstForcesUsingRandom() : float
- getModifiedAccuracyAgainstPlanetUsingRandom() : float
- getModifiedAccuracyAgainstPlayerUsingRandom() : float
- getModifiedAccuracyAgainstPortUsingRandom() : float
- getModifiedForceAccuracyAgainstPlayerUsingRandom() : float
- getModifiedPlanetAccuracyAgainstPlayer() : float
- getModifiedPortAccuracyAgainstPlayer() : float
Constants
MAX_CDS_RAND
protected
mixed
MAX_CDS_RAND
= 54
PLANET_DAMAGE_MOD
Reduce the damage done to planets by this factor
protected
mixed
PLANET_DAMAGE_MOD
= 0.2
Properties
$accuracy
protected
int
$accuracy
$amount
protected
int
$amount
$armourDamage
protected
int
$armourDamage
$damageRollover
protected
bool
$damageRollover
$name
protected
string
$name
$shieldDamage
protected
int
$shieldDamage
Methods
__construct()
public
__construct(int $numberOfCDs[, bool $portPlanetDrones = false ]) : mixed
Parameters
- $numberOfCDs : int
- $portPlanetDrones : bool = false
canShootForces()
public
canShootForces() : bool
Return values
boolcanShootPlanets()
public
canShootPlanets() : bool
Return values
boolcanShootPorts()
public
canShootPorts() : bool
Return values
boolcanShootTraders()
public
canShootTraders() : bool
Return values
boolgetAmount()
Returns the amount of this type of force.
public
getAmount() : int
Return values
intgetArmourDamage()
public
getArmourDamage() : int
Return values
intgetBaseAccuracy()
public
getBaseAccuracy() : int
Return values
intgetDamage()
public
getDamage() : WeaponDamageData
Return values
WeaponDamageDatagetModifiedAccuracy()
public
getModifiedAccuracy() : float
Return values
floatgetModifiedAccuracyAgainstForces()
public
getModifiedAccuracyAgainstForces(AbstractPlayer $weaponPlayer, Force $forces) : float
Parameters
- $weaponPlayer : AbstractPlayer
- $forces : Force
Return values
floatgetModifiedAccuracyAgainstPlanet()
public
getModifiedAccuracyAgainstPlanet(AbstractPlayer $weaponPlayer, Planet $planet) : float
Parameters
- $weaponPlayer : AbstractPlayer
- $planet : Planet
Return values
floatgetModifiedAccuracyAgainstPlayer()
public
getModifiedAccuracyAgainstPlayer(AbstractPlayer $weaponPlayer, AbstractPlayer $targetPlayer) : float
Parameters
- $weaponPlayer : AbstractPlayer
- $targetPlayer : AbstractPlayer
Return values
floatgetModifiedAccuracyAgainstPort()
public
getModifiedAccuracyAgainstPort(AbstractPlayer $weaponPlayer, Port $port) : float
Parameters
- $weaponPlayer : AbstractPlayer
- $port : Port
Return values
floatgetModifiedDamageAgainstForces()
public
getModifiedDamageAgainstForces(AbstractPlayer $weaponPlayer, Force $forces) : WeaponDamageData
Parameters
- $weaponPlayer : AbstractPlayer
- $forces : Force
Return values
WeaponDamageDatagetModifiedDamageAgainstPlanet()
public
getModifiedDamageAgainstPlanet(AbstractPlayer $weaponPlayer, Planet $planet) : WeaponDamageData
Parameters
- $weaponPlayer : AbstractPlayer
- $planet : Planet
Return values
WeaponDamageDatagetModifiedDamageAgainstPlayer()
public
getModifiedDamageAgainstPlayer(AbstractPlayer $weaponPlayer, AbstractPlayer $targetPlayer) : WeaponDamageData
Parameters
- $weaponPlayer : AbstractPlayer
- $targetPlayer : AbstractPlayer
Return values
WeaponDamageDatagetModifiedDamageAgainstPort()
public
getModifiedDamageAgainstPort(AbstractPlayer $weaponPlayer, Port $port) : WeaponDamageData
Parameters
- $weaponPlayer : AbstractPlayer
- $port : Port
Return values
WeaponDamageDatagetModifiedForceAccuracyAgainstPlayer()
public
getModifiedForceAccuracyAgainstPlayer(Force $forces, AbstractPlayer $targetPlayer) : float
Parameters
- $forces : Force
- $targetPlayer : AbstractPlayer
Return values
floatgetModifiedForceDamageAgainstPlayer()
public
getModifiedForceDamageAgainstPlayer(Force $forces, AbstractPlayer $targetPlayer) : WeaponDamageData
Parameters
- $forces : Force
- $targetPlayer : AbstractPlayer
Return values
WeaponDamageDatagetModifiedPlanetDamageAgainstPlayer()
public
getModifiedPlanetDamageAgainstPlayer(Planet $planet, AbstractPlayer $targetPlayer) : WeaponDamageData
Parameters
- $planet : Planet
- $targetPlayer : AbstractPlayer
Return values
WeaponDamageDatagetModifiedPortDamageAgainstPlayer()
public
getModifiedPortDamageAgainstPlayer(Port $port, AbstractPlayer $targetPlayer) : WeaponDamageData
Parameters
- $port : Port
- $targetPlayer : AbstractPlayer
Return values
WeaponDamageDatagetName()
public
getName() : string
Return values
stringgetShieldDamage()
public
getShieldDamage() : int
Return values
intisDamageRollover()
public
isDamageRollover() : bool
Return values
boolshootForces()
public
shootForces(AbstractPlayer $weaponPlayer, Force $forces) : ForceTakenDamageData, KillResults?: array{}}
Parameters
- $weaponPlayer : AbstractPlayer
- $forces : Force
Return values
ForceTakenDamageData, KillResults?: array{}}shootPlanet()
public
shootPlanet(AbstractPlayer $weaponPlayer, Planet $planet) : TakenDamageData, KillResults?: array{}}
Parameters
- $weaponPlayer : AbstractPlayer
- $planet : Planet
Return values
TakenDamageData, KillResults?: array{}}shootPlayer()
public
shootPlayer(AbstractPlayer $weaponPlayer, AbstractPlayer $targetPlayer) : TakenDamageData, KillResults?: array{DeadExp: int, KillerExp: int, KillerCredits: int}}
Parameters
- $weaponPlayer : AbstractPlayer
- $targetPlayer : AbstractPlayer
Return values
TakenDamageData, KillResults?: array{DeadExp: int, KillerExp: int, KillerCredits: int}}shootPlayerAsForce()
public
shootPlayerAsForce(Force $forces, AbstractPlayer $targetPlayer) : TakenDamageData, KillResults?: array{DeadExp: int, LostCredits: int}}
Parameters
- $forces : Force
- $targetPlayer : AbstractPlayer
Return values
TakenDamageData, KillResults?: array{DeadExp: int, LostCredits: int}}shootPlayerAsPlanet()
public
shootPlayerAsPlanet(Planet $forces, AbstractPlayer $targetPlayer) : TakenDamageData, KillResults?: array{DeadExp: int, LostCredits: int}}
Parameters
- $forces : Planet
- $targetPlayer : AbstractPlayer
Return values
TakenDamageData, KillResults?: array{DeadExp: int, LostCredits: int}}shootPlayerAsPort()
public
shootPlayerAsPort(Port $forces, AbstractPlayer $targetPlayer) : TakenDamageData, KillResults?: array{DeadExp: int, LostCredits: int}}
Parameters
- $forces : Port
- $targetPlayer : AbstractPlayer
Return values
TakenDamageData, KillResults?: array{DeadExp: int, LostCredits: int}}shootPort()
public
shootPort(AbstractPlayer $weaponPlayer, Port $port) : TakenDamageData, KillResults?: array{}}
Parameters
- $weaponPlayer : AbstractPlayer
- $port : Port
Return values
TakenDamageData, KillResults?: array{}}doForceDamageToPlayer()
protected
doForceDamageToPlayer(AbstractPlayer, Hit: bool} $return, Force $forces, AbstractPlayer $targetPlayer) : TakenDamageData, KillResults?: array{DeadExp: int, LostCredits: int}}
Parameters
- $return : AbstractPlayer, Hit: bool}
- $forces : Force
- $targetPlayer : AbstractPlayer
Return values
TakenDamageData, KillResults?: array{DeadExp: int, LostCredits: int}}doPlanetDamageToPlayer()
protected
doPlanetDamageToPlayer(AbstractPlayer, Hit: bool} $return, Planet $planet, AbstractPlayer $targetPlayer) : TakenDamageData, KillResults?: array{DeadExp: int, LostCredits: int}}
Parameters
- $return : AbstractPlayer, Hit: bool}
- $planet : Planet
- $targetPlayer : AbstractPlayer
Return values
TakenDamageData, KillResults?: array{DeadExp: int, LostCredits: int}}doPlayerDamageToForce()
protected
doPlayerDamageToForce(Force, Hit: bool} $return, AbstractPlayer $weaponPlayer, Force $forces) : ForceTakenDamageData, KillResults?: array{}}
Parameters
- $return : Force, Hit: bool}
- $weaponPlayer : AbstractPlayer
- $forces : Force
Return values
ForceTakenDamageData, KillResults?: array{}}doPlayerDamageToPlanet()
protected
doPlayerDamageToPlanet(Planet, Hit: bool} $return, AbstractPlayer $weaponPlayer, Planet $planet) : TakenDamageData, KillResults?: array{}}
Parameters
- $return : Planet, Hit: bool}
- $weaponPlayer : AbstractPlayer
- $planet : Planet
Return values
TakenDamageData, KillResults?: array{}}doPlayerDamageToPlayer()
protected
doPlayerDamageToPlayer(AbstractPlayer, Hit: bool} $return, AbstractPlayer $weaponPlayer, AbstractPlayer $targetPlayer) : TakenDamageData, KillResults?: array{DeadExp: int, KillerExp: int, KillerCredits: int}}
Parameters
- $return : AbstractPlayer, Hit: bool}
- $weaponPlayer : AbstractPlayer
- $targetPlayer : AbstractPlayer
Return values
TakenDamageData, KillResults?: array{DeadExp: int, KillerExp: int, KillerCredits: int}}doPlayerDamageToPort()
protected
doPlayerDamageToPort(Port, Hit: bool} $return, AbstractPlayer $weaponPlayer, Port $port) : TakenDamageData, KillResults?: array{}}
Parameters
- $return : Port, Hit: bool}
- $weaponPlayer : AbstractPlayer
- $port : Port
Return values
TakenDamageData, KillResults?: array{}}doPortDamageToPlayer()
protected
doPortDamageToPlayer(AbstractPlayer, Hit: bool} $return, Port $port, AbstractPlayer $targetPlayer) : TakenDamageData, KillResults?: array{DeadExp: int, LostCredits: int}}
Parameters
- $return : AbstractPlayer, Hit: bool}
- $port : Port
- $targetPlayer : AbstractPlayer
Return values
TakenDamageData, KillResults?: array{DeadExp: int, LostCredits: int}}getModifiedAccuracyAgainstForcesUsingRandom()
protected
getModifiedAccuracyAgainstForcesUsingRandom(AbstractPlayer $weaponPlayer, Force $forces, int $random) : float
Parameters
- $weaponPlayer : AbstractPlayer
- $forces : Force
- $random : int
Return values
floatgetModifiedAccuracyAgainstPlanetUsingRandom()
protected
getModifiedAccuracyAgainstPlanetUsingRandom(AbstractPlayer $weaponPlayer, Planet $planet, int $random) : float
Parameters
- $weaponPlayer : AbstractPlayer
- $planet : Planet
- $random : int
Return values
floatgetModifiedAccuracyAgainstPlayerUsingRandom()
protected
getModifiedAccuracyAgainstPlayerUsingRandom(AbstractPlayer $weaponPlayer, AbstractPlayer $targetPlayer, int $random) : float
Parameters
- $weaponPlayer : AbstractPlayer
- $targetPlayer : AbstractPlayer
- $random : int
Return values
floatgetModifiedAccuracyAgainstPortUsingRandom()
protected
getModifiedAccuracyAgainstPortUsingRandom(AbstractPlayer $weaponPlayer, Port $port, int $random) : float
Parameters
- $weaponPlayer : AbstractPlayer
- $port : Port
- $random : int
Return values
floatgetModifiedForceAccuracyAgainstPlayerUsingRandom()
protected
getModifiedForceAccuracyAgainstPlayerUsingRandom(Force $forces, AbstractPlayer $targetPlayer, int $random) : float
Parameters
- $forces : Force
- $targetPlayer : AbstractPlayer
- $random : int
Return values
floatgetModifiedPlanetAccuracyAgainstPlayer()
protected
getModifiedPlanetAccuracyAgainstPlayer(Planet $planet, AbstractPlayer $targetPlayer) : float
Parameters
- $planet : Planet
- $targetPlayer : AbstractPlayer
Return values
floatgetModifiedPortAccuracyAgainstPlayer()
protected
getModifiedPortAccuracyAgainstPlayer(Port $port, AbstractPlayer $targetPlayer) : float
Parameters
- $port : Port
- $targetPlayer : AbstractPlayer