修复回合制战斗bug

This commit is contained in:
strawberry 2025-07-03 16:26:55 +08:00
parent 4a633a063e
commit 096f634021
2 changed files with 9 additions and 22 deletions

View File

@ -382,9 +382,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
var todo = [];
// 加点事件
var point = guards.reduce(function (curr, g) {
return curr + core.material.enemys[g[2]].point;
}, core.getEnemyValue(enemy, "point", x, y)) || 0;
var point = core.getEnemyValue(enemy, "point", x, y) || 0;
if (core.flags.enableAddPoint && point > 0) {
core.push(todo, [{ "type": "insert", "name": "加点事件", "args": [point] }]);
}
@ -793,7 +791,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
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) {
while (oneTurn * i / max < 30) {
i++
}
heroinfo.now *= i
@ -856,7 +854,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
enemy_animate.push(animate)
damage += poison
hero_diff.hp = (hero_diff.hp ?? 0) - poison
if (poison > 0) hero_diff.hp = (hero_diff.hp ?? 0) - poison
//闪避
enemy_diff.hp = (enemy_diff.hp ?? 0) - (core.hasSpecial(mon_special, 8) && hero_turn % enemyvalue.duck === 0 ? 0 : mon_damage)
//风行

View File

@ -4658,7 +4658,6 @@ let time=0
24, // 字体大小
"宋体",//字体
'#FF0000', // 字体颜色
'#000000', // 描边颜色
0.5, // 水平速度 (speedX)
-10, // 垂直速度 (speedY)
0.5, // 重力 (gravity)
@ -4694,7 +4693,6 @@ let time=0
fontSize,
font,
fontColor,
outlineColor,
speedX,
speedY,
gravity,
@ -4709,7 +4707,6 @@ let time=0
fontSize,
font,
fontColor,
outlineColor,
speedX,
speedY,
gravity,
@ -4733,7 +4730,6 @@ let time=0
16, // 默认字体大小
"Arial", //默认字体
null, // 默认颜色
null, // 默认描边颜色
null, // 默认水平速度
null, // 默认垂直速度
null, // 默认重力
@ -4758,7 +4754,6 @@ let time=0
fontSize,
font,
fontColor,
outlineColor,
speedX,
speedY,
gravity,
@ -4784,7 +4779,6 @@ let time=0
fontSize,
font,
fontColor,
outlineColor,
speedX,
speedY,
gravity,
@ -4797,7 +4791,6 @@ let time=0
this._fontSize = fontSize ?? 16; // 默认字体大小
this._font = font ?? "Arial";
this._fontColor = fontColor ?? (damage > 0 ? "#22FF44" : "lightcoral"); // 默认颜色
this._outlineColor = outlineColor ?? "#FFFFFF"; // 默认描边颜色
this._speedX = speedX ?? -1 + Math.random() * 2; // 水平速度,默认随机
this._speedY = speedY ?? -3 - Math.random() * 4; // 垂直速度,默认随机
this._gravity = gravity ?? 0.3; // 重力加速度,默认 0.3
@ -4839,8 +4832,6 @@ let time=0
var canvas = core.getContextByName(this._symbol);
canvas.font = this._fontSize + "px " + this._font; // 动态设置字体大小
canvas.fillStyle = this._fontColor; // 动态设置字体颜色
canvas.strokeStyle = this._outlineColor; // 动态设置描边颜色
canvas.strokeText(this._text, 2, this._height);
canvas.fillText(this._text, 2, this._height);
};
@ -20191,7 +20182,7 @@ let time=0
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) {
while (oneTurn * i / max < 30) {
i++
}
heroInfo.turn = 0
@ -20846,22 +20837,21 @@ let time=0
text = "暴击" + herodamage
else
text = herodamage === 0 ? "抵抗" : herodamage;
console.log([enemyDiffList[turn].hp, heroDiffList[turn].hp])
Dove.MorePerform.ShowDamagePop.PopDamage(
ctx, // 默认画布名称
270, // 英雄位置 x
160 + changeY, // 英雄位置 y
text, // 伤害值
18, // 默认字体大小
22, // 默认字体大小
"Arial", //默认字体
typeof text === "string" && text.startsWith("+") ?
"#22FF44" :
typeof text === "string" ?
"#FFFFFF" :
null, // 默认颜色
text === "抵抗" ? "#000000" : null, // 默认描边颜色
0, // 默认水平速度
-1, // 默认垂直速度
-0.5, // 默认垂直速度
0, // 默认重力
90 // 默认显示时长(帧数)
);
@ -20880,16 +20870,15 @@ let time=0
110, // 英雄位置 x
160 + changeY, // 英雄位置 y
text, // 伤害值
18, // 默认字体大小
22, // 默认字体大小
"Arial", //默认字体
typeof text === "string" && text.startsWith("+") ?
"#22FF44" :
typeof text === "string" ?
"#FFFFFF" :
null, // 默认颜色
text === "抵抗" ? "#000000" : null, // 默认描边颜色
0, // 默认水平速度
-1, // 默认垂直速度
-0.5, // 默认垂直速度
0, // 默认重力
90 // 默认显示时长(帧数)
);