From 9dcfb6ce68f68017fb7944b669eb565d41896b85 Mon Sep 17 00:00:00 2001 From: libccy Date: Sun, 5 Feb 2017 14:55:07 +0800 Subject: [PATCH] d --- card/yunchou.js | 2 +- character/diy.js | 99 +++++++++++++++++++++++++++++++++++++++++++- character/swd.js | 2 +- character/yijiang.js | 2 +- game/game.js | 6 +++ game/update.js | 12 +++--- 6 files changed, 112 insertions(+), 11 deletions(-) diff --git a/card/yunchou.js b/card/yunchou.js index 20695db8a..d42fab660 100644 --- a/card/yunchou.js +++ b/card/yunchou.js @@ -165,7 +165,7 @@ card.yunchou={ event.finish(); } else{ - get.sort(list,'seat',target); + get.sortSeat(list,target); event.list=list; event.torespond=[]; } diff --git a/character/diy.js b/character/diy.js index c21ecf6ef..a6658e9b7 100644 --- a/character/diy.js +++ b/character/diy.js @@ -40,9 +40,104 @@ character.diy={ }, content:function(){ 'step 0' - event.cards=get.cards(Math.floor(game.players.length)/2); event.list=game.players.slice(0); - get.sort(list,'seat',target); + get.sortSeat(event.list,target); + var cards=get.cards(Math.floor(game.players.length)/2); + var dialog=ui.create.dialog('筹度',cards,true); + _status.dieClose.push(dialog); + dialog.videoId=lib.status.videoId++; + game.addVideo('cardDialog',null,['筹度',get.cardsInfo(cards),dialog.videoId]); + event.dialog=dialog; + game.delay(); + game.log(player,'亮出了',cards); + 'step 1' + if(event.list.length){ + event.current=event.list.shift(); + if(event.current.isAlive()&&event.current.num('h')){ + if(event.current.isUnderControl(true)){ + event.dialog.setCaption('选择一张亮出的牌并用一张手牌替换之'); + } + var maxValue=0; + for(var i=0;i0){ + return ai.get.value(button.link,player.nextSeat)-5; + } + else{ + return 5-ai.get.value(button.link,player.nextSeat); + } + } + } + 'step 6' + if(result&&result.bool&&result.links&&result.links.length){ + for(var i=0;i