修复部分武将调用get.skillCategoriesOf时未传入player的问题

This commit is contained in:
AstralBarrage 2024-05-30 11:33:45 +08:00
parent 3b12794b3a
commit f10f796ff7
5 changed files with 9 additions and 9 deletions

View File

@ -1440,7 +1440,7 @@ const skills = {
info[3].some(function (skill) {
var info = get.skillInfoTranslation(skill);
if (!info.includes("【杀】")) return false;
var list = get.skillCategoriesOf(skill);
var list = get.skillCategoriesOf(skill, player);
list.remove("锁定技");
return list.length == 0;
})
@ -1472,7 +1472,7 @@ const skills = {
var skills = info[3].filter(function (skill) {
var info = get.skillInfoTranslation(skill);
if (!info.includes("【杀】")) return false;
var list = get.skillCategoriesOf(skill);
var list = get.skillCategoriesOf(skill, get.player());
list.remove("锁定技");
return list.length == 0;
});
@ -1511,7 +1511,7 @@ const skills = {
const skills = info[3].filter(function (skill) {
var info = get.skillInfoTranslation(skill);
if (!info.includes("【杀】")) return false;
var list = get.skillCategoriesOf(skill);
var list = get.skillCategoriesOf(skill, get.player());
list.remove("锁定技");
return list.length == 0;
});
@ -1590,7 +1590,7 @@ const skills = {
var skills = info[3].filter(function (skill) {
var info = get.skillInfoTranslation(skill);
if (!info.includes("【杀】")) return false;
var list = get.skillCategoriesOf(skill);
var list = get.skillCategoriesOf(skill, get.player());
list.remove("锁定技");
return list.length == 0;
});

View File

@ -936,7 +936,7 @@ const skills = {
return true;
},
zhuanhuanji2(skill, player) {
return player.countMark("mbxuetu_status") !== 1;
return player && player.countMark("mbxuetu_status") !== 1;
},
position: "he",
onremove: ["mbxuetu", "mbxuetu_status"],

View File

@ -11159,7 +11159,7 @@ const skills = {
let name = _status.characterlist[i];
if (name.indexOf("zuoci") != -1 || name.indexOf("key_") == 0 || name.indexOf("sp_key_") == 0 || get.is.double(name) || lib.skill.rehuashen.banned.includes(name) || player.storage.rehuashen.character.includes(name)) continue;
let skills = lib.character[name][3].filter(skill => {
const categories = get.skillCategoriesOf(skill);
const categories = get.skillCategoriesOf(skill, player);
return !categories.some(type => lib.skill.rehuashen.bannedType.includes(type));
});
if (skills.length) {
@ -11213,7 +11213,7 @@ const skills = {
node = ui.create.buttonPresets.character(item, "character", position, noclick);
const info = lib.character[item];
const skills = info[3].filter(function (skill) {
const categories = get.skillCategoriesOf(skill);
const categories = get.skillCategoriesOf(skill, get.player());
return !categories.some(type => lib.skill.rehuashen.bannedType.includes(type));
});
if (skills.length) {

View File

@ -4219,7 +4219,7 @@ const skills = {
let name = _status.characterlist[i];
if (name.indexOf("zuoci") != -1 || name.indexOf("key_") == 0 || name.indexOf("sp_key_") == 0 || lib.skill.rehuashen.banned.includes(name) || player.storage.huashen.owned[name]) continue;
let skills = lib.character[name][3].filter(skill => {
const categories = get.skillCategoriesOf(skill);
const categories = get.skillCategoriesOf(skill, player);
return !categories.some(type => lib.skill.rehuashen.bannedType.includes(type));
});
if (skills.length) {

View File

@ -8168,7 +8168,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
event.target = target;
player.awakenSkill("gzshigong");
var list = lib.character[player.name2][3].filter(function (skill) {
return get.skillCategoriesOf(skill).length == 0;
return get.skillCategoriesOf(skill, player).length == 0;
});
if (!list.length) {
event._result = { control: "cancel2" };