ambslot-monster-kill
Advanced tools
Comparing version 1.1.6 to 1.1.7
@@ -5,6 +5,3 @@ export declare class MonsterKill { | ||
constructor(monsterData: any); | ||
shot(monsters: any[], value?: number): any[] | { | ||
element: string; | ||
message: string; | ||
}; | ||
shot(monsters: any[], value?: number): any[]; | ||
skill(monsters: any[], value?: number): any[] | { | ||
@@ -11,0 +8,0 @@ element: string; |
@@ -20,7 +20,11 @@ "use strict"; | ||
if (!this.monsterData[monsters[index].type]) | ||
return { element: 'error', message: 'Undefined monster data' }; | ||
monsters[index].multiplier = {}; | ||
return [{ id: 0, result: { element: 'missing', multiplier: 0 } }]; | ||
if (!monsters[index].multiplier) | ||
monsters[index].multiplier = {}; | ||
let monsterProbs = []; | ||
if (_monster.multiplier.onDeath) { | ||
monsters[index].multiplier.onDeath = _monster.multiplier.onDeath[0] + ~~(Math.random() * (_monster.multiplier.onDeath[1] - _monster.multiplier.onDeath[0])); | ||
if (!(monsters[index].multiplier.onDeath && | ||
typeof monsters[index].multiplier.onDeath === 'number' && | ||
!(monsters[index].multiplier.onDeath < _monster.multiplier.onDeath[0] || monsters[index].multiplier.onDeath > _monster.multiplier.onDeath[1]))) | ||
monsters[index].multiplier.onDeath = _monster.multiplier.onDeath[0] + ~~(Math.random() * (_monster.multiplier.onDeath[1] - _monster.multiplier.onDeath[0])); | ||
monsterProbs = [ | ||
@@ -38,3 +42,6 @@ ...monsterProbs, | ||
if (_monster.multiplier.onDamage) { | ||
monsters[index].multiplier.onDamage = _monster.multiplier.onDamage[0] + ~~(Math.random() * (_monster.multiplier.onDamage[1] - _monster.multiplier.onDamage[0])); | ||
if (!(monsters[index].multiplier.onDamage && | ||
typeof monsters[index].multiplier.onDamage === 'number' && | ||
!(monsters[index].multiplier.onDamage < _monster.multiplier.onDamage[0] || monsters[index].multiplier.onDamage > _monster.multiplier.onDamage[1]))) | ||
monsters[index].multiplier.onDamage = _monster.multiplier.onDamage[0] + ~~(Math.random() * (_monster.multiplier.onDamage[1] - _monster.multiplier.onDamage[0])); | ||
monsterProbs = [ | ||
@@ -41,0 +48,0 @@ ...monsterProbs, |
{ | ||
"name": "ambslot-monster-kill", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
7371
152
1