From 6d171d97564f261f8b8c50cf3994053f3c2a9b9a Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sat, 4 Nov 2023 14:00:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A3=B4=E7=A7=80=E3=80=90=E8=A1=8C=E5=9B=BE?= =?UTF-8?q?=E3=80=91=E6=B7=BB=E5=8A=A0=E5=80=8D=E6=95=B0=E5=92=8C=E7=BA=A6?= =?UTF-8?q?=E6=95=B0tag=E6=A0=87=E8=AE=B0=EF=BC=8C=E4=BC=98=E5=8C=96ai?= =?UTF-8?q?=E3=80=90=E7=88=B5=E5=88=B6=E3=80=91=E5=92=8C=E3=80=90=E8=A1=8C?= =?UTF-8?q?=E5=9B=BE=E3=80=91=E7=9A=84=E9=85=8D=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/mobile.js | 76 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 72 insertions(+), 4 deletions(-) diff --git a/character/mobile.js b/character/mobile.js index 175af643b..80d9b5192 100644 --- a/character/mobile.js +++ b/character/mobile.js @@ -4760,18 +4760,58 @@ game.import('character',function(lib,game,ui,get,ai,_status){ intro:{ content:'当前记录:X=#', }, + init:function(player){ + player.addSkill('xingtu_mark'); + }, + onremove:function(player){ + player.removeSkill('xingtu_mark'); + player.removeGaintag('xingtu1'); + player.removeGaintag('xingtu2'); + delete player.storage.xingtu; + }, subSkill:{ record:{ + audio:'xingtu', trigger:{player:'useCardAfter'}, - forced:true, filter:function(event,player){ return typeof get.number(event.card)=='number'; }, + forced:true, content:function(){ - player.storage.xingtu=get.number(trigger.card); + var num=get.number(trigger.card) + player.storage.xingtu=num; player.markSkill('xingtu'); }, }, + mark:{ + charlotte:true, + trigger:{ + player:['xingtu_recordAfter','gainAfter'], + global:'loseAsyncAfter', + }, + filter:function(event,player){ + if(typeof player.storage.xingtu!='number'||!player.countCards('h')) return false; + return event.name=='xingtu_record'||event.getg(player).length; + }, + direct:true, + firstDo:true, + content:function(){ + 'step 0' + player.removeGaintag('xingtu1'); + player.removeGaintag('xingtu2'); + 'step 1' + var cards1=[],cards2=[],num=player.storage.xingtu; + player.getCards('h').forEach(card=>{ + var numx=get.number(card,player); + if(typeof numx=='number'){ + if(numx%num==0) cards1.push(card); + if(num%numx==0) cards2.push(card); + } + }); + player.addGaintag(cards1,'xingtu1'); + player.addGaintag(cards2,'xingtu2'); + }, + }, }, }, juezhi:{ @@ -4784,7 +4824,33 @@ game.import('character',function(lib,game,ui,get,ai,_status){ selectCard:[2,Infinity], check:function(card){ if(ui.selected.cards.length>1) return 0; - return 4-get.value(card); + var player=_status.event.player; + if(player.hasSkill('xingtu')&&player.storage.xingtu){ + var cards=player.getCards('he'); + var num=player.storage.xingtu,stop=false; + for(var i=0;i<=cards.length;i++){ + if(i!=cards.length){ + var num1=get.number(cards[i],player); + if(typeof num1!='number') continue; + for(var j=0;j