@paintswap/estfor-definitions 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,180 +0,0 @@
1
- export enum BoostType {
2
- NONE,
3
- ANY_XP,
4
- COMBAT_XP,
5
- NON_COMBAT_XP,
6
- GATHERING,
7
- ABSENCE,
8
- }
9
-
10
- export enum Skill {
11
- NONE,
12
- COMBAT,
13
- ATTACK,
14
- RANGE,
15
- MAGIC,
16
- DEFENCE,
17
- HEALTH,
18
- MINING,
19
- WOODCUTTING,
20
- FISHING,
21
- SMITHING,
22
- THIEVING,
23
- CRAFTING,
24
- COOKING,
25
- FIREMAKING,
26
- }
27
-
28
- export enum EquipPosition {
29
- NONE,
30
- HEAD,
31
- NECK,
32
- BODY,
33
- ARMS,
34
- LEGS,
35
- BOOTS,
36
- SPARE1,
37
- SPARE2,
38
- LEFT_HAND,
39
- RIGHT_HAND,
40
- BOTH_HANDS,
41
- ARROW_SATCHEL,
42
- MAGIC_BAG,
43
- FOOD,
44
- AUX, // wood, seeds etc..
45
- BOOST_VIAL,
46
- NO_POSITION,
47
- }
48
-
49
- export class Attire {
50
- helmet: i32 = 0
51
- amulet: i32 = 0
52
- armor: i32 = 0
53
- gauntlets: i32 = 0
54
- tassets: i32 = 0
55
- boots: i32 = 0
56
- ring: i32 = 0
57
- reserved1: i32 = 0
58
- queueId: i64 = 0
59
- }
60
-
61
- export enum ActionQueueStatus {
62
- NONE,
63
- APPEND,
64
- KEEP_LAST_IN_PROGRESS,
65
- }
66
-
67
- export enum CombatStyle {
68
- NONE,
69
- MELEE,
70
- RANGE,
71
- MAGIC,
72
- MELEE_DEFENCE,
73
- RANGE_DEFENCE,
74
- MAGIC_DEFENCE,
75
- }
76
-
77
- export class Equipment {
78
- itemTokenId: i32 = 0
79
- amount: i32 = 0
80
- }
81
-
82
- export class QueuedAction {
83
- attire: Attire = new Attire()
84
- actionId: i32 = 0
85
- regenerateId: i32 = 0 // Food (combat), maybe something for non-combat later
86
- choiceId: i32 = 0 // Melee/Arrow/Magic (combat), logs, ore (non-combat)
87
- choiceId1: i32 = 0 // Reserved (TBD)
88
- choiceId2: i32 = 0 // Reserved (TBD)
89
- combatStyle: CombatStyle = CombatStyle.NONE
90
- timespan: i32 = 0 // How long to queue the action for
91
- rightHandEquipmentTokenId: i32 = 0
92
- leftHandEquipmentTokenId: i32 = 0
93
- startTime: string = '0' // Filled in by the smart contract, can be "0"
94
- isValid: boolean = true // If we still have the item, TODO: Not used yet
95
- }
96
-
97
- export class ActionInfo {
98
- skill: Skill = Skill.NONE
99
- isAvailable: boolean = true
100
- isDynamic: boolean = false
101
- actionChoiceRequired: boolean = false
102
- xpPerHour: i32 = 0
103
- numSpawn: i32 = 0
104
- minSkillPoints: i32 = 0
105
- handItemTokenIdRangeMin: i32 = 0
106
- handItemTokenIdRangeMax: i32 = 0
107
- }
108
-
109
- export class ActionReward {
110
- itemTokenId: i32 = 0
111
- rate: i32 = 0 // base 100, 2 decimal places
112
- }
113
-
114
- export class Action {
115
- actionId: i32 = 0
116
- info: ActionInfo = new ActionInfo()
117
- guaranteedRewards: ActionReward[] = []
118
- randomRewards: ActionReward[] = []
119
- combatStats: CombatStats = new CombatStats()
120
- }
121
-
122
- // Contains everything you need to create an item
123
- export class InputItem {
124
- combatStats: CombatStats = new CombatStats()
125
- nonCombatStats: NonCombatStats = new NonCombatStats()
126
- tokenId: i32 = 0
127
- equipPosition: EquipPosition = EquipPosition.NONE
128
- // Can this be transferred to another player?
129
- isTransferable: boolean = true
130
- // Minimum requirements in this skill
131
- skill: Skill = Skill.NONE
132
- minSkillPoints: i32 = 0
133
- // Food
134
- healthRestored: i32 = 0
135
- // Boost
136
- boostType: BoostType = BoostType.NONE
137
- boostValue: i32 = 0 // Varies, could be the % increase
138
- boostDuration: i32 = 0 // How long the effect of the boost last
139
- // uri
140
- metadataURI: string = ''
141
- }
142
-
143
- export class CombatStats {
144
- melee: i32 = 0
145
- magic: i32 = 0
146
- range: i32 = 0
147
- meleeDefence: i32 = 0
148
- magicDefence: i32 = 0
149
- rangeDefence: i32 = 0
150
- health: i32 = 0
151
- }
152
-
153
- export class NonCombatStats {
154
- skill: Skill = Skill.NONE
155
- diff: i32 = 0
156
- }
157
-
158
- export const emptyCombatStats = new CombatStats()
159
- export const emptyNonCombatStats = new NonCombatStats()
160
- export const defaultInputItem = new InputItem()
161
- export const noAttire = new Attire()
162
-
163
- export class PendingOutput {
164
- consumed: Equipment[] = []
165
- produced: Equipment[] = []
166
- producedPastRandomRewards: Equipment[] = []
167
- producedXPRewards: Equipment[] = []
168
- died: boolean = false
169
- }
170
-
171
- export class PendingFlags {
172
- includeLoot: boolean = true // Guaranteed loot from actions, and random loot if claiming quite late
173
- includePastRandomRewards: boolean = true // This is random loot from previous actions
174
- includeXPRewards: boolean = true // Passing any xp thresholds gives you extra rewards
175
- }
176
-
177
- export class XPThresholdReward {
178
- xpThreshold: i32 = 0
179
- equipments: Equipment[] = []
180
- }
package/tsconfig.json DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "extends": "assemblyscript/std/assembly",
3
- "include": ["src/**/*", "index.ts"]
4
- }