Documentation

Force
in package

Table of Contents

Constants

LOWEST_MAX_EXPIRE_SCOUTS_ONLY  = 432000
MAX_CDS  = 50
MAX_MINES  = 50
MAX_SDS  = 5
REFRESH_ALL_TIME_PER_STACK  = 1
SQL  = 'game_id = :game_id AND sector_id = :sector_id AND owner_id = :owner_id'
TIME_PER_SCOUT_ONLY  = 86400
TIME_PERCENT_PER_COMBAT  = 0.02
TIME_PERCENT_PER_MINE  = 0.02
TIME_PERCENT_PER_SCOUT  = 0.02

Properties

$CACHE_FORCES  : array<int, array<int, array<int, self>>>
$CACHE_SECTOR_FORCES  : array<int, array<int, array<int, self>>>
$combatDrones  : int
$expire  : int
$gameID  : int
$hasChanged  : bool
$isNew  : bool
$mines  : int
$ownerID  : int
$scoutDrones  : int
$sectorID  : int
$SQLID  : array{game_id: int, sector_id: int, owner_id: int}
$TIDIED_UP  : array<int, array<int, bool>>

Methods

__sleep()  : mixed
addCDs()  : void
addMines()  : void
addSDs()  : void
clearCache()  : void
exists()  : bool
getAttackForcesHREF()  : string
getAttackTurnCost()  : int
getBumpTurnCost()  : int
getCDs()  : int
getDropCDHREF()  : string
getDropMineHREF()  : string
getDropSDHREF()  : string
getExamineDropForcesHREF()  : string
getExpire()  : int
getForce()  : self
getGalaxy()  : Galaxy
getGalaxyForces()  : array<int, array<int, self>>
getGameID()  : int
getMaxExpireTime()  : int
getMaxGalaxyExpireTime()  : int
getMines()  : int
getOwner()  : AbstractPlayer
getOwnerID()  : int
getRefreshAllHREF()  : string
getRefreshHREF()  : string
getSDs()  : int
getSector()  : Sector
getSectorForces()  : array<int, self>
getSectorID()  : int
getTakeCDHREF()  : string
getTakeMineHREF()  : string
getTakeSDHREF()  : string
hasCDs()  : bool
hasExpired()  : bool
hasMaxCDs()  : bool
hasMaxMines()  : bool
hasMaxSDs()  : bool
hasMines()  : bool
hasSDs()  : bool
killForcesByPlayer()  : array{}
ping()  : void
saveForces()  : void
setCDs()  : void
setExpire()  : void
setMines()  : void
setSDs()  : void
shootPlayers()  : ForceCombatResults
takeCDs()  : void
takeDamage()  : ForceTakenDamageData
takeMines()  : void
takeSDs()  : void
tidyUpForces()  : void
update()  : void
updateExpire()  : void
updateRefreshAll()  : void
Update the table fields associated with using Refresh All
__construct()  : mixed
takeDamageToCDs()  : int
Returns the number of CDs destroyed
takeDamageToMines()  : int
Returns the number of mines destroyed
takeDamageToSDs()  : int
Returns the number of SDs destroyed

Constants

LOWEST_MAX_EXPIRE_SCOUTS_ONLY

public mixed LOWEST_MAX_EXPIRE_SCOUTS_ONLY = 432000

MAX_CDS

public mixed MAX_CDS = 50

MAX_MINES

public mixed MAX_MINES = 50

MAX_SDS

public mixed MAX_SDS = 5

REFRESH_ALL_TIME_PER_STACK

public mixed REFRESH_ALL_TIME_PER_STACK = 1

SQL

public mixed SQL = 'game_id = :game_id AND sector_id = :sector_id AND owner_id = :owner_id'

TIME_PER_SCOUT_ONLY

protected mixed TIME_PER_SCOUT_ONLY = 86400

TIME_PERCENT_PER_COMBAT

protected mixed TIME_PERCENT_PER_COMBAT = 0.02

TIME_PERCENT_PER_MINE

protected mixed TIME_PERCENT_PER_MINE = 0.02

TIME_PERCENT_PER_SCOUT

protected mixed TIME_PERCENT_PER_SCOUT = 0.02

Properties

$CACHE_FORCES

protected static array<int, array<int, array<int, self>>> $CACHE_FORCES = []

$CACHE_SECTOR_FORCES

protected static array<int, array<int, array<int, self>>> $CACHE_SECTOR_FORCES = []

$combatDrones

protected int $combatDrones = 0

$expire

protected int $expire = 0

$gameID read-only

protected int $gameID

$hasChanged

protected bool $hasChanged = false

$isNew

protected bool $isNew = true

$mines

protected int $mines = 0

$ownerID read-only

protected int $ownerID

$scoutDrones

protected int $scoutDrones = 0

$sectorID read-only

protected int $sectorID

$SQLID read-only

protected array{game_id: int, sector_id: int, owner_id: int} $SQLID

$TIDIED_UP

protected static array<int, array<int, bool>> $TIDIED_UP = []

Methods

__sleep()

public __sleep() : mixed

addCDs()

public addCDs(int $amount) : void
Parameters
$amount : int

addMines()

public addMines(int $amount) : void
Parameters
$amount : int

addSDs()

public addSDs(int $amount) : void
Parameters
$amount : int

clearCache()

public static clearCache() : void

exists()

public exists() : bool
Return values
bool

getAttackForcesHREF()

public getAttackForcesHREF() : string
Return values
string

getCDs()

public getCDs() : int
Return values
int

getDropCDHREF()

public getDropCDHREF() : string
Return values
string

getDropMineHREF()

public getDropMineHREF() : string
Return values
string

getDropSDHREF()

public getDropSDHREF() : string
Return values
string

getExamineDropForcesHREF()

public getExamineDropForcesHREF() : string
Return values
string

getExpire()

public getExpire() : int
Return values
int

getForce()

public static getForce(int $gameID, int $sectorID, int $ownerID[, bool $forceUpdate = false ][, DatabaseRecord $dbRecord = null ]) : self
Parameters
$gameID : int
$sectorID : int
$ownerID : int
$forceUpdate : bool = false
$dbRecord : DatabaseRecord = null
Return values
self

getGalaxyForces()

public static getGalaxyForces(int $gameID, int $galaxyID[, bool $forceUpdate = false ]) : array<int, array<int, self>>
Parameters
$gameID : int
$galaxyID : int
$forceUpdate : bool = false
Return values
array<int, array<int, self>>

getGameID()

public getGameID() : int
Return values
int

getMaxExpireTime()

public getMaxExpireTime() : int
Return values
int

getMaxGalaxyExpireTime()

public getMaxGalaxyExpireTime() : int
Return values
int

getMines()

public getMines() : int
Return values
int

getOwnerID()

public getOwnerID() : int
Return values
int

getRefreshAllHREF()

public static getRefreshAllHREF() : string
Return values
string

getRefreshHREF()

public getRefreshHREF() : string
Return values
string

getSDs()

public getSDs() : int
Return values
int

getSectorForces()

public static getSectorForces(int $gameID, int $sectorID[, bool $forceUpdate = false ]) : array<int, self>
Parameters
$gameID : int
$sectorID : int
$forceUpdate : bool = false
Return values
array<int, self>

getSectorID()

public getSectorID() : int
Return values
int

getTakeCDHREF()

public getTakeCDHREF() : string
Return values
string

getTakeMineHREF()

public getTakeMineHREF() : string
Return values
string

getTakeSDHREF()

public getTakeSDHREF() : string
Return values
string

hasCDs()

public hasCDs() : bool
Return values
bool

hasExpired()

public hasExpired() : bool
Return values
bool

hasMaxCDs()

public hasMaxCDs() : bool
Return values
bool

hasMaxMines()

public hasMaxMines() : bool
Return values
bool

hasMaxSDs()

public hasMaxSDs() : bool
Return values
bool

hasMines()

public hasMines() : bool
Return values
bool

hasSDs()

public hasSDs() : bool
Return values
bool

ping()

public ping(string $pingMessage, AbstractPlayer $playerPinging[, bool $skipCheck = false ]) : void
Parameters
$pingMessage : string
$playerPinging : AbstractPlayer
$skipCheck : bool = false

saveForces()

public static saveForces() : void

setCDs()

public setCDs(int $amount) : void
Parameters
$amount : int

setExpire()

public setExpire(int $time) : void
Parameters
$time : int

setMines()

public setMines(int $amount) : void
Parameters
$amount : int

setSDs()

public setSDs(int $amount) : void
Parameters
$amount : int

shootPlayers()

public shootPlayers(array<string|int, AbstractPlayer$targetPlayers, bool $minesAreAttacker) : ForceCombatResults
Parameters
$targetPlayers : array<string|int, AbstractPlayer>
$minesAreAttacker : bool
Return values
ForceCombatResults

takeCDs()

public takeCDs(int $amount) : void
Parameters
$amount : int

takeDamage()

public takeDamage(WeaponDamageData $damage) : ForceTakenDamageData
Parameters
$damage : WeaponDamageData
Return values
ForceTakenDamageData

takeMines()

public takeMines(int $amount) : void
Parameters
$amount : int

takeSDs()

public takeSDs(int $amount) : void
Parameters
$amount : int

tidyUpForces()

public static tidyUpForces(Galaxy $galaxyToTidy) : void
Parameters
$galaxyToTidy : Galaxy

update()

public update() : void

updateExpire()

public updateExpire() : void

updateRefreshAll()

Update the table fields associated with using Refresh All

public updateRefreshAll(AbstractPlayer $player, int $refreshTime) : void
Parameters
$player : AbstractPlayer
$refreshTime : int

__construct()

protected __construct(int $gameID, int $sectorID, int $ownerID[, DatabaseRecord $dbRecord = null ]) : mixed
Parameters
$gameID : int
$sectorID : int
$ownerID : int
$dbRecord : DatabaseRecord = null

takeDamageToCDs()

Returns the number of CDs destroyed

protected takeDamageToCDs(int $damage) : int
Parameters
$damage : int
Return values
int

takeDamageToMines()

Returns the number of mines destroyed

protected takeDamageToMines(int $damage) : int
Parameters
$damage : int
Return values
int

takeDamageToSDs()

Returns the number of SDs destroyed

protected takeDamageToSDs(int $damage) : int
Parameters
$damage : int
Return values
int

        
On this page

Search results