From cc5dcff07d6f5c5225e826ae00860d3b3d599c47 Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Tue, 26 Dec 2023 23:22:54 +0800 Subject: [PATCH 01/13] =?UTF-8?q?=E3=80=90=E6=8C=AF=E9=9E=98=E3=80=91ai?= =?UTF-8?q?=E5=86=99=E5=8F=8D=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/jsrg.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/character/jsrg.js b/character/jsrg.js index f34c6bbb1..2d8838604 100644 --- a/character/jsrg.js +++ b/character/jsrg.js @@ -5455,12 +5455,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ effect:{ target:function(card,player,target){ - if(player._jsrgzhenqiao_aiChecking) return; if(target===player&&get.subtype(card)==='equip1'&&!player.getEquip(1)){ - if(card.name!=='zhuge'||target.getCardUsable('sha')||!target.needsToDiscard()) return; - if(target.countCards('hs',i=>{ + if(card.name!=='zhuge'||target.getCardUsable('sha')||!target.needsToDiscard()||target.countCards('hs',i=>{ return get.name(i)==='sha'&&lib.filter.cardEnabled(i,target); - })>1) return 'zeroplayertarget'; + })<2) return 'zeroplayertarget'; } } } From b40817bc681bdafe74419457cbab200f94918ce5 Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Wed, 27 Dec 2023 08:33:20 +0800 Subject: [PATCH 02/13] bugfix --- card/standard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/card/standard.js b/card/standard.js index e4bf4f355..bfb5fa286 100644 --- a/card/standard.js +++ b/card/standard.js @@ -254,7 +254,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, order:function(item,player){ if(player.hasSkillTag('presha',true,null,true)) return 10; - if(typeof item==='object'&&item.hasNature('linked')){ + if(typeof item==='object'&&game.hasNature(item,'linked')){ if(game.hasPlayer(function(current){ return current!=player&¤t.isLinked()&&player.canUse(item,current,null,true)&&get.effect(current,item,player,player)>0&&lib.card.sha.ai.canLink(player,current,item); })&&game.countPlayer(function(current){ From a81c5c5c9f1e017eb6ca73e48187d52380b027db Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Wed, 27 Dec 2023 08:53:29 +0800 Subject: [PATCH 03/13] =?UTF-8?q?=E4=BC=98=E5=8C=96=E3=80=90=E6=96=87?= =?UTF-8?q?=E5=92=8C=E4=B9=B1=E6=AD=A6=E3=80=91ai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- card/guozhan.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/card/guozhan.js b/card/guozhan.js index a3ef0eda2..55f3d28c2 100644 --- a/card/guozhan.js +++ b/card/guozhan.js @@ -225,7 +225,20 @@ game.import('card',function(lib,game,ui,get,ai,_status){ player.chooseControl().set('prompt','文和乱武:请选择一项').set('choiceList',[ '令'+str+'弃置两张类型不同的手牌', '弃置'+str+'的一张手牌', - ]); + ]).set('ai',()=>{ + let target=_status.event.getParent().target,hs=target.getCards('h'),type=[]; + if(hs.length<2) return 0; + hs.forEach(i=>{ + type.add(get.type2(i,target)); + }); + if(target.identity!=='qun'){ + if(type.length>1) return 0; + return 1; + } + if(type.length<2||target.hp<3) return 1; + if(hs.length===2) return 0; + return 1; + }); 'step 2' if(result.index==0){ var list=[],hs=target.getCards('h'); From f6a70ee22338aeb69e8a25c2bf15a5591054c45b Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Wed, 27 Dec 2023 10:24:53 +0800 Subject: [PATCH 04/13] =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E7=A5=9E=E9=A9=AC=E8=B6=85ai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/extra.js | 26 ++++++++++++++++++++++++++ character/offline.js | 42 ++++++++++++++++++++++++++++++++++++++++++ character/shenhua.js | 1 + character/sp2.js | 1 + 4 files changed, 70 insertions(+) diff --git a/character/extra.js b/character/extra.js index 3c02885bb..063ea3147 100755 --- a/character/extra.js +++ b/character/extra.js @@ -2193,6 +2193,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ intro:{ content:'受到的伤害+1且改为雷属性', }, + ai:{ + effect:{ + target:(card,player,target)=>{ + if(!get.tag(card,'damage')) return; + if(target.hasSkillTag('nodamage')||target.hasSkillTag('nothunder')) return 'zeroplayertarget'; + if(target.hasSkillTag('filterDamage',null,{ + player:player, + card:lib.element.VCard({ + name:card.name, + nature:'thunder' + },[card]) + })) return; + return 2; + } + } + } }, init:{ audio:'shouli', @@ -2286,6 +2302,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return get.suit(card,current)==suit; }); })]; + }, + target:(card,player,target)=>{ + if(card.name==='sha'&&!player.hasSkillTag('directHit_ai',true,{ + target:target, + card:card + },true)&&game.hasPlayer(current=>{ + return current.hasCard(cardx=>{ + return get.subtype(cardx)==='equip3'; + },'e'); + })) return [0, -0.5]; } } } diff --git a/character/offline.js b/character/offline.js index bb48350bc..148ded2f2 100644 --- a/character/offline.js +++ b/character/offline.js @@ -758,6 +758,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ intro:{ content:'受到的伤害+1且改为雷属性', }, + ai:{ + effect:{ + target:(card,player,target)=>{ + if(!get.tag(card,'damage')) return; + if(target.hasSkillTag('nodamage')||target.hasSkillTag('nothunder')) return 'zeroplayertarget'; + if(target.hasSkillTag('filterDamage',null,{ + player:player, + card:lib.element.VCard({ + name:card.name, + nature:'thunder' + },[card]) + })) return; + return 2; + } + } + } }, init:{ audio:'psshouli', @@ -900,6 +916,32 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ threaten:100, reverseEquip:true, + ai:{ + effect:{ + player:(card,player,target)=>{ + if(typeof card!=='object') return; + let suit=get.suit(card); + if(!lib.suit.contains(suit)||player.hasCard(function(i){ + return get.suit(i,player)==suit; + },'h')) return; + return [1,game.countPlayer(current=>{ + return current.countCards('e',card=>{ + return get.suit(card,current)==suit; + }); + })]; + }, + target:(card,player,target)=>{ + if(card.name==='sha'&&!player.hasSkillTag('directHit_ai',true,{ + target:target, + card:card + },true)&&game.hasPlayer(current=>{ + return current.hasCard(cardx=>{ + return get.subtype(cardx)==='equip3'; + },'e'); + })) return [0, -0.5]; + } + } + } } }, //战役篇田丰 diff --git a/character/shenhua.js b/character/shenhua.js index 4823e0452..dab254745 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -4146,6 +4146,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, logTarget:'source', ai:{ + maixie_defend:true, threaten:function(player,target){ if(target.hp==1) return 0.2; return 1.5; diff --git a/character/sp2.js b/character/sp2.js index 586c6f156..e6b5679a8 100644 --- a/character/sp2.js +++ b/character/sp2.js @@ -8253,6 +8253,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ expose:0.5, + maixie_defend:true }, }, "yechou2":{ From 6c2128805e4728cc1dbbb1455636750cd037eda5 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Wed, 27 Dec 2023 15:34:21 +0800 Subject: [PATCH 05/13] =?UTF-8?q?=E5=87=8C=E6=93=8D=E3=80=81=E5=BE=90?= =?UTF-8?q?=E8=8D=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/mobile.js | 4 ++-- character/sb.js | 6 ++++-- character/sp.js | 21 +++++++++------------ 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/character/mobile.js b/character/mobile.js index be32a2efa..510082732 100644 --- a/character/mobile.js +++ b/character/mobile.js @@ -14164,7 +14164,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return !event.numFixed; }, content:function(){ - trigger.num+=1+Math.floor(player.countCards('e')/2); + trigger.num+=1+Math.ceil(player.countCards('e')/2); } }, yingjian:{ @@ -14989,7 +14989,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ fenyin_info:'你的回合内,当你使用牌时,若此牌与你于此回合内使用的上一张牌的颜色不同,则你可以摸一张牌。', yingjian_info:'准备阶段开始时,你可以视为使用一张无距离限制的【杀】。', dujin:'独进', - dujin_info:'摸牌阶段,你可以多摸X+1张牌。(X为你装备区里牌数的一半且向下取整)', + dujin_info:'摸牌阶段,你可以多摸X+1张牌(X为你装备区里牌数的一半且向上取整)。', shixin:'释衅', shixin_info:'锁定技,当你受到火属性伤害时,你防止此伤害。', zhaohuo:'招祸', diff --git a/character/sb.js b/character/sb.js index f46d3e241..a34b077d4 100644 --- a/character/sb.js +++ b/character/sb.js @@ -515,8 +515,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ const sum=storage[0]; const names=storage[1]; dialog.addText('剩余可记录'+sum+'次牌名'); - dialog.addText('已记录牌名:'); - dialog.addSmall([names,'vcard']); + if(names.length){ + dialog.addText('已记录牌名:'); + dialog.addSmall([names,'vcard']); + } } }, }, diff --git a/character/sp.js b/character/sp.js index 37abe21ea..4807eb369 100755 --- a/character/sp.js +++ b/character/sp.js @@ -24530,21 +24530,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:"本回合内手牌上限-#", }, }, - "xinfu_shajue":{ + xinfu_shajue:{ audio:2, - trigger:{ - global:"dying", - }, - filter:function (event,player){ - return event.player.hp<0&&event.player!=player; + trigger:{global:'dying'}, + filter:function(event,player){ + return event.player!=player; }, forced:true, - //priority:7, - content:function (){ - if(trigger.parent.name=='damage'&&get.itemtype(trigger.parent.cards)=='cards'&&get.position(trigger.parent.cards[0],true)=='o'){ - player.gain(trigger.parent.cards,"gain2"); - } + content:function(){ player.addMark('xionghuo',1); + if(trigger.player.hp<0&&trigger.parent.name=='damage'&&get.itemtype(trigger.parent.cards)=='cards'&&get.position(trigger.parent.cards[0],true)=='o'){ + player.gain(trigger.parent.cards,'gain2'); + } }, }, xinfu_jianjie:{ @@ -25533,7 +25530,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "xionghuo_low":"凶镬", "xionghuo_low_info":"", "xinfu_shajue":"杀绝", - "xinfu_shajue_info":"锁定技,其他角色进入濒死状态时,若其体力值小于0,则你获得一个“暴戾”标记,并获得使其进入濒死状态的牌。", + "xinfu_shajue_info":"锁定技,其他角色进入濒死状态时,你获得一个“暴戾”标记。然后若其体力值小于0,你获得使其进入濒死状态的牌。", xinfu_jianjie:"荐杰", jianjie:'荐杰', jianjie_info:'①你的第一个准备阶段开始时,你令一名其他角色获得“龙印”,然后令另一名其他角色获得“凤印”。②出牌阶段限一次。若当前回合不是你的第一个回合,则你可以移动场上的“龙印”或“凤印”。③拥有“龙印”或“凤印”的其他角色死亡时,你转移该角色的“龙印”和“凤印”。④拥有“龙印”/“凤印”的角色视为拥有〖火计〗/〖连环〗,且同时拥有这两种标记的角色视为拥有〖业炎〗。', From b69f5fa7e65ca406d93a4bbc54f063c7953ee850 Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Wed, 27 Dec 2023 15:53:07 +0800 Subject: [PATCH 06/13] =?UTF-8?q?=E4=BC=98=E5=8C=96=E3=80=90=E5=A4=AA?= =?UTF-8?q?=E5=B9=B3=E8=A6=81=E6=9C=AF=E3=80=91ai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- card/guozhan.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/card/guozhan.js b/card/guozhan.js index 55f3d28c2..cd3455a41 100644 --- a/card/guozhan.js +++ b/card/guozhan.js @@ -1344,6 +1344,18 @@ game.import('card',function(lib,game,ui,get,ai,_status){ })){ return [0,0,0,0]; } + }, + target:(card,player,target)=>{ + if(target._g_taipingyaoshu_temp) return; + if(get.subtype(card)==='equip2'&&target.getEquip('taipingyaoshu')&&!target.countEmpty(2)){ + target._g_taipingyaoshu_temp=true; + let lose=get.effect(target,{name:'losehp'},target,target), + draw=get.effect(target,{name:'wuzhong'},target,target); + if(lose<0&&target.hp<=1&&!target.hasCard(i=>{ + return get.name(i)==='tao'&&lib.filter.cardEnabled(i,target,'forceEnable'); + })) draw=0; + return [1,(lose+draw)/get.attitude(target,target)]; + } } } } From 936831fec4e5ee5c74bfc196adee2b41661cac5d Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Wed, 27 Dec 2023 15:54:50 +0800 Subject: [PATCH 07/13] =?UTF-8?q?=E5=B7=AE=E7=82=B9=E5=84=BF=E5=BF=98?= =?UTF-8?q?=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- card/guozhan.js | 1 + 1 file changed, 1 insertion(+) diff --git a/card/guozhan.js b/card/guozhan.js index cd3455a41..a8b7d4397 100644 --- a/card/guozhan.js +++ b/card/guozhan.js @@ -1351,6 +1351,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ target._g_taipingyaoshu_temp=true; let lose=get.effect(target,{name:'losehp'},target,target), draw=get.effect(target,{name:'wuzhong'},target,target); + delete target._g_taipingyaoshu_temp; if(lose<0&&target.hp<=1&&!target.hasCard(i=>{ return get.name(i)==='tao'&&lib.filter.cardEnabled(i,target,'forceEnable'); })) draw=0; From d0a3222339a62869ba14b0a95e75662b911e4de1 Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Wed, 27 Dec 2023 16:56:34 +0800 Subject: [PATCH 08/13] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E2=80=9C=E5=8D=A1?= =?UTF-8?q?=E7=89=8C=E2=80=9Ddraw=E5=B9=B6=E6=9B=B4=E6=96=B0=E6=9C=AC?= =?UTF-8?q?=E4=BD=93=E7=9B=B8=E5=85=B3ai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- card/guozhan.js | 2 +- card/standard.js | 10 ++++++++++ character/clan.js | 6 +++--- character/ddd.js | 10 +++++----- character/diy.js | 8 ++++---- character/huicui.js | 4 ++-- character/jsrg.js | 7 ++++--- character/mobile.js | 8 ++++---- character/offline.js | 2 +- character/onlyOL.js | 2 +- character/refresh.js | 2 +- character/sb.js | 6 +++--- character/shenhua.js | 2 +- character/shiji.js | 6 +++--- character/sp.js | 8 ++++---- character/sp2.js | 2 +- character/tw.js | 6 +++--- character/xianding.js | 4 ++-- character/yijiang.js | 6 +++--- 19 files changed, 56 insertions(+), 45 deletions(-) diff --git a/card/guozhan.js b/card/guozhan.js index a8b7d4397..51465fd24 100644 --- a/card/guozhan.js +++ b/card/guozhan.js @@ -1350,7 +1350,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ if(get.subtype(card)==='equip2'&&target.getEquip('taipingyaoshu')&&!target.countEmpty(2)){ target._g_taipingyaoshu_temp=true; let lose=get.effect(target,{name:'losehp'},target,target), - draw=get.effect(target,{name:'wuzhong'},target,target); + draw=2*get.effect(target,{name:'draw'},target,target); delete target._g_taipingyaoshu_temp; if(lose<0&&target.hp<=1&&!target.hasCard(i=>{ return get.name(i)==='tao'&&lib.filter.cardEnabled(i,target,'forceEnable'); diff --git a/card/standard.js b/card/standard.js index bfb5fa286..67710990c 100644 --- a/card/standard.js +++ b/card/standard.js @@ -14,6 +14,16 @@ game.import('card',function(lib,game,ui,get,ai,_status){ } } }, + draw:{ + ai:{ + result:{ + target:1 + }, + tag:{ + draw:1 + } + } + }, losehp:{ ai:{ result:{ diff --git a/character/clan.js b/character/clan.js index ecfcd46e3..f6f58f610 100644 --- a/character/clan.js +++ b/character/clan.js @@ -1398,9 +1398,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ target.classList.remove('linked2'); var eff=cards[0][1]; if(eff>0) return eff; - return Math.max((get.effect(target,{name:'wuzhong'},player,player)+get.effect(player,{name:'wuzhong'},player,player)/3),get.recoverEffect(target,player,player)); + return Math.max((2*get.effect(target,{name:'draw'},player,player)+0.6*get.effect(player,{name:'draw'},player,player)),get.recoverEffect(target,player,player)); } - return Math.max((get.effect(target,{name:'wuzhong'},player,player)+get.effect(player,{name:'wuzhong'},player,player)/3),get.recoverEffect(target,player,player)); + return Math.max((2*get.effect(target,{name:'draw'},player,player)+0.6*get.effect(player,{name:'draw'},player,player)),get.recoverEffect(target,player,player)); }).set('goon',player.countCards('hs',card=>{ return get.name(card)=='jiu'&&player.hasUseTarget(card); })&&player.countCards('hs',card=>{ @@ -1425,7 +1425,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var player=_status.event.player,target=_status.event.getParent().target; if(!target.isDamaged()) return 0; if(get.attitude(player,target)<=0&&player.countCards('he',card=>get.value(card)<0)>=2) return 0; - return (get.effect(target,{name:'wuzhong'},player,player)+get.effect(player,{name:'wuzhong'},player,player)/3)>get.recoverEffect(target,player,player)?0:1; + return (2*get.effect(target,{name:'draw'},player,player)+0.6*get.effect(player,{name:'draw'},player,player))>get.recoverEffect(target,player,player)?0:1; }); } else event.finish(); diff --git a/character/ddd.js b/character/ddd.js index cbbdf2f66..fce068fcd 100644 --- a/character/ddd.js +++ b/character/ddd.js @@ -794,7 +794,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return get.color(card)==color; },'h')){ if(color=='red') return get.recoverEffect(player,player,player)+2/Math.max(2,get.value(button.link)); - if(color=='black') return get.effect(target,{name:'wuzhong'},target,player)+2/Math.max(2,get.value(button.link)); + if(color=='black') return 2*get.effect(target,{name:'draw'},target,player)+2/Math.max(2,get.value(button.link)); } return get.value(button.link)/3; }) @@ -828,7 +828,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var prompt2='用'+get.translation(event.card1)+'交换对方的'+get.translation(event.card2); if(color=='black'){ prompt2+=',然后对方摸两张牌'; - next.set('goon',get.effect(target,{name:'wuzhong'},target,player)>0); + next.set('goon',2*get.effect(target,{name:'draw'},target,player)>0); } else if(color=='red'&&player.isDamaged()){ prompt2+=',然后你回复1点体力'; @@ -1105,7 +1105,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 1' player.chooseTarget('是否令一名其他角色摸等量的牌?',lib.filter.notMe).set('ai',target=>{ var player=get.player(); - return get.effect(target,{name:'wuzhong'},player,player); + return get.effect(target,{name:'draw'},player,player); }); 'step 2' if(result.bool){ @@ -1676,7 +1676,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return player.countCards('h')==target.countCards('h')&&player!=target; }).set('ai',target=>{ var player=get.player(); - return Math.max(get.effect(target,{name:'wuzhong'},player,player),get.effect(target,{name:'guohe'},player,player)/2); + return Math.max(get.effect(target,{name:'draw'},player,player),get.effect(target,{name:'guohe'},player,player)/2); }); if(result.bool){ var target=result.targets[0]; @@ -1729,7 +1729,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ })){ player.chooseTarget('整军:是否令一名角色摸一张牌?').set('ai',function(target){ var player=_status.event.player; - return get.effect(target,{name:'wuzhong'},player,player); + return get.effect(target,{name:'draw'},player,player); }); } else event.goto(2); diff --git a/character/diy.js b/character/diy.js index 535752670..03b87777a 100755 --- a/character/diy.js +++ b/character/diy.js @@ -1414,7 +1414,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var player=_status.event.player,target=_status.event.getParent().target; switch(button.link){ case 'damage':return get.damageEffect(target,player,player); - case 'draw':return get.effect(player,{name:'wuzhong'},player,player) + case 'draw':return 2*get.effect(player,{name:'draw'},player,player) case 'discard':return get.effect(target,{name:'guohe_copy2'},player,player)*Math.min(1.6,target.countCards('he')); case 'use':return _status.event.getRand('minagi_peiquan')*4; } @@ -1447,7 +1447,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return baseEffect+Math.max(...choices.map(choice=>{ switch(choice){ case 'damage':return get.damageEffect(target,player,player); - case 'draw':return get.effect(player,{name:'wuzhong'},player,player); + case 'draw':return 2*get.effect(player,{name:'draw'},player,player); case 'discard':return get.effect(target,{name:'guohe_copy2'},player,player)*Math.min(1.6,target.countCards('he')); case 'use':return _status.event.getRand('minagi_peiquan')*4; } @@ -2643,7 +2643,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.chooseTarget('退论:是否令一名角色摸一张牌或弃置一张牌?').set('ai',function(target){ var player=_status.event.player; var att=get.attitude(player,target); - if(att>0||target.countCards('he')==0) return get.effect(target,{name:'wuzhong'},player,player)/2; + if(att>0||target.countCards('he')==0) return get.effect(target,{name:'draw'},player,player); return get.effect(target,{name:'guohe_copy2'},target,player); }); } @@ -12458,7 +12458,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ choicex=choices.slice(0); var getx=function(a){ switch(a){ - case 'draw':return get.effect(player,{name:'wuzhong'},player,player); + case 'draw':return 2*get.effect(player,{name:'draw'},player,player); case 'damage':return get.damageEffect(_status.event.getParent().target,player,player); default:return 0; } diff --git a/character/huicui.js b/character/huicui.js index 7b89af868..89f1fdbd2 100644 --- a/character/huicui.js +++ b/character/huicui.js @@ -6164,7 +6164,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, logTarget:'player', check:function(event,player){ - var eff=get.effect(player,{name:'wuzhong'},player,player)/2; + var eff=get.effect(player,{name:'draw'},player,player); if(player.countCards('h')+1<=event.player.countCards('h')&&event.player.countCards('he')>0) eff+=get.effect(event.player,{name:'guohe_copy2'},player,player); return eff; }, @@ -7513,7 +7513,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ result:{ player:function(player,target){ var eff=get.recoverEffect(target,player,player); - if(target.getDamagedHp()>1) eff+=get.effect(target,{name:'wuzhong'},player,player)/2; + if(target.getDamagedHp()>1) eff+=get.effect(target,{name:'draw'},player,player); return eff; }, }, diff --git a/character/jsrg.js b/character/jsrg.js index 2d8838604..0967d627e 100644 --- a/character/jsrg.js +++ b/character/jsrg.js @@ -1583,8 +1583,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; })&&(player.hp>2||get.damageEffect(player,player,player)>=0)) return player; var info=game.filterPlayer().map(current=>{ - let damage=undamaged.includes(current),card={name:damage?'damage':'wuzhong'}; - return [current,get.effect(current,card,player,player)/(damage?1.5:1)]; + let damage=undamaged.includes(current),card={name:damage?'damage':'draw'}; + return [current,get.effect(current,card,player,player)*(damage?0.7:2)]; }).sort((a,b)=>b[1]-a[1])[0]; if(info[1]>0) return info[0]; return null; @@ -5392,7 +5392,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ onremove:true, prompt2:'失去1点体力并防止此伤害,然后你与其各摸一张牌', check:function(event,player){ - return get.damageEffect(event.player,event.source,player,event.nature)*Math.sqrt(event.num)<=get.effect(player,{name:'losehp'},player,player); + return get.damageEffect(event.player,event.source,_status.event.player,event.nature)*event.num < + get.effect(player,{name:'losehp'},player,_status.event.player)+get.effect(player,{name:'draw'},player,_status.event.player)+get.effect(event.player,{name:'draw'},player,_status.event.player)/2; }, group:'jsrgjishan_recover', content:function(){ diff --git a/character/mobile.js b/character/mobile.js index be32a2efa..aae191b5d 100644 --- a/character/mobile.js +++ b/character/mobile.js @@ -1193,7 +1193,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ]).set('prompt','雀颂:请选择一项').set('ai',()=>{ var player=_status.event.player; var len=_status.event.len; - return get.effect(player,{name:'wuzhong'},player,player)*len/2>=get.recoverEffect(player,player,player)?0:1; + return get.effect(player,{name:'draw'},player,player)*len>=get.recoverEffect(player,player,player)?0:1; }).set('len',len); } } @@ -3588,7 +3588,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ for(var card of cards){ var num=i+1; if(cards2.slice(0,num).contains(card)) continue; - if(get.tag(card,'damage')&&i>0) count+=get.effect(player,{name:'wuzhong'},player)/2; + if(get.tag(card,'damage')&&i>0) count+=get.effect(player,{name:'draw'},player); var targets2=targets.filter(current=>{ return player.canUse(card,current,false)&&get.distance(player,current)<=num&&get.effect(current,card,player,player)>0; }); @@ -3827,7 +3827,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ getValue:function(player,mark,target){ let dis=Math.sqrt(get.distance(player,target,'absolute')); if(target.isTurnedOver()) dis++; - let draw=get.effect(target,{name:'wuzhong'},target,target)/2; + let draw=get.effect(target,{name:'draw'},target,target); switch(mark.slice(6)){ case 'wushi': if(target.hasJudge('bingliang')) return 12/(1+target.getCardUsable('sha',true)); @@ -4486,7 +4486,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var att=get.attitude(player,target),eff=[0,0]; var hs=player.countCards('h'),ht=target.countCards('h'); if(hs>=ht){ - eff[0]=get.effect(target,{name:'wuzhong'},player,player)/2; + eff[0]=get.effect(target,{name:'draw'},player,player); if(player.storage.sbyaoming_status==0) eff[0]*=1.2; } if(hs<=ht){ diff --git a/character/offline.js b/character/offline.js index 148ded2f2..bdd90d992 100644 --- a/character/offline.js +++ b/character/offline.js @@ -3088,7 +3088,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.chooseTarget(get.prompt('zylianji'),'令一名角色摸一张牌').set('ai',target=>{ var player=_status.event.player; if(target==player&&player.needsToDiscard(1)) return 1; - return get.effect(target,{name:'wuzhong'},player,player); + return get.effect(target,{name:'draw'},player,player); }); 'step 1' if(result.bool){ diff --git a/character/onlyOL.js b/character/onlyOL.js index 1f1c6a63b..e6efb8eef 100644 --- a/character/onlyOL.js +++ b/character/onlyOL.js @@ -139,7 +139,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ]).set('ai',()=>{ var player=_status.event.player; var list=_status.event.list; - var num1=get.effect(player,{name:'wuzhong'},player,player)/2; + var num1=get.effect(player,{name:'draw'},player,player); var num2=get.recoverEffect(player,player,player); return num1*list[0]>num2*list[1]?0:1; }).set('list',[-num1,player.getDamagedHp()]); diff --git a/character/refresh.js b/character/refresh.js index a6687ca52..ed6967418 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -3479,7 +3479,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ case 'diamond': if(target.isIn()){ str+=(',令'+strt+'摸两张牌'); - goon=get.effect(target,{name:'wuzhong'},player,player); + goon=2*get.effect(target,{name:'draw'},player,player); } break; case 'spade': diff --git a/character/sb.js b/character/sb.js index f46d3e241..0264eaca3 100644 --- a/character/sb.js +++ b/character/sb.js @@ -3992,7 +3992,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 0' trigger.source.chooseBool('樵拾:是否令'+get.translation(player)+'回复'+trigger.num+'点体力,然后你摸两张牌?').set('ai',()=>{ return _status.event.bool; - }).set('bool',get.recoverEffect(player,trigger.source,trigger.source)+get.effect(trigger.source,{name:'wuzhong'},trigger.source)>5); + }).set('bool',get.recoverEffect(player,trigger.source,trigger.source)+2*get.effect(trigger.source,{name:'draw'},trigger.source)>5); 'step 1' if(result.bool){ player.logSkill('sbqiaoshi'); @@ -4047,7 +4047,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }).length; player.chooseTarget(get.prompt('sbyanyu'),'令一名其他角色摸'+get.cnNumber(event.num)+'张牌',lib.filter.notMe).set('ai',target=>{ var player=_status.event.player; - return get.effect(target,{name:'wuzhong'},player,player); + return get.effect(target,{name:'draw'},player,player); }); 'step 1' if(result.bool){ @@ -4842,7 +4842,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:function(player){ var num=0,targets=game.filterPlayer(current=>current.hasMark('sbjieyin_mark')); for(var current of targets){ - num+=get.effect(current,{name:'wuzhong'},player,player); + num+=2*get.effect(current,{name:'draw'},player,player); } if(num>0) return 3; return 1; diff --git a/character/shenhua.js b/character/shenhua.js index dab254745..bd12c7d04 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -3536,7 +3536,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(player.countCards('h')>player.hp+1){ check=false; } - else if(player.countCards('h',{name:['wuzhong']})){ + else if(player.countCards('h',{name:'wuzhong'})){ check=false; } else{ diff --git a/character/shiji.js b/character/shiji.js index 94fe88ffd..239376ddf 100644 --- a/character/shiji.js +++ b/character/shiji.js @@ -364,7 +364,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.list=list; var num1=0,num2=0,num3=0; for(var target of list){ - num1+=get.effect(target,{name:'wuzhong'},player,player); + num1+=2*get.effect(target,{name:'draw'},player,player); num2+=get.recoverEffect(target,player,player); } trigger.player.chooseControl('摸两张牌','回复体力','cancel2').set('prompt','整肃奖励:请选择'+get.translation(list)+'的整肃奖励').set('ai',function(){ @@ -437,13 +437,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.control=='cancel2'){event.finish();return;} player.chooseTarget('整军:是否令一名其他角色也回复1点体力或摸两张牌?',lib.filter.notMe).set('ai',function(target){ var player=_status.event.player; - return Math.max(get.effect(target,{name:'wuzhong'},target,player),get.recoverEffect(target,target,player)); + return Math.max(2*get.effect(target,{name:'draw'},target,player),get.recoverEffect(target,target,player)); }); 'step 2' if(result.bool){ var target=result.targets[0]; event.target=target; - var num1=get.effect(target,{name:'wuzhong'},target,player); + var num1=2*get.effect(target,{name:'draw'},target,player); var num2=get.recoverEffect(target,target,player); player.line(target); if(target.isHealthy()) result.index=0; diff --git a/character/sp.js b/character/sp.js index 37abe21ea..aed481ceb 100755 --- a/character/sp.js +++ b/character/sp.js @@ -3848,7 +3848,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var fn=function(control){ switch(control){ case '选项一': - return player.getUseValue({name:'wuzhong'})/2; + return player.getUseValue({name:'draw'}); case '选项二': return Math.max.apply(Math,game.filterPlayer().map(current=>{ if(current.hasSkillTag('noh')) return -1; @@ -9252,7 +9252,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var player=_status.event.player,target=_status.event.getTrigger().player; if(target.hasCard(function(card){ return lib.filter.canBeDiscarded(card,player,target); - },'he')&&get.effect(target,{name:'guohe_copy2'},player,player)>get.effect(player,{name:'wuzhong'},player,player)/2) return 1; + },'he')&&get.effect(target,{name:'guohe_copy2'},player,player)>get.effect(player,{name:'draw'},player,player)) return 1; return 0; }); 'step 1' @@ -9640,7 +9640,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(num>0) max=Math.max(max,Math.sqrt(Math.min(2,num))*get.effect(target,{name:'guohe_copy2'},player,player)); }, 选项四:function(target){ - max=Math.max(max,get.effect(target,{name:'wuzhong'},player,player)); + max=Math.max(max,2*get.effect(target,{name:'draw'},player,player)); }, }[choice]; game.countPlayer(function(current){ @@ -9671,7 +9671,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }], ['选择一名角色,令其摸两张牌',function(target){ var player=_status.event.player; - return get.effect(target,{name:'wuzhong'},player,player); + return 2*get.effect(target,{name:'draw'},player,player); }] ][index]; var targets=game.filterPlayer(function(current){ diff --git a/character/sp2.js b/character/sp2.js index e6b5679a8..6b1600a71 100644 --- a/character/sp2.js +++ b/character/sp2.js @@ -923,7 +923,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }).set('ai',function(button){ var target=_status.event.target; return [ - get.effect(target,{name:'wuzhong'},player,player)/2, + get.effect(target,{name:'draw'},player,player), get.effect(target,{name:'shunshou_copy2'},player,player), get.recoverEffect(target,player,player), ][button.link]; diff --git a/character/tw.js b/character/tw.js index 45bbc0723..f5e84a661 100644 --- a/character/tw.js +++ b/character/tw.js @@ -3151,7 +3151,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var eff=list.map(target=>{ if(target==player) return 0; return get.effect(target,{name:'sha'},player,player); - }).reduce((p,c)=>p+c,0),eff2=list2.map(target=>get.effect(target,{name:'wuzhong'},player,player)).reduce((p,c)=>p+c,0); + }).reduce((p,c)=>p+c,0),eff2=list2.map(target=>2*get.effect(target,{name:'draw'},player,player)).reduce((p,c)=>p+c,0); if(_status.event.controls.contains('选项二')&&eff2>eff) return '选项二'; if(eff>0) return 0; return 'cancel2'; @@ -3173,7 +3173,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return _status.event.getParent().list.contains(target); }).set('ai',function(target){ var player=_status.event.player; - return get.effect(target,{name:'wuzhong'},player,player); + return get.effect(target,{name:'draw'},player,player); }); else event.finish(); } @@ -12668,7 +12668,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(!ui.selected.cards.length) return 0; var sub=get.subtype(ui.selected.cards[0],false); var eff=get.effect(target,ui.selected.cards[0],player,target); - if(sub=='equip2') eff+=(get.effect(target,{name:'wuzhong'},target,target)/2); + if(sub=='equip2') eff+=(get.effect(target,{name:'draw'},target,target)); if(target.isDamaged()&&(sub=='equip3'||sub=='equip4'||sub=='equip5')) eff+=get.recoverEffect(target,player,player); return eff; }, diff --git a/character/xianding.js b/character/xianding.js index 498908f87..69e3f3554 100644 --- a/character/xianding.js +++ b/character/xianding.js @@ -5089,7 +5089,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ targetsx.removeArray(targets); return targetsx.reduce((p,c)=>{ return p+Math.max(0,get.effect(c,{name:'shunshou_copy2'},player,player)); - },0)>get.effect(player,{name:'wuzhong'},player,player)/1.5?'选项一':'选项二'; + },0)>get.effect(player,{name:'draw'},player,player)*1.3?'选项一':'选项二'; }()); 'step 1' if(result.control=='cancel2'){ @@ -8521,7 +8521,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ max=get.recoverEffect(current,player,player)*Math.min(evt.getParent().num,player.getDamagedHp()); }, 选项二:function(target){ - max=get.effect(target,{name:'wuzhong'},player,player)/2*evt.getParent().num; + max=get.effect(target,{name:'draw'},player,player)*evt.getParent().num; }, 选项三:function(target){ if(player.isTurnedOver()) max+=25; diff --git a/character/yijiang.js b/character/yijiang.js index 1644392a3..657eaad49 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -995,7 +995,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var user=trigger.player,target=previous; event.user=user;event.target=target; if(user){ - user.chooseBool('是否对'+get.translation(target)+'发动【联对】?','令'+get.translation(target)+'摸两张牌').set('ai',()=>_status.event.bool).set('bool',get.effect(target,{name:'wuzhong'},user,user)>0); + user.chooseBool('是否对'+get.translation(target)+'发动【联对】?','令'+get.translation(target)+'摸两张牌').set('ai',()=>_status.event.bool).set('bool',get.effect(target,{name:'draw'},user,user)>0); } 'step 1' if(result.bool){ @@ -2387,7 +2387,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }).set('ai',function(target){ var player=_status.event.player; var storage=player.getStorage('xinyaoming_kanon'); - if(get.attitude(player,target)>0&&!storage.contains('摸牌')&&target!=player) return get.effect(target,{name:'wuzhong'},player,player)/2; + if(get.attitude(player,target)>0&&!storage.contains('摸牌')&&target!=player) return get.effect(target,{name:'draw'},player,player); if(get.attitude(player,target)<0&&!storage.contains('弃牌')&&target!=player&&target.countCards('h')) return get.effect(target,{name:'guohe_copy2'},player,player); if(get.attitude(player,target)>0&&!storage.contains('制衡')) return get.effect(target,{name:'kaihua'},player,player); return 0; @@ -2424,7 +2424,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var target=_status.event.target; var controls=_status.event.controls.slice(); var map={ - '摸牌':get.effect(target,{name:'wuzhong'},player,player)/2, + '摸牌':get.effect(target,{name:'draw'},player,player), '弃牌':get.effect(target,{name:'guohe_copy2'},player,player), '制衡':get.effect(target,{name:'kaihua'},player,player), }; From 419ef865df7f182c33e63109ff3847b138537cd2 Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Wed, 27 Dec 2023 21:08:01 +0800 Subject: [PATCH 09/13] bugfix --- character/refresh.js | 59 ++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 32 deletions(-) diff --git a/character/refresh.js b/character/refresh.js index ed6967418..e9dd2a57d 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -11588,45 +11588,40 @@ game.import('character',function(lib,game,ui,get,ai,_status){ direct:true, content:function (){ 'step 0' - player.gainPlayerCard(get.prompt('new_liyu',trigger.player),trigger.player,'hej','visibleMove').set('ai',function(card){ - var player=_status.event.player; - var evt=_status.event.target; - if(get.attitude(player,evt)>0&&get.position(card)=='j') return 4+get.value(card); - if(get.type(card)=='equip'){ - if(get.attitude(player,evt)>0&&game.hasPlayer(function(current){ - return (player.canUse({name:'juedou'},current)&¤t!=evt.target&&get.effect(current,{name:'juedou'},player,player)>2); - })){ - return 5; - } - else if(game.hasPlayer(function(current){ - return (player.canUse({name:'juedou'},current)&¤t!=evt&¤t!=player&&get.effect(current,{name:'juedou'},player,player)<0); - })){ - return 1; - } - else return 4; - } + player.gainPlayerCard(get.prompt('new_liyu',trigger.player),trigger.player,'hej','visibleMove').set('ai',function(button){ + var player=_status.event.player,target=_status.event.target; + if(get.attitude(player,target)>0&&get.position(button.link)==='j') return 4+get.value(button.link); + if(get.type(button.link)==='equip') return _status.event.juedou; return 3; - }).set('logSkill',['new_liyu',trigger.player]); + }).set('juedou',(()=>{ + if(get.attitude(player,trigger.player)>0&&game.hasPlayer(function(current){ + return (player.canUse({name:'juedou'},current)&¤t!=trigger.player&¤t!=player&&get.effect(current,{name:'juedou'},player,_status.event.player)>2); + })) return 5; + if(game.hasPlayer(function(current){ + return (player.canUse({name:'juedou'},current)&¤t!=trigger.player&¤t!=player&&get.effect(current,{name:'juedou'},player,_status.event.player)<0); + })) return 1; + return 4; + })()).set('logSkill',['new_liyu',trigger.player]); 'step 1' if(result.bool){ if(get.type(result.cards[0])!='equip'){ trigger.player.draw(); event.finish(); } - else{ - if(!game.hasPlayer(function(current){ - return current!=player&¤t!=trigger.player&&player.canUse('juedou',current); - })){ - event.finish(); - return; - } - trigger.player.chooseTarget(true,function(card,player,target){ - var evt=_status.event.getParent(); - return evt.player.canUse({name:'juedou'},target)&&target!=_status.event.player; - },'请选择一名角色,视为'+get.translation(player)+'对其使用【决斗】').set('ai',function(target){ - var evt=_status.event.getParent(); - return get.effect(target,{name:'juedou'},evt.player,_status.event.player)-2; - }); + else{ + if(!game.hasPlayer(function(current){ + return current!=player&¤t!=trigger.player&&player.canUse('juedou',current); + })){ + event.finish(); + return; + } + trigger.player.chooseTarget(true,function(card,player,target){ + var evt=_status.event.getParent(); + return evt.player.canUse({name:'juedou'},target)&&target!=_status.event.player; + },'请选择一名角色,视为'+get.translation(player)+'对其使用【决斗】').set('ai',function(target){ + var evt=_status.event.getParent(); + return get.effect(target,{name:'juedou'},evt.player,_status.event.player)-2; + }); } } else event.finish(); From b1598996f2e5bea587f606c5cb8b7e052bf12c5b Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Wed, 27 Dec 2023 21:13:16 +0800 Subject: [PATCH 10/13] =?UTF-8?q?=E3=80=90=E6=8C=AF=E9=9E=98=E3=80=91ai?= =?UTF-8?q?=E6=94=B9mod?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/jsrg.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/character/jsrg.js b/character/jsrg.js index 0967d627e..94f5a61fb 100644 --- a/character/jsrg.js +++ b/character/jsrg.js @@ -5453,21 +5453,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){ // trigger.getParent().triggeredTargets4=trigger.getParent().triggeredTargets4.concat(trigger.targets); trigger.getParent().effectCount++; }, - ai:{ - effect:{ - target:function(card,player,target){ - if(target===player&&get.subtype(card)==='equip1'&&!player.getEquip(1)){ - if(card.name!=='zhuge'||target.getCardUsable('sha')||!target.needsToDiscard()||target.countCards('hs',i=>{ - return get.name(i)==='sha'&&lib.filter.cardEnabled(i,target); - })<2) return 'zeroplayertarget'; - } - } - } - }, mod:{ attackRange:function(player,num){ return num+1; }, + aiOrder:(player,card,num)=>{ + if(num>0&&get.itemtype(card)==='card'&&get.subtype(card)==='equip1'&&!player.getEquip(1)){ + if(card.name!=='zhuge'||player.getCardUsable('sha')||!player.needsToDiscard()||player.countCards('hs',i=>{ + return get.name(i)==='sha'&&lib.filter.cardEnabled(i,target); + })<2) return 0; + } + }, + aiValue:(player,card,num)=>{ + if(num>0&&get.itemtype(card)==='card'&&card.name!=='zhuge'&&get.subtype(card)==='equip1'&&!player.getEquip(1)) return 0.01*num; + }, + aiUseful:()=>{ + return lib.skill.jsrgzhenqiao.mod.aiValue.apply(this,arguments); + } } }, //王允 From 201336225d97c8b05b808f04e1a6b29ec2b097b4 Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Wed, 27 Dec 2023 21:35:01 +0800 Subject: [PATCH 11/13] bugfix --- mode/boss.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mode/boss.js b/mode/boss.js index dcaf37e59..0394b7485 100644 --- a/mode/boss.js +++ b/mode/boss.js @@ -8366,6 +8366,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } }, boss_wuxin:{ + audio:2, + mod:{ + targetEnabled:function(card,player,target){ + if(get.type(card)=='delay'&&player!=target) return false; + } + }, trigger:{player:'damageBefore'}, forced:true, priority:10, @@ -8373,7 +8379,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ trigger.cancel(); player.loseHp(); }, - audio:2, }, shenwei:{ audio:2, From 4d982b73f49b4b6ce5a81ff72f6ac200c90a0271 Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Wed, 27 Dec 2023 22:07:35 +0800 Subject: [PATCH 12/13] =?UTF-8?q?=E3=80=90=E7=82=BC=E9=AD=84=E3=80=91bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/extra.js | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/character/extra.js b/character/extra.js index 063ea3147..860f5b11c 100755 --- a/character/extra.js +++ b/character/extra.js @@ -374,6 +374,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ //神贾诩 jxlianpo:{ audio:2, + init:()=>{ + game.addGlobalSkill('jxlianpo_global'); + }, + onremove:()=>{ + if(!game.hasPlayer(i=>i.hasSkill('jxlianpo'),true)) game.removeGlobalSkill('jxlianpo_global'); + }, trigger:{global:'dieAfter'}, filter:function(event,player){ if(lib.skill.jxlianpo.getMax().length<=1) return false; @@ -381,7 +387,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, logTarget:'source', - global:'jxlianpo_global', getMax:()=>{ const map={ zhu:game.countPlayer(current=>{ @@ -521,20 +526,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); }, cardSavable:function(card,player,target){ - if(card.name=='tao'){ + if(card.name=='tao'&&!player.hasSkill('jxlianpo')){ if(!lib.skill.jxlianpo.getMax().includes('zhu')) return; if(player==target) return; return false; } }, playerEnabled:function(card,player,target){ - if(card.name=='tao'){ + if(card.name=='tao'&&!player.hasSkill('jxlianpo')){ if(!lib.skill.jxlianpo.getMax().includes('zhu')) return; if(player==target) return; return false; } } }, + trigger:{player:'dieAfter'}, + filter:()=>{ + return !game.hasPlayer(i=>i.hasSkill('jxlianpo'),true); + }, + silent:true, + forceDie:true, + content:()=>{ + game.removeGlobalSkill('jxlianpo_global'); + } }, }, }, From e891b683effeec12b8c815e1a038fd5c37554305 Mon Sep 17 00:00:00 2001 From: kuangshen04 <2832899707@qq.com> Date: Wed, 27 Dec 2023 23:12:13 +0800 Subject: [PATCH 13/13] =?UTF-8?q?revert=20.skill=E6=94=B9=E5=BC=B9?= =?UTF-8?q?=E6=80=A7=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layout/default/layout.css | 14 +-- noname/get/index.js | 240 ++++++++++++++++---------------------- 2 files changed, 102 insertions(+), 152 deletions(-) diff --git a/layout/default/layout.css b/layout/default/layout.css index 52519f4b0..0058030b0 100644 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -1935,20 +1935,10 @@ div:not(.handcards)>.card>.info>span, padding: 0; } -div:has(>div.skill):only-child { - display: flex; - flex-wrap: nowrap; -} .skill { left: 0 !important; - flex: 0 0 70px !important; - word-break: break-word; - /* width: 70px !important; - white-space: nowrap; */ -} -.skill+div { - flex: 1; - word-break: break-word; + width: 70px !important; + white-space: nowrap; } .skilln { left: 0 !important; diff --git a/noname/get/index.js b/noname/get/index.js index 2fdde3581..781bfed29 100644 --- a/noname/get/index.js +++ b/noname/get/index.js @@ -3061,143 +3061,106 @@ export class Get extends Uninstantable { skills.add(i); } } - skills.forEach(skill => { - if (lib.skill[skill] && (lib.skill[skill].nopop || lib.skill[skill].equipSkill)) return; - if (!lib.translate[skill + '_info']) return; - let translation; - if (lib.translate[skill + '_ab']) translation = lib.translate[skill + '_ab']; - else { - translation = get.translation(skill); - if (!lib.skill[skill].nobracket) translation = `【${translation.slice(0, 2)}】`; - } - - if (node.forbiddenSkills[skill]) uiintro.add(` -