package extend.mj;

import com.taurus.core.entity.ITArray;
import com.taurus.core.entity.ITObject;
import com.taurus.core.entity.TObject;

public class WinCardType {
	public static final int DIANPAO = 1; //点炮类型

	public static final int PINGHU = 2; //平胡类型

	public static final int QIXIAODUI = 3;	//七小对

	public static final int YIBANGAO = 4; //一般高 手牌里每种花色的牌最多只有3张，必须全部是147、258、369组合，且组合一致，加上5张不重复的字牌

	public static final int QIXING = 5; //七星 手牌里每种花色的牌最多只有3张，且必须是147、258、369组合，加上7张不重复的字牌

	public static final int LONGJIABEI = 6; //龙夹背 手中的牌有7个对子，且有1组4张相同的牌

	public static final int QINGDADUI = 7;		//清大对 手牌只有刻子、杠和1对将，且全都是同一种花色。

	public static final int QIXINGYIBANGAO = 8;		//七星一般高 手牌里每种花色的牌最多只有3张，必须全部是147、258、369组合，且组合一致，加上7张不重复的字牌。

	public static final int SHUANGLONGJIABEI = 9;		//双龙夹背 手中的牌有7个对子，且有2组4张相同的牌

	public static final int SANLONGJIABEI = 10; //三龙夹背 手中的牌有7个对子，日有3组4张相同的牌。

	public static final int SHILAOTOU = 11; //十老头 从第一张打到桌面上的牌算起，不间断打出10张字牌即可胡牌

	public static final int TANGZISHISANYAO = 12; //塘子十三ㄠ 从第一张牌达到桌面上的牌算起，不间断打出十三张1、9、字牌即可直接胡牌

	public static final int TANGZIQIXIAODUI = 13; //塘子小七对 从第一张牌达到桌面上的牌算起，不间断打出十三张牌，打出的牌可以组成6个对子+单张，即可直接胡牌

	public static final int DADUIZI = 14; //大对子  手牌只有刻子、杠和1对将。
	public static final int LANPAI = 15; //烂牌  手牌只有刻子、杠和1对将。

	public static final int YI_TIAO_LONG = 16; //一条龙  手中的牌有同一花色的1-9，目胡牌时1-9必须组成123、456、789的顺子。1-9的顺子必须在手中，吃的牌不算

	public static final int LOU_DI_LONG = 17;//落地龙

	public static final int HUN_YI_SE = 18; //混一色

	public static final int ZHUANGJIA = 19; //庄家 庄家胡牌时，庄家额外加番。闲家胡牌时，庄家额外付番

	public static final int QINGYISE = 20;	//清一色
	public static final int	ZI_YI_SE = 21; //字一色 手牌只有字牌

	public static final int QIANG_GANG_HU = 22;	//抢杠胡  抢杠  抢杠胡时，被抢杠玩家额外付番

	public static final int GANGSHANGHUA = 23;	//杠上开花

	public static final int GANGSHANGPAO = 24; //杠上炮

	public static final int SHI_SHAN_YAO = 103; //十三幺


	public static final int SHUANGGANGHUA = 25; //双杠花

	public static final int SHUANGGANGPAO = 26; //双杠上炮


	public static final int SANGANGHUA = 27; //三杠花

	public static final int SANGANGPAO = 28; //三杠上炮

	public static final int SIGANGHUA = 29; //四杠花

	public static final int SIGANGPAO = 30; //四杠上炮

	public static final int TANGZIQIXING = 31; //塘子七星

	public static final int TANGZIYIBANGAO = 32;//塘子一般高

	public static final int TANGZIQIXINGYIBANGAO = 33;//塘子七星一般高

	public static final int TANGZILANPAI = 34;//塘子烂牌

	public static final int XIANJIA = 35;//闲家

	public static final int TANGZIHU = 36;



	public static final int YING_MO = 50; // 自摸胡牌
	public static final int YING_MO_SCORE = 2; //硬摸 自摸胡牌，每个玩家出4分
	public static int BASE_HU_SCORE = 2; //基础分数
	public static int DA_HU_BEI_SCORE = 2; //大胡倍数
	public static int PINGHU_SCORE = 2; //平胡类型
	public static int QIXIAODUI_SOCRE = 4;	//七小对 倍数
	public static int YIBANGAO_SCORE = 4; //一般高
	public static int QIXING_SCORE = 4; //七星
	public static int LONGJIABEI_SCORE = 8; //龙夹背

	public static int QINGDADUI_SCORE = 8; //清大对

	public static int QIXINGYIBANGAO_SCORE= 8;//七星一般高

	public static int SHUANGLONGJIABEI_SCORE = 16;//双龙夹背

	public static int SANLONGJIABEI_SCORE = 32;//三龙夹背

	public static int SHILAOTOU_SCORE = 1;//十老头

	public static int TANGZISHISANYAO_SCORE = 1;//塘子十三ㄠ;

	public static int DADUIZI_SCORE = 2;//大对子

	public static int LANPAI_SCORE = 2;//烂牌

	public static int YI_TIAO_LONG_SCORE = 2;//一条龙
	public static int LUO_DI_LONG_SCORE = 2;//一条龙

	public static int HUN_YI_SE_SCORE = 2; //混一色

	public static int ZHUANGJIA_SCORE = 2;//庄家分

	public static int QINGYISE_SCORE = 4;	//清一色
	public static int ZI_YI_SE_SCORE = 8; //字一色
	public static int GANGSHANGHUA_SCORE = 10;	//杠上开花

	public static int GANGSHANGPAO_SOCRE = 10; //杠上炮
	public static int QIANG_GANG_HU_SOCRE = 10;	//抢杠胡

	public static int SHUANGGANGHUA_SCORE = 20;//双杠花
	public static int SHUANGGANGPAO_SOCRE = 20; //双杠上炮

	public static int SANGANGHUA_SCORE = 30;//三杠花
	public static int SANGANGPAO_SOCRE = 30; //三杠上炮

	public static int SIGANGHUA_SCORE = 40;//四杠花
	public static int SIGANGPAO_SCORE = 40; //四杠上炮

	public static int TANGZIQIXING_SCORE = 1;//
	public static int TANGZIYIBANGAO_SCORE = 1;//
	public static int TANGZIQIXINGYIBANGAO_SCORE = 1;//
	public static int TANGZILANPAI_SCORE = 1;//

	public static int TANGZIQIXIAODUI_SCORE = 1;


	public int type;
	public int value;

	public int score;

	public boolean is_dahu;

	public String desc;

	public ITArray opcard;

	//初始化房间的特殊参数
	static public void InitRoomSpecialConfig(EXRoom room)
	{

	}

	public WinCardType(int type, int value, int score, boolean is_dahu, String desc) {
		this.type = type;
		this.value = value;
		this.score = score;
		this.is_dahu = is_dahu;
		this.desc = desc;
	}

	public boolean IsDaHu()
	{
	    return is_dahu;
	}

	public ITObject toTObject() {
		return toTObject(false);
	}

	public ITObject toTObject(boolean is_opcard) {
		ITObject obj = TObject.newInstance();
		obj.putInt("type", type);
		obj.putInt("value", value);
		obj.putInt("score", score);
		if(is_opcard&&opcard!=null) {
			obj.putTArray("opcard", opcard);
		}
		return obj;
	}

	public String toString() {
		return "type:" + type + " value:" + value + " score:" + score + " desc:" + desc;
	}
}