Loop Critical for Big Number
This commit is contained in:
parent
8d31055c52
commit
7be7d3706f
@ -179,7 +179,9 @@ enemys.prototype.nextCriticals = function (enemy, number, x, y, floorId) {
|
||||
}
|
||||
else { // 暴力for循环法
|
||||
pre = info.damage;
|
||||
for (var atk=hero_atk+1;atk<=mon_hp+mon_def;atk++) {
|
||||
var per_add = Math.ceil(hero_atk / 5000);
|
||||
if (per_add<0) per_add = 1;
|
||||
for (var atk=hero_atk+per_add;atk<=mon_hp+mon_def;atk+=per_add) {
|
||||
var nextInfo = this.getDamageInfo(enemy, core.status.hero.hp, atk, core.status.hero.def, core.status.hero.mdef, x, y, floorId);
|
||||
if (nextInfo==null) break;
|
||||
if (pre>nextInfo.damage) {
|
||||
|
||||
@ -1645,7 +1645,7 @@ ui.prototype.drawBookDetail = function (index) {
|
||||
u.push(t);
|
||||
}
|
||||
});
|
||||
hints.push(JSON.stringify(u.map(function (v) {return v[0]+":"+v[1];})));
|
||||
hints.push(JSON.stringify(u.map(function (v) {return core.formatBigNumber(v[0])+":"+core.formatBigNumber(v[1]);})));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1679,7 +1679,7 @@ ui.prototype.drawBookDetail = function (index) {
|
||||
|
||||
hints.push("");
|
||||
var criticals = core.enemys.nextCriticals(enemyId, 10).map(function (v) {
|
||||
return v[0]+":"+v[1];
|
||||
return core.formatBigNumber(v[0])+":"+core.formatBigNumber(v[1]);
|
||||
});
|
||||
while (criticals[0]=='0:0') criticals.shift();
|
||||
hints.push("临界表:"+JSON.stringify(criticals))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user