From 3fc04586118b0acbd063f834a630e711db369b0d Mon Sep 17 00:00:00 2001 From: 157 <144450955+PZ157@users.noreply.github.com> Date: Thu, 26 Oct 2023 22:50:15 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E4=B8=BA=E6=96=B0?= =?UTF-8?q?=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit trigger.nature->get.natureList(trigger) --- character/xianding.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/character/xianding.js b/character/xianding.js index 263a7b99a..670cbf137 100644 --- a/character/xianding.js +++ b/character/xianding.js @@ -11725,7 +11725,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ next.set('goon',get.attitude(player,trigger.player)<0&&!trigger.player.hasSkillTag('filterDamage',null,{ player:player, card:trigger.card, - })&&get.damageEffect(trigger.player,player,player,trigger.nature)>0); + })&&get.damageEffect(trigger.player,player,player,get.natureList(trigger))>0); next.logSkill=[event.name,trigger.player]; 'step 1' if(result.bool) trigger.num++; From 41317b020449e9793788713d372cdbc3f71e2b1d Mon Sep 17 00:00:00 2001 From: 157 <144450955+PZ157@users.noreply.github.com> Date: Thu, 26 Oct 2023 22:58:08 +0800 Subject: [PATCH 2/7] bugfix --- character/tw.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/character/tw.js b/character/tw.js index b7dbd4ff0..90a6f4b75 100644 --- a/character/tw.js +++ b/character/tw.js @@ -13193,7 +13193,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ name:card.name, target:target, card:card, - }))){ + })){ if(player&&player.hasSkillTag('damageBonus',true,{ target:target, card:card From 047db539d517e38e4a2ae52beeac6ffa7b30d1f8 Mon Sep 17 00:00:00 2001 From: 157 <144450955+PZ157@users.noreply.github.com> Date: Fri, 27 Oct 2023 22:22:32 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=B0=E7=AD=96?= =?UTF-8?q?=E7=95=A5ai=E4=B8=8D=E5=B1=AF=E6=A1=83=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 优化【桃】【桃园结义】ai --- card/standard.js | 144 +++++++++++++++++++++++++---------------------- 1 file changed, 76 insertions(+), 68 deletions(-) diff --git a/card/standard.js b/card/standard.js index 7e27a1853..8980ad4c4 100644 --- a/card/standard.js +++ b/card/standard.js @@ -399,98 +399,105 @@ game.import('card',function(lib,game,ui,get,ai,_status){ target.recover(); }, ai:{ - basic: { - order: function (card, player) { - if (player.hasSkillTag('pretao')) return 9; + basic:{ + order:(card,player)=>{ + if(player.hasSkillTag('pretao')) return 9; return 2; }, - useful: function (card, i) { + useful:(card,i)=>{ let player = _status.event.player; - if (player.isDamaged() && !game.checkMod(card, player, 'unchanged', 'cardEnabled2', player)) return 2 / (1 + i); - let fs = game.filterPlayer(function (current) { - return get.attitude(player, current) > 0 && current.hp <= 2; + if(player.isDamaged()&&!game.checkMod(card,player,'unchanged','cardEnabled2',player)) return 2/(1+i); + let fs = game.filterPlayer(current=>{ + return get.attitude(player,current)>0&¤t.hp<=2; }), damaged = 0, needs = 0; - for (let f of fs) { - if (!lib.filter.cardSavable(card, player, f)) continue; - if (f.hp > 1) damaged++; + fs.forEach(f=>{ + if(!lib.filter.cardSavable(card,player,f)) return; + if(f.hp>1) damaged++; else needs++; - } - if (needs && damaged) return 5 * needs + 3 * damaged; - if (needs + damaged > 1 || player.hasSkillTag('maixie')) return 8; - if (player.hp / player.maxHp < 0.7) return 7 + Math.abs(player.hp / player.maxHp - 0.5); - if (needs) return 7; - if (damaged) return Math.max(3, 6.4 - i); - return 6.8 - Math.min(5, player.hp); + }); + if(needs&&damaged) return 5*needs+3*damaged; + if(needs+damaged>1 || player.hasSkillTag('maixie')) return 8; + if(player.hp/player.maxHp<0.7) return 7+Math.abs(player.hp/player.maxHp-0.5); + if(needs) return 7; + if(damaged) return Math.max(3,6.4-i); + return 6.8-Math.min(5,player.hp); }, - value: function (card, player, i) { - let fs = game.filterPlayer(function (current) { - return get.attitude(_status.event.player, current) > 0; + value:(card,player,i)=>{ + let fs = game.filterPlayer(current=>{ + return get.attitude(_status.event.player,current)>0; }), damaged = 0, needs = 0; - for (let i of fs) { - if (!player.canUse('tao', i)) continue; - if (i.hp <= 1) needs++; - else if (i.hp == 2) damaged++; - } - if (needs > 2) return 11; - if (needs > 1) return 10; - if ((needs && damaged) || player.hasSkillTag('maixie')) return 9; - if (needs || damaged > 1) return 8; - if (damaged) return 7.5; - return Math.max(1, 9.2 - player.hp); + fs.forEach(f=>{ + if(!player.canUse('tao',f)) return; + if (f.hp<=1) needs++; + else if(f.hp==2) damaged++; + }); + if(needs>2) return 11; + if(needs>1) return 10; + if(needs&&damaged || player.hasSkillTag('maixie')) return 9; + if(needs || damaged>1) return 8; + if(damaged) return 7.5; + return Math.max(1,9.2-player.hp); } }, - result: { - target: function (player, target) { - if (target.hasSkillTag('maixie')) return 3; + result:{ + target:(player,target)=>{ + if(target.hasSkillTag('maixie')) return 3; return 2; }, - target_use: function (player, target, card) { - if (player === _status.currentPhase && player.hasSkillTag('nokeep', true, {card:card,target:target}, true)) return 2; + target_use:(player,target,card)=>{ + if(player===_status.currentPhase&&player.hasSkillTag('nokeep',true,{ + card:card, + target:target + },true)) return 2; let mode = get.mode(); - if (target.hp > 0) { + if(target.hp>0){ let nd = player.needsToDiscard(); - let keep = false; - if (player.isPhaseUsing()) { - if (nd <= 0 || (nd === 1 && target.hp >= 2 && player.countCards('hs', 'tao') <= 1)) keep = true; + let keep = 0; + if(nd<2&&player.isPhaseUsing()){ + if(nd<1) keep = 3; + else if(target.hp>=2&&player.countCards('hs','tao')<=target.hp/2) keep = 1; } - if (keep) { - if (!nd || nd < 2 && game.hasPlayer(function (current) { - if (current.hp <= 2 && player !== current && get.attitude(player, current) > 2) { - if(target.hp >= 2 && current.identity === 'zhu' && (mode === 'identity' || mode === 'versus' || mode === 'chess')){ - keep=2; + if(keep){ + if(!nd || game.hasPlayer(current=>{ + if(player!==current&¤t.hp<=2&&get.attitude(player,current)>2){ + if(target.hp>=2&¤t.identity==='zhu'&&(mode==='identity' || mode === 'versus' || mode === 'chess')){ + keep=3; + return true; + } + if(player.hp>current.hp){ + keep += player.hp-current.hp; return true; } - if (player.hp > current.hp) return true; } return false; })){ - if(keep>1) return 0; + if(keep>2) return 0; } } } if(target.isZhu2() || target===game.boss) return 2; - if(player !== target){ - if (target.hp < 0 && player.countCards('hs', 'tao') + target.hp <= 0) return 0; - if (Math.abs(get.attitude(player, target)) < 1.2) return 0; + if(player!==target){ + if(target.hp<0&&player.countCards('hs','tao')+target.hp<=0) return 0; + if(Math.abs(get.attitude(player, target))<1.2) return 0; } - if (!player.getFriends().length) return 2; + if(!player.getFriends().length) return 2; let tri = _status.event.getTrigger(), - num = game.countPlayer(function (current) { - if (get.attitude(current, target) > 0) return current.countCards('hs', 'tao'); + num = game.countPlayer(current=>{ + if(get.attitude(current,target)>0) return current.countCards('hs','tao'); }), dis = 1, t = _status.currentPhase||game.me; - while (t !== target) { - let att = get.attitude(player, t); - if (Math.abs(att) < 2) dis += 0.45; - else if (att < 0) dis++; + while(t!==target){ + let att = get.attitude(player,t); + if(att<-2) dis++; + else if(att<1) dis += 0.45; t = t.next; } - if (mode === 'identity') { - if (tri && tri.name === 'dying') { - if (target.identity === 'fan') { - if (!tri.source && player !== target || tri.source && tri.source !== target && player.getFriends().includes(tri.source.identity)) { - if (num > dis || (player === target && player.countCards('hs', {type: 'basic'}) > 1.6 * dis)) return 2; + if(mode==='identity'){ + if(tri&&tri.name==='dying'){ + if(target.identity==='fan') { + if(!tri.source&&player!==target || tri.source&&tri.source!==target&&player.getFriends().includes(tri.source.identity)){ + if(num>dis || player===target&&player.countCards('hs',{type:'basic'})>1.6*dis) return 2; return 0; } } @@ -498,13 +505,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){ (tri.source.countCards('he')>2||player===tri.source&&player.hasCard((i)=>i.name!='tao','he'))) return 2; //if(player!==target&&!target.isZhu&&target.countCards('hs'){ + return current.identity==='fan'; }))) return 0; } } - else if (mode === 'stone' && target.isMin() && player !== target && tri && tri.name === 'dying' && player.side === target.side && tri.source !== target.getEnemy()) return 0; + else if(mode==='stone'&&target.isMin()&&player!==target&&tri&&tri.name==='dying'&&player.side===target.side&&tri.source!==target.getEnemy()) return 0; return 2; } }, @@ -904,8 +911,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, ai:{ basic:{ - order:function(){ - return 11; + order:(item,player)=>{ + if(game.hasPlayer(current=>current.hp<=1&&get.recoverEffect(current,player,_status.event.player)<0) return 1; + return 10; }, useful:[3,1], value:0, From 2fe1d3ca6420eea981f692058beb0c8d821cde51 Mon Sep 17 00:00:00 2001 From: 157 <144450955+PZ157@users.noreply.github.com> Date: Sat, 28 Oct 2023 00:09:52 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E5=86=8D=E6=AC=A1=E5=BE=AE=E8=B0=83?= =?UTF-8?q?=E5=B1=AF=E6=A1=83ai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- card/standard.js | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/card/standard.js b/card/standard.js index 8980ad4c4..8cdb3d43d 100644 --- a/card/standard.js +++ b/card/standard.js @@ -451,16 +451,25 @@ game.import('card',function(lib,game,ui,get,ai,_status){ },true)) return 2; let mode = get.mode(); if(target.hp>0){ - let nd = player.needsToDiscard(); - let keep = 0; - if(nd<2&&player.isPhaseUsing()){ + let min = 7.2-1.2*Math.min(3,player.hp), + nd = player.needsToDiscard(-player.countCards('h',i=>get.value(i)get.name==='tao'&&lib.filter.cardEnabled(i,player)), + keep = 0; + if(nd>1&&taos>1&&player.hp<1+taos) return 2; + if(nd<3&&game.hasPlayer(current=>{ + return current.identity==='zhu'&¤t.hp<3&&(mode==='identity'||mode==='versus'||mode==='chess')&&get.attitude(player,current)>0; + })){ + nd = 0; + keep = 3; + } + else if(nd<2&&player.isPhaseUsing()){ if(nd<1) keep = 3; - else if(target.hp>=2&&player.countCards('hs','tao')<=target.hp/2) keep = 1; + else if(target.hp>=2&&taos<=target.hp/2) keep = 1; } if(keep){ - if(!nd || game.hasPlayer(current=>{ + if(!nd || game.countPlayer(current=>{ if(player!==current&¤t.hp<=2&&get.attitude(player,current)>2){ - if(target.hp>=2&¤t.identity==='zhu'&&(mode==='identity' || mode === 'versus' || mode === 'chess')){ + if(target.hp>=2){ keep=3; return true; } @@ -474,6 +483,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ if(keep>2) return 0; } } + return 2; } if(target.isZhu2() || target===game.boss) return 2; if(player!==target){ From b4fbd78ac747d96f7d1fe7eae7923f73cc8c7d56 Mon Sep 17 00:00:00 2001 From: 157 <144450955+PZ157@users.noreply.github.com> Date: Sat, 28 Oct 2023 15:07:11 +0800 Subject: [PATCH 5/7] =?UTF-8?q?bugfix,ai=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复【桃】ai的一些bug; 增加【过河拆桥】不无懈ai --- card/standard.js | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/card/standard.js b/card/standard.js index 8cdb3d43d..9cb6b3804 100644 --- a/card/standard.js +++ b/card/standard.js @@ -428,7 +428,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }), damaged = 0, needs = 0; fs.forEach(f=>{ if(!player.canUse('tao',f)) return; - if (f.hp<=1) needs++; + if(f.hp<=1) needs++; else if(f.hp==2) damaged++; }); if(needs>2) return 11; @@ -449,51 +449,44 @@ game.import('card',function(lib,game,ui,get,ai,_status){ card:card, target:target },true)) return 2; - let mode = get.mode(); + let mode = get.mode(), + taos = player.countCards('hs',i=>get.name==='tao'&&lib.filter.cardEnabled(i,target,'forceEnable')); if(target.hp>0){ let min = 7.2-1.2*Math.min(3,player.hp), nd = player.needsToDiscard(-player.countCards('h',i=>get.value(i)get.name==='tao'&&lib.filter.cardEnabled(i,player)), keep = 0; - if(nd>1&&taos>1&&player.hp<1+taos) return 2; + if(nd>1&&taos>1&&player.hp<1+taos || target.identity==='zhu'&&target.hp<3&&(mode==='identity'||mode==='versus'||mode==='chess')) return 2; if(nd<3&&game.hasPlayer(current=>{ - return current.identity==='zhu'&¤t.hp<3&&(mode==='identity'||mode==='versus'||mode==='chess')&&get.attitude(player,current)>0; + return player!==current&¤t.identity==='zhu'&¤t.hp<3&&(mode==='identity'||mode==='versus'||mode==='chess')&&get.attitude(player,current)>0; })){ - nd = 0; - keep = 3; + nd=0; + keep=3; } - else if(nd<2&&player.isPhaseUsing()){ + else if(nd<2 || !player.isPhaseUsing()){ if(nd<1) keep = 3; else if(target.hp>=2&&taos<=target.hp/2) keep = 1; } if(keep){ if(!nd || game.countPlayer(current=>{ - if(player!==current&¤t.hp<=2&&get.attitude(player,current)>2){ - if(target.hp>=2){ - keep=3; - return true; - } - if(player.hp>current.hp){ - keep += player.hp-current.hp; - return true; - } + if(player!==current&¤t.hp<3&&player.hp>current.hp&&get.attitude(player,current)>2){ + keep += player.hp-current.hp; + return true; } return false; })){ if(keep>2) return 0; } } - return 2; } if(target.isZhu2() || target===game.boss) return 2; if(player!==target){ - if(target.hp<0&&player.countCards('hs','tao')+target.hp<=0) return 0; - if(Math.abs(get.attitude(player, target))<1.2) return 0; + if(target.hp<0&&taos+target.hp<=0) return 0; + if(Math.abs(get.attitude(player,target))<1) return 0; } if(!player.getFriends().length) return 2; let tri = _status.event.getTrigger(), num = game.countPlayer(current=>{ - if(get.attitude(current,target)>0) return current.countCards('hs','tao'); + if(get.attitude(current,target)>0) return current.countCards('hs',i=>get.name==='tao'&&lib.filter.cardEnabled(i,target,'forceEnable')); }), dis = 1, t = _status.currentPhase||game.me; @@ -512,11 +505,11 @@ game.import('card',function(lib,game,ui,get,ai,_status){ } } else if(tri.source&&tri.source.isZhu&&(target.identity==='zhong'||target.identity==='mingzhong')&& - (tri.source.countCards('he')>2||player===tri.source&&player.hasCard((i)=>i.name!='tao','he'))) return 2; + (tri.source.countCards('he')>2||player===tri.source&&player.hasCard((i)=>i.name!=='tao','he'))) return 2; //if(player!==target&&!target.isZhu&&target.countCards('hs'){ + if(player.hp<=1&&player!==target&&taos+player.countCards('hs','jiu')<=Math.min(dis,game.countPlayer(current=>{ return current.identity==='fan'; }))) return 0; } @@ -1499,6 +1492,11 @@ game.import('card',function(lib,game,ui,get,ai,_status){ player.discardPlayerCard(target,pos,true,'visible'); }, ai:{ + wuxie:(target,card,player,viewer,status)=>{ + if(status*get.attitude(viewer,player)>0&&!player.isMad() || target.hp>2&&!target.hasCard(i=>{ + return get.value(i,target)>3+Math.min(5,target.hp); + },'e')&&target.countCards('h')*_status.event.getRand('guohe_wuxie')>1.57) return 0; + }, basic:{ order:9, useful:5, From 9de17e09fe9a6be6faf94087967e5dbbda7db5c2 Mon Sep 17 00:00:00 2001 From: 157 <144450955+PZ157@users.noreply.github.com> Date: Sat, 28 Oct 2023 15:34:30 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8D=81=E5=91=A8?= =?UTF-8?q?=E5=B9=B4=E8=AE=B8=E9=9D=96ai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/xianding.js | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/character/xianding.js b/character/xianding.js index 7e2abdc25..107239cba 100644 --- a/character/xianding.js +++ b/character/xianding.js @@ -381,11 +381,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 0' var cards=trigger.getd().filter(card=>{ return get.position(card)=='d'&&player.getStorage('dcshangyu').includes(card); - }); + }),targets=game.filterPlayer(current=>{ + return !player.getStorage('dcshangyu_transfer').includes(current); + }).sortBySeat(_status.currentPhase); event.cards=cards; player.chooseTarget(`赏誉:将${get.translation(cards)}交给一名可选角色`,(card,player,target)=>{ return !player.getStorage('dcshangyu_transfer').includes(target); - },true); + },true).set('ai',target=>{ + let att=get.sgn(get.attitude(_status.event.player,target)),idx=1+_status.event.targets.indexOf(target); + if(att<0) return -idx; + return att+1/idx; + }).set('targets',targets); 'step 1' if(result.bool){ var target=result.targets[0]; @@ -447,17 +453,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.chooseControl(choices,'cancel2').set('prompt',get.prompt('dccaixia')).set('prompt2','你可以摸至多'+get.cnNumber(choices.length)+'张牌,但是你此后需要再使用等量的牌才可再发动本技能。').set('ai',()=>{ return _status.event.choice; }).set('choice',function(){ - if(player.isPhaseUsing()){ - if(!player.hasCard(card=>{ - return get.tag(card,'damage')&&player.hasValueTarget(card); - },'hs')) return 0; - var cards=player.getCards('hs',card=>{ - return player.hasValueTarget(card); - }); - if(!cards.some(card=>get.tag(card,'damage'))) return 0; - return Math.min(choices.length,cards.filter(card=>!get.tag(card,'damage')).length+1); + var cards=player.getCards('hs',card=>get.name(card,player)!=='sha'&&player.hasValueTarget(card)); + var damage=Math.min(player.getCardUsable({name:'sha'}),player.countCards('hs','sha'))+cards.filter(i=>get.tag(i,'damage')).length; + if(player.isPhaseUsing()||player.hp+player.hujia+player.countCards('hs',i=>get.tag(card,'recover'))>2){ + if(damage) return Math.min(choices.length-1,cards.length-damage); + return Math.min(choices.length-1,cards.length-1); } - return choices.length; + return choices.length-1; }()); 'step 1' if(result.control!='cancel2'){ @@ -471,7 +473,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mod:{ aiOrder:function(player,card,num){ if(!get.tag(card,'damage')) return; - if(player.countMark('dccaixia_clear')>1) return num/2; + if(player.countMark('dccaixia_clear')>1) return num/3; return num+6; }, }, From 184e16553e9c48bde0faea8cf86db0876a57ddc7 Mon Sep 17 00:00:00 2001 From: 157 <144450955+PZ157@users.noreply.github.com> Date: Mon, 30 Oct 2023 23:21:33 +0800 Subject: [PATCH 7/7] bugfix --- card/standard.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/card/standard.js b/card/standard.js index 9cb6b3804..9893988ab 100644 --- a/card/standard.js +++ b/card/standard.js @@ -450,12 +450,12 @@ game.import('card',function(lib,game,ui,get,ai,_status){ target:target },true)) return 2; let mode = get.mode(), - taos = player.countCards('hs',i=>get.name==='tao'&&lib.filter.cardEnabled(i,target,'forceEnable')); + taos = player.getCards('hs',i=>get.name(i)==='tao'&&lib.filter.cardEnabled(i,target,'forceEnable')); if(target.hp>0){ let min = 7.2-1.2*Math.min(3,player.hp), - nd = player.needsToDiscard(-player.countCards('h',i=>get.value(i)!taos.includes(i)&&get.value(i)1&&taos>1&&player.hp<1+taos || target.identity==='zhu'&&target.hp<3&&(mode==='identity'||mode==='versus'||mode==='chess')) return 2; + if(taos.length>1&&(nd>1||nd&&player.hp<1+taos.length) || target.identity==='zhu'&&target.hp<3&&(mode==='identity'||mode==='versus'||mode==='chess')) return 2; if(nd<3&&game.hasPlayer(current=>{ return player!==current&¤t.identity==='zhu'&¤t.hp<3&&(mode==='identity'||mode==='versus'||mode==='chess')&&get.attitude(player,current)>0; })){ @@ -464,7 +464,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ } else if(nd<2 || !player.isPhaseUsing()){ if(nd<1) keep = 3; - else if(target.hp>=2&&taos<=target.hp/2) keep = 1; + else if(target.hp>=2&&taos.length<=target.hp/2) keep = 1; } if(keep){ if(!nd || game.countPlayer(current=>{ @@ -480,13 +480,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){ } if(target.isZhu2() || target===game.boss) return 2; if(player!==target){ - if(target.hp<0&&taos+target.hp<=0) return 0; + if(target.hp<0&&taos.length+target.hp<=0) return 0; if(Math.abs(get.attitude(player,target))<1) return 0; } if(!player.getFriends().length) return 2; let tri = _status.event.getTrigger(), num = game.countPlayer(current=>{ - if(get.attitude(current,target)>0) return current.countCards('hs',i=>get.name==='tao'&&lib.filter.cardEnabled(i,target,'forceEnable')); + if(get.attitude(current,target)>0) return current.countCards('hs',i=>get.name(i)==='tao'&&lib.filter.cardEnabled(i,target,'forceEnable')); }), dis = 1, t = _status.currentPhase||game.me;