koishi-plugin-noah 1.8.1 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.cjs +13 -2
- package/package.json +1 -1
package/lib/index.cjs
CHANGED
|
@@ -4112,7 +4112,7 @@ var SDVXDrawer = class extends BaseDrawer {
|
|
|
4112
4112
|
ctx.font = '32px "Fredoka One"';
|
|
4113
4113
|
ctx.fillStyle = "#FFFFFF";
|
|
4114
4114
|
const indexText = `#${String(i + 1).padStart(2, "0")}`;
|
|
4115
|
-
ctx.fillText(indexText, x +
|
|
4115
|
+
ctx.fillText(indexText, x + 801, y + 383);
|
|
4116
4116
|
ctx.textAlign = "left";
|
|
4117
4117
|
ctx.font = '400 24px "Noto Sans JP"';
|
|
4118
4118
|
ctx.fillStyle = "#FFFFFF";
|
|
@@ -6634,7 +6634,18 @@ function vf(ctx, config, logger6) {
|
|
|
6634
6634
|
const sortedScores = [...best50ScoreList].sort((a, b) => b.extra.volforce - a.extra.volforce).slice(0, 50);
|
|
6635
6635
|
const total = sortedScores.reduce((sum, score) => sum + score.extra.volforce, 0);
|
|
6636
6636
|
const totalVolforce = Math.round(total / 50 * 1e3) / 1e3;
|
|
6637
|
-
|
|
6637
|
+
const roll = Math.random();
|
|
6638
|
+
let trigger = false;
|
|
6639
|
+
if (totalVolforce >= 22) {
|
|
6640
|
+
trigger = roll < 0.5;
|
|
6641
|
+
} else if (totalVolforce > 21.2) {
|
|
6642
|
+
trigger = roll < 0.4;
|
|
6643
|
+
} else if (totalVolforce > 20.8) {
|
|
6644
|
+
trigger = roll < 0.3;
|
|
6645
|
+
} else if (totalVolforce >= 20) {
|
|
6646
|
+
trigger = roll < 0.1;
|
|
6647
|
+
}
|
|
6648
|
+
if (trigger) {
|
|
6638
6649
|
try {
|
|
6639
6650
|
await new Promise((resolve3) => setTimeout(resolve3, 2e3));
|
|
6640
6651
|
const audioPath = getAssetPath(
|