临界显示为宝石数

This commit is contained in:
AncTe committed 2023-08-07 18:45:50 +08:00
1 parent e7ba4e1507
commit b7f3c98131
5 files changed
+38 -25

No files matched your search

+6 -1
View File
@@ -193,8 +193,13 @@ export class EnemyCollection implements RangeCollection<DamageEnemy> {
py: 32 * (v.y! + 1) - 1,
color: color
});
const criGem = core.getLocalStorage('criticalGem', false);
const n = critical?.atkDelta ?? Infinity;
const ratio = core.status.maps[this.floorId].ratio;
const cri = criGem ? Math.ceil(n / ratio) : n;
core.status.damage.data.push({
text: critical?.atkDelta.toString() ?? '?',
text: isFinite(cri) ? cri.toString() : '?',
px: 32 * v.x! + 1,
py: 32 * (v.y! + 1) - 11,
color: '#fff'
+3 -1
View File
@@ -20,6 +20,7 @@ import * as utils from './utils';
import * as chase from './chase';
import * as damage from './enemy/damage';
import * as battle from './enemy/battle';
import * as special from './enemy/special';
export {
halo,
@@ -35,5 +36,6 @@ export {
utils,
chase,
damage,
battle
battle,
special
};