diff --git a/character/extra/skill.js b/character/extra/skill.js index aad130050..8d2cf937e 100644 --- a/character/extra/skill.js +++ b/character/extra/skill.js @@ -1997,7 +1997,7 @@ const skills = { if ( !get.tag(card, "damage") || player.countMark("dcxianjin") % 2 || - !player.hasSkillTag("jueqing", null, target) + !player.hasSkillTag("jueqing", false, target) ) return; if (player.isMaxHandcard()) return [1, 1]; return [1, Math.min(3, 1 + player.getStorage("dctuoyu").length)]; @@ -5782,7 +5782,7 @@ const skills = { if (!target.hasFriend()) return; let rec = get.tag(card, "recover"), damage = get.tag(card, "damage"); if (!rec && !damage) return; - if (damage && player.hasSkillTag("jueqing", null, target)) return 1.7; + if (damage && player.hasSkillTag("jueqing", false, target)) return 1.7; let die = [null, 1], temp; game.filterPlayer(i => { diff --git a/character/offline/skill.js b/character/offline/skill.js index cf45fe7d5..2690b2fe7 100644 --- a/character/offline/skill.js +++ b/character/offline/skill.js @@ -845,8 +845,6 @@ const skills = { var go = false, d1 = false; if (get.attitude(player, trigger.player) > 0) { - d1 = true; - if (trigger.player.hasSkill("jueqing") || trigger.player.hasSkill("gangzhi")) d1 = false; for (var target of trigger.targets) { if ( !target.mayHaveShan( @@ -866,15 +864,17 @@ const skills = { true ) ) { - if (!target.hasSkill("gangzhi")) d1 = false; if ( - target.hasSkillTag("filterDamage", null, { + get.attitude(player, target) < 0 && + !trigger.player.hasSkillTag("jueqing", false, target) && + !target.hasSkillTag("filterDamage", null, { player: trigger.player, card: trigger.card, - }) || - get.attitude(player, target) >= 0 - ) - d1 = false; + }) + ) { + d1 = true; + break; + } } } if (trigger.addCount === false || !trigger.player.isPhaseUsing()) go = false; diff --git a/character/onlyOL/skill.js b/character/onlyOL/skill.js index f636485fa..4211a4e93 100644 --- a/character/onlyOL/skill.js +++ b/character/onlyOL/skill.js @@ -869,7 +869,7 @@ const skills = { true ) ) { - if (player.hasSkill("jueqing") || target.hasSkill("gangzhi")) extra_num--; + if (player.hasSkillTag("jueqing", false, target)) extra_num--; else if ( target.hasSkillTag("filterDamage", null, { player: event.player, diff --git a/character/refresh/skill.js b/character/refresh/skill.js index 6e9dbbf1c..13a6fb7b5 100644 --- a/character/refresh/skill.js +++ b/character/refresh/skill.js @@ -3199,7 +3199,7 @@ const skills = { threaten: 0.9, effect: { target: function (card, player, target) { - if (player.hasSkillTag("jueqing")) return; + if (player.hasSkillTag("jueqing", false, target)) return; if (target.hujia) return; if (player._shibei_tmp) return; if (target.hasSkill("shibei_ai")) return; @@ -12842,8 +12842,8 @@ const skills = { ai: { effect: { target: (card, player, target) => { - if (typeof card !== "object" || !get.tag(card, "damage") || target.hasSkill("gangzhi")) return; - if (player.hasSkillTag("jueqing", null, true)) return; + if (typeof card !== "object" || !get.tag(card, "damage")) return; + if (player.hasSkillTag("jueqing", false, target)) return; if (get.color(card) === "red") return [1, 0, 1, 0.6]; return [1, 0.6]; }, diff --git a/character/sp2/skill.js b/character/sp2/skill.js index 98b94fcbd..3538b4b3a 100644 --- a/character/sp2/skill.js +++ b/character/sp2/skill.js @@ -8687,6 +8687,31 @@ const skills = { ai: { jueqing: true, }, + init(player) { + game.addGlobalSkill("gangzhi_jueqing"); + }, + onremove(player) { + game.removeGlobalSkill("gangzhi_jueqing"); + }, + subSkill: { + jueqing: { + trigger: {player: "dieAfter"}, + filter(event, player) { + return !game.hasPlayer(cur => cur.hasSkill("gangzhi")); + }, + silent: true, + forceDie: true, + content() { + game.removeGlobalSkill("gangzhi_jueqing"); + }, + ai: { + jueqing: true, + skillTagFilter(player, tag, arg) { + if (tag === "jueqing") return arg && arg.hasSkill("gangzhi"); + } + } + } + }, }, beizhan: { trigger: { player: "phaseJieshuBegin" }, diff --git a/character/standard/skill.js b/character/standard/skill.js index 9e2b5f692..50d13ce5b 100644 --- a/character/standard/skill.js +++ b/character/standard/skill.js @@ -496,7 +496,7 @@ const skills = { threaten: 0.9, effect: { target: function (card, player, target) { - if (player.hasSkillTag("jueqing")) return; + if (player.hasSkillTag("jueqing", false, target)) return; if (player._stdjinjian_tmp) return; const count = player.storage.counttrigger; if (count && count.stdjinjian_player && count.stdjinjian_player > 0) return; diff --git a/character/tw/skill.js b/character/tw/skill.js index 03286f0ce..387b11384 100644 --- a/character/tw/skill.js +++ b/character/tw/skill.js @@ -1942,8 +1942,7 @@ const skills = { .set( "goon", (function () { - var d1 = true; - if (player.hasSkill("jueqing") || player.hasSkill("gangzhi")) d1 = false; + var d1 = false; if ( !target.mayHaveShan( player, @@ -1962,15 +1961,7 @@ const skills = { true ) ) { - if (!target.hasSkill("gangzhi")) d1 = false; - if ( - !target.hasSkillTag("filterDamage", null, { - player: player, - card: trigger.card, - }) && - get.attitude(player, target) < 0 - ) - return true; + if (get.attitude(player, target) < 0 && !player.hasSkillTag("jueqing", false, target)) return true; } if (d1) return get.damageEffect(player, player, player) > 0; return false; @@ -13720,8 +13711,6 @@ const skills = { "goon", (function () { if (get.attitude(target, player) < 0) return false; - var d1 = true; - if (trigger.player.hasSkill("jueqing") || trigger.player.hasSkill("gangzhi")) d1 = false; for (var target of trigger.targets) { if ( !target.mayHaveShan( @@ -13741,18 +13730,19 @@ const skills = { true ) ) { - if (!target.hasSkill("gangzhi")) d1 = false; if ( + + get.attitude(player, target) < 0 && + !trigger.player.hasSkillTag("jueqing", false, target) && !target.hasSkillTag("filterDamage", null, { player: trigger.player, card: trigger.card, - }) && - get.attitude(player, target) < 0 + }) ) return true; } } - return d1; + return false; })() ); if (!event.target.isUnderControl(true) && !event.target.isOnline()) game.delayx(); @@ -16112,9 +16102,8 @@ const skills = { return event.card.name == "sha" && (event.player == player || player.inRange(event.player)) && player.countCards("he") > 0; }, checkx(event, player) { - let d1 = true, + let d1 = false, e = false; - if (event.player.hasSkill("jueqing") || event.player.hasSkill("gangzhi")) d1 = false; for (let tar of event.targets) { if (event.card.name == "sha") { if ( @@ -16135,13 +16124,14 @@ const skills = { true ) ) { - if (!tar.hasSkill("gangzhi")) d1 = false; if ( + !event.player.hasSkillTag("jueqing", false, tar) && !tar.hasSkillTag("filterDamage", null, { player: event.player, card: event.card, }) ) { + d1 = true; let att = get.attitude(_status.event.player, tar); if (att > 0) return false; if (att < 0) e = true; diff --git a/character/xianding/skill.js b/character/xianding/skill.js index 9cc0fd2a8..8e1a68a26 100644 --- a/character/xianding/skill.js +++ b/character/xianding/skill.js @@ -3705,7 +3705,7 @@ const skills = { ai: { effect: { target: function (card, player, target) { - if (target.countCards("h") > target.getHp() || player.hasSkillTag("jueqing")) return; + if (target.countCards("h") > target.getHp() || player.hasSkillTag("jueqing", false, target)) return; if (player._dcxiongmu_temp) return; if (_status.event.getParent("useCard", true) || _status.event.getParent("_wuxie", true)) return; if (get.tag(card, "damage")) { @@ -12999,7 +12999,7 @@ const skills = { threaten: 0.9, effect: { target: function (card, player, target) { - if (player.hasSkillTag("jueqing")) return; + if (player.hasSkillTag("jueqing", false, target)) return; //if(target.hujia) return; if (player._jinjian_tmp) return; if (_status.event.getParent("useCard", true) || _status.event.getParent("_wuxie", true)) return; diff --git a/character/yijiang/skill.js b/character/yijiang/skill.js index 716a85585..7d6da59da 100644 --- a/character/yijiang/skill.js +++ b/character/yijiang/skill.js @@ -14383,7 +14383,7 @@ const skills = { threaten: 0.9, effect: { target: function (card, player, target) { - if (player.hasSkillTag("jueqing")) return; + if (player.hasSkillTag("jueqing", false, target)) return; if (target.hujia) return; if (player._shibei_tmp) return; if (target.hasSkill("shibei_ai")) return; diff --git a/noname/library/element/player.js b/noname/library/element/player.js index d242c67f6..5e57b93cc 100644 --- a/noname/library/element/player.js +++ b/noname/library/element/player.js @@ -9028,9 +9028,7 @@ export class Player extends HTMLDivElement { */ hasSkillTag(tag, hidden, arg, globalskill) { var skills = this.getSkills(hidden); - if (globalskill) { - skills.addArray(lib.skill.global); - } + if (globalskill !== false) skills.addArray(lib.skill.global); game.expandSkills(skills); for (var i = 0; i < skills.length; i++) { var info = lib.skill[skills[i]];