@reldens/skills 0.20.0 → 0.21.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/levels-set.js +1 -1
- package/lib/skill.js +5 -4
- package/package.json +4 -4
package/lib/levels-set.js
CHANGED
package/lib/skill.js
CHANGED
|
@@ -46,6 +46,7 @@ class Skill
|
|
|
46
46
|
this.uses = 0;
|
|
47
47
|
this.canActivate = sc.get(props, 'canActivate', true);
|
|
48
48
|
this.range = sc.get(props, 'range', 0);
|
|
49
|
+
this.skillActivationTimer = false;
|
|
49
50
|
this.lastState = '';
|
|
50
51
|
this.groups = sc.get(props, 'groups', []);
|
|
51
52
|
this.lastAppliedModifiers = {};
|
|
@@ -99,7 +100,7 @@ class Skill
|
|
|
99
100
|
}
|
|
100
101
|
if(this.skillDelay > 0){
|
|
101
102
|
this.canActivate = false;
|
|
102
|
-
setTimeout(()=> {
|
|
103
|
+
this.skillActivationTimer = setTimeout(()=> {
|
|
103
104
|
this.canActivate = true;
|
|
104
105
|
}, this.skillDelay);
|
|
105
106
|
} else {
|
|
@@ -290,13 +291,13 @@ class Skill
|
|
|
290
291
|
|
|
291
292
|
getOwnerEventKey()
|
|
292
293
|
{
|
|
293
|
-
return sc.get(this.owner, 'eventsPrefix', ''
|
|
294
|
+
return sc.get(this.owner, 'eventsPrefix', 'skill.ownerId.'+this.getOwnerId());
|
|
294
295
|
}
|
|
295
296
|
|
|
296
297
|
async fireEvent(eventName, ...args)
|
|
297
298
|
{
|
|
298
|
-
// @NOTE: we append the current level set owner ID to the event name so we can pick up this event only for
|
|
299
|
-
// owner automatically:
|
|
299
|
+
// @NOTE: we append the current level set owner ID to the event name, so we can pick up this event only for
|
|
300
|
+
// this owner automatically:
|
|
300
301
|
return await this.events.emit(this.eventFullName(eventName), ...args);
|
|
301
302
|
}
|
|
302
303
|
|
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.21.0",
|
|
5
5
|
"description": "Reldens - Skills",
|
|
6
6
|
"author": "Damian A. Pastorini",
|
|
7
7
|
"license": "MIT",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"url": "https://github.com/damian-pastorini/reldens-skills/issues"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@reldens/modifiers": "^0.
|
|
44
|
-
"@reldens/storage": "^0.
|
|
45
|
-
"@reldens/utils": "^0.
|
|
43
|
+
"@reldens/modifiers": "^0.21.0",
|
|
44
|
+
"@reldens/storage": "^0.19.0",
|
|
45
|
+
"@reldens/utils": "^0.22.0"
|
|
46
46
|
}
|
|
47
47
|
}
|