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