diff --git a/card/standard.js b/card/standard.js index a7c6a7b97..bab619aef 100644 --- a/card/standard.js +++ b/card/standard.js @@ -469,14 +469,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){ return 2; }, target_use:(player,target,card)=>{ - if(player===_status.currentPhase&&player.hasSkillTag('nokeep',true,{ + if(!player.isPhaseUsing()||player.hasSkillTag('nokeep',true,{ card:card, target:target },true)) return 2; let mode = get.mode(), taos = player.getCards('hs',i=>get.name(i)==='tao'&&lib.filter.cardEnabled(i,target,'forceEnable')); if(target.hp>0){ - if(!player.isPhaseUsing()) return 0; let min = 7.2-4*player.hp/player.maxHp, nd = player.needsToDiscard(0,(i,player)=>{ return !player.canIgnoreHandcard(i)&&(taos.includes(i)||get.value(i)>=min); diff --git a/character/diy.js b/character/diy.js index bc32b2d9a..f51589788 100755 --- a/character/diy.js +++ b/character/diy.js @@ -3420,7 +3420,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return get.itemtype(player.storage.mia_qianmeng)=='card'; }, async cost(event, trigger, player){ - event.result = await + event.result = await player.chooseTarget(get.prompt('mia_qianmeng'),'令一名角色获得牌堆中所有点数为'+player.storage.mia_qianmeng.number+'的牌',lib.filter.notMe).forResult(); }, async content(event, trigger, player){ @@ -6689,7 +6689,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var next=get.copy(lib.skill.kud_qiaoshou_backupx); next.cardname=links[0][2]; return next; - }, + }, prompt(links){ return '将一张手牌置于武将牌上,然后视为装备'+get.translation(links[0][2]); }, @@ -9357,7 +9357,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if (result.bool) event.result = { bool: true, cards: result.links, - } + } }, logTarget: 'player', async content(event, trigger, player){ diff --git a/character/huicui.js b/character/huicui.js index af154f358..9ef093628 100644 --- a/character/huicui.js +++ b/character/huicui.js @@ -9946,11 +9946,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ intro:{content:'不能使用手牌'}, charlotte:true, mod:{ - cardEnabled:function(card){ - if(get.position(card)=='h') return false; + cardEnabled:function(card,player){ + let hs=player.getCards('h'),cards=[card]; + if(Array.isArray(card.cards)) cards.addArray(card.cards); + for(let i of cards){ + if(hs.includes(i)) return false; + } }, - cardSavable:function(card){ - if(get.position(card)=='h') return false; + cardSavable:function(card,player){ + let hs=player.getCards('h'),cards=[card]; + if(Array.isArray(card.cards)) cards.addArray(card.cards); + for(let i of cards){ + if(hs.includes(i)) return false; + } }, }, }, diff --git a/character/xinghuoliaoyuan.js b/character/xinghuoliaoyuan.js index 35100865c..2ba3a9168 100755 --- a/character/xinghuoliaoyuan.js +++ b/character/xinghuoliaoyuan.js @@ -1365,7 +1365,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:["useCardAfter","respond"], }, filter:function (event,player){ - if(get.itemtype(event.cards)!='cards') return false; + if(get.itemtype(event.cards)!=='cards'||!game.hasPlayer(current=>{ + if(current===player) return false; + return current.getHp()>player.getHp()||current.countCards('h')>player.countCards('h'); + })) return false; for(var i=0;iplayer.countCards('h')||Math.max(0,target.hp)>Math.max(0,player.hp); - }).set('ai',function(target){ + async cost(event, trigger, player){ + event.result = await player.chooseTarget(get.prompt2('xinfu_xunxian'),(card,player,target)=>{ + if(target===player) return false; + return target.getHp()>player.getHp()||target.countCards('h')>player.countCards('h'); + }).set('ai',(target)=>{ let att=get.attitude(_status.event.player,target),name=_status.event.cards[0].name; if(att<3) return 0; if(target.hasJudge('lebu')) att/=5; if(name==='sha'&&target.hasSha()) att/=5; if(name==='wuxie'&&target.needsToDiscard(_status.event.cards)) att/=5; return att/(1+get.distance(player,target,'absolute')); - }).set('cards',trigger.cards); - 'step 1' - if(result.bool){ - var list=[]; - for(var i=0;i