目录结构调整

This commit is contained in:
2026-02-04 23:47:45 +08:00
parent 6938c911c3
commit 6b22238c6e
8780 changed files with 15333 additions and 574 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,126 @@
var eqw_Const=eqw_Const||{};
eqw_Const.ClickBtn=[295,288,289,918,919,701,801,922,1042,800,1043,1220,1224,1225,744];
eqw_Const.UnClickBtn=[];
eqw_Const.Max={
playercnt:3
};
eqw_Const.Card={
oriwidth:147,
oriheight:202,
Dis1:55,//牌间隔
Dis2:55,
Limit:10,
pushscale:50,
push_y:355,
pushdis:20,
pushlocation:[[640,420],[1100,130],[60,130]],//出牌起始位置
pushlocation_f:[[640,280],[860,130],[360,130]],//出牌最终位置
dealcard:[[30,370],[1050,130],[130,130]],//发牌位置
scale:100,
deskscale:50,
out_y:20,
w1:147,
w2:147,
x1:16,
x2:1116,
y1:445,
y2:525,
y3:470
};
eqw_Const.Search={
//pushlocation_f:[[640,280],[860,130],[360,130]],//出牌最终位置
Location:[[640,300],[860,150],[360,150]],
Dis:20,
scale:50
};
eqw_Const.CountDown={
Location:[[15,360],[985,115],[210,115]],//倒计时显示位置
Width:29,
warning:10
};
eqw_Const.Call={
Width_1:68,
Width_2:22,
Location:[[30,370],[1050,130],[130,130]],//叫分显示位置
y1:278,
y2:350,
Dis:60,
grade:[100,65,45,5],
x:45
};
eqw_Const.Main={
Location_1:[[315,303],[498,303],[681,303],[864,303]],
Location_2:[590,125]
};
eqw_Const.Bottom={
Location:[640,120],
Dis:20
};
eqw_Const.BottomOrGrade={
Location:[640,210],
Dis:25,
scale:50
};
eqw_Const.Balance={
//Location_bg:[[213,227],[527,227],[843,227]],
//Location_set:[[220,233],[538,233],[855,233]],
//Location_setnum:[[249,236],[567,236][855,236]],
//Location_grade:[[361,229],[664,229],[973,229]],
Location_bg:[[0,0],[0,0],[0,0]],
Location_set:[[12,6],[12,6],[12,6]],
Location_setnum:[[41,10],[41,10],[41,10]],
Location_grade:[[130,8],[130,8],[130,8]],
BG_Tag:1,
SET_Tag:100,
SETNUM_Tag:200,
GRADE_Tag:300,
Dis:60,
up_y:227,
Height:240
};
eqw_Const.Video={
timer:3000,
MyCardsDis:30,
MyCardsScale:50,
MyCards_y:500,
pushlocation:[[640,500],[1100,130],[60,130]],//出牌起始位置
pushlocation_f:[[640,360],[1060,200],[240,200]],//出牌最终位置
oriwidth:147,
pushdis:20,
pushscale:50
};
eqw_Const.soundsList={
//MenuSceneMusic:"00101.mp3",
//MainSceneMusic:"00102.mp3",
banker:"00213.mp3",
outpoker:"00104.mp3",
dealcards:"00214.mp3",
burry:"00215.mp3",
timeup:"00216.mp3",
singlebalance:"00217.mp3",
balance:"",
score:"00218.mp3",
man_passcall:["00105.mp3","00106.mp3","00107.mp3","00108.mp3","00109.mp3","00110.mp3"],
woman_passcall:["00111.mp3","00112.mp3","00113.mp3","00114.mp3","00115.mp3","00116.mp3"],
man_call:[["00117.mp3","00118.mp3"],["00119.mp3","00120.mp3"],["00121.mp3","00122.mp3"],["00123.mp3","00124.mp3"],["00125.mp3","00126.mp3"],["00127.mp3","00128.mp3"],
["00129.mp3","00130.mp3"],["00131.mp3","00132.mp3"],["00133.mp3","00134.mp3"],["00135.mp3","00136.mp3"],["00137.mp3","00138.mp3"],["00139.mp3","00140.mp3"],
["00141.mp3","00142.mp3"],["00143.mp3","00144.mp3"],["00145.mp3","00146.mp3"],["00147.mp3","00148.mp3"],["00149.mp3","00150.mp3"],["00151.mp3","00152.mp3"],
["00153.mp3","00154.mp3"],["00155.mp3","00156.mp3"]],
woman_call:[["00157.mp3","00158.mp3"],["00159.mp3","00160.mp3"],["00161.mp3","00162.mp3"],["00163.mp3","00164.mp3"],["00165.mp3","00166.mp3"],["00167.mp3","00168.mp3"],
["00169.mp3","00170.mp3"],["00171.mp3","00172.mp3"],["00173.mp3","00174.mp3"],["00175.mp3","00176.mp3"],["00177.mp3","00178.mp3"],["00179.mp3","00180.mp3"],
["00181.mp3","00182.mp3"],["00183.mp3","00184.mp3"],["00185.mp3","00186.mp3"],["00187.mp3","00188.mp3"],["00189.mp3","00190.mp3"],["00191.mp3","00192.mp3"],
["00193.mp3","00194.mp3"],["00195.mp3","00196.mp3"]],
man_flower:[["00197.mp3","00198.mp3"],["00199.mp3","00200.mp3"],["00201.mp3","00202.mp3"],["00203.mp3","00204.mp3"]],
woman_flower:[["00205.mp3","00206.mp3"],["00207.mp3","00208.mp3"],["00209.mp3","00210.mp3"],["00211.mp3","00212.mp3"]],
};
eqw_Const.ButtonSounds = {
src:"00103.mp3",
buttonList:[860,701]
};

View File

@@ -0,0 +1,44 @@
var eqw_Data=eqw_Data||{};
eqw_Data.Balance_bg_1=[];
eqw_Data.Balance_bg_2=[];
eqw_Data.Balance_bg_3=[];
eqw_Data.Balance_set_1=[];
eqw_Data.Balance_set_2=[];
eqw_Data.Balance_set_3=[];
eqw_Data.Balance_setnum_1=[];
eqw_Data.Balance_setnum_2=[];
eqw_Data.Balance_setnum_3=[];
eqw_Data.Balance_grade_1=[];
eqw_Data.Balance_grade_2=[];
eqw_Data.Balance_grade_3=[];
eqw_Data.Timer = 0;
eqw_Data.isShowmaxseat = true;
eqw_Data.isShowgrade = true;
eqw_Data.isHideCards = true;
eqw_Data.isGetBottom = true;
eqw_Data.pushcards =[null,null,null];
var Debugger={
isSubmitError:false
};
eqw_Data.switchStep = -1;
var CombatInfo_2=null;
eqw_Data.CardSpid = -1;
eqw_Data.CardIndex = false;
eqw_Data.CardsList = [705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740];
eqw_Data.isSlide = false;

View File

@@ -0,0 +1,65 @@
var eqw_Card=eqw_Card||{
new: function(id, flower, number, score, dealowner){
/*
参数说明:
id 绝对id
flower 牌面花色
number 牌面数值
code 牌编码
扑克牌的统一编码规则:
1牌面花色的定义 5:王 4:黑桃 3:红心 2:梅花 1:方块
2牌面数值的定义 01:A 02:2 03:3 ... 09:9 10:10 11:J 12:Q 13:K 53:小王 54:大王
3牌编码的定义
3.1 常主的牌编码定义:
未叫主之前:
2的牌编码定义 黑桃2:2402 红心2:2302 梅花2:2202 方块2:2102
7的牌编码定义 黑桃7:7407 红心2:7307 梅花7:7207 方块7:7107
王的牌编码定义 小王:9553 大王:9554
叫主之后:
主2牌编码定义 原有牌编码的基础上+1000例如红心为主牌则红心2的牌编码变为3302
主7牌编码定义 原有牌编码的基础上+1000例如红心为主牌则红心7的牌编码变为8307
3.2 普通牌的牌编码定义
A的定义14
未叫主之前:
3位数字 第一位为牌面花色 第二三位为牌面数值
叫主之后:
主牌花色 4位数字即在原有牌编码的基础上+1000表示是主牌
非主牌花色 3位数字即原有牌编码不变
3.3 综上所述
牌编码是3位的即小于1000的都是非主牌
牌编码是4位的即大于1000的都是主牌
可根据牌编码进行牌大小的比较和排序
4 牌型定义
>100: 单张, 101一张单张102两张单张111十一张单张 ...
>200: 对子, 201一对202两对203三对 ...
>300: 拖拉机302两连对拖拉机303三连对拖拉机 ...
*/
var pai = {};
pai.id = id; //绝对id即数组下标从0开始计数
pai.flower = flower; //牌面花色
pai.number = number; //牌面数值
pai.score = score; //牌在游戏中的分值
pai.dealowner = dealowner; //发牌状态
//-1:规则去除的牌
// 0:未发的牌,即底牌
//>0:发牌发到谁手上从1开始计数即位置编号+1位置编号是从0开始计数的
pai.playround = -1; //出牌状态
//-1:未出的牌
// 0:埋牌
//>0:牌是第几轮出出去的从1开始计数
pai.playindex = -1; //本轮中的出牌顺序从1开始计数
pai.playowner = -1; //出牌后被谁得到从1开始计数即位置编号+1位置编号是从0开始计数的
return pai;
}
};

View File

@@ -0,0 +1,94 @@
var eqw_Net=eqw_Net||{};
eqw_Net.App="youle";
eqw_Net.Route="erqiwang";
eqw_Net.RpcList={};
eqw_Net.RpcList.fapai="fapai";
eqw_Net.RpcList.jiaofen="jiaofen";
eqw_Net.RpcList.shangzhuang="shangzhuang";
eqw_Net.RpcList.get_player_grade2 = "get_player_grade2";
eqw_Net.RpcList.xuanzhu="xuanzhu";
eqw_Net.RpcList.touxiang="touxiang";
eqw_Net.RpcList.maipai="maipai";
eqw_Net.RpcList.chupai="chupai";
eqw_Net.RpcList.chupai1="chupai1";
eqw_Net.RpcList.chupai2="chupai2";
eqw_Net.RpcList.chupai3="chupai3";
eqw_Net.RpcList.jiesuan="jiesuan";
eqw_Net.RpcList.zhunbei="zhunbei";
eqw_Net._SendData=function(_app,_route,_rpc,_data){
var _msg={};
_msg.data={};
_msg.app=_app;
_msg.route=_route;
_msg.rpc=_rpc;
_msg.data=_data;
console.log("二七王发送数据:"+JSON.stringify(_msg));
try{
Net.ws_tcp.send(JSON.stringify(_msg));
}catch(e){
alert(e);
//alert(e.lineNumber);
alert(e.message);
}
}
eqw_Net.ReceiveData=function(_msg){
// console.log("二七王收到数据:"+JSON.stringify(_msg));
if(min_ExitsFunction(eqw_Desk[_msg.rpc])){
//eqw_Net[_msg.rpc](_msg);
eqw_Desk[_msg.rpc](_msg);
}
}
//发牌
eqw_Net.Send_fapai=function(_data){
this._SendData(this.App,this.Route,this.RpcList.fapai,_data);
}
//叫分
eqw_Net.Send_jiaofen=function(_data){
this._SendData(this.App,this.Route,this.RpcList.jiaofen,_data);
}
//上庄
eqw_Net.Send_shangzhuang=function(_data){
this._SendData(this.App,this.Route,this.RpcList.shangzhuang,_data);
}
//选主
eqw_Net.Send_xuanzhu=function(_data){
this._SendData(this.App,this.Route,this.RpcList.xuanzhu,_data);
}
//埋牌
eqw_Net.Send_maipai=function(_data){
this._SendData(this.App,this.Route,this.RpcList.maipai,_data);
}
//出牌1
eqw_Net.Send_chupai=function(_data){
this._SendData(this.App,this.Route,this.RpcList.chupai,_data);
}
//准备
eqw_Net.Send_zhunbei=function(_data){
this._SendData(this.App,this.Route,this.RpcList.zhunbei,_data);
}
//准备
eqw_Net.Send_get_player_grade2=function(_data){
this._SendData(this.App,this.Route,this.RpcList.get_player_grade2,_data);
}
//投降
eqw_Net.Send_touxiang=function(_data){
Utl.startLoad();
this._SendData(this.App,this.Route,this.RpcList.touxiang,_data);
}

View File

@@ -0,0 +1,183 @@
var eqw_Player=eqw_Player||{};
function eqw_HandCard(id){
this.id=id;
this.isSelect=0;
this.click=1;
this.diff=0;
this.mustpush=0;
}
eqw_HandCard.prototype.GetId=function(){
return this.id;
}
eqw_HandCard.prototype.Select=function(){
this.isSelect=1;
}
eqw_HandCard.prototype.CancelSelect=function(){
this.isSelect=0;
}
eqw_HandCard.prototype.GetSelect=function(){
return this.isSelect;
}
eqw_HandCard.prototype.GetClick=function(){
return this.click;
}
eqw_HandCard.prototype.SetClick=function(){
this.click = 1;
}
eqw_HandCard.prototype.SetUnClick=function(){
this.click = 0;
}
eqw_HandCard.prototype.SetDiff=function(){
this.diff = 1;
}
eqw_HandCard.prototype.SetUnDiff=function(){
this.diff = 0;
}
eqw_HandCard.prototype.SetMust=function(){
this.mustpush = 1;
}
eqw_HandCard.prototype.SetUnMust=function(){
this.mustpush = 0;
}
///////------------------------------eqw_Player------------------------
eqw_Player.HandCards=[];
eqw_Player.call=null;//我的叫分
eqw_Player.status=0;//玩家是否是庄家
eqw_Player.BottomCards=[];//底牌只有庄家才有此属性
eqw_Player.Init=function(){
this.HandCards=[];
this.call=null;
this.status=0;
this.BottomCards=[];
}
eqw_Player.InitCards=function(){
for(var i=0;i<this.HandCards.length;i++){
this.HandCards[i].isSelect=0;
this.HandCards[i].click=1;
this.HandCards[i].diff=0;
this.HandCards[i].mustpush=0;
}
}
//选牌
eqw_Player.SelectCards=function(ind){
this.HandCards[ind].Select();
}
//取消选牌
eqw_Player.CancelSelectCards=function(ind){
this.HandCards[ind].CancelSelect();
}
//得到选中牌数量
eqw_Player.GetNumSelect=function(){
var n=0;
for(var i=0;i<this.HandCards.length;i++){
if(this.HandCards[i].GetSelect()==1){
n++;
}
}
return n;
}
//得到选中牌数量
eqw_Player.GetSelectCards=function(){
var result=[];
for(var i=0;i<this.HandCards.length;i++){
if(this.HandCards[i].GetSelect()==1){
result.push(this.HandCards[i].id);
}
}
return result;
}
//未出牌是设置手牌
eqw_Player.SetHandCards=function(CardList){
for(var i=0;i<eqw_Player.HandCards.length;i++){
eqw_Player.HandCards[i]=null;
}
eqw_Player.HandCards=[];
eqw_Player.HandCards.length=CardList.length;
for(var i=0;i<CardList.length;i++){
eqw_Player.HandCards[i]=new eqw_HandCard(CardList[i]);
}
}
//出牌
eqw_Player.PushCards=function(CardList){
for(var i=0;i<CardList.length;i++){
for(var j=0;j<this.HandCards.length;j++){
if(this.HandCards[j].GetId()==CardList[i]){
}
}
}
}
//设置手牌为未选中状态
eqw_Player.NoSelect=function(){
for(var j=0;j<this.HandCards.length;j++){
if(this.HandCards[j].GetSelect()==1){
this.HandCards[j].CancelSelect();
set_self(705+j,19,eqw_Const.Card.out_y,1,0);
}
}
}
//设置底牌
eqw_Player.SetBottomCards=function(CardList){
eqw_Player.BottomCards.length=CardList.length;
for(var i=0;i<CardList.length;i++){
eqw_Player.BottomCards[i]=CardList[i];
}
}
//获得牌列表
eqw_Player.GetCardsList=function(){
var result=[];
result.length=eqw_Player.HandCards.length;
for(var i=0;i<eqw_Player.HandCards.length;i++){
result[i]=eqw_Player.HandCards[i].id;
}
return result;
}
//设置可出不可出
eqw_Player.SetClickCards=function(CardList){
for(var i=0;i<CardList.length;i++){
for(var j=0;j<this.HandCards.length;j++){
if(this.HandCards[j].GetId()==CardList[i]){
this.HandCards[j].click=0;
}
//else{
//this.HandCards[j].click=0;
//}
}
}
for(var j=0;j<this.HandCards.length;j++){
if(this.HandCards[j].click==1){
this.HandCards[j].click=0;
}else{
this.HandCards[j].click=1;
}
}
}
//设置必出
eqw_Player.SetMustCards=function(CardList){
for(var i=0;i<CardList.length;i++){
for(var j=0;j<this.HandCards.length;j++){
if(this.HandCards[j].GetId()==CardList[i]){
set_self(705+j,19,-eqw_Const.Card.out_y,1,0);
this.HandCards[j].Select();
this.HandCards[j].SetMust();
}
}
}
}
//设置牌区别显示
eqw_Player.SetDiffCards=function(CardList){
for(var i=0;i<CardList.length;i++){
for(var j=0;j<this.HandCards.length;j++){
if(this.HandCards[j].GetId()==CardList[i]){
this.HandCards[j].SetDiff();
}
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,142 @@
var eqw_Logic=eqw_Logic||{};
eqw_Logic.GameStart=function(){
eqw_Desk.Create();
for(var i=0;i<eqw_Const.UnClickBtn.length;i++){
set_self(eqw_Const.UnClickBtn[i],41,0,0,0);
}
}
eqw_Logic.ChangeToStatus=function(seat){//将座位转化为对应位置
return (seat-Utl.getMySeat()+Game_Config.Max.PlayerCnt)%Game_Config.Max.PlayerCnt;
}
eqw_Logic.ChangeToSeat=function(status){//将位置转化为座位
return (status+Utl.getMySeat())%Game_Config.Max.PlayerCnt;
}
eqw_Logic.power2fs=function(x) {
return (x & ( x - 1)) === 0 ? (x == 1 ? 0 : (x-1).toString(2).length): false;
}
//获取某个位置玩家发到手上的牌
eqw_Logic.get_seat_cards_deal = function(cards, seat){
var aryCardIDs = [];
for (var i = 0; i < cards.length; i++){
var o_card = cards[i];
if (o_card[4] == seat + 1){
aryCardIDs.push(o_card[0]);
}
}
return cls_youle_erqiwang_arith.order_cards(eqw_Desk.MainCard, aryCardIDs);
}
//获取某个位置玩家发到手上的牌(庄家包含底牌)
eqw_Logic.get_seat_cards_owner = function(cards, seat){
var aryCardIDs = [];
for (var i = 0; i < cards.length; i++){
var o_card = cards[i];
if ((o_card[4] == seat + 1) || //发到手上
(o_card[4] == 0 && seat == eqw_Desk.BankerSeat)){ //庄家包括底牌
aryCardIDs.push(o_card[0]);
}
}
return cls_youle_erqiwang_arith.order_cards(eqw_Desk.MainCard, aryCardIDs);
}
//获取埋牌
eqw_Logic.get_bury_cards = function(cards){
var aryCardIDs = [];
for (var i = 0; i < cards.length; i++){
var o_card = cards[i];
if (o_card[5] == 0){
aryCardIDs.push(o_card[0]);
}
}
return cls_youle_erqiwang_arith.order_cards(eqw_Desk.MainCard, aryCardIDs);
}
//获取发牌时的底牌
eqw_Logic.get_bottom_cards = function(cards){
var aryCardIDs = [];
for (var i = 0; i < cards.length; i++){
var o_card = cards[i];
if (o_card[4] == 0){
aryCardIDs.push(o_card[0]);
}
}
return cls_youle_erqiwang_arith.order_cards(eqw_Desk.MainCard, aryCardIDs);
}
//判断是否可以发牌
eqw_Logic.CheckDealCards = function(){
}
eqw_Logic.play_bujiao = function(sex){
switch(sex){
default://男
var num = eqw_Const.soundsList.man_passcall.length;
var idx = ifast_random(num);
Utl.playSound(eqw_Const.soundsList.man_passcall[idx]);
break;
case 2://女
var num = eqw_Const.soundsList.woman_passcall.length;
var idx = ifast_random(num);
Utl.playSound(eqw_Const.soundsList.woman_passcall[idx]);
break;
}
}
eqw_Logic.play_jiaofen = function(sex,call){
switch(sex){
default://男
var idx1 = parseInt(call/5)-1;
var num = eqw_Const.soundsList.man_call[idx1].length;
var idx = ifast_random(num);
Utl.playSound(eqw_Const.soundsList.man_call[idx1][idx]);
break;
case 2://女
var idx1 = parseInt(call/5)-1;
var num = eqw_Const.soundsList.woman_call[idx1].length;
var idx = ifast_random(num);
Utl.playSound(eqw_Const.soundsList.woman_call[idx1][idx]);
break;
}
}
eqw_Logic.play_flower = function(sex,flower){
switch(sex){
default://男
var num = eqw_Const.soundsList.man_flower[flower-1].length;
var idx = ifast_random(num);
Utl.playSound(eqw_Const.soundsList.man_flower[flower-1][idx]);
break;
case 2://女
var num = eqw_Const.soundsList.woman_flower[flower-1].length;
var idx = ifast_random(num);
Utl.playSound(eqw_Const.soundsList.woman_flower[flower-1][idx]);
break;
}
}
eqw_Logic.play_banker = function(){
Utl.playSound(eqw_Const.soundsList.banker);
}
eqw_Logic.play_outpoker = function(){
Utl.playSound(eqw_Const.soundsList.outpoker);
}
eqw_Logic.play_dealcards = function(){
Utl.playSound(eqw_Const.soundsList.dealcards);
}
eqw_Logic.play_burry = function(){
Utl.playSound(eqw_Const.soundsList.burry);
}
eqw_Logic.play_timeup = function(){
Utl.playSound(eqw_Const.soundsList.timeup);
}
eqw_Logic.play_singlebalance = function(){
Utl.playSound(eqw_Const.soundsList.singlebalance);
}
eqw_Logic.play_balance = function(){
Utl.playSound(eqw_Const.soundsList.balance);
}
eqw_Logic.play_score = function(){
Utl.playSound(eqw_Const.soundsList.score);
}