From aa025823909770d40ad12a6939dfeaa1211eb040 Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Sun, 4 Feb 2024 09:53:05 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B9=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E3=80=90=E5=AE=88=E6=88=90=E3=80=91ai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/huicui.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/character/huicui.js b/character/huicui.js index 83ee125f6..c0366dd71 100644 --- a/character/huicui.js +++ b/character/huicui.js @@ -187,10 +187,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ noh:true, skillTagFilter(player,tag,arg){ - if(player.countCards('h')!==1) return false; + if(player===_status.currentPhase||player.countCards('h')!==1) return false; return game.hasPlayer(current=>{ return current.hasSkill('dcshoucheng')&&get.attitude(current,player)>0; }); + }, + effect:{ + target(card,player,target){ + if(target===_status.currentPhase||target.countCards('h')!==1||!game.hasPlayer(current=>{ + return current.hasSkill('dcshoucheng')&&get.attitude(current,target)>0; + })) return; + if(get.tag(card,'lose')||get.tag(card,'discard')) return [1,1.6]; + } } } } From 6216b9730c2cd7575d2bf78e76e85b33180a81a2 Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Sun, 4 Feb 2024 10:19:24 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E4=BC=98=E5=8C=96=E3=80=90=E5=AE=88?= =?UTF-8?q?=E6=88=90=E3=80=91ai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/sp.js | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/character/sp.js b/character/sp.js index 9e88aa187..56e24a4ff 100755 --- a/character/sp.js +++ b/character/sp.js @@ -22712,6 +22712,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audioname:['liushan'] }, shoucheng:{ + init(player){ + game.addGlobalSkill('shoucheng_draw',player); + }, trigger:{ global:['equipAfter','addJudgeAfter','loseAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], }, @@ -22743,6 +22746,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "step 2" if(result.bool){ player.logSkill(event.name,target); + if(player!==target&&(get.mode()!=='identity'||player.identity!=='nei')) player.addExpose(0.15); target.draw(); } "step 3" @@ -22750,8 +22754,28 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ threaten:1.3, - expose:0.2, - noh:true, + }, + subSkill:{ + draw:{ + trigger:{player:'dieAfter'}, + filter(event,player){ + return !game.hasPlayer(current=>{ + return current.hasSkill('shoucheng'); + },true); + }, + content(){ + game.removeGlobalSkill('shoucheng_draw'); + }, + ai:{ + noh:true, + skillTagFilter(player,tag,arg){ + if(player===_status.currentPhase||player.countCards('h')!==1) return false; + return game.hasPlayer(current=>{ + return current.hasSkill('shoucheng')&&player.isFriendOf(current); + }); + } + } + } } }, hengzheng:{ From 601a858c1f7014a3e4a4d6faed227f94d75dfa7f Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Sun, 4 Feb 2024 11:29:04 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B0=83=E7=94=A8lib.fil?= =?UTF-8?q?ter.cardUsable=E7=9A=84=E8=80=83=E8=99=91=E6=AC=A1=E6=95=B0?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E9=BB=98=E8=AE=A4event=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noname/library/element/content.js | 3 ++- noname/library/element/player.js | 6 +++++- noname/library/index.js | 7 ++++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/noname/library/element/content.js b/noname/library/element/content.js index 81965aa48..9a1cdaeda 100644 --- a/noname/library/element/content.js +++ b/noname/library/element/content.js @@ -1049,7 +1049,8 @@ export const Content = { card.cards = cards.slice(0); event.card = card; } - if (!lib.filter.cardEnabled(card, player) || (event.addCount !== false && !lib.filter.cardUsable(card, player))) { + if (!lib.filter.cardEnabled(card, player) || event.addCount !== false && + !lib.filter.cardUsable(card, player, event.getParent('chooseToUse'))) { event.result = { bool: false }; event.finish(); return; diff --git a/noname/library/element/player.js b/noname/library/element/player.js index 0145806f5..08ed00819 100644 --- a/noname/library/element/player.js +++ b/noname/library/element/player.js @@ -6892,7 +6892,11 @@ export class Player extends HTMLDivElement { var info = get.info(card); if (info.multicheck && !info.multicheck(card, this)) return false; if (!lib.filter.cardEnabled(card, this)) return false; - if (includecard && !lib.filter.cardUsable(card, this)) return false; + if (includecard){ + let evt = includecard; + if(typeof evt !== 'object') evt = _status.event.getParent('chooseToUse'); + if(!lib.filter.cardUsable(card, this, evt)) return false; + } if (distance !== false && !lib.filter.targetInRange(card, this, target)) return false; return lib.filter[includecard ? 'targetEnabledx' : 'targetEnabled'](card, this, target); } diff --git a/noname/library/index.js b/noname/library/index.js index 43bdaad58..3f6aa4bb1 100644 --- a/noname/library/index.js +++ b/noname/library/index.js @@ -9967,11 +9967,12 @@ export class Library extends Uninstantable { return filterTarget(card, player, current); }); }, - targetEnabledx: function (card, player, target) { + targetEnabledx: function (card, player, target, event) { if (!card) return false; if (!target || !target.isIn()) return false; - var event = _status.event; - if (event._backup && event._backup.filterCard == lib.filter.filterCard && (!lib.filter.cardEnabled(card, player, event) || !lib.filter.cardUsable(card, player, event))) return false; + if(typeof event !== 'object') event = _status.event.getParent('chooseToUse'); + if (event._backup && event._backup.filterCard == lib.filter.filterCard && + (!lib.filter.cardEnabled(card, player, event) || !lib.filter.cardUsable(card, player, event))) return false; if (event.addCount_extra) { if (!lib.filter.cardUsable2(card, player) && !game.checkMod(card, player, target, false, 'cardUsableTarget', player)) return false; } From ca90bcb2610089289c0c0cf9a8e61930e825f5b7 Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Sun, 4 Feb 2024 11:33:22 +0800 Subject: [PATCH 4/8] =?UTF-8?q?Revert=20"=E4=BF=AE=E5=A4=8D=E5=B9=B6?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E3=80=90=E5=AE=88=E6=88=90=E3=80=91ai"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit aa025823909770d40ad12a6939dfeaa1211eb040. --- character/huicui.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/character/huicui.js b/character/huicui.js index c0366dd71..83ee125f6 100644 --- a/character/huicui.js +++ b/character/huicui.js @@ -187,18 +187,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ noh:true, skillTagFilter(player,tag,arg){ - if(player===_status.currentPhase||player.countCards('h')!==1) return false; + if(player.countCards('h')!==1) return false; return game.hasPlayer(current=>{ return current.hasSkill('dcshoucheng')&&get.attitude(current,player)>0; }); - }, - effect:{ - target(card,player,target){ - if(target===_status.currentPhase||target.countCards('h')!==1||!game.hasPlayer(current=>{ - return current.hasSkill('dcshoucheng')&&get.attitude(current,target)>0; - })) return; - if(get.tag(card,'lose')||get.tag(card,'discard')) return [1,1.6]; - } } } } From 9f1de8ebb00bda58817dde1d9470c9d4d429a1ad Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Sun, 4 Feb 2024 11:57:14 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=8B=E6=9D=80?= =?UTF-8?q?=E9=92=9F=E4=BC=9A=E3=80=90=E8=87=AA=E7=AB=8B=E3=80=91=E6=94=92?= =?UTF-8?q?=E7=89=8Cai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/mobile.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/character/mobile.js b/character/mobile.js index 2bff8ac75..611f7aa31 100644 --- a/character/mobile.js +++ b/character/mobile.js @@ -7523,6 +7523,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ //钟会 requanji:{ audio:2, + mod:{ + aiOrder:(player,card,num)=>{ + if(num<=0||typeof card!=='object'||!player.isPhaseUsing()||!player.hasSkill('zili')||player.needsToDiscard()) return num; + if(player.getExpansions('quanji').length<3&&player.getUseValue(card) Date: Sun, 4 Feb 2024 11:57:55 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A5=9E=E5=8F=B8?= =?UTF-8?q?=E9=A9=AC=E6=87=BF=E3=80=90=E5=BF=8D=E6=88=92=E3=80=91ai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/extra.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/character/extra.js b/character/extra.js index 242869e97..71e4f2936 100755 --- a/character/extra.js +++ b/character/extra.js @@ -5699,10 +5699,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mod:{ aiOrder:(player,card,num)=>{ if(num<=0||typeof card!=='object'||!player.isPhaseUsing()) return num; - if(player.awakenedSkills.includes('sbaiyin')){ + if(player.hasSkill('sbaiyin')){ + if(player.countMark('renjie')<4&&player.getUseValue(card) Date: Sun, 4 Feb 2024 12:22:35 +0800 Subject: [PATCH 7/8] bugfix --- noname/library/element/content.js | 4 +++- noname/library/element/player.js | 5 +++-- noname/library/index.js | 7 ++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/noname/library/element/content.js b/noname/library/element/content.js index 9a1cdaeda..3c2497162 100644 --- a/noname/library/element/content.js +++ b/noname/library/element/content.js @@ -1049,8 +1049,10 @@ export const Content = { card.cards = cards.slice(0); event.card = card; } + let evt = event.getParent('chooseToUse'); + if (get.itemtype(evt) !== 'event') evt = event; if (!lib.filter.cardEnabled(card, player) || event.addCount !== false && - !lib.filter.cardUsable(card, player, event.getParent('chooseToUse'))) { + !lib.filter.cardUsable(card, player, evt)) { event.result = { bool: false }; event.finish(); return; diff --git a/noname/library/element/player.js b/noname/library/element/player.js index 08ed00819..3c84f0a98 100644 --- a/noname/library/element/player.js +++ b/noname/library/element/player.js @@ -6894,8 +6894,9 @@ export class Player extends HTMLDivElement { if (!lib.filter.cardEnabled(card, this)) return false; if (includecard){ let evt = includecard; - if(typeof evt !== 'object') evt = _status.event.getParent('chooseToUse'); - if(!lib.filter.cardUsable(card, this, evt)) return false; + if (typeof evt !== 'object') evt = _status.event.getParent('chooseToUse'); + if (get.itemtype(evt) !== 'event') evt = undefined; + if (!lib.filter.cardUsable(card, this, evt)) return false; } if (distance !== false && !lib.filter.targetInRange(card, this, target)) return false; return lib.filter[includecard ? 'targetEnabledx' : 'targetEnabled'](card, this, target); diff --git a/noname/library/index.js b/noname/library/index.js index 3f6aa4bb1..e1398899a 100644 --- a/noname/library/index.js +++ b/noname/library/index.js @@ -9967,12 +9967,13 @@ export class Library extends Uninstantable { return filterTarget(card, player, current); }); }, - targetEnabledx: function (card, player, target, event) { + targetEnabledx: function (card, player, target) { if (!card) return false; if (!target || !target.isIn()) return false; - if(typeof event !== 'object') event = _status.event.getParent('chooseToUse'); + let event = _status.event, evt = event.getParent('chooseToUse'); + if(get.itemtype(evt) !== 'event') evt = event; if (event._backup && event._backup.filterCard == lib.filter.filterCard && - (!lib.filter.cardEnabled(card, player, event) || !lib.filter.cardUsable(card, player, event))) return false; + (!lib.filter.cardEnabled(card, player, event) || !lib.filter.cardUsable(card, player, evt))) return false; if (event.addCount_extra) { if (!lib.filter.cardUsable2(card, player) && !game.checkMod(card, player, target, false, 'cardUsableTarget', player)) return false; } From 59c401ddd90a5ac680a6416180adeed951592510 Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Sun, 4 Feb 2024 13:11:28 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=86=99=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/huicui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/character/huicui.js b/character/huicui.js index 8966db040..74b7d2fef 100644 --- a/character/huicui.js +++ b/character/huicui.js @@ -164,7 +164,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ noh:true, skillTagFilter(player,tag,arg){ - if(player.countCards('h')!=1||(_status.currentPhase&&_status.currentPhase==player)) return false; + if(player===_status.currentPhase||player.countCards('h')!=1) return false; return game.hasPlayer(current=>{ return current.hasSkill('dcshoucheng')&&get.attitude(current,player)>0; });