mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-03 10:14:34 +08:00
修复楼传bug
This commit is contained in:
1 parent
ece4cf74c5
commit
e275669489
5 files changed
+7
-219
No files matched your search
@@ -46,7 +46,7 @@ export function getSpecialHint(enemy: Enemy & DetailedEnemy) {
|
||||
* @param enemy 怪物实例
|
||||
*/
|
||||
export function getDefDamage(
|
||||
enemy: Enemy & DetailedEnemy,
|
||||
enemy: DetailedEnemy,
|
||||
addDef: number = 0,
|
||||
addAtk: number = 0
|
||||
) {
|
||||
@@ -59,7 +59,7 @@ export function getDefDamage(
|
||||
const max = 100 - Math.floor(addDef / ratio);
|
||||
|
||||
for (let i = 0; i <= max; i++) {
|
||||
const dam = core.getDamageInfo(enemy, {
|
||||
const dam = core.getDamageInfo(enemy.id, {
|
||||
def: core.status.hero.def + ratio * i + addDef,
|
||||
atk: core.status.hero.atk + addAtk
|
||||
});
|
||||
@@ -73,7 +73,6 @@ export function getDefDamage(
|
||||
continue;
|
||||
}
|
||||
if (!has(dam)) continue;
|
||||
if (dam.damage === origin) continue;
|
||||
if (dam.damage === res.at(-1)?.[1]) continue;
|
||||
last = dam.damage;
|
||||
res.push([ratio * i + addDef, dam.damage]);
|
||||
@@ -91,7 +90,7 @@ export function getDefDamage(
|
||||
* @param enemy 怪物实例
|
||||
*/
|
||||
export function getCriticalDamage(
|
||||
enemy: Enemy & DetailedEnemy,
|
||||
enemy: DetailedEnemy,
|
||||
addAtk: number = 0,
|
||||
addDef: number = 0
|
||||
): [number, number][] {
|
||||
@@ -104,7 +103,7 @@ export function getCriticalDamage(
|
||||
const max = 100 - Math.floor(addAtk / ratio);
|
||||
|
||||
for (let i = 0; i <= max; i++) {
|
||||
const dam = core.getDamageInfo(enemy, {
|
||||
const dam = core.getDamageInfo(enemy.id, {
|
||||
atk: core.status.hero.atk + ratio * i + addAtk,
|
||||
def: core.status.hero.def + addDef
|
||||
});
|
||||
@@ -118,7 +117,6 @@ export function getCriticalDamage(
|
||||
continue;
|
||||
}
|
||||
if (!has(dam)) continue;
|
||||
if (dam.damage === origin) continue;
|
||||
if (dam.damage === res.at(-1)?.[1]) continue;
|
||||
last = dam.damage;
|
||||
res.push([ratio * i + addAtk, dam.damage]);
|
||||
|
||||
@@ -553,6 +553,7 @@ onMounted(async () => {
|
||||
v.addEventListener('click', e => (v as HTMLElement).blur());
|
||||
});
|
||||
|
||||
locateMap(nowFloor.value);
|
||||
draw();
|
||||
|
||||
useDrag(
|
||||
|
||||
Reference in new issue
Block a user