修复回合制战斗bug
This commit is contained in:
parent
4a633a063e
commit
096f634021
@ -382,9 +382,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
var todo = [];
|
var todo = [];
|
||||||
|
|
||||||
// 加点事件
|
// 加点事件
|
||||||
var point = guards.reduce(function (curr, g) {
|
var point = core.getEnemyValue(enemy, "point", x, y) || 0;
|
||||||
return curr + core.material.enemys[g[2]].point;
|
|
||||||
}, core.getEnemyValue(enemy, "point", x, y)) || 0;
|
|
||||||
if (core.flags.enableAddPoint && point > 0) {
|
if (core.flags.enableAddPoint && point > 0) {
|
||||||
core.push(todo, [{ "type": "insert", "name": "加点事件", "args": [point] }]);
|
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
|
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 = 1
|
let i = 1
|
||||||
while (oneTurn * i / max < 15) {
|
while (oneTurn * i / max < 30) {
|
||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
heroinfo.now *= i
|
heroinfo.now *= i
|
||||||
@ -856,7 +854,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
enemy_animate.push(animate)
|
enemy_animate.push(animate)
|
||||||
|
|
||||||
damage += poison
|
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)
|
enemy_diff.hp = (enemy_diff.hp ?? 0) - (core.hasSpecial(mon_special, 8) && hero_turn % enemyvalue.duck === 0 ? 0 : mon_damage)
|
||||||
//风行
|
//风行
|
||||||
|
@ -4658,7 +4658,6 @@ let time=0
|
|||||||
24, // 字体大小
|
24, // 字体大小
|
||||||
"宋体",//字体
|
"宋体",//字体
|
||||||
'#FF0000', // 字体颜色
|
'#FF0000', // 字体颜色
|
||||||
'#000000', // 描边颜色
|
|
||||||
0.5, // 水平速度 (speedX)
|
0.5, // 水平速度 (speedX)
|
||||||
-10, // 垂直速度 (speedY)
|
-10, // 垂直速度 (speedY)
|
||||||
0.5, // 重力 (gravity)
|
0.5, // 重力 (gravity)
|
||||||
@ -4694,7 +4693,6 @@ let time=0
|
|||||||
fontSize,
|
fontSize,
|
||||||
font,
|
font,
|
||||||
fontColor,
|
fontColor,
|
||||||
outlineColor,
|
|
||||||
speedX,
|
speedX,
|
||||||
speedY,
|
speedY,
|
||||||
gravity,
|
gravity,
|
||||||
@ -4709,7 +4707,6 @@ let time=0
|
|||||||
fontSize,
|
fontSize,
|
||||||
font,
|
font,
|
||||||
fontColor,
|
fontColor,
|
||||||
outlineColor,
|
|
||||||
speedX,
|
speedX,
|
||||||
speedY,
|
speedY,
|
||||||
gravity,
|
gravity,
|
||||||
@ -4733,7 +4730,6 @@ let time=0
|
|||||||
16, // 默认字体大小
|
16, // 默认字体大小
|
||||||
"Arial", //默认字体
|
"Arial", //默认字体
|
||||||
null, // 默认颜色
|
null, // 默认颜色
|
||||||
null, // 默认描边颜色
|
|
||||||
null, // 默认水平速度
|
null, // 默认水平速度
|
||||||
null, // 默认垂直速度
|
null, // 默认垂直速度
|
||||||
null, // 默认重力
|
null, // 默认重力
|
||||||
@ -4758,7 +4754,6 @@ let time=0
|
|||||||
fontSize,
|
fontSize,
|
||||||
font,
|
font,
|
||||||
fontColor,
|
fontColor,
|
||||||
outlineColor,
|
|
||||||
speedX,
|
speedX,
|
||||||
speedY,
|
speedY,
|
||||||
gravity,
|
gravity,
|
||||||
@ -4784,7 +4779,6 @@ let time=0
|
|||||||
fontSize,
|
fontSize,
|
||||||
font,
|
font,
|
||||||
fontColor,
|
fontColor,
|
||||||
outlineColor,
|
|
||||||
speedX,
|
speedX,
|
||||||
speedY,
|
speedY,
|
||||||
gravity,
|
gravity,
|
||||||
@ -4797,7 +4791,6 @@ let time=0
|
|||||||
this._fontSize = fontSize ?? 16; // 默认字体大小
|
this._fontSize = fontSize ?? 16; // 默认字体大小
|
||||||
this._font = font ?? "Arial";
|
this._font = font ?? "Arial";
|
||||||
this._fontColor = fontColor ?? (damage > 0 ? "#22FF44" : "lightcoral"); // 默认颜色
|
this._fontColor = fontColor ?? (damage > 0 ? "#22FF44" : "lightcoral"); // 默认颜色
|
||||||
this._outlineColor = outlineColor ?? "#FFFFFF"; // 默认描边颜色
|
|
||||||
this._speedX = speedX ?? -1 + Math.random() * 2; // 水平速度,默认随机
|
this._speedX = speedX ?? -1 + Math.random() * 2; // 水平速度,默认随机
|
||||||
this._speedY = speedY ?? -3 - Math.random() * 4; // 垂直速度,默认随机
|
this._speedY = speedY ?? -3 - Math.random() * 4; // 垂直速度,默认随机
|
||||||
this._gravity = gravity ?? 0.3; // 重力加速度,默认 0.3
|
this._gravity = gravity ?? 0.3; // 重力加速度,默认 0.3
|
||||||
@ -4839,8 +4832,6 @@ let time=0
|
|||||||
var canvas = core.getContextByName(this._symbol);
|
var canvas = core.getContextByName(this._symbol);
|
||||||
canvas.font = this._fontSize + "px " + this._font; // 动态设置字体大小
|
canvas.font = this._fontSize + "px " + this._font; // 动态设置字体大小
|
||||||
canvas.fillStyle = this._fontColor; // 动态设置字体颜色
|
canvas.fillStyle = this._fontColor; // 动态设置字体颜色
|
||||||
canvas.strokeStyle = this._outlineColor; // 动态设置描边颜色
|
|
||||||
canvas.strokeText(this._text, 2, this._height);
|
|
||||||
canvas.fillText(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
|
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 = 1
|
let i = 1
|
||||||
while (oneTurn * i / max < 15) {
|
while (oneTurn * i / max < 30) {
|
||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
heroInfo.turn = 0
|
heroInfo.turn = 0
|
||||||
@ -20846,22 +20837,21 @@ let time=0
|
|||||||
text = "暴击" + herodamage
|
text = "暴击" + herodamage
|
||||||
else
|
else
|
||||||
text = herodamage === 0 ? "抵抗" : herodamage;
|
text = herodamage === 0 ? "抵抗" : herodamage;
|
||||||
|
console.log([enemyDiffList[turn].hp, heroDiffList[turn].hp])
|
||||||
Dove.MorePerform.ShowDamagePop.PopDamage(
|
Dove.MorePerform.ShowDamagePop.PopDamage(
|
||||||
ctx, // 默认画布名称
|
ctx, // 默认画布名称
|
||||||
270, // 英雄位置 x
|
270, // 英雄位置 x
|
||||||
160 + changeY, // 英雄位置 y
|
160 + changeY, // 英雄位置 y
|
||||||
text, // 伤害值
|
text, // 伤害值
|
||||||
18, // 默认字体大小
|
22, // 默认字体大小
|
||||||
"Arial", //默认字体
|
"Arial", //默认字体
|
||||||
typeof text === "string" && text.startsWith("+") ?
|
typeof text === "string" && text.startsWith("+") ?
|
||||||
"#22FF44" :
|
"#22FF44" :
|
||||||
typeof text === "string" ?
|
typeof text === "string" ?
|
||||||
"#FFFFFF" :
|
"#FFFFFF" :
|
||||||
null, // 默认颜色
|
null, // 默认颜色
|
||||||
text === "抵抗" ? "#000000" : null, // 默认描边颜色
|
|
||||||
0, // 默认水平速度
|
0, // 默认水平速度
|
||||||
-1, // 默认垂直速度
|
-0.5, // 默认垂直速度
|
||||||
0, // 默认重力
|
0, // 默认重力
|
||||||
90 // 默认显示时长(帧数)
|
90 // 默认显示时长(帧数)
|
||||||
);
|
);
|
||||||
@ -20880,16 +20870,15 @@ let time=0
|
|||||||
110, // 英雄位置 x
|
110, // 英雄位置 x
|
||||||
160 + changeY, // 英雄位置 y
|
160 + changeY, // 英雄位置 y
|
||||||
text, // 伤害值
|
text, // 伤害值
|
||||||
18, // 默认字体大小
|
22, // 默认字体大小
|
||||||
"Arial", //默认字体
|
"Arial", //默认字体
|
||||||
typeof text === "string" && text.startsWith("+") ?
|
typeof text === "string" && text.startsWith("+") ?
|
||||||
"#22FF44" :
|
"#22FF44" :
|
||||||
typeof text === "string" ?
|
typeof text === "string" ?
|
||||||
"#FFFFFF" :
|
"#FFFFFF" :
|
||||||
null, // 默认颜色
|
null, // 默认颜色
|
||||||
text === "抵抗" ? "#000000" : null, // 默认描边颜色
|
|
||||||
0, // 默认水平速度
|
0, // 默认水平速度
|
||||||
-1, // 默认垂直速度
|
-0.5, // 默认垂直速度
|
||||||
0, // 默认重力
|
0, // 默认重力
|
||||||
90 // 默认显示时长(帧数)
|
90 // 默认显示时长(帧数)
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user