动画极速模式
This commit is contained in:
parent
d57ce74a79
commit
67a8f9ecda
@ -21651,7 +21651,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
let max = heroInfo.speed
|
let max = heroInfo.speed
|
||||||
if (enemyInfo.speed > max) max = enemyInfo.speed
|
if (enemyInfo.speed > max) max = enemyInfo.speed
|
||||||
equipInfo.forEach(v => { if (v.speed > max) max = v.speed })
|
equipInfo.forEach(v => { if (v.speed > max) max = v.speed })
|
||||||
let i = 0
|
let i = 1
|
||||||
while (oneTurn * i / max < 15) {
|
while (oneTurn * i / max < 15) {
|
||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
@ -21659,7 +21659,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
if (enemyInfo.onAttack) enemyInfo.now *= i
|
if (enemyInfo.onAttack) enemyInfo.now *= i
|
||||||
equipInfo.forEach(v => { if (v.onAttack) v.now *= i })
|
equipInfo.forEach(v => { if (v.onAttack) v.now *= i })
|
||||||
oneTurn *= i
|
oneTurn *= i
|
||||||
console.log([oneTurn, heroInfo.now, enemyInfo.now])
|
|
||||||
let time = 0,
|
let time = 0,
|
||||||
farme = 0;
|
farme = 0;
|
||||||
return new Promise((res) => {
|
return new Promise((res) => {
|
||||||
@ -21689,11 +21688,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
(inRect(pos, easyclosebox) && easy) ||
|
(inRect(pos, easyclosebox) && easy) ||
|
||||||
(inRect(pos, uneasyclosebox) && !easy)
|
(inRect(pos, uneasyclosebox) && !easy)
|
||||||
) {
|
) {
|
||||||
core.status.event.id = "";
|
flags.qukly = !flags.qukly
|
||||||
core.unregisterAnimationFrame("attackAnimate");
|
|
||||||
core.clearMap(ctx);
|
|
||||||
core.closePanel();
|
|
||||||
res();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
async function drawAttackAnimate(
|
async function drawAttackAnimate(
|
||||||
@ -21723,7 +21719,28 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
if (v.onAttack) onAttack = true;
|
if (v.onAttack) onAttack = true;
|
||||||
});
|
});
|
||||||
core.clearMap(ctx);
|
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) {
|
if (easy) {
|
||||||
core.fillRect(ctx, 64, 52, 288, 212, "rgba(0,0,0,0.5)");
|
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);
|
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(
|
core.fillBoldText(
|
||||||
ctx,
|
ctx,
|
||||||
"跳过",
|
flags.qukly ? "正常" : "极速",
|
||||||
330,
|
330,
|
||||||
250,
|
250,
|
||||||
"#FFFF60",
|
"#FFFF60",
|
||||||
@ -21881,7 +21898,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
"bold 36px pala"
|
"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);
|
let enemynow = Math.min(100 + (enemyInfo.now / oneTurn) * 215, 315);
|
||||||
ctx.fillStyle = "#FFFFFF";
|
ctx.fillStyle = "#FFFFFF";
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
@ -21932,7 +21949,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
|
|
||||||
core.drawIcon(ctx, v.id, vnow - 16, 54, 32, 32);
|
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);
|
let heronow = Math.min(100 + (heroInfo.now / oneTurn) * 215, 315);
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.moveTo(heronow, 120);
|
ctx.moveTo(heronow, 120);
|
||||||
@ -22202,7 +22219,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
);
|
);
|
||||||
core.fillBoldText(
|
core.fillBoldText(
|
||||||
ctx,
|
ctx,
|
||||||
"跳过",
|
flags.qukly ? "正常" : "极速",
|
||||||
330,
|
330,
|
||||||
365,
|
365,
|
||||||
"#FFFF60",
|
"#FFFF60",
|
||||||
@ -22229,7 +22246,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
"bold 36px pala"
|
"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);
|
let enemynow = Math.min(100 + (enemyInfo.now / oneTurn) * 215, 315);
|
||||||
ctx.fillStyle = "#FFFFFF";
|
ctx.fillStyle = "#FFFFFF";
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
@ -22280,7 +22297,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
|
|
||||||
core.drawIcon(ctx, v.id, vnow - 16, 54, 32, 32);
|
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);
|
let heronow = Math.min(100 + (heroInfo.now / oneTurn) * 215, 315);
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.moveTo(heronow, 120);
|
ctx.moveTo(heronow, 120);
|
||||||
|
Loading…
Reference in New Issue
Block a user