动画极速模式

This commit is contained in:
草莓 2025-03-18 11:35:35 +08:00
parent d57ce74a79
commit 67a8f9ecda

View File

@ -21651,7 +21651,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
let max = heroInfo.speed
if (enemyInfo.speed > max) max = enemyInfo.speed
equipInfo.forEach(v => { if (v.speed > max) max = v.speed })
let i = 0
let i = 1
while (oneTurn * i / max < 15) {
i++
}
@ -21659,7 +21659,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
if (enemyInfo.onAttack) enemyInfo.now *= i
equipInfo.forEach(v => { if (v.onAttack) v.now *= i })
oneTurn *= i
console.log([oneTurn, heroInfo.now, enemyInfo.now])
let time = 0,
farme = 0;
return new Promise((res) => {
@ -21689,11 +21688,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
(inRect(pos, easyclosebox) && easy) ||
(inRect(pos, uneasyclosebox) && !easy)
) {
core.status.event.id = "";
core.unregisterAnimationFrame("attackAnimate");
core.clearMap(ctx);
core.closePanel();
res();
flags.qukly = !flags.qukly
}
};
async function drawAttackAnimate(
@ -21723,7 +21719,28 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
if (v.onAttack) onAttack = true;
});
core.clearMap(ctx);
let animate = Math.floor(farme / 30);
let animate = Math.floor(farme / 15);
if (flags.qukly) {
while (true) {
let goattack = false
equipInfo.forEach(v => {
if (v.now >= oneTurn) goattack = true
});
if (enemyInfo.now >= oneTurn) goattack = true
if (heroInfo.now >= oneTurn) goattack = true
if (goattack) break;
enemyInfo.now += enemyInfo.speed
heroInfo.now += heroInfo.speed
equipInfo.forEach(function (v) {
v.now += v.speed
});
}
}
if (easy) {
core.fillRect(ctx, 64, 52, 288, 212, "rgba(0,0,0,0.5)");
core.strokeRect(ctx, 64, 52, 288, 212, "rgba(255,255,255,0.5)", 4);
@ -21854,7 +21871,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
);
core.fillBoldText(
ctx,
"跳过",
flags.qukly ? "正常" : "极速",
330,
250,
"#FFFF60",
@ -21881,7 +21898,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
"bold 36px pala"
);
if (!attack && !onAttack) enemyInfo.now += enemyInfo.speed;
if (!attack && !onAttack && !flags.qukly) enemyInfo.now += enemyInfo.speed;
let enemynow = Math.min(100 + (enemyInfo.now / oneTurn) * 215, 315);
ctx.fillStyle = "#FFFFFF";
ctx.beginPath();
@ -21932,7 +21949,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.drawIcon(ctx, v.id, vnow - 16, 54, 32, 32);
});
if (!attack && !onAttack) heroInfo.now += hero.speed;
if (!attack && !onAttack && !flags.qukly) heroInfo.now += hero.speed;
let heronow = Math.min(100 + (heroInfo.now / oneTurn) * 215, 315);
ctx.beginPath();
ctx.moveTo(heronow, 120);
@ -22202,7 +22219,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
);
core.fillBoldText(
ctx,
"跳过",
flags.qukly ? "正常" : "极速",
330,
365,
"#FFFF60",
@ -22229,7 +22246,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
"bold 36px pala"
);
if (!attack && !onAttack) enemyInfo.now += enemyInfo.speed;
if (!attack && !onAttack & !flags.qukly) enemyInfo.now += enemyInfo.speed;
let enemynow = Math.min(100 + (enemyInfo.now / oneTurn) * 215, 315);
ctx.fillStyle = "#FFFFFF";
ctx.beginPath();
@ -22280,7 +22297,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.drawIcon(ctx, v.id, vnow - 16, 54, 32, 32);
});
if (!attack && !onAttack) heroInfo.now += hero.speed;
if (!attack && !onAttack && !flags.qukly) heroInfo.now += hero.speed;
let heronow = Math.min(100 + (heroInfo.now / oneTurn) * 215, 315);
ctx.beginPath();
ctx.moveTo(heronow, 120);