$ npm install @projectsophon/gamelogicƬ ArtifactFileColor: Abstract<number, "ArtifactFileColor">
• ArtifactFileColor: Object
| Name | Type |
|---|---|
APP_BACKGROUND | ArtifactFileColor |
BLUE | ArtifactFileColor |
• Const RelicsList: ArtifactType[]
▸ artifactAvailableTimestamp(artifact): number
| Name | Type |
|---|---|
artifact | Artifact |
number
▸ artifactBiomeName(artifact): string
| Name | Type |
|---|---|
artifact | Artifact |
string
▸ artifactFileName(videoMode, thumb, artifact, color, debugProps?): string
| Name | Type | Default value |
|---|---|---|
videoMode | boolean | undefined |
thumb | boolean | undefined |
artifact | RenderedArtifact | undefined |
color | ArtifactFileColor | undefined |
debugProps | undefined | { forceAncient: boolean ; skipCaching: boolean } | undefined |
string
▸ artifactRoll(id): number
| Name | Type |
|---|---|
id | ArtifactId |
number
▸ biomeName(biome): string
| Name | Type |
|---|---|
biome | Biome |
string
▸ canActivateArtifact(artifact, planet, artifactsOnPlanet): undefined | boolean
| Name | Type |
|---|---|
artifact | Artifact |
planet | undefined | Planet |
artifactsOnPlanet | Artifact[] |
undefined | boolean
▸ canDepositArtifact(account, artifact, planet?): undefined | boolean
| Name | Type |
|---|---|
account | EthAddress |
artifact | Artifact |
planet? | Planet |
undefined | boolean
▸ canWithdrawArtifact(account, artifact, planet?): undefined | boolean
| Name | Type |
|---|---|
account | EthAddress |
artifact | Artifact |
planet? | Planet |
undefined | boolean
▸ dateMintedAt(artifact): string
| Name | Type |
|---|---|
artifact | undefined | Artifact |
string
▸ durationUntilArtifactAvailable(artifact): number
| Name | Type |
|---|---|
artifact | Artifact |
number
▸ formatNumber(num, smallDec?): string
| Name | Type | Default value |
|---|---|---|
num | number | undefined |
smallDec | number | 0 |
string
▸ getActivatedArtifact(artifacts): Artifact | undefined
| Name | Type |
|---|---|
artifacts | Artifact[] |
Artifact | undefined
▸ getActiveBlackDomain(artifacts): Artifact | undefined
| Name | Type |
|---|---|
artifacts | Artifact[] |
Artifact | undefined
▸ getArtifactDebugName(a?): string
| Name | Type |
|---|---|
a? | Artifact |
string
▸ getPlanetRank(planet): number
| Name | Type |
|---|---|
planet | undefined | Planet |
number
▸ getPlayerControlledSpaceships(artifacts, owner): (undefined | Artifact)[]
| Name | Type |
|---|---|
artifacts | undefined | (undefined | Artifact)[] |
owner | undefined | EthAddress |
(undefined | Artifact)[]
▸ getRange(planet, percentEnergySending?, rangeBoost?): number
Todo
| Name | Type | Default value | Description |
|---|---|---|---|
planet | Planet | undefined | - |
percentEnergySending | number | 100 | - |
rangeBoost | number | 1 | A multiplier to be applied to the resulting range. Currently used for calculating boost associated with abandoning a planet. |
number
▸ hasOwner(planet): boolean
| Name | Type |
|---|---|
planet | Planet |
boolean
▸ hasStatBoost(type): boolean
| Name | Type |
|---|---|
type | undefined | ArtifactType |
boolean
▸ isActivated(artifact): boolean
| Name | Type |
|---|---|
artifact | undefined | Artifact |
boolean
▸ isAncient(artifact): boolean
| Name | Type |
|---|---|
artifact | RenderedArtifact |
boolean
▸ isBasic(type): boolean
| Name | Type |
|---|---|
type | ArtifactType |
boolean
▸ isEmojiFlagMessage(planetMessage): planetMessage is PlanetMessage<EmojiFlagBody>
| Name | Type |
|---|---|
planetMessage | PlanetMessage<unknown> |
planetMessage is PlanetMessage<EmojiFlagBody>
▸ isLocatable(planet?): planet is LocatablePlanet
| Name | Type |
|---|---|
planet? | Planet |
planet is LocatablePlanet
▸ isRelic(type): boolean
| Name | Type |
|---|---|
type | ArtifactType |
boolean
▸ isSpaceShip(type): boolean
| Name | Type |
|---|---|
type | undefined | ArtifactType |
boolean
▸ levelFromRarity(rarity): PlanetLevel
| Name | Type |
|---|---|
rarity | ArtifactRarity |
PlanetLevel
▸ rarityName(rarity): string
| Name | Type |
|---|---|
rarity | ArtifactRarity |
string
▸ rarityNameFromArtifact(a): string
| Name | Type |
|---|---|
a | Artifact |
string
▸ setForceAncient(force): void
| Name | Type |
|---|---|
force | boolean |
void
▸ timeUntilNextBroadcastAvailable(lastRevealTimestamp, locationRevealCooldown): number
Gets the time (ms) until we can broadcast the coordinates of a planet.
| Name | Type |
|---|---|
lastRevealTimestamp | undefined | number |
locationRevealCooldown | number |
number