战斗动画修复!!!
This commit is contained in:
parent
171f0b5d1f
commit
a77c7bf184
@ -460,6 +460,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
"r.webp",
|
||||
"sound.webp",
|
||||
"status.webp",
|
||||
"statusBackground.webp",
|
||||
"suiji.webp",
|
||||
"tati_020101.webp",
|
||||
"tati_020101a.webp",
|
||||
@ -1521,7 +1522,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
"title": "秽翼的尤斯蒂娅",
|
||||
"name": "Eustia",
|
||||
"version": "鸽子窝造塔小队",
|
||||
"floorId": "guangchang",
|
||||
"floorId": "jiaocheng01",
|
||||
"hero": {
|
||||
"image": "hero.webp",
|
||||
"animate": false,
|
||||
@ -1531,10 +1532,10 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
"hp": 1000,
|
||||
"manamax": -1,
|
||||
"mana": 0,
|
||||
"atk": 10,
|
||||
"def": 10,
|
||||
"atk": 30,
|
||||
"def": 20,
|
||||
"mdef": 100,
|
||||
"speed": 10,
|
||||
"speed": 20,
|
||||
"money": 0,
|
||||
"exp": 0,
|
||||
"equipment": [],
|
||||
@ -1546,7 +1547,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
"loc": {
|
||||
"direction": "up",
|
||||
"x": 6,
|
||||
"y": 10
|
||||
"y": 12
|
||||
},
|
||||
"flags": {
|
||||
"itemDetail": true,
|
||||
@ -1557,9 +1558,9 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
"followers": [],
|
||||
"steps": 0,
|
||||
"matk": 0,
|
||||
"spell": 0,
|
||||
"spell": 10,
|
||||
"spelldef": 0,
|
||||
"mhp": 0
|
||||
"mhp": 100
|
||||
},
|
||||
"startCanvas": [
|
||||
{
|
||||
@ -1914,6 +1915,10 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
}
|
||||
],
|
||||
"startText": [
|
||||
{
|
||||
"type": "if",
|
||||
"condition": "false",
|
||||
"true": [
|
||||
{
|
||||
"type": "setText"
|
||||
},
|
||||
@ -1931,6 +1936,8 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
],
|
||||
"time": 500,
|
||||
"keep": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
@ -1944,10 +1951,16 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
"type": "insert",
|
||||
"name": "强制横屏"
|
||||
},
|
||||
{
|
||||
"type": "if",
|
||||
"condition": "false",
|
||||
"true": [
|
||||
{
|
||||
"type": "insert",
|
||||
"name": "chapter0"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"shops": [
|
||||
{
|
||||
@ -2121,7 +2134,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
"redPotion": 100,
|
||||
"bluePotion": 250,
|
||||
"yellowPotion": 500,
|
||||
"greenPotion": 800,
|
||||
"greenPotion": 900,
|
||||
"breakArmor": 0.9,
|
||||
"counterAttack": 0.1,
|
||||
"purify": 3,
|
||||
@ -2129,7 +2142,8 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
"animateSpeed": 300,
|
||||
"moveSpeed": 100,
|
||||
"statusCanvasRowsOnMobile": 3,
|
||||
"floorChangeTime": 500
|
||||
"floorChangeTime": 500,
|
||||
"yellowGem": 2
|
||||
},
|
||||
"flags": {
|
||||
"statusBarItems": [
|
||||
|
@ -22,7 +22,15 @@ main.floors.jiaocheng01=
|
||||
"血瓶介绍:不同大小"
|
||||
]
|
||||
},
|
||||
"changeFloor": {},
|
||||
"changeFloor": {
|
||||
"6,0": {
|
||||
"floorId": "jiaocheng02",
|
||||
"loc": [
|
||||
6,
|
||||
12
|
||||
]
|
||||
}
|
||||
},
|
||||
"beforeBattle": {},
|
||||
"afterBattle": {},
|
||||
"afterGetItem": {},
|
||||
|
@ -25,7 +25,15 @@ main.floors.jiaocheng02=
|
||||
"法杖:魔攻比例10%,魔防比例0%"
|
||||
]
|
||||
},
|
||||
"changeFloor": {},
|
||||
"changeFloor": {
|
||||
"6,12": {
|
||||
"floorId": "jiaocheng01",
|
||||
"loc": [
|
||||
6,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"beforeBattle": {},
|
||||
"afterBattle": {},
|
||||
"afterGetItem": {},
|
||||
|
@ -308,14 +308,12 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
}
|
||||
// 获得战斗伤害信息
|
||||
var damageInfo = core.getDamageInfo(enemyId, null, x, y) || {};
|
||||
|
||||
if (!core.getFlag("noAnimate")) await core.attackAnimate(
|
||||
enemyId,
|
||||
damageInfo.start[0],
|
||||
damageInfo.start[1],
|
||||
damageInfo.start[2],
|
||||
damageInfo.start[3],
|
||||
damageInfo.start[4],
|
||||
damageInfo.heroDiffList,
|
||||
damageInfo.enemyDiffList,
|
||||
damageInfo.heroanimateList,
|
||||
@ -792,7 +790,6 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
}
|
||||
|
||||
var guards = [];
|
||||
|
||||
// 光环和支援检查
|
||||
if (!core.status.checkBlock) core.status.checkBlock = {};
|
||||
|
||||
@ -1047,7 +1044,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
enemyinfo.now = oneTurn
|
||||
enemyinfo.onAttack = true
|
||||
}
|
||||
const start = [core.clone(heroinfo), core.clone(enemyinfo), core.clone(equipInfo), oneTurn, onegcd] //记录开始战斗时的属性并转发
|
||||
const start = [core.clone(heroinfo), core.clone(enemyinfo), core.clone(equipInfo), oneTurn] //记录开始战斗时的属性并转发
|
||||
//---第三部分:递归开始---
|
||||
|
||||
const heroDiffList = [],
|
||||
@ -1064,7 +1061,6 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
enemy_diff = {},
|
||||
hero_animate = [],
|
||||
enemy_animate = [];
|
||||
|
||||
if (enemyinfo.onAttack) { //怪物先攻的场合
|
||||
//这里计算怪物攻击时发生的各种变化,同时计入enemy_diff
|
||||
let mon_damage = 0
|
||||
@ -1097,6 +1093,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
enemyinfo.onAttack = false
|
||||
enemyinfo.now = 0
|
||||
onattack = true
|
||||
|
||||
}
|
||||
equipInfo.forEach(v => {
|
||||
if (v.onAttack) {
|
||||
@ -1204,7 +1201,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
if (onattack) {
|
||||
//处理完毕后的数据处理
|
||||
heroDiffList.push(hero_diff)
|
||||
enemyDiffList.push(enemy_diff)
|
||||
@ -1225,6 +1222,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
return null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
BIN
project/images/statusBackground.webp
Normal file
BIN
project/images/statusBackground.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
@ -37,7 +37,7 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||
"canUseItemEffect": "true"
|
||||
},
|
||||
"greenGem": {
|
||||
"cls": "tools",
|
||||
"cls": "items",
|
||||
"name": "绿宝石",
|
||||
"text": ",法强+${core.values.greenGem}",
|
||||
"itemEffect": "core.status.hero.spell += core.values.greenGem * core.status.thisMap.ratio",
|
||||
@ -92,7 +92,7 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||
"canUseItemEffect": "true"
|
||||
},
|
||||
"sword0": {
|
||||
"cls": "items",
|
||||
"cls": "equips",
|
||||
"name": "破旧的剑",
|
||||
"text": "一把已经生锈的剑",
|
||||
"equip": {
|
||||
@ -103,7 +103,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||
}
|
||||
},
|
||||
"itemEffect": "core.status.hero.atk += 0",
|
||||
"itemEffectTip": ",攻击+0"
|
||||
"itemEffectTip": ",攻击+0",
|
||||
"equipCls": "匕首"
|
||||
},
|
||||
"sword1": {
|
||||
"cls": "equips",
|
||||
@ -557,9 +558,15 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||
"canUseItemEffect": "true"
|
||||
},
|
||||
"I375": {
|
||||
"cls": "items",
|
||||
"cls": "equips",
|
||||
"name": "新物品",
|
||||
"canUseItemEffect": "true"
|
||||
"canUseItemEffect": "true",
|
||||
"equipCls": "法杖",
|
||||
"equip": {
|
||||
"type": 0,
|
||||
"value": {},
|
||||
"percentage": {}
|
||||
}
|
||||
},
|
||||
"I396": {
|
||||
"cls": "items",
|
||||
|
@ -3087,7 +3087,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
break;
|
||||
case "matk":
|
||||
case "mhp":
|
||||
text += `(${core.status.hero[item]})%`;
|
||||
text = `${Math.floor(core.getRealStatus("spell")* core.getRealStatus(item)/100)}(${text})%`;
|
||||
break;
|
||||
}
|
||||
core.fillBoldText1(
|
||||
@ -3933,8 +3933,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
return nextInfo == null ||
|
||||
typeof nextInfo == "number" ||
|
||||
nextInfo.damage >= pre ?
|
||||
null :
|
||||
[start, nextInfo.damage];
|
||||
null : [start, nextInfo.damage];
|
||||
};
|
||||
var currAtk = start_atk;
|
||||
while (true) {
|
||||
@ -4371,7 +4370,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
if (!id || !cls || !(cls === "enemys" || cls === "enemy48"))
|
||||
return core.clearContinueAutomaticRoute(callback);
|
||||
// 非强制战斗
|
||||
if (!core.enemys.canBattle(id, x, y) && !force && !core.status.event.id) {
|
||||
if (core.enemys.getDamage(id, x, y) === null && !force && !core.status.event.id) {
|
||||
core.stopSound();
|
||||
core.playSound("操作失败");
|
||||
core.drawTip("你打不过此怪物!", id);
|
||||
@ -5284,13 +5283,18 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
|
||||
var critical = this.nextCriticals(enemy, 1, x, y, floorId);
|
||||
if (critical.length > 0) critical = critical[0];
|
||||
|
||||
var criticalSpeed = core.nextCriticals_speed(enemy, 1, x, y, floorId);
|
||||
if (criticalSpeed.length > 0) criticalSpeed = criticalSpeed[0];
|
||||
var criticalSpell = core.nextCriticals_spell(enemy, 1, x, y, floorId);
|
||||
if (criticalSpell.length > 0) criticalSpell = criticalSpell[0];
|
||||
var e = core.clone(enemy);
|
||||
for (var v in enemyInfo) {
|
||||
e[v] = enemyInfo[v];
|
||||
}
|
||||
if (x != null && y != null) {
|
||||
e.locs = [[x, y]];
|
||||
e.locs = [
|
||||
[x, y]
|
||||
];
|
||||
}
|
||||
e.name = core.getEnemyValue(enemy, "name", x, y, floorId);
|
||||
e.specialText = specialText;
|
||||
@ -5298,6 +5302,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
e.damage = this.getDamage(enemy, x, y, floorId);
|
||||
e.critical = critical[0];
|
||||
e.criticalDamage = critical[1];
|
||||
e.criticalAtk = [critical[0], critical[1]];
|
||||
e.criticalSpeed = criticalSpeed;
|
||||
e.criticalSpell = criticalSpell;
|
||||
e.defDamage = this._getCurrentEnemys_addEnemy_defDamage(
|
||||
enemy,
|
||||
x,
|
||||
@ -5540,6 +5547,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
},
|
||||
"一防减伤": function () {
|
||||
// 在此增加新插件
|
||||
//
|
||||
|
||||
ui.prototype._drawBook_drawRow3 = function (
|
||||
index,
|
||||
enemy,
|
||||
@ -5555,24 +5564,10 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
var col1 = left,
|
||||
col2 = left + (width * 9) / 25,
|
||||
col3 = left + (width * 17) / 25;
|
||||
core.fillText("ui", "临界", col1, position, "#DDDDDD", f13);
|
||||
core.fillText(
|
||||
"ui",
|
||||
core.formatBigNumber(enemy.critical || 0),
|
||||
col1 + 30,
|
||||
position,
|
||||
null,
|
||||
b13
|
||||
);
|
||||
core.fillText("ui", "减伤", col2, position, null, f13);
|
||||
core.fillText(
|
||||
"ui",
|
||||
core.formatBigNumber(enemy.criticalDamage || 0),
|
||||
col2 + 30,
|
||||
position,
|
||||
null,
|
||||
b13
|
||||
);
|
||||
core.fillText('ui', '攻击临界', col1 - 50, position, '#DDDDDD', f13);
|
||||
core.fillText('ui', `[${core.formatBigNumber(enemy.criticalAtk?.[0] || 0)},${core.formatBigNumber(enemy.criticalAtk?.[1] || 0)}]`, col1 + 10, position, null, b13);
|
||||
core.fillText('ui', '法强临界', col2 - 33, position, null, f13);
|
||||
core.fillText('ui', `[${core.formatBigNumber(enemy.criticalSpell[0] || 0)},${core.formatBigNumber(enemy.criticalSpell?.[1] || 0)}]`, col2 + 27, position, null, b13);
|
||||
//core.fillText('ui', '加防', col3, position, null, f13);
|
||||
core.fillText("ui", "1防", col3, position, null, f13);
|
||||
core.fillText(
|
||||
@ -5590,8 +5585,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
k = k || 1;
|
||||
var nowDamage = this._getDamage(enemy, null, x, y, floorId);
|
||||
var nextDamage = this._getDamage(
|
||||
enemy,
|
||||
{ def: core.status.hero.def + k },
|
||||
enemy, { def: core.status.hero.def + k },
|
||||
x,
|
||||
y,
|
||||
floorId
|
||||
@ -21636,7 +21630,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
main.dom.gameDraw.appendChild(animateAttack);
|
||||
const { lcm, gcd } = core.plugin.utils;
|
||||
|
||||
function animateOnAttack(name, onenemy) {
|
||||
function animateonAttack(name, onenemy) {
|
||||
if (onenemy) {
|
||||
playanimate(name, 290, 180);
|
||||
} else {
|
||||
@ -21650,7 +21644,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
enemyInfo,
|
||||
equipInfo,
|
||||
oneTurn,
|
||||
onegcd,
|
||||
heroDiffList,
|
||||
enemyDiffList,
|
||||
heroanimateList,
|
||||
@ -21664,8 +21657,18 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
enemyInfo.id = enemyId;
|
||||
enemyInfo.cls = core.getClsFromId(enemyId);
|
||||
enemyInfo.name = core.material.enemys[enemyId].name;
|
||||
|
||||
if (oneTurn < 120) oneTurn *= Math.round(120 / oneTurn);
|
||||
let max = heroInfo.speed
|
||||
if (enemyInfo.speed > max) max = enemyInfo.speed
|
||||
equipInfo.forEach(v => { if (v.speed > max) max = v.speed })
|
||||
let i = 0
|
||||
while (oneTurn * i / max < 15) {
|
||||
i++
|
||||
}
|
||||
if (heroInfo.onAttack) heroInfo.now *= i
|
||||
if (enemyInfo.onAttack) enemyInfo.now *= i
|
||||
equipInfo.forEach(v => { if (v.onAttack) v.now *= i })
|
||||
oneTurn *= i
|
||||
console.log([oneTurn, heroInfo.now, enemyInfo.now])
|
||||
let time = 0,
|
||||
farme = 0;
|
||||
return new Promise((res) => {
|
||||
@ -21708,7 +21711,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
enemyInfo,
|
||||
equipInfo,
|
||||
farme,
|
||||
onegcd,
|
||||
heroDiffList,
|
||||
enemyDiffList,
|
||||
heroanimateList,
|
||||
@ -21723,11 +21725,11 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
equipInfo.forEach(function (v) {
|
||||
if (v.isAttack) attack = true;
|
||||
});
|
||||
let onattack = false;
|
||||
if (heroInfo.onAttack) onattack = true;
|
||||
if (enemyInfo.onAttack) onattack = true;
|
||||
let onAttack = false;
|
||||
if (heroInfo.onAttack) onAttack = true;
|
||||
if (enemyInfo.onAttack) onAttack = true;
|
||||
equipInfo.forEach(function (v) {
|
||||
if (v.onAttack) onattack = true;
|
||||
if (v.onAttack) onAttack = true;
|
||||
});
|
||||
core.clearMap(ctx);
|
||||
let animate = Math.floor(farme / 30);
|
||||
@ -21888,7 +21890,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
"bold 36px pala"
|
||||
);
|
||||
|
||||
if (!attack && !onattack) enemyInfo.now += enemyInfo.speed / onegcd;
|
||||
if (!attack && !onAttack) enemyInfo.now += enemyInfo.speed;
|
||||
let enemynow = Math.min(100 + (enemyInfo.now / oneTurn) * 215, 315);
|
||||
ctx.fillStyle = "#FFFFFF";
|
||||
ctx.beginPath();
|
||||
@ -21927,7 +21929,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
}
|
||||
core.drawLine(ctx, 100, 125, 315, 125, "#FFFFFF", 5);
|
||||
equipInfo.forEach(function (v) {
|
||||
if (!attack && !onattack) v.now += v.speed / onegcd;
|
||||
if (!attack && !onAttack) v.now += v.speed;
|
||||
let vnow = Math.min(100 + (v.now / oneTurn) * 215, 315);
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(vnow, 120);
|
||||
@ -21939,7 +21941,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
|
||||
core.drawIcon(ctx, v.id, vnow - 16, 54, 32, 32);
|
||||
});
|
||||
if (!attack && !onattack) heroInfo.now += hero.speed / onegcd;
|
||||
if (!attack && !onAttack) heroInfo.now += hero.speed;
|
||||
let heronow = Math.min(100 + (heroInfo.now / oneTurn) * 215, 315);
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(heronow, 120);
|
||||
@ -22236,7 +22238,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
"bold 36px pala"
|
||||
);
|
||||
|
||||
if (!attack && !onattack) enemyInfo.now += enemyInfo.speed / onegcd;
|
||||
if (!attack && !onAttack) enemyInfo.now += enemyInfo.speed;
|
||||
let enemynow = Math.min(100 + (enemyInfo.now / oneTurn) * 215, 315);
|
||||
ctx.fillStyle = "#FFFFFF";
|
||||
ctx.beginPath();
|
||||
@ -22275,7 +22277,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
}
|
||||
core.drawLine(ctx, 100, 125, 315, 125, "#FFFFFF", 5);
|
||||
equipInfo.forEach(function (v) {
|
||||
if (!attack && !onattack) v.now += v.speed / onegcd;
|
||||
if (!attack && !onAttack) v.now += v.speed;
|
||||
let vnow = Math.min(100 + (v.now / oneTurn) * 215, 315);
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(vnow, 120);
|
||||
@ -22287,7 +22289,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
|
||||
core.drawIcon(ctx, v.id, vnow - 16, 54, 32, 32);
|
||||
});
|
||||
if (!attack && !onattack) heroInfo.now += hero.speed / onegcd;
|
||||
if (!attack && !onAttack) heroInfo.now += hero.speed;
|
||||
let heronow = Math.min(100 + (heroInfo.now / oneTurn) * 215, 315);
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(heronow, 120);
|
||||
@ -22311,12 +22313,12 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
}
|
||||
let nowattacking = false;
|
||||
if (heroInfo.now >= oneTurn && !heroInfo.isAttack) {
|
||||
heroInfo.onattack = false;
|
||||
heroInfo.onAttack = false;
|
||||
heroInfo.isAttack = true;
|
||||
nowattacking = true;
|
||||
}
|
||||
if (enemyInfo.now >= oneTurn && !enemyInfo.isAttack) {
|
||||
enemyInfo.onattack = false;
|
||||
enemyInfo.onAttack = false;
|
||||
enemyInfo.isAttack = true;
|
||||
nowattacking = true;
|
||||
}
|
||||
@ -22324,7 +22326,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
equipInfo.forEach((v) => {
|
||||
if (v.now >= oneTurn && !v.isAttack) {
|
||||
v.isAttack = true;
|
||||
v.onattack = false;
|
||||
v.onAttack = false;
|
||||
nowattacking = true;
|
||||
equipanimate.push(v);
|
||||
}
|
||||
@ -22355,7 +22357,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
for (const v in enemyDiffList[turn]) {
|
||||
enemyInfo[v] += enemyDiffList[turn][v];
|
||||
}
|
||||
enemyanimateList[turn].forEach((v) => animateOnAttack(v, true));
|
||||
enemyanimateList[turn].forEach((v) => animateonAttack(v, true));
|
||||
let enemydamage = heroDiffList[turn].hp;
|
||||
if (enemydamage > 0) enemydamage = "+" + enemydamage;
|
||||
text = enemydamage === 0 ? "抵抗" : enemydamage;
|
||||
@ -22380,7 +22382,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
for (const v in heroDiffList[turn]) {
|
||||
heroInfo[v] += heroDiffList[turn][v];
|
||||
}
|
||||
heroanimateList[turn].forEach((v) => animateOnAttack(v, false));
|
||||
heroanimateList[turn].forEach((v) => animateonAttack(v, false));
|
||||
|
||||
if (enemyDiffList[turn] < 0) enemyInfo.inAttack = true;
|
||||
if (heroDiffList[turn] < 0) heroInfo.inAttack = true;
|
||||
@ -22435,7 +22437,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
enemyInfo,
|
||||
equipInfo,
|
||||
farme,
|
||||
onegcd,
|
||||
heroDiffList,
|
||||
enemyDiffList,
|
||||
heroanimateList,
|
||||
@ -23423,6 +23424,142 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
for (var name in result.value)
|
||||
core.status.hero[name] += result.value[name];
|
||||
};
|
||||
},
|
||||
"攻速临界": function () {
|
||||
// 在此增加新插件
|
||||
//临界表
|
||||
core.ui._drawBookDetail_turnAndCriticals = function (enemy, floorId, texts) {
|
||||
// 临界表
|
||||
var criticals = core.enemys.nextCriticals(enemy.id, 8, enemy.x, enemy.y, floorId).map(function (v) {
|
||||
return core.formatBigNumber(v[0]) + ":" + core.formatBigNumber(v[1]);
|
||||
});
|
||||
while (criticals[0] == '0:0') criticals.shift();
|
||||
texts.push("\r[#FF6A6A]\\d攻击临界表:\\d\r[]" + JSON.stringify(criticals));
|
||||
var criticals_spell = core.nextCriticals_spell(enemy.id, 8, enemy.x, enemy.y, floorId).map(function (v) {
|
||||
return core.formatBigNumber(v[0]) + ":" + core.formatBigNumber(v[1]);
|
||||
});
|
||||
while (criticals_spell[0] == '0:0') criticals_spell.shift();
|
||||
texts.push("\r[#FF6A6A]\\d法强临界表:\\d\r[]" + JSON.stringify(criticals_spell));
|
||||
var criticals_speed = core.nextCriticals_speed(enemy.id, 8, enemy.x, enemy.y, floorId).map(function (v) {
|
||||
return core.formatBigNumber(v[0]) + ":" + core.formatBigNumber(v[1]);
|
||||
});
|
||||
while (criticals_speed[0] == '0:0') criticals_speed.shift();
|
||||
texts.push("\r[#FF6A6A]\\d速度临界表:\\d\r[]" + JSON.stringify(criticals_speed));
|
||||
|
||||
}
|
||||
//攻速临界计算
|
||||
core.nextCriticals_speed = function (enemy, number, x, y, floorId) {
|
||||
if (typeof enemy == 'string') enemy = core.material.enemys[enemy];
|
||||
number = number || 1;
|
||||
|
||||
var info = core.getDamageInfo(enemy, null, x, y, floorId);
|
||||
if (info == null) { // 如果未破防...
|
||||
return [
|
||||
['?', '?']
|
||||
];
|
||||
}
|
||||
|
||||
if (typeof info == 'number') {
|
||||
return [
|
||||
[0, 0]
|
||||
];
|
||||
}
|
||||
return core.enemys._nextSpeedCriticals_useBinarySearch(enemy, info, number, x, y, floorId);
|
||||
}
|
||||
enemys.prototype._nextSpeedCriticals_useBinarySearch = function (enemy, info, number, x, y, floorId) {
|
||||
var mon_hp = info.mon_hp,
|
||||
hero_speed = core.status.hero.speed,
|
||||
mon_def = info.mon_def,
|
||||
pre = info.damage;
|
||||
var list = [];
|
||||
var start_speed = hero_speed;
|
||||
|
||||
var calNext = function (currSpeed, maxSpeed) {
|
||||
var start = Math.floor(currSpeed),
|
||||
end = Math.floor(maxSpeed);
|
||||
if (start > end) return null;
|
||||
|
||||
while (start < end) {
|
||||
var mid = Math.floor((start + end) / 2);
|
||||
if (mid - start > end - mid) mid--;
|
||||
var nextInfo = core.enemys.getDamageInfo(enemy, { "speed": mid }, x, y, floorId);
|
||||
if (nextInfo == null || (typeof nextInfo == 'number')) return null;
|
||||
if (pre > nextInfo.damage) end = mid;
|
||||
else start = mid + 1;
|
||||
}
|
||||
var nextInfo = core.enemys.getDamageInfo(enemy, { "speed": start }, x, y, floorId);
|
||||
return nextInfo == null || (typeof nextInfo == 'number') || nextInfo.damage >= pre ? null : [start, nextInfo.damage];
|
||||
}
|
||||
var currSpeed = start_speed;
|
||||
while (true) {
|
||||
var next = calNext(currSpeed + 1, Number.MAX_SAFE_INTEGER, pre);
|
||||
if (next == null) break;
|
||||
currSpeed = next[0];
|
||||
pre = next[1];
|
||||
list.push([currSpeed - hero_speed, info.damage - pre]);
|
||||
if (pre <= 0 && !core.flags.enableNegativeDamage) break;
|
||||
if (list.length >= number) break;
|
||||
}
|
||||
if (list.length == 0) list.push([0, 0]);
|
||||
return list;
|
||||
}
|
||||
//法强临界计算
|
||||
core.nextCriticals_spell = function (enemy, number, x, y, floorId) {
|
||||
if (typeof enemy == 'string') enemy = core.material.enemys[enemy];
|
||||
number = number || 1;
|
||||
|
||||
var info = core.getDamageInfo(enemy, null, x, y, floorId);
|
||||
if (info == null) { // 如果未破防...
|
||||
return [
|
||||
['?', '?']
|
||||
];
|
||||
}
|
||||
|
||||
if (typeof info == 'number') {
|
||||
return [
|
||||
[0, 0]
|
||||
];
|
||||
}
|
||||
return core.enemys._nextSpellCriticals_useBinarySearch(enemy, info, number, x, y, floorId);
|
||||
}
|
||||
enemys.prototype._nextSpellCriticals_useBinarySearch = function (enemy, info, number, x, y, floorId) {
|
||||
var mon_hp = info.mon_hp,
|
||||
hero_spell = core.status.hero.spell,
|
||||
mon_def = info.mon_def,
|
||||
turn = info.mon_turn,
|
||||
pre = info.damage;
|
||||
var list = [];
|
||||
var start_spell = hero_spell;
|
||||
|
||||
var calNext = function (currSpell, maxSpell) {
|
||||
var start = Math.floor(currSpell),
|
||||
end = Math.floor(maxSpell);
|
||||
if (start > end) return null;
|
||||
|
||||
while (start < end) {
|
||||
var mid = Math.floor((start + end) / 2);
|
||||
if (mid - start > end - mid) mid--;
|
||||
var nextInfo = core.enemys.getDamageInfo(enemy, { "spell": mid }, x, y, floorId);
|
||||
if (nextInfo == null || (typeof nextInfo == 'number')) return null;
|
||||
if (turn > nextInfo.mon_turn) end = mid;
|
||||
else start = mid + 1;
|
||||
}
|
||||
var nextInfo = core.enemys.getDamageInfo(enemy, { "spell": start }, x, y, floorId);
|
||||
return nextInfo == null || (typeof nextInfo == 'number') || nextInfo.mon_turn >= turn ? null : [start, nextInfo.damage];
|
||||
}
|
||||
var currSpell = start_spell;
|
||||
while (true) {
|
||||
var next = calNext(currSpell + 1, Number.MAX_SAFE_INTEGER, pre, turn);
|
||||
if (next == null) break;
|
||||
currSpell = next[0];
|
||||
pre = next[1];
|
||||
list.push([currSpell - hero_spell, info.damage - pre]);
|
||||
if (pre <= 0 && !core.flags.enableNegativeDamage) break;
|
||||
if (list.length >= number) break;
|
||||
}
|
||||
if (list.length == 0) list.push([0, 0]);
|
||||
return list;
|
||||
}
|
||||
},
|
||||
"手册(临时)": function () {
|
||||
// 在此增加新插件
|
||||
@ -23434,6 +23571,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
this._drawBook_drawRow3(index, enemy, top, left, width, top + 74);
|
||||
this._drawBook_drawRow5(index, enemy, top, left, width, top + 90);
|
||||
}
|
||||
|
||||
ui.prototype._drawBook_drawRow4 = function (index, enemy, top, left, width, position) {
|
||||
// 绘制第一行
|
||||
core.setTextAlign('ui', 'left');
|
||||
@ -23456,6 +23594,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
f13 = this._buildFont(13, false);
|
||||
var col1 = left,
|
||||
col2 = left + width * 13 / 25;
|
||||
core.fillText('ui', '速度临界', col1 - 120, position, '#DDDDDD', f13);
|
||||
core.fillText('ui', `[${core.formatBigNumber(enemy.criticalSpeed?.[0] || 0)},${core.formatBigNumber(enemy.criticalSpeed?.[1] || 0)}]`, col1 - 60, position, null, b13);
|
||||
|
||||
core.fillText('ui', "勇士出手次数", col1, position, '#DDDDDD', f13);
|
||||
core.fillText('ui', core.getDamageInfo(enemy, null) ? core.getDamageInfo(enemy, null).hero_turn : '???', col1 + 80, position, null, b13);
|
||||
|
Loading…
Reference in New Issue
Block a user