半波损失更新,小芒记得改剧情

This commit is contained in:
草莓 2025-06-03 20:52:58 +08:00
parent d9b257e5fa
commit 56cf1723a8
3 changed files with 27 additions and 34 deletions

View File

@ -26,30 +26,6 @@ main.floors.jiuguan=
],
"direction": "down"
}
],
"4,10": [
{
"type": "over",
"text": "这段话将在屏幕中心",
"image": "bg_5043.png",
"memory": false,
"time": 3000,
"hidetime": 30,
"sound": "",
"textColor": [
255,
255,
255,
1
],
"boldColor": [
0,
0,
0,
1
],
"font": "bold 48px Verdana"
}
]
},
"changeFloor": {},

View File

@ -316,6 +316,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
}
// 获得战斗伤害信息
var damageInfo = core.getDamageInfo(enemyId, null, x, y) || {};
if ((!core.getFlag("noAnimate") || damageInfo.damage >= core.status.hero.hp) && (!main.replayChecking && !core.isReplaying())) await core.attackAnimate(
enemyId,
damageInfo.start[0],
@ -1032,7 +1033,6 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
}
}
//需要变更
const onegcd = gcd(...oneTurn) //最大公约数
oneTurn = lcm(...oneTurn) //单次回合长度
//在这里处理equip的初始位置now
@ -1055,6 +1055,17 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
enemyinfo.now = 0
heroinfo.now = oneTurn / 2
}
let max = heroinfo.speed
if (enemyinfo.speed > max) max = enemyinfo.speed
equipInfo.forEach(v => { if (v.speed > max) max = v.speed })
let i = 1
while (oneTurn * i / max < 15) {
i++
}
heroinfo.now *= i
enemyinfo.now *= i
equipInfo.forEach(v => { v.now *= i })
oneTurn *= i
const start = [core.clone(heroinfo), core.clone(enemyinfo), core.clone(equipInfo), oneTurn] //记录开始战斗时的属性并转发
//---第三部分:递归开始---

View File

@ -2896,8 +2896,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
if (!core.status.floorId || timestamp - now < 50) return
now = timestamp;
globalAlphafloor += globalAlphafloorStatus;
if (globalAlphafloor === 100) globalAlphafloorStatus = -2;
if (globalAlphafloor === 0) globalAlphafloorStatus = 2;
if (globalAlphafloor === 100) globalAlphafloorStatus = -4;
if (globalAlphafloor === 0) globalAlphafloorStatus = 4;
if (core.domStyle.isVertical) {
core.clearMap(
@ -3083,8 +3083,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.drawImage(
uictx,
"green.webp",
MAP_BLOCK_LEFT_VERTICAL + 42,
MAP_BLOCK_TOP_VERTICAL + 57
MAP_BLOCK_LEFT_VERTICAL + 44,
MAP_BLOCK_TOP_VERTICAL + 57, 20, 20
);
uictx.globalAlpha = 1;
} else {
@ -3095,7 +3095,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
uictx,
"green.webp",
MAP_BLOCK_LEFT + 50,
MAP_BLOCK_TOP + 57
MAP_BLOCK_TOP + 60, 20, 20
);
uictx.globalAlpha = 1;
}
@ -20061,13 +20061,13 @@ let time=0
"回合战斗动画": function () {
// 在此增加新插件
const ctx = core.createCanvas("animateAttack", 0, 0, 416, 416, 80)
const changeY = -30
let easy = false;
const { imagelighter } = core.plugin.utils;
const { lcm, gcd } = core.plugin.utils;
const anctx = core.createCanvas("animate2", 0, 0, 416, 416, 91)
let a = []
function drawAnimate(name, centerX, centerY) {
@ -20100,6 +20100,8 @@ let time=0
function animationFrame(callback1) {
let time = 0
const ctx = core.getContextByName("animateAttack") ?? core.createCanvas("animateAttack", 0, 0, 416, 416, 80)
const anctx = core.getContextByName("animate2") ?? core.createCanvas("animate2", 0, 0, 416, 416, 91)
core.registerAnimationFrame("animate2", true, function (timestamp) {
if (
timestamp - core.animateFrame.animate2Time < 50 ||
@ -20174,6 +20176,9 @@ let time=0
heroanimateList,
enemyanimateList
) {
const ctx = core.getContextByName("animateAttack") ?? core.createCanvas("animateAttack", 0, 0, 416, 416, 80)
const anctx = core.getContextByName("animate2") ?? core.createCanvas("animate2", 0, 0, 416, 416, 91)
//参数分别为怪物id、真实属性战斗信息特殊装备如火焰风衣属性特殊装备属性为以元组{equipId,oneDamage,speed,now:0}构成的数组(列出每个需要计算的特殊装备,没有则为空数组或不填)
core.lockControl();
core.clearMap(ctx);
@ -20262,6 +20267,8 @@ let time=0
equipInfo.forEach(function (v) {
if (v.onAttack) onAttack = true;
});
const ctx = core.getContextByName("animateAttack") ?? core.createCanvas("animateAttack", 0, 0, 416, 416, 80)
const anctx = core.getContextByName("animate2") ?? core.createCanvas("animate2", 0, 0, 416, 416, 91)
core.clearMap(ctx);
let animate = Math.floor(farme / 15);
@ -20926,8 +20933,7 @@ let time=0
}
core.registerAnimationFrame("attackAnimate", true, (temptime) => {
if (!time) time = temptime
if (temptime - time < 50) return
time = temptime;
drawAttackAnimate(
heroInfo,