diff --git a/character/extra.js b/character/extra.js
index bbff8c975..a2860fc5a 100755
--- a/character/extra.js
+++ b/character/extra.js
@@ -17,12 +17,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
extra_ol:['ol_zhangliao','shen_caopi','shen_zhenji','shen_sunquan'],
extra_mobilezhi:['shen_guojia','shen_xunyu'],
extra_mobilexin:['shen_taishici','shen_sunce'],
- extra_mobileren:['shen_huatuo'],
+ extra_mobileren:['shen_huatuo','shen_lusu'],
extra_tw:['tw_shen_guanyu','tw_shen_lvmeng'],
extra_offline:['shen_diaochan','boss_zhaoyun','shen_dianwei','le_shen_jiaxu'],
},
},
character:{
+ shen_lusu:['male','shen',3,['dingzhou','tamo','zhimeng'],['wu']],
shen_huatuo:['male','shen',3,['wuling','youyi'],['qun']],
le_shen_jiaxu:['male','shen',4,['jxlianpo','jxzhaoluan'],['qun']],
shen_dianwei:['male','shen',4,['juanjia','qiexie','cuijue'],['wei']],
@@ -90,6 +91,185 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
skill:{
+ //神鲁肃
+ dingzhou:{
+ audio:2,
+ enable:'phaseUse',
+ usable:1,
+ filter(event,player){
+ const num=player.countCards('he');
+ return game.hasPlayer(current=>{
+ const total=current.countCards('ej');
+ return total>0&&num>=total;
+ });
+ },
+ filterCard:true,
+ selectCard:[1,Infinity],
+ check(card){
+ return 7-get.value(card);
+ },
+ filterTarget(card,player,target){
+ return ui.selected.cards.length==target.countCards('ej')&&player!=target;
+ },
+ filterOk(){
+ return ui.selected.cards.length==ui.selected.targets[0].countCards('ej');
+ },
+ position:'he',
+ lose:false,
+ discard:false,
+ delay:false,
+ async content(event,trigger,player){
+ const target=event.targets[0];
+ await player.give(event.cards,target);
+ const cards=target.getGainableCards(player,'ej');
+ if(cards.length) player.gain(cards,'give',target);
+ },
+ ai:{
+ order:9,
+ result:{
+ target(player,target){
+ let eff=0;
+ if(ui.selected.cards.length) eff-=ui.selected.cards.map(card=>get.value(card)).reduce((p,c)=>p+c,0);
+ const es=target.getCards('e'),js=target.getCards('j');
+ es.forEach(card=>{
+ eff-=get.value(card,target);
+ });
+ js.forEach(card=>{
+ eff-=get.effect(target,{
+ name:card.viewAs||card.name,
+ cards:[card],
+ },target,target);
+ });
+ return eff;
+ }
+ },
+ },
+ },
+ tamo:{
+ audio:2,
+ trigger:{
+ global:'phaseBefore',
+ player:'enterGame',
+ },
+ filter(event,player){
+ return (event.name!='phase'||game.phaseNumber==0)&&game.hasPlayer(current=>{
+ return !current.isZhu2()&¤t!=player;
+ });
+ },
+ direct:true,
+ async content(event,trigger,player){
+ const toSortPlayers=game.filterPlayer(current=>!current.isZhu2());
+ toSortPlayers.sortBySeat(game.findPlayer2(current=>current.getSeatNum()==1));
+ const next=player.chooseToMove('榻谟:是否分配所有角色的座次?');
+ next.set('list',[
+ ['(以下排列的顺序即为发动技能后角色的座次顺序)',
+ [toSortPlayers.map(i=>`${i.getSeatNum()}|${i.name}`),(item,type,position,noclick,node)=>{
+ const info=item.split('|'),_item=item;
+ const seat=parseInt(info[0]);
+ item=info[1];
+ node=ui.create.buttonPresets.character(item,type,position,noclick);
+ node.link=_item;
+ node.seatNumber=seat;
+ node._customintro=(uiintro)=>{
+ uiintro.add(`${get.translation(node._link)}(原${get.cnNumber(node.seatNumber,true)}号位)`);
+ };
+ return node;
+ }]
+ ]
+ ]);
+ next.set('processAI',list=>{
+ const listx=list[0][1][0];
+ const me=listx.find(info=>parseInt(info.split('|')[0])==get.player().getSeatNum());
+ listx.remove(me);
+ listx.randomSort();
+ listx.unshift(me);
+ return [listx];
+ });
+ const {result}=await next;
+ if(!result.bool) return;
+ player.logSkill('tamo');
+ const resultList=result.moved[0].map(info=>{
+ return parseInt(info.split('|')[0]);
+ });
+ const toSwapList=[];
+ const cmp=(a,b)=>{
+ return resultList.indexOf(a)-resultList.indexOf(b);
+ }
+ for(let i in toSortPlayers){
+ for(let j in toSortPlayers){
+ if(cmp(toSortPlayers[i].getSeatNum(),toSortPlayers[j].getSeatNum())<0){
+ toSwapList.push([toSortPlayers[i],toSortPlayers[j]]);
+ [toSortPlayers[i],toSortPlayers[j]]=[toSortPlayers[j],toSortPlayers[i]];
+ }
+ }
+ }
+ game.broadcastAll((toSwapList)=>{
+ for(const list of toSwapList){
+ game.swapSeat(list[0],list[1],false);
+ }
+ },toSwapList);
+ await game.asyncDelay();
+ }
+ },
+ //什么均贫卡
+ zhimeng:{
+ audio:2,
+ trigger:{player:'phaseAfter'},
+ filter(event,player){
+ return game.hasPlayer(current=>{
+ return current.countCards('h')+player.countCards('h')>0&&player!=current;
+ })
+ },
+ direct:true,
+ async content(event,trigger,player){
+ const {result:{bool,targets}}=await player.chooseTarget(get.prompt('zhimeng'),'与一名其他角色平分手牌',(card,player,target)=>{
+ return target.countCards('h')+player.countCards('h')>0&&player!=target;
+ }).set('ai',target=>{
+ const player=get.player();
+ const pvalue=-player.getCards('h').map(card=>get.value(card,player)).reduce((p,c)=>p+c,0);
+ const tvalue=target.getCards('h').map(card=>get.value(card,player)).reduce((p,c)=>p+c,0);
+ return (pvalue+tvalue)/2;
+ });
+ if(!bool) return;
+ const target=targets[0];
+ player.logSkill('zhimeng',target);
+ const lose_list=[];
+ let cards=[];
+ [player,target].forEach(current=>{
+ const hs=current.getCards('h');
+ if(hs.length){
+ cards.addArray(hs);
+ current.$throw(hs.length,500);
+ game.log(current,'将',get.cnNumber(hs.length),'张牌置入了处理区');
+ lose_list.push([current,hs]);
+ }
+ });
+ await game.loseAsync({
+ lose_list:lose_list,
+ }).setContent('chooseToCompareLose');
+ await game.asyncDelay();
+ cards=cards.filterInD();
+ const pcards=cards.randomGets(Math.ceil(cards.length/2));
+ const tcards=cards.removeArray(pcards);
+ const list=[];
+ if(pcards.length){
+ list.push([player,pcards]);
+ game.log(player,'获得了',get.cnNumber(pcards.length),'张牌');
+ }
+ if(tcards.length){
+ list.push([target,tcards]);
+ game.log(target,'获得了',get.cnNumber(tcards.length),'张牌');
+ }
+ game.loseAsync({
+ gain_list:list,
+ player:player,
+ animate:'gain2',
+ }).setContent('gaincardMultiple');
+ },
+ ai:{
+ threaten:4,
+ },
+ },
//神华佗
wuling:{
audio:2,
@@ -8066,6 +8246,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'