删除 YouleNexus 内嵌 .git,统一由根仓库唯一管理。提交: - projects/ 旧 H5 模板 Game_Surface_3 与各子游戏源码 - cocoscreator_projects/YouleNexus 工程 + cocos-creator-mcp 扩展源码 - CLAUDE.md、.mcp.json 等配置 library/temp/node_modules/dist 等缓存由 .gitignore 排除。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1157 lines
35 KiB
JavaScript
1157 lines
35 KiB
JavaScript
var eqw_Desk=eqw_Desk||{};
|
|
|
|
|
|
eqw_Desk.count = 0; //总局数
|
|
|
|
eqw_Desk.idx = 0;//当前局数
|
|
|
|
//eqw_Desk.countdown=0;//倒计时(所有倒计时)
|
|
|
|
//eqw_Desk.Sumcountdown=0;//当前倒计时的总时间
|
|
|
|
eqw_Desk.countdown_jiaofen= 15; //叫分倒计时
|
|
eqw_Desk.countdown_xuanzhu= 20; //选主倒计时
|
|
eqw_Desk.countdown_maipai= 25; //埋牌倒计时
|
|
eqw_Desk.countdown_chupai= 30; //出牌倒计时
|
|
|
|
eqw_Desk.Multi=1;//倍数
|
|
eqw_Desk.PushCardList_1=[];//出牌列表
|
|
eqw_Desk.PushCardList_2=[];//出牌列表
|
|
eqw_Desk.PushCardList_3=[];//出牌列表
|
|
|
|
eqw_Desk.surrender = 0;
|
|
|
|
eqw_Desk.step = -1; //1发完牌叫分 2庄家选主 3庄家埋牌 4出牌 5单局结算//当前阶段
|
|
|
|
|
|
|
|
|
|
|
|
function eqw_PlayerInDesk(seat){
|
|
this.seat=seat;
|
|
this.call=null;
|
|
this.grade=0;
|
|
this.info=[[0,0],[0,0],[0,0],[0,0],[-1,-1]];
|
|
this.baozhu=0;
|
|
this.HandCards=[];
|
|
}
|
|
eqw_PlayerInDesk.prototype.Init=function(){
|
|
this.call=null;
|
|
this.grade=0;
|
|
this.info=[[0,0],[0,0],[0,0],[0,0],[-1,-1]];
|
|
this.baozhu=0;
|
|
this.HandCards=[];
|
|
}
|
|
eqw_PlayerInDesk.prototype.SetHandCards=function(CardList){
|
|
this.HandCards=CardList;
|
|
}
|
|
eqw_PlayerInDesk.prototype.PushCards=function(CardList){
|
|
for(var i=0;i<CardList.length;i++){
|
|
var index = this.HandCards.indexOf(CardList[i]);
|
|
if (index > -1) {
|
|
this.HandCards.splice(index, 1);
|
|
}
|
|
}
|
|
}
|
|
function eqw_CallRun(){
|
|
this.callpos=-1;//当前叫分玩家座位
|
|
this.score=null;//当前叫分
|
|
this.CardList=[];//出牌列表
|
|
this.call=[];
|
|
this.call.length=3;
|
|
}
|
|
eqw_CallRun.prototype.Init=function(){
|
|
this.callpos=-1;//当前叫分玩家座位
|
|
this.score=null;//当前叫分
|
|
this.CardList=[];//出牌列表
|
|
this.call=[];
|
|
this.call.length=3;
|
|
}
|
|
eqw_Desk.Call_Run={};
|
|
eqw_Desk.PlayerList=[];
|
|
eqw_Desk.BankerSeat=-1;
|
|
eqw_Desk.Callgrade=0;//当前叫分
|
|
eqw_Desk.Curgrade=0;//当前得分
|
|
eqw_Desk.bottomcards=[];//底牌
|
|
eqw_Desk.MainCard=0;//主牌花色
|
|
eqw_Desk.PushSeat=0;//出牌位置
|
|
eqw_Desk.PushInd=1;//出牌位置
|
|
eqw_Desk.push_count=1;//第一位置出牌数量
|
|
eqw_Desk.push_flower=0;//第一位置出牌花色
|
|
eqw_Desk.push_cardtype=0;//第一位置出牌牌型
|
|
eqw_Desk.GradeList=[];
|
|
eqw_Desk.Page_Search=0;//当前完成的出牌轮数
|
|
eqw_Desk.Round=0;//出牌轮数
|
|
|
|
//创建
|
|
eqw_Desk.Create=function(){
|
|
this.Call_Run=new eqw_CallRun();
|
|
this.Call_Run.CardList.length=3;
|
|
//new eqw_CallRun();
|
|
//eqw_Desk.seatlist.push([[0,0],[0,0],[0,0],[0,0],[-1,-1]]);
|
|
//1号位
|
|
//eqw_Desk.seatlist.push([[0,0],[0,0],[0,0],[0,0],[-1,-1]]);
|
|
//2号位
|
|
//eqw_Desk.seatlist.push([[0,0],[0,0],[0,0],[0,0],[-1,-1]]);
|
|
for(var i=0;i<eqw_Const.Max.playercnt;i++){
|
|
this.PlayerList[i]=new eqw_PlayerInDesk(i);
|
|
}
|
|
}
|
|
eqw_Desk.Init=function(){
|
|
this.Call_Run.Init();
|
|
this.Call_Run.CardList.length=3;
|
|
//new eqw_CallRun();
|
|
//eqw_Desk.seatlist.push([[0,0],[0,0],[0,0],[0,0],[-1,-1]]);
|
|
//1号位
|
|
//eqw_Desk.seatlist.push([[0,0],[0,0],[0,0],[0,0],[-1,-1]]);
|
|
//2号位
|
|
//eqw_Desk.seatlist.push([[0,0],[0,0],[0,0],[0,0],[-1,-1]]);
|
|
for(var i=0;i<eqw_Const.Max.playercnt;i++){
|
|
this.PlayerList[i].Init();
|
|
}
|
|
eqw_Desk.BankerSeat=-1;
|
|
eqw_Desk.Callgrade=0;//当前叫分
|
|
eqw_Desk.Curgrade=0;//当前得分
|
|
eqw_Desk.bottomcards=[];//底牌
|
|
eqw_Desk.MainCard=0;//主牌花色
|
|
eqw_Desk.PushSeat=0;//出牌位置
|
|
eqw_Desk.PushInd=1;//出牌位置
|
|
eqw_Desk.push_count=1;//第一位置出牌数量
|
|
eqw_Desk.push_flower=0;//第一位置出牌花色
|
|
eqw_Desk.push_cardtype=0;//第一位置出牌牌型
|
|
eqw_Desk.GradeList=[];
|
|
eqw_Desk.Page_Search=0;//当前完成的出牌轮数
|
|
eqw_Desk.Round=0;//出牌轮数
|
|
eqw_Desk.PushCardList_1=[];//出牌列表
|
|
eqw_Desk.PushCardList_2=[];//出牌列表
|
|
eqw_Desk.PushCardList_3=[];//出牌列表
|
|
eqw_Desk.Multi=1;//倍数
|
|
eqw_Desk.surrender = 0;
|
|
//eqw_Desk.count = 0; //总局数
|
|
|
|
//eqw_Desk.idx = 0;//当前局数
|
|
eqw_Desk.step = -1; //1发完牌叫分 2庄家选主 3庄家埋牌 4出牌 5单局结算//当前阶段
|
|
}
|
|
eqw_Desk.GetPlayerBySeat=function(seat){
|
|
return eqw_Desk.PlayerList[seat];
|
|
}
|
|
eqw_Desk.getSeatList=function(){
|
|
var rt = [];
|
|
for(var i=0;i<3;i++){
|
|
rt.push(eqw_Desk.PlayerList[i].info);
|
|
}
|
|
return rt;
|
|
}
|
|
eqw_Desk.GetBanker=function(){
|
|
for(var i=0;i<3;i++){
|
|
if(eqw_Desk.PlayerList[i].banker==1){
|
|
return eqw_Desk.PlayerList[i];
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
//设置总局数
|
|
eqw_Desk.SetCount=function(v){
|
|
this.count=v;
|
|
}
|
|
//设置当前局数
|
|
eqw_Desk.SetIdx=function(v){
|
|
this.idx=v;
|
|
}
|
|
//设置第一个叫分者
|
|
eqw_Desk.SetFirstseat=function(v){
|
|
this.firstseat=v;
|
|
}
|
|
//设置当前阶段
|
|
eqw_Desk.SetStep=function(v){
|
|
this.step=v;
|
|
}
|
|
//设置庄家位置
|
|
eqw_Desk.SetBanker=function(v){
|
|
this.banker=v;
|
|
}
|
|
//设置庄家叫分
|
|
eqw_Desk.SetCall=function(v){
|
|
this.call=v;
|
|
}
|
|
//设置主牌花色
|
|
eqw_Desk.SetFlower=function(v){
|
|
this.flower=v;
|
|
}
|
|
//发牌
|
|
eqw_Desk.fapai=function(_msg){
|
|
//console.log("发牌");
|
|
for(var i=0;i<3;i++){
|
|
eqw_GameUI.HideReady(i);
|
|
}
|
|
set_self(701,37,0,0,0);
|
|
set_self(801,37,0,0,0);
|
|
eqw_GameUI.HideAllCards();
|
|
eqw_GameUI.Init();
|
|
eqw_Desk.Init();
|
|
if(get_self(920,37,0,0,0)==1){
|
|
eqw_GameUI.CloseSingleBalance();
|
|
}
|
|
Desk.makewar(_msg);
|
|
eqw_Desk.SetStep(1);
|
|
eqw_Player.SetHandCards(_msg.data.cards);
|
|
eqw_Desk.Page_Search=0;
|
|
eqw_Desk.Call_Run.callpos=_msg.data.seat;
|
|
eqw_Desk.Call_Run.score=null;
|
|
eqw_Desk.idx=_msg.data.asetidx;
|
|
eqw_Desk.count=_msg.data.asetcount;
|
|
eqw_GameUI.ShowRound(eqw_Desk.idx,eqw_Desk.count);
|
|
eqw_GameUI.Data.CountDown=_msg.data.countdown;
|
|
//eqw_GameUI.SetMyCards();
|
|
eqw_GameUI.DealCards();
|
|
}
|
|
//叫分
|
|
eqw_Desk.jiaofen=function(_msg){
|
|
//console.log("进入叫分");
|
|
eqw_GameUI.Data.CountDown=_msg.data.countdown;
|
|
eqw_Desk.Call_Run.callpos=_msg.data.nextseat;
|
|
eqw_Desk.GetPlayerBySeat(_msg.data.seat).call=_msg.data.call;
|
|
eqw_Desk.Call_Run.score=_msg.data.currcall;
|
|
//eqw_GameUI.Data.CountDown=_msg.data.countdown;
|
|
eqw_Desk.Call_Run.call[_msg.data.seat,_msg.data.call];
|
|
eqw_Desk.Multi=_msg.data.multiple;
|
|
eqw_GameUI.SwitchCall();
|
|
eqw_GameUI.ShowCall(_msg.data.seat,_msg.data.call);
|
|
eqw_GameUI.OpenCountDown(_msg.data.nextseat);
|
|
if(_msg.data.call>0){
|
|
eqw_Logic.play_jiaofen(Utl.getSexBySeat(_msg.data.seat),_msg.data.call);
|
|
}else if(_msg.data.call==0){
|
|
eqw_Logic.play_bujiao(Utl.getSexBySeat(_msg.data.seat));
|
|
}
|
|
|
|
|
|
}
|
|
//上庄
|
|
eqw_Desk.shangzhuang=function(_msg){
|
|
eqw_GameUI.Data.CountDown=_msg.data.countdown;
|
|
eqw_Desk.Multi=_msg.data.multiple;
|
|
eqw_Desk.BankerSeat=_msg.data.banker;
|
|
eqw_Desk.Callgrade=_msg.data.grade;
|
|
eqw_Desk.Curgrade=0;
|
|
eqw_Desk.SetStep(2);
|
|
eqw_Desk.bottomcards=_msg.data.bottomcards;
|
|
eqw_Desk.bottomcards=_msg.data.bottomcards;
|
|
eqw_GameUI.Data.CountDown=_msg.data.countdown;
|
|
eqw_GameUI.ShowCall(_msg.data.seat,_msg.data.call);
|
|
|
|
if(Utl.getMySeat()==eqw_Desk.BankerSeat){
|
|
eqw_Player.SetHandCards(_msg.data.cards);
|
|
eqw_GameUI.SetMyCards();
|
|
eqw_Player.SetDiffCards(eqw_Desk.bottomcards);
|
|
if(typeof(_msg.data.touxiang) != "undefined"){
|
|
eqw_Desk.surrender = _msg.data.touxiang;
|
|
}
|
|
}
|
|
setTimeout("eqw_GameUI.shangzhuang()",300);
|
|
}
|
|
//选主
|
|
eqw_Desk.xuanzhu=function(_msg){
|
|
//eqw_GameUI.closeSurrenderBtn();
|
|
eqw_Desk.MainCard=_msg.data.flower;
|
|
|
|
eqw_GameUI.ChoseMainEffct(_msg.data.flower);
|
|
eqw_Logic.play_flower(Utl.getSexBySeat(_msg.data.banker),_msg.data.flower);
|
|
eqw_GameUI.Data.CountDown=_msg.data.countdown;
|
|
eqw_Player.SetHandCards(_msg.data.cards);
|
|
eqw_Player.SetDiffCards(eqw_Desk.bottomcards);
|
|
eqw_GameUI.SetMyCards();
|
|
eqw_Desk.SetStep(3);
|
|
|
|
|
|
}
|
|
//埋牌
|
|
eqw_Desk.maipai=function(_msg){
|
|
eqw_Desk.SetStep(4);
|
|
eqw_GameUI.Data.CountDown=_msg.data.countdown;
|
|
if(Utl.getMySeat()==eqw_Desk.BankerSeat){
|
|
eqw_Player.SetHandCards(_msg.data.cards);
|
|
//eqw_Player.SetDiffCards(eqw_Desk.bottomcards);
|
|
eqw_Player.SetBottomCards(_msg.data.bottomcards);
|
|
//set_self(800,37,0,0,0);
|
|
}
|
|
eqw_Desk.PushSeat=_msg.data.seat;
|
|
eqw_Desk.PushInd=1;
|
|
eqw_Desk.SetStep(4);
|
|
//eqw_Desk.isFirstPush=1;
|
|
eqw_GameUI.maipai();
|
|
}
|
|
//出牌1
|
|
eqw_Desk.chupai1=function(_msg){
|
|
//eqw_Data.isShowmaxseat = true;
|
|
//eqw_Data.isShowgrade = true;
|
|
//eqw_Data.isHideCards = true;
|
|
eqw_Desk.surrender = -1;
|
|
eqw_GameUI.CloseCountDown();
|
|
eqw_GameUI.Data.CountDown=_msg.data.countdown;
|
|
eqw_Desk.PushSeat=_msg.data.nextseat;
|
|
eqw_Desk.PushInd=2;
|
|
eqw_Desk.SetStep(5);
|
|
var pobj= eqw_Desk.GetPlayerBySeat(_msg.data.seat);
|
|
pobj.info=_msg.data.info;
|
|
pobj.baozhu=_msg.data.baozhu;
|
|
eqw_Desk.Call_Run.CardList[_msg.data.seat]=_msg.data.cards;
|
|
//eqw_Data.pushcards[_msg.data.seat]=_msg.data.cards;
|
|
switch(_msg.data.seat){
|
|
case 0:
|
|
eqw_Desk.PushCardList_1.push(_msg.data.cards);
|
|
break;
|
|
case 1:
|
|
eqw_Desk.PushCardList_2.push(_msg.data.cards);
|
|
break;
|
|
case 2:
|
|
eqw_Desk.PushCardList_3.push(_msg.data.cards);
|
|
break;
|
|
}
|
|
if(Utl.getMySeat()==_msg.data.seat){
|
|
eqw_Player.SetHandCards(_msg.data.cardsinhand);
|
|
set_self(801,37,0,0,0);
|
|
eqw_GameUI.SetMyCards();
|
|
}
|
|
eqw_Desk.push_count=_msg.data.count;
|
|
eqw_Desk.push_flower=_msg.data.flower;
|
|
eqw_Desk.push_cardtype=_msg.data.cardtype;
|
|
if(Utl.getMySeat()==_msg.data.nextseat){
|
|
var rt = cls_youle_erqiwang_arith.get_followcard(eqw_Desk.MainCard, eqw_Player.GetCardsList(), eqw_Desk.push_count, eqw_Desk.push_flower, eqw_Desk.push_cardtype);
|
|
eqw_GameUI.ShowFollow(rt);
|
|
}
|
|
eqw_GameUI.PushCards(_msg.data.seat,_msg.data.cards);
|
|
|
|
if(pobj.baozhu==1){
|
|
eqw_GameUI.baozhu(pobj.seat,pobj.info);
|
|
}
|
|
eqw_GameUI.PushCardsRun(_msg.data.nextseat);
|
|
}
|
|
//出牌2
|
|
eqw_Desk.chupai2=function(_msg){
|
|
//eqw_Data.isShowmaxseat = true;
|
|
//eqw_Data.isShowgrade = true;
|
|
//eqw_Data.isHideCards = true;
|
|
eqw_GameUI.CloseCountDown();
|
|
eqw_Desk.PushInd=3;
|
|
eqw_GameUI.Data.CountDown=_msg.data.countdown;
|
|
eqw_Desk.PushSeat=_msg.data.nextseat;
|
|
var pobj= eqw_Desk.GetPlayerBySeat(_msg.data.seat);
|
|
pobj.info=_msg.data.info;
|
|
pobj.baozhu=_msg.data.baozhu;
|
|
eqw_Desk.Call_Run.CardList[_msg.data.seat]=_msg.data.cards;
|
|
//eqw_Data.pushcards[_msg.data.seat]=_msg.data.cards;
|
|
switch(_msg.data.seat){
|
|
case 0:
|
|
eqw_Desk.PushCardList_1.push(_msg.data.cards);
|
|
break;
|
|
case 1:
|
|
eqw_Desk.PushCardList_2.push(_msg.data.cards);
|
|
break;
|
|
case 2:
|
|
eqw_Desk.PushCardList_3.push(_msg.data.cards);
|
|
break;
|
|
}
|
|
if(Utl.getMySeat()==_msg.data.seat){
|
|
eqw_Player.SetHandCards(_msg.data.cardsinhand);
|
|
set_self(801,37,0,0,0);
|
|
eqw_GameUI.SetMyCards();
|
|
}
|
|
if(Utl.getMySeat()==_msg.data.nextseat){
|
|
var rt = cls_youle_erqiwang_arith.get_followcard(eqw_Desk.MainCard, eqw_Player.GetCardsList(), eqw_Desk.push_count, eqw_Desk.push_flower, eqw_Desk.push_cardtype);
|
|
eqw_GameUI.ShowFollow(rt);
|
|
}
|
|
eqw_GameUI.PushCards(_msg.data.seat,_msg.data.cards);
|
|
if(pobj.baozhu==1){
|
|
eqw_GameUI.baozhu(pobj.seat,pobj.info);
|
|
}
|
|
eqw_GameUI.PushCardsRun(_msg.data.nextseat);
|
|
}
|
|
//出牌3
|
|
eqw_Desk.chupai3=function(_msg){
|
|
eqw_GameUI.CloseCountDown();
|
|
eqw_Data.isShowmaxseat = true;
|
|
eqw_Data.isShowgrade = true;
|
|
eqw_Data.isHideCards = true;
|
|
//console.log("1");
|
|
eqw_Desk.PushInd=1;
|
|
eqw_GameUI.Data.CountDown=_msg.data.countdown;
|
|
var pobj= eqw_Desk.GetPlayerBySeat(_msg.data.seat);
|
|
pobj.info=_msg.data.info;
|
|
pobj.baozhu=_msg.data.baozhu;
|
|
eqw_Desk.Call_Run.CardList[_msg.data.seat]=_msg.data.cards;
|
|
//eqw_Data.pushcards[_msg.data.seat]=_msg.data.cards;
|
|
eqw_Desk.PushSeat=_msg.data.nextseat;
|
|
switch(_msg.data.seat){
|
|
case 0:
|
|
console.log("before:"+eqw_Desk.PushCardList_1);
|
|
eqw_Desk.PushCardList_1.push(_msg.data.cards);
|
|
console.log("data:"+_msg.data.cards+"\nafter:"+eqw_Desk.PushCardList_1);
|
|
break;
|
|
case 1:
|
|
eqw_Desk.PushCardList_2.push(_msg.data.cards);
|
|
break;
|
|
case 2:
|
|
eqw_Desk.PushCardList_3.push(_msg.data.cards);
|
|
break;
|
|
}
|
|
eqw_Desk.Page_Search++;
|
|
if(Utl.getMySeat()==_msg.data.seat){
|
|
eqw_Player.SetHandCards(_msg.data.cardsinhand);
|
|
set_self(801,37,0,0,0);
|
|
eqw_GameUI.SetMyCards();
|
|
|
|
}
|
|
eqw_GameUI.PushCards(_msg.data.seat,_msg.data.cards);
|
|
if(pobj.baozhu==1){
|
|
eqw_GameUI.baozhu(pobj.seat,pobj.info);
|
|
}
|
|
if(typeof(_msg.data.grade)!="undefined"){
|
|
eqw_Desk.Curgrade+=_msg.data.grade;
|
|
eqw_GameUI.Data.Grade1=[];
|
|
eqw_GameUI.Data.Grade2=[];
|
|
eqw_GameUI.Data.Grade3=[];
|
|
for(var i=0;i<3;i++){
|
|
var ind=eqw_Logic.ChangeToStatus(i);
|
|
switch(ind){
|
|
case 0:
|
|
eqw_GameUI.Data.Grade1.length=eqw_Desk.Call_Run.CardList[i].length;
|
|
for(var j=0;j<eqw_Desk.Call_Run.CardList[i].length;j++){
|
|
var gd = cls_youle_erqiwang_arith.id_to_number(eqw_Desk.Call_Run.CardList[i][j]);
|
|
if(gd==5||gd==10||gd==13){
|
|
eqw_GameUI.Data.Grade1[j]=1;
|
|
eqw_Desk.GradeList.push(eqw_Desk.Call_Run.CardList[i][j]);
|
|
}else{
|
|
eqw_GameUI.Data.Grade1[j]=0;
|
|
}
|
|
}
|
|
break;
|
|
case 1:
|
|
eqw_GameUI.Data.Grade2.length=eqw_Desk.Call_Run.CardList[i].length;
|
|
for(var j=0;j<eqw_Desk.Call_Run.CardList[i].length;j++){
|
|
var gd = cls_youle_erqiwang_arith.id_to_number(eqw_Desk.Call_Run.CardList[i][j]);
|
|
if(gd==5||gd==10||gd==13){
|
|
eqw_GameUI.Data.Grade2[j]=1;
|
|
eqw_Desk.GradeList.push(eqw_Desk.Call_Run.CardList[i][j]);
|
|
}else{
|
|
eqw_GameUI.Data.Grade2[j]=0;
|
|
}
|
|
}
|
|
break;
|
|
case 2:
|
|
eqw_GameUI.Data.Grade3.length=eqw_Desk.Call_Run.CardList[i].length;
|
|
for(var j=0;j<eqw_Desk.Call_Run.CardList[i].length;j++){
|
|
var gd = cls_youle_erqiwang_arith.id_to_number(eqw_Desk.Call_Run.CardList[i][j]);
|
|
if(gd==5||gd==10||gd==13){
|
|
eqw_GameUI.Data.Grade3[j]=1;
|
|
eqw_Desk.GradeList.push(eqw_Desk.Call_Run.CardList[i][j]);
|
|
}else{
|
|
eqw_GameUI.Data.Grade3[j]=0;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
eqw_GameUI.Data.GetGrade=_msg.data.grade;
|
|
var bTemp=false;
|
|
if(_msg.data.seat==_msg.data.maxseat){
|
|
bTemp=true;
|
|
}
|
|
eqw_GameUI.ShowMaxSeat(_msg.data.maxseat,true);
|
|
setTimeout("eqw_GameUI.ShowGrade(eqw_GameUI.Data.GetGrade)",1200+300);
|
|
setTimeout("eqw_GameUI.PushCardsRun(eqw_Desk.PushSeat)",2500+300);
|
|
}else{
|
|
eqw_GameUI.ShowMaxSeat(_msg.data.maxseat,true);
|
|
setTimeout("eqw_GameUI.HideCards()",1200+300);
|
|
setTimeout("eqw_GameUI.PushCardsRun(eqw_Desk.PushSeat)",2500+300);
|
|
}
|
|
//eqw_Data.pushcards = [].concat(eqw_Desk.Call_Run.CardList);
|
|
eqw_Desk.Call_Run.CardList=[null,null,null];
|
|
//eqw_GameUI.CloseCountDown();
|
|
|
|
|
|
//eqw_GameUI.PushCardsRun(_msg.data.maxseat);
|
|
}
|
|
eqw_Desk.jiesuan=function(_msg){
|
|
eqw_Logic.play_singlebalance();
|
|
eqw_Desk.PushInd=1;
|
|
eqw_Data.isGetBottom = true;
|
|
|
|
Utl.endLoad();
|
|
//if(eqw_Desk.idx<eqw_Desk.count){
|
|
//eqw_Desk.idx++;
|
|
//}
|
|
|
|
eqw_GameUI.CloseCountDown();
|
|
if(typeof(_msg.data.chupai) == "undefined"){
|
|
//eqw_GameUI.HideMaiPai();
|
|
//eqw_GameUI.HideChoseMainBoard();
|
|
eqw_Desk.ApplyFree(_msg);
|
|
return;
|
|
}
|
|
//eqw_GameUI.Hidebaozhu();
|
|
eqw_Desk.Call_Run.CardList[_msg.data.chupai.seat]=_msg.data.chupai.cards;
|
|
switch(_msg.data.seat){
|
|
case 0:
|
|
eqw_Desk.PushCardList_1.push(_msg.data.cards);
|
|
break;
|
|
case 1:
|
|
eqw_Desk.PushCardList_2.push(_msg.data.cards);
|
|
break;
|
|
case 2:
|
|
eqw_Desk.PushCardList_3.push(_msg.data.cards);
|
|
break;
|
|
}
|
|
eqw_Desk.Page_Search++;
|
|
//eqw_Desk.PushSeat=_msg.data.nextseat;
|
|
if(Utl.getMySeat()==_msg.data.chupai.seat){
|
|
eqw_Player.SetHandCards([]);
|
|
eqw_GameUI.SetMyCards();
|
|
|
|
}
|
|
set_self(801,37,0,0,0);
|
|
eqw_GameUI.Data.SingleBalancePack=_msg.data.aset;
|
|
eqw_GameUI.Data.BottomPack=_msg.data.bottom;
|
|
if(typeof(_msg.data.bottom.grade2)!="undefined"){
|
|
eqw_Desk.Curgrade+=_msg.data.bottom.grade2;
|
|
}
|
|
if(typeof(_msg.data.account)!="undefined"){
|
|
eqw_GameUI.Data.BalancePack=_msg.data.account;
|
|
var maxgrade=0;
|
|
for(var i=0;i<eqw_GameUI.Data.BalancePack.length;i++){
|
|
if(eqw_GameUI.Data.BalancePack[i][0]>maxgrade){
|
|
eqw_GameUI.Data.WinPlayer=[];
|
|
eqw_GameUI.Data.WinPlayer.push(i);
|
|
maxgrade=eqw_GameUI.Data.BalancePack[i][0];
|
|
}else if(eqw_GameUI.Data.BalancePack[i][0]==maxgrade){
|
|
eqw_GameUI.Data.WinPlayer.push(i);
|
|
}
|
|
}
|
|
}else{
|
|
eqw_GameUI.Data.BalancePack=null;
|
|
}
|
|
for(var i=0;i<3;i++){
|
|
Utl.setGrade(i,_msg.data.aset.seatlist[i].score);
|
|
}
|
|
eqw_GameUI.PushCards(_msg.data.chupai.seat,_msg.data.chupai.cards);
|
|
if(typeof(_msg.data.chupai.grade)!="undefined"){
|
|
eqw_Desk.Curgrade+=_msg.data.chupai.grade;
|
|
eqw_GameUI.Data.Grade1=[];
|
|
eqw_GameUI.Data.Grade2=[];
|
|
eqw_GameUI.Data.Grade3=[];
|
|
for(var i=0;i<3;i++){
|
|
|
|
var ind=eqw_Logic.ChangeToStatus(i);
|
|
switch(ind){
|
|
case 0:
|
|
eqw_GameUI.Data.Grade1.length=eqw_Desk.Call_Run.CardList[i].length;
|
|
for(var j=0;j<eqw_Desk.Call_Run.CardList[i].length;j++){
|
|
var gd = cls_youle_erqiwang_arith.id_to_number(eqw_Desk.Call_Run.CardList[i][j]);
|
|
if(gd==5||gd==10||gd==13){
|
|
eqw_GameUI.Data.Grade1[j]=1;
|
|
eqw_Desk.GradeList.push(eqw_Desk.Call_Run.CardList[i][j]);
|
|
}else{
|
|
eqw_GameUI.Data.Grade1[j]=0;
|
|
}
|
|
}
|
|
break;
|
|
case 1:
|
|
eqw_GameUI.Data.Grade2.length=eqw_Desk.Call_Run.CardList[i].length;
|
|
for(var j=0;j<eqw_Desk.Call_Run.CardList[i].length;j++){
|
|
var gd = cls_youle_erqiwang_arith.id_to_number(eqw_Desk.Call_Run.CardList[i][j]);
|
|
if(gd==5||gd==10||gd==13){
|
|
eqw_GameUI.Data.Grade2[j]=1;
|
|
eqw_Desk.GradeList.push(eqw_Desk.Call_Run.CardList[i][j]);
|
|
}else{
|
|
eqw_GameUI.Data.Grade2[j]=0;
|
|
}
|
|
}
|
|
break;
|
|
case 2:
|
|
eqw_GameUI.Data.Grade3.length=eqw_Desk.Call_Run.CardList[i].length;
|
|
for(var j=0;j<eqw_Desk.Call_Run.CardList[i].length;j++){
|
|
var gd = cls_youle_erqiwang_arith.id_to_number(eqw_Desk.Call_Run.CardList[i][j]);
|
|
if(gd==5||gd==10||gd==13){
|
|
eqw_GameUI.Data.Grade3[j]=1;
|
|
eqw_Desk.GradeList.push(eqw_Desk.Call_Run.CardList[i][j]);
|
|
}else{
|
|
eqw_GameUI.Data.Grade3[j]=0;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
eqw_GameUI.Data.GetGrade=_msg.data.chupai.grade;
|
|
eqw_GameUI.ShowMaxSeat(_msg.data.maxseat,true);
|
|
setTimeout("eqw_GameUI.ShowGrade(eqw_GameUI.Data.GetGrade)",1200+300);
|
|
//setTimeout("eqw_GameUI.PushCardsRun(eqw_Desk.PushSeat)",2500+300);
|
|
//setTimeout("eqw_GameUI.GetBottom()",2500+300);
|
|
}else{
|
|
eqw_GameUI.ShowMaxSeat(_msg.data.maxseat,true);
|
|
setTimeout("eqw_GameUI.HideCards()",1200+300);
|
|
//setTimeout("eqw_GameUI.PushCardsRun(eqw_Desk.PushSeat)",2500+300);
|
|
}
|
|
eqw_GameUI.HideCountDown();
|
|
setTimeout("eqw_GameUI.GetBottom()",2500+300);
|
|
|
|
|
|
//eqw_GameUI.GetBottom();
|
|
|
|
}
|
|
eqw_Desk.zhunbei=function(_msg){
|
|
if(_msg.data.seat==Utl.getMySeat()){
|
|
eqw_GameUI.CloseSingleBalance();
|
|
eqw_GameUI.HideAllCards();
|
|
set_self(701,37,0,0,0);
|
|
}
|
|
eqw_GameUI.ShowReady(_msg.data.seat);
|
|
}
|
|
eqw_Desk.ApplyFree=function(_msg){
|
|
eqw_GameUI.Data.SingleBalancePack=_msg.data.aset;
|
|
if(typeof(_msg.data.account)!="undefined"){
|
|
eqw_GameUI.Data.BalancePack=_msg.data.account;
|
|
var maxgrade=0;
|
|
for(var i=0;i<eqw_GameUI.Data.BalancePack.length;i++){
|
|
if(eqw_GameUI.Data.BalancePack[i][0]>maxgrade){
|
|
eqw_GameUI.Data.WinPlayer=[];
|
|
eqw_GameUI.Data.WinPlayer.push(i);
|
|
maxgrade=eqw_GameUI.Data.BalancePack[i][0];
|
|
}else if(eqw_GameUI.Data.BalancePack[i][0]==maxgrade){
|
|
eqw_GameUI.Data.WinPlayer.push(i);
|
|
}
|
|
}
|
|
}else{
|
|
eqw_GameUI.Data.BalancePack=null;
|
|
}
|
|
for(var i=0;i<3;i++){
|
|
Utl.setGrade(i,_msg.data.aset.seatlist[i].score);
|
|
}
|
|
eqw_GameUI.OpenSingleBalance();
|
|
}
|
|
eqw_Desk.Reconnect=function(_msg){
|
|
//console.log("阶段:"+_msg.step);
|
|
for(var i=0;i<_msg.PlayerInfo.length;i++){
|
|
Utl.setGrade(i,_msg.PlayerInfo[i]);
|
|
}
|
|
|
|
switch(_msg.step){
|
|
case 1://叫分阶段
|
|
eqw_Desk.idx=_msg.idx;
|
|
eqw_Desk.count=_msg.count;
|
|
eqw_GameUI.ShowRound(_msg.idx,_msg.count);
|
|
eqw_Player.SetHandCards(_msg.MyCards);
|
|
eqw_GameUI.SetMyCards();
|
|
eqw_GameUI.Data.CountDown=_msg.CallRun.countdown;//倒计时
|
|
eqw_Desk.Call_Run.callpos=_msg.CallRun.seat;
|
|
eqw_Desk.Call_Run.score=_msg.CallRun.nowcall;
|
|
eqw_Desk.Call_Run.call =_msg.CallRun.call;
|
|
eqw_Desk.Multi=_msg.CallRun.multiple;
|
|
eqw_Desk.SetStep(1);
|
|
eqw_GameUI.OpenScore();
|
|
for(var i=0;i<3;i++){
|
|
eqw_GameUI.ShowCall(i,eqw_Desk.Call_Run.call[i]);
|
|
}
|
|
break;
|
|
case 2://选主阶段
|
|
eqw_Desk.idx=_msg.idx;
|
|
eqw_Desk.count=_msg.count;
|
|
eqw_GameUI.ShowRound(_msg.idx,_msg.count);
|
|
eqw_Player.SetHandCards(_msg.MyCards);
|
|
eqw_GameUI.SetMyCards();
|
|
eqw_Desk.bottomcards=_msg.ChooseMain.bottomcards;
|
|
eqw_Desk.BankerSeat=_msg.ChooseMain.banker;
|
|
eqw_Desk.Callgrade=_msg.ChooseMain.call;
|
|
eqw_Desk.Curgrade=0;
|
|
eqw_Desk.SetStep(2);
|
|
eqw_Desk.Multi=_msg.ChooseMain.multiple;
|
|
var ind=eqw_Logic.ChangeToStatus(eqw_Desk.BankerSeat);
|
|
eqw_GameUI.Data.Bankerspid=346+ind;
|
|
eqw_GameUI.Data.CountDown=_msg.ChooseMain.countdown;
|
|
if(Utl.getMySeat()==eqw_Desk.BankerSeat){
|
|
eqw_Player.SetDiffCards(eqw_Desk.bottomcards);
|
|
if(typeof(_msg.ChooseMain.touxiang) != "undefined"){
|
|
eqw_Desk.surrender = _msg.ChooseMain.touxiang;
|
|
}
|
|
}
|
|
eqw_GameUI.ShowFlowerInfo();
|
|
eqw_GameUI.ShowMulti();
|
|
eqw_GameUI.ShowChoseMainBoard();
|
|
eqw_GameUI.OpenCountDown(eqw_Desk.BankerSeat);
|
|
break;
|
|
case 3://埋牌阶段
|
|
eqw_Desk.idx=_msg.idx;
|
|
eqw_Desk.count=_msg.count;
|
|
eqw_GameUI.ShowRound(_msg.idx,_msg.count);
|
|
eqw_Player.SetHandCards(_msg.MyCards);
|
|
eqw_GameUI.SetMyCards();
|
|
eqw_Desk.bottomcards=_msg.BuryCards.bottomcards;
|
|
eqw_Desk.BankerSeat=_msg.BuryCards.banker;
|
|
eqw_GameUI.ShowBanker(eqw_Desk.BankerSeat);
|
|
eqw_Desk.Callgrade=_msg.BuryCards.call;
|
|
eqw_Desk.Curgrade=0;
|
|
eqw_Desk.SetStep(3);
|
|
eqw_Desk.Multi=_msg.BuryCards.multiple;
|
|
eqw_Desk.MainCard=_msg.BuryCards.flower;
|
|
if(Utl.getMySeat()==eqw_Desk.BankerSeat){
|
|
eqw_Player.SetDiffCards(eqw_Desk.bottomcards);
|
|
if(typeof(_msg.BuryCards.touxiang) != "undefined"){
|
|
eqw_Desk.surrender = _msg.BuryCards.touxiang;
|
|
}
|
|
}
|
|
var ind=eqw_Logic.ChangeToStatus(eqw_Desk.BankerSeat);
|
|
eqw_GameUI.Data.Bankerspid=346+ind;
|
|
eqw_GameUI.Data.Main=eqw_Desk.MainCard;
|
|
eqw_GameUI.ShowFlowerInfo();
|
|
eqw_GameUI.ShowMulti();
|
|
eqw_GameUI.ShowMaiPai();
|
|
break;
|
|
case 4://投降阶段
|
|
//if(){//庄家
|
|
//eqw_Desk.bottomcards=_msg.BuryCards.bottomcards;
|
|
//}
|
|
eqw_Desk.idx=_msg.idx;
|
|
eqw_Desk.count=_msg.count;
|
|
eqw_GameUI.ShowRound(_msg.idx,_msg.count);
|
|
eqw_Player.SetHandCards(_msg.MyCards);
|
|
eqw_GameUI.SetMyCards();
|
|
eqw_Desk.BankerSeat=_msg.Surrender.banker;
|
|
eqw_GameUI.ShowBanker(eqw_Desk.BankerSeat);
|
|
eqw_Desk.Callgrade=_msg.Surrender.call;
|
|
eqw_Desk.Curgrade=0;
|
|
eqw_Desk.SetStep(4);
|
|
eqw_Desk.Multi=_msg.Surrender.multiple;
|
|
eqw_Desk.MainCard=_msg.Surrender.flower;
|
|
var ind=eqw_Logic.ChangeToStatus(eqw_Desk.BankerSeat);
|
|
eqw_GameUI.Data.Bankerspid=346+ind;
|
|
eqw_GameUI.Data.Main=eqw_Desk.MainCard;
|
|
eqw_GameUI.Data.CountDown=_msg.Surrender.countdown;
|
|
if(Utl.getMySeat()==eqw_Desk.BankerSeat){//庄家
|
|
eqw_Desk.bottomcards=_msg.Surrender.bottomcards;
|
|
eqw_Player.SetBottomCards(_msg.Surrender.bottomcards);
|
|
if(typeof(_msg.Surrender.touxiang) != "undefined"){
|
|
eqw_Desk.surrender = _msg.Surrender.touxiang;
|
|
}
|
|
}
|
|
eqw_Desk.PushInd=1;
|
|
eqw_GameUI.ShowFlowerInfo();
|
|
eqw_GameUI.ShowMulti();
|
|
eqw_GameUI.ShowDeskCards();
|
|
eqw_GameUI.PushCardsRun(eqw_Desk.BankerSeat);
|
|
set_self(701,37,1,0,0);
|
|
break;
|
|
case 5://出牌阶段
|
|
eqw_GameUI.Endmaipai();
|
|
eqw_Desk.idx=_msg.idx;
|
|
eqw_Desk.count=_msg.count;
|
|
eqw_GameUI.ShowRound(_msg.idx,_msg.count);
|
|
eqw_Player.SetHandCards(_msg.MyCards);
|
|
eqw_Player.InitCards();
|
|
eqw_GameUI.SetMyCards();
|
|
eqw_Desk.BankerSeat=_msg.PushCards.banker;
|
|
eqw_Desk.PushSeat = _msg.PushCards.playproc.currseat;
|
|
eqw_GameUI.ShowBanker(eqw_Desk.BankerSeat);
|
|
eqw_Desk.Callgrade=_msg.PushCards.call;
|
|
eqw_Desk.Curgrade=_msg.PushCards.grade;
|
|
eqw_Desk.SetStep(5);
|
|
eqw_Desk.Multi=_msg.PushCards.multiple;
|
|
eqw_Desk.MainCard=_msg.PushCards.flower;
|
|
var ind=eqw_Logic.ChangeToStatus(eqw_Desk.BankerSeat);
|
|
eqw_GameUI.Data.Bankerspid=346+ind;
|
|
eqw_GameUI.Data.Main=eqw_Desk.MainCard;
|
|
eqw_GameUI.Data.CountDown=_msg.PushCards.countdown;
|
|
if(Utl.getMySeat()==eqw_Desk.BankerSeat){//庄家
|
|
eqw_Desk.bottomcards=_msg.PushCards.bottomcards;
|
|
eqw_Player.SetBottomCards(_msg.PushCards.bottomcards);
|
|
|
|
}else{
|
|
eqw_Desk.GradeList=_msg.PushCards.gradecards;
|
|
}
|
|
|
|
eqw_GameUI.ShowDeskCards();
|
|
eqw_GameUI.ShowFlowerInfo();
|
|
eqw_GameUI.ShowMulti();
|
|
eqw_GameUI.PushCardsRun(eqw_Desk.BankerSeat);
|
|
var n=0;
|
|
for(var i=0;i<3;i++){
|
|
eqw_Desk.Call_Run.CardList[i] = _msg.PushCards.playproc.cards[i];
|
|
//eqw_Data.pushcards[i] = _msg.PushCards.playproc.cards[i];
|
|
if(_msg.PushCards.playproc.cards[i]!=null){
|
|
n++;
|
|
var ii=eqw_Logic.ChangeToStatus(i);
|
|
switch(ii){
|
|
case 0:
|
|
eqw_GameUI.ShowMyPush(_msg.PushCards.playproc.cards[i]);
|
|
break;
|
|
case 1:
|
|
eqw_GameUI.ShowDownPush(_msg.PushCards.playproc.cards[i]);
|
|
break;
|
|
case 2:
|
|
eqw_GameUI.ShowUpPush(_msg.PushCards.playproc.cards[i]);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
eqw_Desk.PushInd=n+1;
|
|
eqw_Desk.PushCardList_1=[];
|
|
eqw_Desk.PushCardList_2=[];
|
|
eqw_Desk.PushCardList_3=[];
|
|
for(var i=0;i<_msg.PushCards.pushlist.length;i++){
|
|
if(_msg.PushCards.pushlist[i][0].length>0){
|
|
eqw_Desk.PushCardList_1.push(_msg.PushCards.pushlist[i][0]);
|
|
}
|
|
if(_msg.PushCards.pushlist[i][1].length>0){
|
|
eqw_Desk.PushCardList_2.push(_msg.PushCards.pushlist[i][1]);
|
|
}
|
|
if(_msg.PushCards.pushlist[i][2].length>0){
|
|
eqw_Desk.PushCardList_3.push(_msg.PushCards.pushlist[i][2]);
|
|
}
|
|
}
|
|
|
|
eqw_Desk.Page_Search=_msg.PushCards.playproc.round-1;
|
|
//eqw_Desk.seatlist=_msg.PushCards.seatlist;
|
|
for(var i=0;i<_msg.PushCards.seatlist.length;i++){
|
|
var ppobj=eqw_Desk.GetPlayerBySeat(i);
|
|
ppobj.info=_msg.PushCards.seatlist[i];
|
|
if(ppobj.info[4][0]!=-1){
|
|
ppobj.baozhu=1;
|
|
eqw_GameUI.baozhu(i,ppobj.info);
|
|
}
|
|
}
|
|
eqw_Desk.push_count=_msg.PushCards.playproc.startcount;
|
|
eqw_Desk.push_flower=_msg.PushCards.playproc.startflower;
|
|
eqw_Desk.push_cardtype=_msg.PushCards.playproc.starttype;
|
|
if(_msg.PushCards.playproc.currseat == Utl.getMySeat()){
|
|
switch(eqw_Desk.PushInd){
|
|
case 1:
|
|
|
|
break;
|
|
case 2:
|
|
var rt = cls_youle_erqiwang_arith.get_followcard(eqw_Desk.MainCard, eqw_Player.GetCardsList(), eqw_Desk.push_count, eqw_Desk.push_flower, eqw_Desk.push_cardtype);
|
|
eqw_GameUI.ShowFollow(rt);
|
|
break;
|
|
case 3:
|
|
var rt = cls_youle_erqiwang_arith.get_followcard(eqw_Desk.MainCard, eqw_Player.GetCardsList(), eqw_Desk.push_count, eqw_Desk.push_flower, eqw_Desk.push_cardtype);
|
|
eqw_GameUI.ShowFollow(rt);
|
|
break;
|
|
}
|
|
}
|
|
set_self(701,37,1,0,0);
|
|
eqw_GameUI.PushCardsRun(_msg.PushCards.playproc.currseat);
|
|
break;
|
|
case 6://结算阶段
|
|
eqw_Desk.Callgrade = 0;
|
|
eqw_Desk.Curgrade = 0;
|
|
eqw_GameUI.ShowFlowerInfo();
|
|
eqw_Desk.Multi = -1;
|
|
eqw_GameUI.ShowMulti();
|
|
eqw_Desk.idx=_msg.idx;
|
|
eqw_Desk.count=_msg.count;
|
|
eqw_GameUI.ShowRound(_msg.idx,_msg.count);
|
|
eqw_Player.SetHandCards(_msg.MyCards);
|
|
eqw_GameUI.SetMyCards();
|
|
eqw_Desk.SetStep(6);
|
|
eqw_Data.isGetBottom = false;
|
|
eqw_GameUI.HideBanker();
|
|
eqw_GameUI.HideAllCards();
|
|
set_self(860,37,0,0,0);
|
|
for(var i=0;i<3;i++){
|
|
if(_msg.Balance.readystate[i]==1){
|
|
eqw_GameUI.ShowReady(i);
|
|
}
|
|
}
|
|
if(_msg.Balance.readystate[Utl.getMySeat()]==0){
|
|
eqw_GameUI.Data.SingleBalancePack=_msg.Balance.aset;
|
|
//if(typeof(_msg.data.account)!="undefined"){
|
|
//eqw_GameUI.Data.BalancePack=_msg.data.account;
|
|
//var maxgrade=0;
|
|
//for(var i=0;i<eqw_GameUI.Data.BalancePack.length;i++){
|
|
//if(eqw_GameUI.Data.BalancePack[i][0]>maxgrade){
|
|
//eqw_GameUI.Data.WinPlayer=[];
|
|
//eqw_GameUI.Data.WinPlayer.push(i);
|
|
//maxgrade=eqw_GameUI.Data.BalancePack[i][0];
|
|
//}else if(eqw_GameUI.Data.BalancePack[i][0]==maxgrade){
|
|
//eqw_GameUI.Data.WinPlayer.push(i);
|
|
//}
|
|
//}
|
|
//}else{
|
|
//eqw_GameUI.Data.BalancePack=null;
|
|
//}
|
|
for(var i=0;i<3;i++){
|
|
Utl.setGrade(i,eqw_GameUI.Data.SingleBalancePack.seatlist[i].score);
|
|
}
|
|
eqw_GameUI.OpenSingleBalance();
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
eqw_Desk.get_player_grade2=function(_msg){
|
|
|
|
CombatInfo_2=JSON.parse(_msg.data.gameinfo2);
|
|
Game_Modify.GoCombatPageTwo(GameData.GradeIdx);
|
|
|
|
}
|
|
eqw_Desk.updateScene = function(){
|
|
//eqw_GameUI.ShowRound(eqw_Desk.idx,eqw_Desk.count);
|
|
//eqw_GameUI.SetMyCards();
|
|
//logmessage("重画阶段:"+this.step,1);
|
|
switch(this.step){
|
|
case 1://叫分阶段
|
|
//eqw_GameUI.Data.CountDown=_msg.CallRun.countdown;//倒计时
|
|
//eqw_Desk.Call_Run.callpos=_msg.CallRun.seat;
|
|
//eqw_Desk.Call_Run.score=_msg.CallRun.nowcall;
|
|
//eqw_Desk.Multi=_msg.CallRun.multiple;
|
|
//eqw_Desk.SetStep(1);
|
|
eqw_GameUI.EndDealCards();
|
|
//logmessage(eqw_Player.GetCardsList(),1);
|
|
eqw_GameUI.ShowRound(eqw_Desk.idx,eqw_Desk.count);
|
|
eqw_GameUI.OpenScore(true);
|
|
for(var i=0;i<3;i++){
|
|
eqw_GameUI.ShowCall(i,this.Call_Run.call[i]);
|
|
}
|
|
eqw_GameUI.SetMyCards();
|
|
break;
|
|
case 2://选主阶段
|
|
//eqw_Desk.bottomcards=_msg.ChooseMain.bottomcards;
|
|
//eqw_Desk.BankerSeat=_msg.ChooseMain.banker;
|
|
//eqw_Desk.Callgrade=_msg.ChooseMain.call;
|
|
//eqw_Desk.Curgrade=0;
|
|
//eqw_Desk.SetStep(2);
|
|
//eqw_Desk.Multi=_msg.ChooseMain.multiple;
|
|
var ind=eqw_Logic.ChangeToStatus(eqw_Desk.BankerSeat);
|
|
eqw_GameUI.Data.Bankerspid=346+ind;
|
|
//eqw_GameUI.Data.CountDown=_msg.ChooseMain.countdown;
|
|
if(Utl.getMySeat()==eqw_Desk.BankerSeat){
|
|
eqw_Player.SetDiffCards(eqw_Desk.bottomcards);
|
|
}
|
|
eqw_GameUI.ShowFlowerInfo();
|
|
eqw_GameUI.ShowMulti();
|
|
eqw_GameUI.ShowChoseMainBoard();
|
|
eqw_GameUI.OpenCountDown(eqw_Desk.BankerSeat);
|
|
eqw_GameUI.SetMyCards();
|
|
break;
|
|
case 3://埋牌阶段
|
|
//eqw_Desk.bottomcards=_msg.BuryCards.bottomcards;
|
|
//eqw_Desk.BankerSeat=_msg.BuryCards.banker;
|
|
eqw_GameUI.ShowBanker(eqw_Desk.BankerSeat);
|
|
//eqw_Desk.Callgrade=_msg.BuryCards.call;
|
|
//eqw_Desk.Curgrade=0;
|
|
//eqw_Desk.SetStep(3);
|
|
//eqw_Desk.Multi=_msg.BuryCards.multiple;
|
|
//eqw_Desk.MainCard=_msg.BuryCards.flower;
|
|
if(Utl.getMySeat()==eqw_Desk.BankerSeat){
|
|
eqw_Player.SetDiffCards(eqw_Desk.bottomcards);
|
|
}
|
|
var ind=eqw_Logic.ChangeToStatus(eqw_Desk.BankerSeat);
|
|
eqw_GameUI.Data.Bankerspid=346+ind;
|
|
eqw_GameUI.Data.Main=eqw_Desk.MainCard;
|
|
eqw_GameUI.ShowFlowerInfo();
|
|
eqw_GameUI.ShowMulti();
|
|
eqw_GameUI.ShowMaiPai();
|
|
eqw_GameUI.ShowRound(eqw_Desk.idx,eqw_Desk.count);
|
|
eqw_GameUI.SetMyCards();
|
|
break;
|
|
case 4://投降阶段
|
|
//if(){//庄家
|
|
//eqw_Desk.bottomcards=_msg.BuryCards.bottomcards;
|
|
//}
|
|
//eqw_Desk.BankerSeat=_msg.Surrender.banker;
|
|
eqw_GameUI.ShowBanker(eqw_Desk.BankerSeat);
|
|
//eqw_Desk.Callgrade=_msg.Surrender.call;
|
|
eqw_Desk.Curgrade=0;
|
|
//eqw_Desk.SetStep(4);
|
|
//eqw_Desk.Multi=_msg.Surrender.multiple;
|
|
//eqw_Desk.MainCard=_msg.Surrender.flower;
|
|
var ind=eqw_Logic.ChangeToStatus(eqw_Desk.BankerSeat);
|
|
eqw_GameUI.Data.Bankerspid=346+ind;
|
|
eqw_GameUI.Data.Main=eqw_Desk.MainCard;
|
|
//eqw_GameUI.Data.CountDown=_msg.Surrender.countdown;
|
|
if(Utl.getMySeat()==eqw_Desk.BankerSeat){//庄家
|
|
//eqw_Desk.bottomcards=_msg.Surrender.bottomcards;
|
|
eqw_Player.SetBottomCards(eqw_Desk.bottomcards);
|
|
}
|
|
eqw_Desk.PushInd=1;
|
|
eqw_GameUI.ShowFlowerInfo();
|
|
eqw_GameUI.ShowMulti();
|
|
eqw_GameUI.ShowDeskCards();
|
|
eqw_GameUI.PushCardsRun(eqw_Desk.BankerSeat);
|
|
eqw_GameUI.ShowRound(eqw_Desk.idx,eqw_Desk.count);
|
|
eqw_GameUI.SetMyCards();
|
|
set_self(701,37,1,0,0);
|
|
break;
|
|
case 5://出牌阶段
|
|
//eqw_Desk.BankerSeat=_msg.PushCards.banker;
|
|
eqw_Data.isShowmaxseat = false;
|
|
eqw_Data.isShowgrade = false;
|
|
//console.log("2");
|
|
eqw_GameUI.ShowBanker(eqw_Desk.BankerSeat);
|
|
set_self(1039,37,0,0,0);
|
|
//eqw_Desk.Callgrade=_msg.PushCards.call;
|
|
//eqw_Desk.Curgrade=_msg.PushCards.grade;
|
|
//eqw_Desk.SetStep(4);
|
|
//eqw_Desk.Multi=_msg.PushCards.multiple;
|
|
//eqw_Desk.MainCard=_msg.PushCards.flower;
|
|
var ind=eqw_Logic.ChangeToStatus(eqw_Desk.BankerSeat);
|
|
eqw_GameUI.Data.Bankerspid=346+ind;
|
|
eqw_GameUI.Data.Main=eqw_Desk.MainCard;
|
|
//eqw_GameUI.Data.CountDown=_msg.PushCards.countdown;
|
|
if(Utl.getMySeat()==eqw_Desk.BankerSeat){//庄家
|
|
//eqw_Desk.bottomcards=_msg.PushCards.bottomcards;
|
|
eqw_Player.SetBottomCards(eqw_Desk.bottomcards);
|
|
|
|
}else{
|
|
//eqw_Desk.GradeList=_msg.PushCards.gradecards;
|
|
}
|
|
eqw_Player.InitCards();
|
|
eqw_GameUI.SetMyCards();
|
|
eqw_GameUI.ShowDeskCards();
|
|
eqw_GameUI.ShowFlowerInfo();
|
|
eqw_GameUI.ShowMulti();
|
|
//eqw_GameUI.PushCardsRun(eqw_Desk.BankerSeat);
|
|
var n=0;
|
|
for(var i=0;i<3;i++){
|
|
//eqw_Desk.Call_Run.CardList[i] = _msg.PushCards.playproc.cards[i];
|
|
if(eqw_Desk.Call_Run.CardList[i]!=null){
|
|
|
|
var ii=eqw_Logic.ChangeToStatus(i);
|
|
switch(ii){
|
|
case 0:
|
|
eqw_GameUI.ShowMyPush(eqw_Desk.Call_Run.CardList[i]);
|
|
break;
|
|
case 1:
|
|
eqw_GameUI.ShowDownPush(eqw_Desk.Call_Run.CardList[i]);
|
|
break;
|
|
case 2:
|
|
eqw_GameUI.ShowUpPush(eqw_Desk.Call_Run.CardList[i]);
|
|
break;
|
|
}
|
|
}else{
|
|
n++;
|
|
}
|
|
}
|
|
if(n==3){
|
|
//eqw_GameUI.HideCards(eqw_Data.pushcards);
|
|
eqw_GameUI.HideCards();
|
|
//eqw_Data.pushcards =[null,null,null];
|
|
eqw_Data.isHideCards = false;
|
|
}
|
|
//eqw_Desk.PushInd=n+1;
|
|
//eqw_Desk.PushCardList_1=[];
|
|
//eqw_Desk.PushCardList_2=[];
|
|
//eqw_Desk.PushCardList_3=[];
|
|
//for(var i=0;i<_msg.PushCards.pushlist.length;i++){
|
|
//if(_msg.PushCards.pushlist[i][0].length>0){
|
|
//eqw_Desk.PushCardList_1.push(_msg.PushCards.pushlist[i][0]);
|
|
//}
|
|
//if(_msg.PushCards.pushlist[i][1].length>0){
|
|
//eqw_Desk.PushCardList_2.push(_msg.PushCards.pushlist[i][1]);
|
|
//}
|
|
//if(_msg.PushCards.pushlist[i][2].length>0){
|
|
//eqw_Desk.PushCardList_3.push(_msg.PushCards.pushlist[i][2]);
|
|
//}
|
|
//}
|
|
|
|
//eqw_Desk.Page_Search=_msg.PushCards.playproc.round-1;
|
|
//eqw_Desk.seatlist=_msg.PushCards.seatlist;
|
|
//for(var i=0;i<_msg.PushCards.seatlist.length;i++){
|
|
//var ppobj=eqw_Desk.GetPlayerBySeat(i);
|
|
//ppobj.info=_msg.PushCards.seatlist[i];
|
|
//if(ppobj.info[4][0]!=-1){
|
|
//ppobj.baozhu=1;
|
|
//eqw_GameUI.baozhu(i,ppobj.info);
|
|
//}
|
|
//}
|
|
//eqw_Desk.push_count=_msg.PushCards.playproc.startcount;
|
|
//eqw_Desk.push_flower=_msg.PushCards.playproc.startflower;
|
|
//eqw_Desk.push_cardtype=_msg.PushCards.playproc.starttype;
|
|
if(eqw_Desk.PushSeat == Utl.getMySeat()){
|
|
switch(eqw_Desk.PushInd){
|
|
case 1:
|
|
|
|
break;
|
|
case 2:
|
|
var rt = cls_youle_erqiwang_arith.get_followcard(eqw_Desk.MainCard, eqw_Player.GetCardsList(), eqw_Desk.push_count, eqw_Desk.push_flower, eqw_Desk.push_cardtype);
|
|
eqw_GameUI.ShowFollow(rt);
|
|
break;
|
|
case 3:
|
|
var rt = cls_youle_erqiwang_arith.get_followcard(eqw_Desk.MainCard, eqw_Player.GetCardsList(), eqw_Desk.push_count, eqw_Desk.push_flower, eqw_Desk.push_cardtype);
|
|
eqw_GameUI.ShowFollow(rt);
|
|
break;
|
|
}
|
|
}
|
|
set_self(701,37,1,0,0);
|
|
eqw_GameUI.PushCardsRun(eqw_Desk.PushSeat,true);
|
|
eqw_GameUI.ShowRound(eqw_Desk.idx,eqw_Desk.count);
|
|
|
|
break;
|
|
case 6://结算阶段
|
|
eqw_Desk.Callgrade = 0;
|
|
eqw_Desk.Curgrade = 0;
|
|
eqw_GameUI.ShowFlowerInfo();
|
|
eqw_Desk.Multi = -1;
|
|
eqw_GameUI.ShowMulti();
|
|
eqw_GameUI.HideBanker();
|
|
eqw_GameUI.HideAllCards();
|
|
eqw_GameUI.ShowRound(eqw_Desk.idx,eqw_Desk.count);
|
|
//eqw_GameUI.SetMyCards();
|
|
eqw_GameUI.HideAllCards();
|
|
set_self(860,37,0,0,0);
|
|
set_self(860,37,0,0,0);
|
|
for(var i=0;i<3;i++){
|
|
if(_msg.Balance.readystate[i]==1){
|
|
eqw_GameUI.ShowReady(i);
|
|
}
|
|
}
|
|
if(_msg.Balance.readystate[Utl.getMySeat()]==0){
|
|
//eqw_GameUI.Data.SingleBalancePack=_msg.Balance.aset;
|
|
//if(typeof(_msg.data.account)!="undefined"){
|
|
//eqw_GameUI.Data.BalancePack=_msg.data.account;
|
|
//var maxgrade=0;
|
|
//for(var i=0;i<eqw_GameUI.Data.BalancePack.length;i++){
|
|
//if(eqw_GameUI.Data.BalancePack[i][0]>maxgrade){
|
|
//eqw_GameUI.Data.WinPlayer=[];
|
|
//eqw_GameUI.Data.WinPlayer.push(i);
|
|
//maxgrade=eqw_GameUI.Data.BalancePack[i][0];
|
|
//}else if(eqw_GameUI.Data.BalancePack[i][0]==maxgrade){
|
|
//eqw_GameUI.Data.WinPlayer.push(i);
|
|
//}
|
|
//}
|
|
//}else{
|
|
//eqw_GameUI.Data.BalancePack=null;
|
|
//}
|
|
for(var i=0;i<3;i++){
|
|
Utl.setGrade(i,eqw_GameUI.Data.SingleBalancePack.seatlist[i].score);
|
|
}
|
|
eqw_GameUI.OpenSingleBalance();
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|