@reldens/game-data-generator 0.6.0 → 0.8.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.
|
@@ -51,7 +51,7 @@ class AttributesPerLevel extends GameDataGenerator
|
|
|
51
51
|
await this.fileHandler.writeFile(
|
|
52
52
|
this.fileHandler.joinPaths(this.generateFolderPath, this.jsonFileName),
|
|
53
53
|
JSON.stringify({
|
|
54
|
-
|
|
54
|
+
statsByVariation: this.generateAttributesData(),
|
|
55
55
|
typeScaleFactorRandom: this.typeScaleFactorRandom
|
|
56
56
|
})
|
|
57
57
|
);
|
|
@@ -60,20 +60,20 @@ class AttributesPerLevel extends GameDataGenerator
|
|
|
60
60
|
|
|
61
61
|
generateAttributesData()
|
|
62
62
|
{
|
|
63
|
-
for
|
|
64
|
-
this.variations[
|
|
65
|
-
this.generateVariation(
|
|
63
|
+
for(let variationType of Object.keys(this.typesVariations)){
|
|
64
|
+
this.variations[variationType] = {};
|
|
65
|
+
this.generateVariation(variationType);
|
|
66
66
|
}
|
|
67
67
|
return this.variations;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
generateVariation(
|
|
70
|
+
generateVariation(variationType)
|
|
71
71
|
{
|
|
72
72
|
let typesKeys = Object.keys(this.typeTemplates);
|
|
73
|
-
for
|
|
74
|
-
this.variations[
|
|
73
|
+
for(let level = 1; level <= this.maxLevel; level ++){
|
|
74
|
+
this.variations[variationType][level] = {};
|
|
75
75
|
for (let typeKey of typesKeys) {
|
|
76
|
-
this.variations[
|
|
76
|
+
this.variations[variationType][level][typeKey] = this.applyTemplate(typeKey, level, variationType);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reldens/game-data-generator",
|
|
3
3
|
"scope": "@reldens",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.8.0",
|
|
5
5
|
"description": "Reldens - Game Data Generator",
|
|
6
6
|
"author": "Damian A. Pastorini",
|
|
7
7
|
"license": "MIT",
|
|
@@ -37,6 +37,6 @@
|
|
|
37
37
|
"url": "https://github.com/damian-pastorini/game-data-generator/issues"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@reldens/utils": "^0.
|
|
40
|
+
"@reldens/utils": "^0.30.0"
|
|
41
41
|
}
|
|
42
42
|
}
|