@paintswap/estfor-definitions 0.1.0
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.
- package/LICENSE +21 -0
- package/README.md +2 -0
- package/dist/estforConstants.d.ts +644 -0
- package/dist/estforConstants.js +706 -0
- package/dist/estforTypes.d.ts +115 -0
- package/dist/estforTypes.js +70 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +33 -0
- package/package.json +41 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
export declare enum BoostType {
|
|
2
|
+
NONE = 0,
|
|
3
|
+
ANY_XP = 1,
|
|
4
|
+
COMBAT_XP = 2,
|
|
5
|
+
NON_COMBAT_XP = 3,
|
|
6
|
+
GATHERING = 4,
|
|
7
|
+
ABSENCE = 5
|
|
8
|
+
}
|
|
9
|
+
export declare enum Skill {
|
|
10
|
+
NONE = 0,
|
|
11
|
+
COMBAT = 1,
|
|
12
|
+
ATTACK = 2,
|
|
13
|
+
RANGE = 3,
|
|
14
|
+
MAGIC = 4,
|
|
15
|
+
DEFENCE = 5,
|
|
16
|
+
HEALTH = 6,
|
|
17
|
+
MINING = 7,
|
|
18
|
+
WOODCUTTING = 8,
|
|
19
|
+
FISHING = 9,
|
|
20
|
+
SMITHING = 10,
|
|
21
|
+
THIEVING = 11,
|
|
22
|
+
CRAFTING = 12,
|
|
23
|
+
COOKING = 13,
|
|
24
|
+
FIREMAKING = 14
|
|
25
|
+
}
|
|
26
|
+
export declare enum EquipPosition {
|
|
27
|
+
HEAD = 0,
|
|
28
|
+
NECK = 1,
|
|
29
|
+
BODY = 2,
|
|
30
|
+
ARMS = 3,
|
|
31
|
+
LEGS = 4,
|
|
32
|
+
BOOTS = 5,
|
|
33
|
+
SPARE1 = 6,
|
|
34
|
+
SPARE2 = 7,
|
|
35
|
+
LEFT_HAND = 8,
|
|
36
|
+
RIGHT_HAND = 9,
|
|
37
|
+
BOTH_HANDS = 10,
|
|
38
|
+
NONE = 11,
|
|
39
|
+
ARROW_SATCHEL = 12,
|
|
40
|
+
MAGIC_BAG = 13,
|
|
41
|
+
FOOD = 14,
|
|
42
|
+
AUX = 15,
|
|
43
|
+
BOOST_VIAL = 16
|
|
44
|
+
}
|
|
45
|
+
export type Attire = {
|
|
46
|
+
helmet: number;
|
|
47
|
+
amulet: number;
|
|
48
|
+
armor: number;
|
|
49
|
+
gauntlets: number;
|
|
50
|
+
tassets: number;
|
|
51
|
+
boots: number;
|
|
52
|
+
ring: number;
|
|
53
|
+
reserved1: number;
|
|
54
|
+
queueId: number;
|
|
55
|
+
};
|
|
56
|
+
export type ActionInfo = {
|
|
57
|
+
skill: Skill;
|
|
58
|
+
isAvailable: boolean;
|
|
59
|
+
isDynamic: boolean;
|
|
60
|
+
actionChoiceRequired: boolean;
|
|
61
|
+
xpPerHour: number;
|
|
62
|
+
numSpawn: number;
|
|
63
|
+
minSkillPoints: number;
|
|
64
|
+
handItemTokenIdRangeMin: number;
|
|
65
|
+
handItemTokenIdRangeMax: number;
|
|
66
|
+
};
|
|
67
|
+
export type ActionReward = {
|
|
68
|
+
itemTokenId: number;
|
|
69
|
+
rate: number;
|
|
70
|
+
};
|
|
71
|
+
export type Action = {
|
|
72
|
+
info: ActionInfo;
|
|
73
|
+
guaranteedRewards: ActionReward[];
|
|
74
|
+
randomRewards: ActionReward[];
|
|
75
|
+
combatStats: CombatStats;
|
|
76
|
+
};
|
|
77
|
+
export type InputItem = {
|
|
78
|
+
combatStats: CombatStats;
|
|
79
|
+
nonCombatStats: NonCombatStat[];
|
|
80
|
+
tokenId: number;
|
|
81
|
+
equipPosition: EquipPosition;
|
|
82
|
+
isTransferable: boolean;
|
|
83
|
+
skill: Skill;
|
|
84
|
+
minSkillPoints: number;
|
|
85
|
+
healthRestored: number;
|
|
86
|
+
boostType: BoostType;
|
|
87
|
+
boostValue: number;
|
|
88
|
+
boostDuration: number;
|
|
89
|
+
metadataURI: string;
|
|
90
|
+
};
|
|
91
|
+
export type CombatStats = {
|
|
92
|
+
melee: number;
|
|
93
|
+
magic: number;
|
|
94
|
+
range: number;
|
|
95
|
+
meleeDefence: number;
|
|
96
|
+
magicDefence: number;
|
|
97
|
+
rangeDefence: number;
|
|
98
|
+
health: number;
|
|
99
|
+
};
|
|
100
|
+
export type NonCombatStat = {
|
|
101
|
+
skill: Skill;
|
|
102
|
+
diff: number;
|
|
103
|
+
};
|
|
104
|
+
export declare const emptyStats: CombatStats;
|
|
105
|
+
export declare const defaultInputItem: {
|
|
106
|
+
combatStats: CombatStats;
|
|
107
|
+
nonCombatStats: any[];
|
|
108
|
+
isTransferable: boolean;
|
|
109
|
+
skill: Skill;
|
|
110
|
+
minSkillPoints: number;
|
|
111
|
+
healthRestored: number;
|
|
112
|
+
boostType: BoostType;
|
|
113
|
+
boostValue: number;
|
|
114
|
+
boostDuration: number;
|
|
115
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultInputItem = exports.emptyStats = exports.EquipPosition = exports.Skill = exports.BoostType = void 0;
|
|
4
|
+
var BoostType;
|
|
5
|
+
(function (BoostType) {
|
|
6
|
+
BoostType[BoostType["NONE"] = 0] = "NONE";
|
|
7
|
+
BoostType[BoostType["ANY_XP"] = 1] = "ANY_XP";
|
|
8
|
+
BoostType[BoostType["COMBAT_XP"] = 2] = "COMBAT_XP";
|
|
9
|
+
BoostType[BoostType["NON_COMBAT_XP"] = 3] = "NON_COMBAT_XP";
|
|
10
|
+
BoostType[BoostType["GATHERING"] = 4] = "GATHERING";
|
|
11
|
+
BoostType[BoostType["ABSENCE"] = 5] = "ABSENCE";
|
|
12
|
+
})(BoostType = exports.BoostType || (exports.BoostType = {}));
|
|
13
|
+
var Skill;
|
|
14
|
+
(function (Skill) {
|
|
15
|
+
Skill[Skill["NONE"] = 0] = "NONE";
|
|
16
|
+
Skill[Skill["COMBAT"] = 1] = "COMBAT";
|
|
17
|
+
Skill[Skill["ATTACK"] = 2] = "ATTACK";
|
|
18
|
+
Skill[Skill["RANGE"] = 3] = "RANGE";
|
|
19
|
+
Skill[Skill["MAGIC"] = 4] = "MAGIC";
|
|
20
|
+
Skill[Skill["DEFENCE"] = 5] = "DEFENCE";
|
|
21
|
+
Skill[Skill["HEALTH"] = 6] = "HEALTH";
|
|
22
|
+
Skill[Skill["MINING"] = 7] = "MINING";
|
|
23
|
+
Skill[Skill["WOODCUTTING"] = 8] = "WOODCUTTING";
|
|
24
|
+
Skill[Skill["FISHING"] = 9] = "FISHING";
|
|
25
|
+
Skill[Skill["SMITHING"] = 10] = "SMITHING";
|
|
26
|
+
Skill[Skill["THIEVING"] = 11] = "THIEVING";
|
|
27
|
+
Skill[Skill["CRAFTING"] = 12] = "CRAFTING";
|
|
28
|
+
Skill[Skill["COOKING"] = 13] = "COOKING";
|
|
29
|
+
Skill[Skill["FIREMAKING"] = 14] = "FIREMAKING";
|
|
30
|
+
})(Skill = exports.Skill || (exports.Skill = {}));
|
|
31
|
+
var EquipPosition;
|
|
32
|
+
(function (EquipPosition) {
|
|
33
|
+
EquipPosition[EquipPosition["HEAD"] = 0] = "HEAD";
|
|
34
|
+
EquipPosition[EquipPosition["NECK"] = 1] = "NECK";
|
|
35
|
+
EquipPosition[EquipPosition["BODY"] = 2] = "BODY";
|
|
36
|
+
EquipPosition[EquipPosition["ARMS"] = 3] = "ARMS";
|
|
37
|
+
EquipPosition[EquipPosition["LEGS"] = 4] = "LEGS";
|
|
38
|
+
EquipPosition[EquipPosition["BOOTS"] = 5] = "BOOTS";
|
|
39
|
+
EquipPosition[EquipPosition["SPARE1"] = 6] = "SPARE1";
|
|
40
|
+
EquipPosition[EquipPosition["SPARE2"] = 7] = "SPARE2";
|
|
41
|
+
EquipPosition[EquipPosition["LEFT_HAND"] = 8] = "LEFT_HAND";
|
|
42
|
+
EquipPosition[EquipPosition["RIGHT_HAND"] = 9] = "RIGHT_HAND";
|
|
43
|
+
EquipPosition[EquipPosition["BOTH_HANDS"] = 10] = "BOTH_HANDS";
|
|
44
|
+
EquipPosition[EquipPosition["NONE"] = 11] = "NONE";
|
|
45
|
+
EquipPosition[EquipPosition["ARROW_SATCHEL"] = 12] = "ARROW_SATCHEL";
|
|
46
|
+
EquipPosition[EquipPosition["MAGIC_BAG"] = 13] = "MAGIC_BAG";
|
|
47
|
+
EquipPosition[EquipPosition["FOOD"] = 14] = "FOOD";
|
|
48
|
+
EquipPosition[EquipPosition["AUX"] = 15] = "AUX";
|
|
49
|
+
EquipPosition[EquipPosition["BOOST_VIAL"] = 16] = "BOOST_VIAL";
|
|
50
|
+
})(EquipPosition = exports.EquipPosition || (exports.EquipPosition = {}));
|
|
51
|
+
exports.emptyStats = {
|
|
52
|
+
melee: 0,
|
|
53
|
+
magic: 0,
|
|
54
|
+
range: 0,
|
|
55
|
+
meleeDefence: 0,
|
|
56
|
+
magicDefence: 0,
|
|
57
|
+
rangeDefence: 0,
|
|
58
|
+
health: 0,
|
|
59
|
+
};
|
|
60
|
+
exports.defaultInputItem = {
|
|
61
|
+
combatStats: exports.emptyStats,
|
|
62
|
+
nonCombatStats: [],
|
|
63
|
+
isTransferable: true,
|
|
64
|
+
skill: Skill.NONE,
|
|
65
|
+
minSkillPoints: 0,
|
|
66
|
+
healthRestored: 0,
|
|
67
|
+
boostType: BoostType.NONE,
|
|
68
|
+
boostValue: 0,
|
|
69
|
+
boostDuration: 0,
|
|
70
|
+
};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.EstforConstants = exports.EstforTypes = exports.NONE = void 0;
|
|
30
|
+
var estforConstants_1 = require("./estforConstants");
|
|
31
|
+
Object.defineProperty(exports, "NONE", { enumerable: true, get: function () { return __importDefault(estforConstants_1).default; } });
|
|
32
|
+
exports.EstforTypes = __importStar(require("./estforTypes"));
|
|
33
|
+
exports.EstforConstants = __importStar(require("./estforConstants"));
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@paintswap/estfor-definitions",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Types and constants for Estfor",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/PaintSwap/estfor-definitions.git"
|
|
8
|
+
},
|
|
9
|
+
"main": "dist/lib/index.js",
|
|
10
|
+
"types": "dist/lib/index.d.ts",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"estfor",
|
|
13
|
+
"paintswap",
|
|
14
|
+
"game",
|
|
15
|
+
"web3",
|
|
16
|
+
"ts",
|
|
17
|
+
"js",
|
|
18
|
+
"library"
|
|
19
|
+
],
|
|
20
|
+
"files": [
|
|
21
|
+
"dist/**/*"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "run-script-os",
|
|
25
|
+
"build:windows": "rd /s/q dist && tsc",
|
|
26
|
+
"build:default": "rm -rf ./dist/* && tsc",
|
|
27
|
+
"prepare": "yarn build",
|
|
28
|
+
"version": "yarn format:write && git add -A src",
|
|
29
|
+
"postversion": "git push && git push --tags"
|
|
30
|
+
},
|
|
31
|
+
"author": "Paintswap Team",
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"bugs": {
|
|
34
|
+
"url": "https://github.com/PaintSwap/estfor-definitions/issues"
|
|
35
|
+
},
|
|
36
|
+
"homepage": "https://github.com/PaintSwap/estfor-definitions",
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"run-script-os": "^1.1.6",
|
|
39
|
+
"typescript": "^4.9.5"
|
|
40
|
+
}
|
|
41
|
+
}
|