CombatDrones
extends AbstractWeapon
in package
uses
ForcesTrait
Table of Contents
Constants
- MAX_CDS_RAND : int = 54
- MIN_CDS_RAND : int = 3
- PLANET_DAMAGE_MOD : float = 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
- canShootTarget() : bool
- getAmount() : int
- Returns the amount of this type of force.
- getArmourDamage() : int
- getBaseAccuracy() : int
- getDamage() : WeaponDamage
- getModifiedAccuracyAgainstTarget() : float
- getModifiedDamageAgainstTarget() : WeaponDamage
- getName() : string
- getShieldDamage() : int
- isDamageRollover() : bool
- shoot() : HitWeaponResult<string|int, TTarget>
- hitTarget() : HitWeaponResult<string|int, TTarget>
- Applies this weapon's modified damage and resolves a killing shot, if any.
Constants
MAX_CDS_RAND
protected
int
MAX_CDS_RAND
= 54
MIN_CDS_RAND
protected
int
MIN_CDS_RAND
= 3
PLANET_DAMAGE_MOD
Reduce the damage done to planets by this factor
protected
float
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
canShootTarget()
public
canShootTarget(CombatantInterface $target) : bool
Parameters
- $target : CombatantInterface
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() : WeaponDamage
Return values
WeaponDamagegetModifiedAccuracyAgainstTarget()
public
getModifiedAccuracyAgainstTarget(CombatantInterface $shooter, CombatantInterface $target) : float
Parameters
- $shooter : CombatantInterface
- $target : CombatantInterface
Return values
floatgetModifiedDamageAgainstTarget()
public
getModifiedDamageAgainstTarget(CombatantInterface $shooter, CombatantInterface $target) : WeaponDamage
Parameters
- $shooter : CombatantInterface
- $target : CombatantInterface
Return values
WeaponDamagegetName()
public
getName() : string
Return values
stringgetShieldDamage()
public
getShieldDamage() : int
Return values
intisDamageRollover()
public
isDamageRollover() : bool
Return values
boolshoot()
public
shoot(WeaponShotAtCombatant<string|int, TTarget> $shot) : HitWeaponResult<string|int, TTarget>
Parameters
- $shot : WeaponShotAtCombatant<string|int, TTarget>
Tags
Return values
HitWeaponResult<string|int, TTarget>hitTarget()
Applies this weapon's modified damage and resolves a killing shot, if any.
protected
hitTarget(WeaponShotAtCombatant<string|int, TTarget> $shot) : HitWeaponResult<string|int, TTarget>
Parameters
- $shot : WeaponShotAtCombatant<string|int, TTarget>