装备栏/简易ui/战斗修复

This commit is contained in:
草莓 2025-03-08 16:59:40 +08:00
parent 2c4887899c
commit ca903adb18
5 changed files with 11837 additions and 10472 deletions

View File

@ -1529,7 +1529,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"hp": 1000,
"manamax": -1,
"mana": 0,
"atk": 60,
"atk": 10,
"def": 10,
"mdef": 100,
"speed": 10,
@ -1555,9 +1555,9 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"followers": [],
"steps": 0,
"matk": 0,
"spell": 100,
"spell": 0,
"spelldef": 0,
"mhp": 42
"mhp": 0
},
"startCanvas": [
{

View File

@ -55,9 +55,9 @@ main.floors.xiaoxiang01=
[120147, 0, 32, 0,200199, 0,201029,225,110132,224, 0, 0,90675],
[120164,225,200998,200999,201037, 81,201029, 0, 0, 0,110116, 0, 94],
[120172, 0,222, 0,221, 0,201029, 81,110116,225,110137,110138,90650],
[120180,201037,201037, 81,201037,201037,201037, 0,110124, 0, 81, 31,90658],
[120180,201037,201037, 81,201037,201037,201037,246,110124, 0, 81, 31,90658],
[ 92, 32, 32, 22, 21,80089, 31, 0,110132, 0,110122,110122,110197],
[140,110191, 21, 21, 21,80089, 0, 0, 81, 0,222, 29,110197],
[140,110191, 21, 21, 21,80089, 0,246, 81, 0,222, 29,110197],
[140,140,140,110191,80083,80097, 93,110138,110138,140189,140,140,140]
],
"areas": "牢狱",

View File

@ -48,8 +48,8 @@ main.floors.yiqu1=
[140142, 0,120015,120028,201037, 0,201029, 0, 0, 0, 0, 0,110197],
[140150, 0, 0,120019, 0, 0,201029, 0,110189,140,110191, 0,110205],
[ 92, 0, 0,120019,201037,201037,201037, 0,110197,140,110199, 81,110224],
[ 0, 0, 0,120027, 37, 37, 0, 0,110197,140,110199, 0,110232],
[110191, 0, 0, 0, 36, 35,110189,140,140,140,110199, 0, 94],
[ 0, 0, 0,120027, 0, 0, 0, 0,110197,140,110199, 0,110232],
[110191, 0, 0, 0, 0, 0,110189,140,140,140,110199, 0, 94],
[110199,140,140,110191, 0, 0,110197,140,140,110204,110207, 0, 0],
[140,140,140,110199,90684,90684,110197,140,140,110199,110234, 0, 0],
[140,140,140,110199,100307,100308,110197,140,140,110199, 0, 0, 0]

View File

@ -928,6 +928,17 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
origin_hero_atk = core.getStatusOrDefault(hero, "atk"),
origin_hero_def = core.getStatusOrDefault(hero, "def");
//编辑器特判
if (main.mode == "editor") {
hero_hp = hero?.hp ?? core.status.hero.hp,
hero_atk = hero?.atk ?? core.status.hero.atk,
hero_def = hero?.def ?? core.status.hero.def,
hero_matk = hero?.matk ?? core.status.hero.matk,
hero_mdef = hero?.mdef ?? core.status.hero.mdef,
hero_mhp = hero?.mhp ?? core.status.hero.mhp,
hero_speed = hero?.speed ?? core.status.hero.speed,
hero_spell = hero?.spell ?? core.status.hero.spell;
}
// 怪物的各项数据
// 对坚固模仿等处理扔到了脚本编辑-getEnemyInfo之中
var enemyInfo = core.enemys.getEnemyInfo(enemy, hero, x, y, floorId);
@ -1017,7 +1028,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
//需要变更
const onegcd = gcd(...oneTurn) //最大公约数
oneTurn = lcm(...oneTurn) / onegcd //单次回合长度
oneTurn = lcm(...oneTurn) //单次回合长度
//在这里处理equip的初始位置now
equipInfo.forEach(v => {
switch (v.id) {
@ -1029,7 +1040,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
v.onAttack = false
if (v.now === oneTurn) v.onAttack = true //增加正在攻击的标志
})
const heroinfo = { hp: hero_hp, atk: hero_atk, def: hero_def, mdef: hero_mdef, spell: hero_spell, mhp: Math.floor(hero_spell * hero_mhp / 100), matk: Math.floor(hero_spell * hero_matk / 100), speed: hero_speed, now: 0, isAttack: false } //勇士属性
const heroinfo = { hp: hero_hp, atk: hero_atk, def: hero_def, mdef: (!hero?.mdef || hero?.mdef === 100) ? hero_mdef : hero.mdef, spell: hero_spell, mhp: Math.floor(hero_spell * hero_mhp / 100), matk: Math.floor(hero_spell * hero_matk / 100), speed: hero_speed, now: 0, isAttack: false } //勇士属性
const enemyinfo = { hp: mon_hp, atk: mon_atk, def: mon_def, mdef: mon_mdef, spell: mon_spell, speed: mon_speed, special: mon_special, now: 0, onAttack: false, isAttack: false } //怪物属性
//先攻,先攻为怪物和勇士勇士行动前怪物出第一刀
if (core.hasSpecial(mon_special, 1)) {
@ -1194,27 +1205,27 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
})
if (onattack) { //处理完毕后的数据处理
heroDiffList.push(hero_diff)
enemyDiffList.push(enemy_diff)
heroanimateList.push(hero_animate)
enemyanimateList.push(enemy_animate)
//处理属性变化
for (let v in hero_diff) {
heroinfo[v] += hero_diff[v]
}
for (let v in enemy_diff) {
enemyinfo[v] += enemy_diff[v]
}
let a = hero_turn % 50 //出手50回合怪物生命未降低直接判负避免死循环
if (a === 0) {
if (enemyinfo.hp >= beforehp) {
return null
} else {
beforehp = enemyinfo.hp
}
//处理完毕后的数据处理
heroDiffList.push(hero_diff)
enemyDiffList.push(enemy_diff)
heroanimateList.push(hero_animate)
enemyanimateList.push(enemy_animate)
//处理属性变化
for (let v in hero_diff) {
heroinfo[v] += hero_diff[v]
}
for (let v in enemy_diff) {
enemyinfo[v] += enemy_diff[v]
}
//出手50回合怪物生命未降低直接判负避免死循环
if (hero_turn === 50) {
if (enemyinfo.hp >= beforehp) {
return null
}
}
}
//下面这些还没修改,原有技能除先攻、连击外暂时全部移除,所有技能需要在上方的模拟循环中做修正

File diff suppressed because it is too large Load Diff