diff --git a/character/mobile.js b/character/mobile.js index 069533492..ea965f89e 100644 --- a/character/mobile.js +++ b/character/mobile.js @@ -14286,6 +14286,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ re_weiwenzhugezhi:'手杀卫温诸葛直', re_weiwenzhugezhi_prefix:'手杀', + gz_re_xugong:'许贡', re_xugong:'手杀许贡', re_xugong_prefix:'手杀', re_zhanggong:'手杀张恭', diff --git a/character/shenhua.js b/character/shenhua.js index 66406bbbc..718f182fc 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -3337,19 +3337,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ effect:{ - target:function(card,player,target,current){ + target_use:function(card,player,target,current){ if(card.name=='sha'&&get.attitude(player,target)<0){ if(_status.event.name=='xiangle') return; + if(get.attitude(player,target)>0&¤t<0) return 'zerotarget'; var bs=player.getCards('h',{type:'basic'}); - if(bs.length<2) return 0; + bs.remove(card); + if(card.cards) bs.removeArray(card.cards); + else bs.removeArray(ui.selected.cards); + if(!bs.length) return 'zerotarget'; if(player.hasSkill('jiu')||player.hasSkill('tianxianjiu')) return; - if(bs.length<=3&&player.countCards('h','sha')<=1){ + if(bs.length<=2){ for(var i=0;i0; }); if(delta==2&&num>0) return [1,3]; if(num>=delta) return 'zeroplayertarget'; } + else if(get.tag(card,'respondShan')>0){ + if(current<0&&used==target.getAttackRange()-1&&target.mayHaveShan()){ + return 0.6; + } + } + else if(get.tag(card,'respondSha')>0){ + if(current<0&&used==target.getAttackRange()-1&&target.mayHaveSha()){ + return 0.6; + } + } }, }, } diff --git a/character/tw.js b/character/tw.js index ea9b149ce..ca91dbf22 100644 --- a/character/tw.js +++ b/character/tw.js @@ -14260,6 +14260,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhenshan_info:'每回合限一次,当你需要使用或打出一张基本牌时,你可以与一名手牌数少于你的角色交换手牌,视为使用或打出此牌。', tw_tianyu:'TW田豫', tw_tianyu_prefix:'TW', + gz_tw_tianyu:'田豫', twzhenxi:'震袭', twzhenxi_info:'每回合限一次。当你使用【杀】指定目标后,你可选择一项:⒈弃置其X张手牌(X为你至其的距离);⒉将其装备区或判定区内的一张牌移动到另一名角色的装备区或判定区内。若其体力值大于你或其体力值为全场最高,则你可以改为依次执行以上两项。', twyangshi:'扬师', diff --git a/character/yijiang.js b/character/yijiang.js index 809963056..f22baf361 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -6673,15 +6673,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ 'step 0' - var num=0,cards=player.getEquips(1); - for(var card of cards){ - var numz=1; - var info=get.info(card,false); - if(info&&info.distance&&info.distance.attackFrom){ - numz-=info.distance.attackFrom; - } - num+=numz; - } + var num=player.getEquipRange(); if(trigger.player.countCards('h'){ - if(index==0) range--; - let newRange=1; - const info=get.info(card,false); - if(info.distance){ - //如果存在attackRange 则通过attackRange动态获取攻击范围 - if(typeof info.distance.attackRange=='function'){ - newRange=info.distance.attackRange(card,player); - } - //否则采用祖宗之法 - else if(typeof info.distance.attackFrom=='number'){ - newRange-=info.distance.attackFrom; - } - } - return Math.max(range,newRange) - },range)-range); + return (player.getEquipRange()-range); } let base=game.checkMod(player,'unchanged','attackRangeBase',player); if(base!='unchanged'){ range=base; } else{ - const equips=player.getCards('e',function(card){ - return !ui.selected.cards||!ui.selected.cards.contains(card); - }); - range=equips.reduce((range,card,index)=>{ - if(index==0) range--; - let newRange=1; - const info=get.info(card,false); - if(info.distance){ - //如果存在attackRange 则通过attackRange动态获取攻击范围 - if(typeof info.distance.attackRange=='function'){ - newRange=info.distance.attackRange(card,player); - } - //否则采用祖宗之法 - else if(typeof info.distance.attackFrom=='number'){ - newRange-=info.distance.attackFrom; - } - } - return Math.max(range,newRange); - },1); + range=player.getEquipRange(); } range=game.checkMod(player,range,'attackRange',player); return range; }, + getEquipRange:function(cards){ + const player=this; + if(!cards) cards=player.getCards('e',function(card){ + return !ui.selected.cards||!ui.selected.cards.contains(card); + }); + const range=cards.reduce((range,card)=>{ + let newRange=false; + const info=get.info(card,false); + if(info.distance){ + //如果存在attackRange 则通过attackRange动态获取攻击范围 + if(typeof info.distance.attackRange=='function'){ + newRange=info.distance.attackRange(card,player); + } + //否则采用祖宗之法 + else if(typeof info.distance.attackFrom=='number'){ + newRange=(1-info.distance.attackFrom); + } + } + let isN1=(typeof range=='number'); + let isN2=(typeof newRange=='number'); + if(isN1&&isN2) return Math.max(range,newRange); + else return (isN1?range:newRange); + },false); + return (typeof range=='number')?range:1; + }, getGlobalFrom:function(){ var player=this; var range=0; @@ -33744,6 +33736,10 @@ ['经典',{ showName:'典', }], + ['君',{ + color:'#fefedc', + nature:'shenmm', + }], ['骰子',{ getSpan:()=>{ return `🎲`; @@ -57857,22 +57853,7 @@ m=game.checkMod(from,to,m,'attackFrom',from); m=game.checkMod(from,to,m,'attackTo',to); return m; - const attakRange=equips1.reduce((range,card,index)=>{ - if(index==0) range--; - let newRange=1; - const info=get.info(card,false); - if(info.distance){ - //如果存在attackRange 则通过attackRange动态获取攻击范围 - if(typeof info.distance.attackRange=='function'){ - newRange=info.distance.attackRange(card,player); - } - //否则采用祖宗之法 - else if(typeof info.distance.attackFrom=='number'){ - newRange-=info.distance.attackFrom; - } - } - return Math.max(range,newRange) - },1); + const attakRange=from.getEquipRange(); m+=(1-attakRange); for(let i=0;i