diff --git a/character/offline.js b/character/offline.js index 3786497ab..28affda0c 100644 --- a/character/offline.js +++ b/character/offline.js @@ -887,6 +887,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ pshengwu:{ audio:'hengwu', mod:{ + aiOrder:(player,card,num)=>{ + if(num>0&&get.tag(card,'draw')&&ui.cardPile.childNodes.length+ui.discardPile.childNodes.length<20) return 0; + }, aiValue:(player,card,num)=>{ if(num>0&&card.name==='zhuge') return 20; }, diff --git a/character/xianding.js b/character/xianding.js index e0747fec5..c1e58df4e 100644 --- a/character/xianding.js +++ b/character/xianding.js @@ -1303,6 +1303,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dczhangcai:{ audio:2, mod:{ + aiOrder:(player,card,num)=>{ + if(num>0&&get.tag(card,'draw')&&ui.cardPile.childNodes.length+ui.discardPile.childNodes.length<20) return 0; + }, aiValue:(player,card,num)=>{ if(num>0&&card.name==='zhuge') return 20; }, @@ -1323,6 +1326,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(typeof num=='number') count=Math.max(1,player.countCards('h',card=>get.number(card)==num)) return '你可以摸'+get.cnNumber(count)+'张牌。'; }, + check:(event,player)=>{ + const num=player.hasSkill('dczhangcai_all')?get.number(event.card):8; + let count=1; + if(typeof num=='number') count=Math.max(1,player.countCards('h',card=>get.number(card)==num)); + return ui.cardPile.childNodes.length+ui.discardPile.childNodes.length>=count; + }, frequent:true, content:function(){ var num=player.hasSkill('dczhangcai_all')?get.number(trigger.card):8;