-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdubhe.config.ts
47 lines (46 loc) · 1.53 KB
/
dubhe.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { DubheConfig } from '@0xobelisk/sui-common';
export const dubheConfig = {
name: 'constantinople',
description: 'constantinople contract',
data: {
MonsterType: ["None", "Eagle", "Rat", "Caterpillar"],
Direction: ["North", "East", "South", "West"],
TerrainType: ["None", "TallGrass", "Boulder"],
MonsterCatchResult: ["Missed", "Caught", "Fled"],
MapConfig: { width: "u64", height: "u64", terrain: "vector<vector<TerrainType>>" },
Position: { x: "u64", y: "u64" },
MonsterInfo: { monster: "address", catch_attempts: "u64" }
},
errors: {
CannotMove: "This entity cannot move",
AlreadyRegistered: "This address is already registered" ,
NotRegistered: "This address is not registered" ,
SpaceObstructed: "This space is obstructed",
NotInEncounter: "This player is not in an encounter"
},
events: {
MonsterCatchAttempt: {
player: 'address',
monster: 'address',
result: 'MonsterCatchResult',
}
},
schemas: {
entity: {
player: 'StorageMap<address, bool>',
monster: 'StorageMap<address, MonsterType>',
obstruction: 'StorageMap<address, bool>',
owned_by: 'StorageMap<address, vector<address>>',
encounterable: 'StorageMap<address, bool>',
moveable: 'StorageMap<address, bool>',
},
map: {
config: 'StorageValue<MapConfig>',
position: 'StorageMap<address, Position>',
},
encounter : {
monster_info: 'StorageMap<address, MonsterInfo>',
trigger: 'StorageMap<address, bool>',
},
},
} as DubheConfig;