不允许把不能辅助的怪物移动到辅助位置

This commit is contained in:
枫谷剑仙 2022-11-30 05:05:49 +08:00
parent 2a9ee325ee
commit 1d5253f5da
2 changed files with 8 additions and 3 deletions

View File

@ -552,8 +552,8 @@ function calculateAbility(member, assist = null, solo = true, teamsCount = 1) {
[{ index: 2, scale: 0.01 }, { index: 12, scale: 0.02 }, { index: 29, scale: 0.03 }, { index: 44, scale: 0.08 }], //ATK
[{ index: 3, scale: 0.1 }, { index: 12, scale: 0.2 }, { index: 30, scale: 0.3 }, { index: 45, scale: 0.35 }] //RCV
];
const memberCurves = [memberCard.hp, memberCard.atk, memberCard.rcv];
const assistCurves = assistCard ? [assistCard.hp, assistCard.atk, assistCard.rcv] : null;
const memberCurves = [memberCard?.hp, memberCard?.atk, memberCard?.rcv];
const assistCurves = assistCard?.canAssist && [assistCard.hp, assistCard.atk, assistCard.rcv];
const dge = formation.dungeonEnchance;
const dgeRate = [dge.rate.hp, dge.rate.atk, dge.rate.rcv];
@ -585,7 +585,7 @@ function calculateAbility(member, assist = null, solo = true, teamsCount = 1) {
let n_assist_base = 0,
n_assist_plus = 0; //辅助的bonus
//计算辅助的额外血量
if (assistCard?.id > 0 && assistCard.enabled && enableBouns) {
if (assistCurves && enableBouns) {
n_assist_base = Math.round(curve(assistCurves[idx], assist.level, assistCard.maxLevel, assistCard.limitBreakIncr, limitBreakIncr120[idx])); //辅助等级基础三维
n_assist_plus = assist.plus[idx] * plusAdd[idx]; //辅助加值增加量
}

View File

@ -2332,6 +2332,11 @@ function initialize() {
const isCopy = changeSwapToCopy.checked;
let from = formation.teams[formArr[0]][formArr[1]][formArr[2]];
let to = formation.teams[toArr[0]][toArr[1]][toArr[2]];
let fromCard = from.card, toCard = to.card;
if (toArr[1] && !fromCard?.canAssist && fromCard?.id > 0 || formArr[1] && !toCard?.canAssist && toCard?.id > 0) {
console.warn("该角色不能作为辅助");
return;
}
if (formArr[1] != toArr[1]) //从武器拖到非武器才改变类型
{
from = changeType(from, formArr[1]);