修复部分武将调用get.skillCategoriesOf时未传入player的问题
This commit is contained in:
parent
3b12794b3a
commit
f10f796ff7
|
@ -1440,7 +1440,7 @@ const skills = {
|
||||||
info[3].some(function (skill) {
|
info[3].some(function (skill) {
|
||||||
var info = get.skillInfoTranslation(skill);
|
var info = get.skillInfoTranslation(skill);
|
||||||
if (!info.includes("【杀】")) return false;
|
if (!info.includes("【杀】")) return false;
|
||||||
var list = get.skillCategoriesOf(skill);
|
var list = get.skillCategoriesOf(skill, player);
|
||||||
list.remove("锁定技");
|
list.remove("锁定技");
|
||||||
return list.length == 0;
|
return list.length == 0;
|
||||||
})
|
})
|
||||||
|
@ -1472,7 +1472,7 @@ const skills = {
|
||||||
var skills = info[3].filter(function (skill) {
|
var skills = info[3].filter(function (skill) {
|
||||||
var info = get.skillInfoTranslation(skill);
|
var info = get.skillInfoTranslation(skill);
|
||||||
if (!info.includes("【杀】")) return false;
|
if (!info.includes("【杀】")) return false;
|
||||||
var list = get.skillCategoriesOf(skill);
|
var list = get.skillCategoriesOf(skill, get.player());
|
||||||
list.remove("锁定技");
|
list.remove("锁定技");
|
||||||
return list.length == 0;
|
return list.length == 0;
|
||||||
});
|
});
|
||||||
|
@ -1511,7 +1511,7 @@ const skills = {
|
||||||
const skills = info[3].filter(function (skill) {
|
const skills = info[3].filter(function (skill) {
|
||||||
var info = get.skillInfoTranslation(skill);
|
var info = get.skillInfoTranslation(skill);
|
||||||
if (!info.includes("【杀】")) return false;
|
if (!info.includes("【杀】")) return false;
|
||||||
var list = get.skillCategoriesOf(skill);
|
var list = get.skillCategoriesOf(skill, get.player());
|
||||||
list.remove("锁定技");
|
list.remove("锁定技");
|
||||||
return list.length == 0;
|
return list.length == 0;
|
||||||
});
|
});
|
||||||
|
@ -1590,7 +1590,7 @@ const skills = {
|
||||||
var skills = info[3].filter(function (skill) {
|
var skills = info[3].filter(function (skill) {
|
||||||
var info = get.skillInfoTranslation(skill);
|
var info = get.skillInfoTranslation(skill);
|
||||||
if (!info.includes("【杀】")) return false;
|
if (!info.includes("【杀】")) return false;
|
||||||
var list = get.skillCategoriesOf(skill);
|
var list = get.skillCategoriesOf(skill, get.player());
|
||||||
list.remove("锁定技");
|
list.remove("锁定技");
|
||||||
return list.length == 0;
|
return list.length == 0;
|
||||||
});
|
});
|
||||||
|
|
|
@ -936,7 +936,7 @@ const skills = {
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
zhuanhuanji2(skill, player) {
|
zhuanhuanji2(skill, player) {
|
||||||
return player.countMark("mbxuetu_status") !== 1;
|
return player && player.countMark("mbxuetu_status") !== 1;
|
||||||
},
|
},
|
||||||
position: "he",
|
position: "he",
|
||||||
onremove: ["mbxuetu", "mbxuetu_status"],
|
onremove: ["mbxuetu", "mbxuetu_status"],
|
||||||
|
|
|
@ -11159,7 +11159,7 @@ const skills = {
|
||||||
let name = _status.characterlist[i];
|
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;
|
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 => {
|
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));
|
return !categories.some(type => lib.skill.rehuashen.bannedType.includes(type));
|
||||||
});
|
});
|
||||||
if (skills.length) {
|
if (skills.length) {
|
||||||
|
@ -11213,7 +11213,7 @@ const skills = {
|
||||||
node = ui.create.buttonPresets.character(item, "character", position, noclick);
|
node = ui.create.buttonPresets.character(item, "character", position, noclick);
|
||||||
const info = lib.character[item];
|
const info = lib.character[item];
|
||||||
const skills = info[3].filter(function (skill) {
|
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));
|
return !categories.some(type => lib.skill.rehuashen.bannedType.includes(type));
|
||||||
});
|
});
|
||||||
if (skills.length) {
|
if (skills.length) {
|
||||||
|
|
|
@ -4219,7 +4219,7 @@ const skills = {
|
||||||
let name = _status.characterlist[i];
|
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;
|
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 => {
|
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));
|
return !categories.some(type => lib.skill.rehuashen.bannedType.includes(type));
|
||||||
});
|
});
|
||||||
if (skills.length) {
|
if (skills.length) {
|
||||||
|
|
|
@ -8168,7 +8168,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
||||||
event.target = target;
|
event.target = target;
|
||||||
player.awakenSkill("gzshigong");
|
player.awakenSkill("gzshigong");
|
||||||
var list = lib.character[player.name2][3].filter(function (skill) {
|
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) {
|
if (!list.length) {
|
||||||
event._result = { control: "cancel2" };
|
event._result = { control: "cancel2" };
|
||||||
|
|
Loading…
Reference in New Issue