getEnemyInfo if damage is null

This commit is contained in:
oc 2019-02-26 00:23:12 +08:00
parent e312e86bb7
commit e904032d3a

View File

@ -184,8 +184,9 @@ enemys.prototype.nextCriticals = function (enemy, number, x, y, floorId) {
var info = this.getDamageInfo(enemy, core.status.hero.hp, core.status.hero.atk, core.status.hero.def, core.status.hero.mdef, x, y, floorId); var info = this.getDamageInfo(enemy, core.status.hero.hp, core.status.hero.atk, core.status.hero.def, core.status.hero.mdef, x, y, floorId);
if (info == null) { if (info == null) {
if (core.status.hero.atk<=enemy.def) { info = this.getEnemyInfo(enemy, core.status.hero.hp, core.status.hero.atk, core.status.hero.def, core.status.hero.mdef, x, y, floorId);
return [[enemy.def+1-core.status.hero.atk,'?']]; if (core.status.hero.atk<=info.def) {
return [[info.def+1-core.status.hero.atk,'?']];
} }
return []; return [];
} }