@reldens/skills 0.13.0 → 0.14.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/lib/skill.js +2 -7
- package/package.json +2 -2
package/lib/skill.js
CHANGED
|
@@ -190,7 +190,7 @@ class Skill
|
|
|
190
190
|
this.applyModifiers(this.ownerEffects, this.owner, true);
|
|
191
191
|
await this.fireEvent(SkillsEvents.SKILL_APPLY_OWNER_EFFECTS, this, target);
|
|
192
192
|
}
|
|
193
|
-
if(this.castTime
|
|
193
|
+
if(0 < this.castTime){
|
|
194
194
|
await this.fireEvent(SkillsEvents.SKILL_BEFORE_CAST, this, target);
|
|
195
195
|
this.owner.isCasting = setTimeout(() => {
|
|
196
196
|
skillLogicResult = this.finishExecution(target);
|
|
@@ -263,12 +263,7 @@ class Skill
|
|
|
263
263
|
if(this.criticalChance <= 0){
|
|
264
264
|
return false;
|
|
265
265
|
}
|
|
266
|
-
return this.criticalChance <
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
randomInteger(min, max)
|
|
270
|
-
{
|
|
271
|
-
return Math.floor(Math.random() * (max - min + 1)) + min;
|
|
266
|
+
return this.criticalChance < sc.randomInteger(1, 100);
|
|
272
267
|
}
|
|
273
268
|
|
|
274
269
|
applyModifiers(modifiersObjectList, target, avoidCritical = false)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reldens/skills",
|
|
3
3
|
"scope": "@reldens",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.14.0",
|
|
5
5
|
"description": "Reldens - Skills",
|
|
6
6
|
"author": "Damian A. Pastorini",
|
|
7
7
|
"license": "MIT",
|
|
@@ -42,6 +42,6 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@reldens/modifiers": "^0.11.0",
|
|
44
44
|
"@reldens/storage": "^0.11.0",
|
|
45
|
-
"@reldens/utils": "^0.
|
|
45
|
+
"@reldens/utils": "^0.14.0"
|
|
46
46
|
}
|
|
47
47
|
}
|