enefel 2.1.1 → 2.1.3
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/dist/package-lock.json +2 -2
- package/dist/package.json +1 -1
- package/dist/pitch.js +3 -2
- package/dist/skill.js +1 -1
- package/dist/types/models.d.ts +5 -4
- package/package.json +1 -1
- package/pitch.ts +4 -2
- package/skill.ts +1 -1
- package/types/models.ts +5 -4
package/dist/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "enefel",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "enefel",
|
|
9
|
-
"version": "2.1.
|
|
9
|
+
"version": "2.1.3",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"seedrandom": "3.0.5",
|
package/dist/package.json
CHANGED
package/dist/pitch.js
CHANGED
|
@@ -28,14 +28,15 @@ var TILES;
|
|
|
28
28
|
TILES["LATERALB2"] = "i";
|
|
29
29
|
TILES["NEUTRAL"] = "a";
|
|
30
30
|
})(TILES || (exports.TILES = TILES = {}));
|
|
31
|
+
const debugCoordinates = false;
|
|
31
32
|
function coordinatesConvertorY(y, isDev = false) {
|
|
32
|
-
if (isDev) {
|
|
33
|
+
if (debugCoordinates && isDev) {
|
|
33
34
|
return y;
|
|
34
35
|
}
|
|
35
36
|
return y < 0 ? y : String.fromCharCode(y + 65);
|
|
36
37
|
}
|
|
37
38
|
function coordinatesConvertorX(x, isDev = false) {
|
|
38
|
-
if (isDev) {
|
|
39
|
+
if (debugCoordinates && isDev) {
|
|
39
40
|
return x;
|
|
40
41
|
}
|
|
41
42
|
return x + 1;
|
package/dist/skill.js
CHANGED
|
@@ -224,7 +224,7 @@ function useSkill(player, skillId, date = -1, info = null) {
|
|
|
224
224
|
date === -1
|
|
225
225
|
? new Date(Date.now() + (0, time_1.getTime)(time_1.TYPE_TIMER.ACTION) * 1000)
|
|
226
226
|
: date;
|
|
227
|
-
skill.info = info
|
|
227
|
+
skill.info = info;
|
|
228
228
|
}
|
|
229
229
|
function getSkill(player, skillId, info = null) {
|
|
230
230
|
if (!SKILLS.hasOwnProperty(skillId)) {
|
package/dist/types/models.d.ts
CHANGED
|
@@ -119,6 +119,7 @@ export interface Player extends Point {
|
|
|
119
119
|
prevX: number | null;
|
|
120
120
|
prevY: number | null;
|
|
121
121
|
hasEndTurn: boolean;
|
|
122
|
+
canUseMightyBlow?: boolean;
|
|
122
123
|
}
|
|
123
124
|
export interface PlayerWithSkill extends Player {
|
|
124
125
|
skills: PlayerSkill[];
|
|
@@ -224,10 +225,10 @@ export interface PlayerSkill {
|
|
|
224
225
|
date_next: Date | null;
|
|
225
226
|
player_id: string;
|
|
226
227
|
skill_id: string;
|
|
227
|
-
info: string;
|
|
228
|
-
active: string;
|
|
229
|
-
duration: number;
|
|
230
|
-
data: string;
|
|
228
|
+
info: string | null;
|
|
229
|
+
active: string | null;
|
|
230
|
+
duration: number | null;
|
|
231
|
+
data: string | null;
|
|
231
232
|
createdAt: Date;
|
|
232
233
|
updatedAt: Date;
|
|
233
234
|
}
|
package/package.json
CHANGED
package/pitch.ts
CHANGED
|
@@ -16,15 +16,17 @@ enum TILES {
|
|
|
16
16
|
NEUTRAL = "a",
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
const debugCoordinates = false;
|
|
20
|
+
|
|
19
21
|
function coordinatesConvertorY(y: number, isDev = false) {
|
|
20
|
-
if (isDev) {
|
|
22
|
+
if (debugCoordinates && isDev) {
|
|
21
23
|
return y;
|
|
22
24
|
}
|
|
23
25
|
return y < 0 ? y : String.fromCharCode(y + 65);
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
function coordinatesConvertorX(x: number, isDev = false) {
|
|
27
|
-
if (isDev) {
|
|
29
|
+
if (debugCoordinates && isDev) {
|
|
28
30
|
return x;
|
|
29
31
|
}
|
|
30
32
|
return x + 1;
|
package/skill.ts
CHANGED
package/types/models.ts
CHANGED
|
@@ -123,6 +123,7 @@ export interface Player extends Point {
|
|
|
123
123
|
prevX: number | null; // add by Game
|
|
124
124
|
prevY: number | null; // add by Game
|
|
125
125
|
hasEndTurn: boolean; // add by Game
|
|
126
|
+
canUseMightyBlow?: boolean; // add by Game
|
|
126
127
|
}
|
|
127
128
|
|
|
128
129
|
export interface PlayerWithSkill extends Player {
|
|
@@ -237,10 +238,10 @@ export interface PlayerSkill {
|
|
|
237
238
|
date_next: Date | null;
|
|
238
239
|
player_id: string;
|
|
239
240
|
skill_id: string;
|
|
240
|
-
info: string;
|
|
241
|
-
active: string;
|
|
242
|
-
duration: number;
|
|
243
|
-
data: string;
|
|
241
|
+
info: string | null;
|
|
242
|
+
active: string | null;
|
|
243
|
+
duration: number | null;
|
|
244
|
+
data: string | null;
|
|
244
245
|
createdAt: Date;
|
|
245
246
|
updatedAt: Date;
|
|
246
247
|
}
|