Mines
extends AbstractWeapon
in package
uses
ForcesTrait
Table of Contents
Constants
- DCS_DAMAGE_MODIFIER : float = 0.75
- FED_SHIP_DAMAGE_MODIFIER : float = 0.5
- PLANET_DAMAGE_MOD : float = 0.2
- Reduce the damage done to planets by this factor
- TOTAL_ENEMY_MINES_MODIFIER : float = 25
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
- getModifiedDamageAgainstTarget() : WeaponDamage
- getModifiedForceAccuracyAgainstPlayer() : float
- getName() : string
- getShieldDamage() : int
- isDamageRollover() : bool
- shoot() : HitWeaponResult<string|int, Ship>
- hitTarget() : HitWeaponResult<string|int, TTarget>
- Applies this weapon's modified damage and resolves a killing shot, if any.
- hitShipTarget() : HitWeaponResult<string|int, Ship>
Constants
DCS_DAMAGE_MODIFIER
protected
float
DCS_DAMAGE_MODIFIER
= 0.75
FED_SHIP_DAMAGE_MODIFIER
protected
float
FED_SHIP_DAMAGE_MODIFIER
= 0.5
PLANET_DAMAGE_MOD
Reduce the damage done to planets by this factor
protected
float
PLANET_DAMAGE_MOD
= 0.2
TOTAL_ENEMY_MINES_MODIFIER
protected
float
TOTAL_ENEMY_MINES_MODIFIER
= 25
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 $numberOfMines) : mixed
Parameters
- $numberOfMines : int
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
WeaponDamagegetModifiedDamageAgainstTarget()
public
getModifiedDamageAgainstTarget(CombatantInterface $shooter, CombatantInterface $target[, bool $minesAreAttacker = false ]) : WeaponDamage
Parameters
- $shooter : CombatantInterface
- $target : CombatantInterface
- $minesAreAttacker : bool = false
Return values
WeaponDamagegetModifiedForceAccuracyAgainstPlayer()
public
getModifiedForceAccuracyAgainstPlayer(Force $forces, Ship $target, bool $minesAreAttacker) : float
Parameters
Return values
floatgetName()
public
getName() : string
Return values
stringgetShieldDamage()
public
getShieldDamage() : int
Return values
intisDamageRollover()
public
isDamageRollover() : bool
Return values
boolshoot()
public
shoot(WeaponShotAtCombatant<string|int, Ship> $shot[, bool $minesAreAttacker = false ]) : HitWeaponResult<string|int, Ship>
Parameters
- $shot : WeaponShotAtCombatant<string|int, Ship>
- $minesAreAttacker : bool = false
Return values
HitWeaponResult<string|int, Ship>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>
Tags
Return values
HitWeaponResult<string|int, TTarget>hitShipTarget()
private
hitShipTarget(WeaponShotAtCombatant<string|int, Ship> $shot[, bool $minesAreAttacker = false ]) : HitWeaponResult<string|int, Ship>
Parameters
- $shot : WeaponShotAtCombatant<string|int, Ship>
- $minesAreAttacker : bool = false