mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-02 00:14:30 +08:00
完善定点查看
This commit is contained in:
1 parent
2cfbe4984f
commit
77d051dd27
8 files changed
+38
-16
No files matched your search
@@ -104,6 +104,12 @@ const ceil = Math.ceil;
|
||||
|
||||
const x = ref(props.fromBook ? void 0 : flags.mouseLoc[0]);
|
||||
const y = ref(props.fromBook ? void 0 : flags.mouseLoc[1]);
|
||||
x.value = has(x.value)
|
||||
? Math.round(x.value + core.bigmap.offsetX / 32)
|
||||
: void 0;
|
||||
y.value = has(y.value)
|
||||
? Math.round(y.value + core.bigmap.offsetY / 32)
|
||||
: void 0;
|
||||
|
||||
let originCri = getCriticalDamage(enemy, 0, 0, x.value, y.value);
|
||||
let originDef = getDefDamage(enemy, 0, 0, x.value, y.value);
|
||||
@@ -185,8 +191,6 @@ function generateData(data: [number, number][]): ChartConfiguration['data'] {
|
||||
}
|
||||
|
||||
const update = debounce((atk: Chart, def: Chart) => {
|
||||
x.value = props.fromBook ? void 0 : flags.mouseLoc[0];
|
||||
y.value = props.fromBook ? void 0 : flags.mouseLoc[1];
|
||||
allCri.value = getCriticalDamage(
|
||||
enemy,
|
||||
addAtk.value * ratio,
|
||||
|
||||
@@ -35,12 +35,21 @@
|
||||
<script lang="ts" setup>
|
||||
import { isMobile } from '../plugin/use';
|
||||
import { getSpecialHint } from '../plugin/ui/book';
|
||||
import { has } from '../plugin/utils';
|
||||
|
||||
const props = defineProps<{
|
||||
fromBook?: boolean;
|
||||
}>();
|
||||
|
||||
const [x, y] = props.fromBook ? [void 0, void 0] : flags.mouseLoc;
|
||||
const mx = has(x) ? Math.round(x + core.bigmap.offsetX / 32) : void 0;
|
||||
const my = has(y) ? Math.round(y + core.bigmap.offsetY / 32) : void 0;
|
||||
|
||||
const enemy = core.plugin.bookDetailEnemy;
|
||||
|
||||
const info = getSpecialHint(enemy);
|
||||
|
||||
const criticals = core.nextCriticals(enemy, isMobile ? 4 : 8);
|
||||
const criticals = core.nextCriticals(enemy, isMobile ? 4 : 8, mx, my);
|
||||
|
||||
const format = core.formatBigNumber;
|
||||
</script>
|
||||
|
||||
Reference in new issue
Block a user