This type represents data, which are created from action parameters in order to obfuscate the meaning of this action to the contract
Hashed parameters of the action. This hash is sent to the contract in the commit phase, and later, when the action should be executed, the contract must receive full action parameters (and the nonce), which are hashed to this exact value.
Random 256bit number, which were used for the creation of the hash, and must be sent to the contract later, in order to verify the action.
This function simulates contract's estimation of time, which is needed for player to recover from his attack attempt (successful or unsuccessful) and to be able to perform another action.
Player, for whom the estimation is being done
Position, on which the attack's target is standing
Number of blocks, which are needed for the player to recover from his attack attempt, or false
,
if the attack's target is not in the right distance for attack.
This function simulates contract's estimation of time, which is needed for player to get from his current location to the destination tile, possibly equipped with the given item.
Player, for whom the estimation is being done
Destination location, where the player is heading
Item, which is boosting player's moving skill, or undefined, if there isn't any
Number of blocks, which are needed for this player to get to the destination tile,
or false
, if the destination terrain is not walkable or it is too distant
This function simulates contract's estimation of time, which is needed for player to mine the resource on his current location, possibly equipped with the given item.
Player, for whom the estimation is being done
Terrain type, which the player wants to mine
Item, which is boosting player's mining skill, or undefined, if there isn't any
Number of blocks, which are needed for this player to mine the resource given, or false
,
if this terrain type cannot be mined
Function returns current game phase and important schedule info, based on the given block number
Number of block for which the schedule info is demanded
Current game phase (INIT or GAME), block number when the last INIT phase has started, and number of blocks after which the phase should change
Function gets current block number from the blockchain, then calculates the last blocks which function as a seed for item spawning, and returns their hashes.
Current database context
Current API for communication with blockchain
Array of hashes of blocks, which is then used for checking, whether there are spawned items
Function returns item, which is spawned at the given location, according to the given hashes
X coordinate on the map
Y coordinate on the map
Array of block hashes (as returned by getHashesForItemSpawn), which are used for item spawning
Identifier of item currently spawned at the given location, or undefined if there isn't any
This function simulates contract's item spawning logic by getting the location on the map and hash of the block, and returning identifier of item currently spawned at that location
X coordinate on the map
Y coordinate on the map
Block hash
Identifier of item currently spawned at the given location according to the given hash, or undefined, when there is no spawned item
This function simulates contract's assigning of item stat to the item.
Type of stat which is demanded (0 = moving, 1 = mining, 2 = combat)
Item identifier in form of 256bit number
Item stat value as integer between 0 and 100
This function returns all item stats for the given item
Item identifier as string
Item stats for the given item
This function simulates contract's terrain generation by returning the terrain type at the given location, according to the given turn seed.
X coordinate on the map
Y coordinate on the map
Seed of current game turn, as returned by getTurnSeed
Terrain type at the given location
Function gets current turn seed, which is used for terrain generation.
Current database context
Seed of current game turn
Function compares number of current block and number of block, when the player registered for the last time, and returns whether he is registered in the current turn.
Block number, when the player registered himself
Current block number
True if the player is registered in current turn, false otherwise
Implementation of discrete 2D Perlin noise, converted from Solidity to TypeScript. Simulates contract's noise generation.
Implementation of discrete 3D Perlin noise, converted from Solidity to TypeScript. Simulates contract's noise generation.
This function takes parameters for the attack action, and returns it in an obfuscated form.
Player, which should be attacked by this action
Item, which is boosting player's combat skill, or undefined, if there isn't any
Obfuscated attack action
This function takes parameters for the goto action, and returns it in an obfuscated form.
Destination of the goto action
Item, which is boosting player's moving skill, or undefined, if there isn't any
Obfuscated goto action
This function takes parameters for the mine action, and returns it in an obfuscated form.
Item, which is boosting player's mining skill, or undefined, if there isn't any
Obfuscated mine action
This function simulates contract's reduction of numeric value (usually time) by player's skill. Value is unchanged if the skill is 0, and halved if the skill is 200.
Positive numeric value, representing usually time needed for the action
Player's skill, must be integer between 0 and 200
Initial value reduced by the skill
Generated using TypeDoc
This file contains mostly functions which simulates Solidity contract's logic client-side, and therefore reducing the network capacity load.