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 JIHU = 1; //鸡胡类型

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

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

	public static final int HAOHUA_QIXIAODUI = 4; //豪华七小对

	public static final int HAOHUA2_QIXIAODUI = 5; //双豪华七小对

	public static final int HAOHUA3_QIXIAODUI = 6; //三豪华七小对

	public static final int QINGYISE = 7;	//清一色

	public static final int PENGPENGHU = 8;		//碰碰胡

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

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

	public static final int QIANG_GANG_HU = 11;	//抢杠胡

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

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

	public static final int TIAN_HU = 14; //天胡 十倍

	public static final int DI_HU = 15; //地胡 十倍

	public static final int REN_HU = 16; //人胡 十倍

	public static final int SHI_BA_LUO_HAN = 17; //十八罗汉

	public static final int XIAO_SHAN_YUAN = 18; //小三元

	public static final int DA_SHAN_YUAN = 19; //大三元

	public static final int XIAO_SI_XI = 20; //小四喜

	public static final int DA_SI_XI = 21; //大四喜

	public static final int	YAO_JIU	= 22; //幺九

	public static final int LAIZI4_HU = 23; //四鬼胡牌

	public static final int QUAN_FENG = 24;//全风

	public static final int QUAN_QIU_REN = 25;//全求人

	public static final int	QING_YAO_JIU	= 26; //清幺九

	public static final int	ZI_YI_SE = 27; //字一色

	public static final int WU_GUI_JIABEI = 28; //无鬼两倍
	public static final int LIU_JU_2BEI = 29; //流局两倍
	public static final int HAI_DI_NAO_YUE = 30; //海底捞月
	public static final int MEN_QING = 31; //门清 捉炮门清
	public static final int XIAO_HU_ZHONG_DA_HU = 32; //选小胡有大胡的情况下，不显示具体的胡牌类型，只显示大胡几分
	public static final int MAN_TIAN_HU = 33; //满天胡
	public static final int ZIMO_MEN_QING = 34; //自摸门清
	public static final int GUN_GUN = 35; //滚滚
////////////////////////////////////////////////////////////
	public static int BASE_HU_SCORE = 2; //基础分数
	public static int DA_HU_BEI_SCORE = 1; //大胡倍数
	public static int JIHU_SCORE = 1; //鸡胡类型
	public static int PINGHU_SCORE = 1; //平胡类型
	public static int MENGQING_SCORE = 3; //门清类型
	public static int QIXIAODUI_SOCRE = 1;	//七小对 倍数
	public static int HAOHUA_QIXIAODUI_SCORE = 1; //豪华七小对
	public static int HAOHUA2_QIXIAODUI_SCORE = 1; //双豪华七小对
	public static int HAOHUA3_QIXIAODUI_SCORE = 1; //三豪华七小对
	public static int QINGYISE_SCORE = 1;	//清一色
	public static int GANGSHANGHUA_SCORE = 3;	//杠上开花
	public static int PENGPENGHU_SCORE = 3;		//碰碰胡
	public static int GANGSHANGPAO_SOCRE = 3; //杠上炮
	public static int QIANG_GANG_HU_SOCRE = 1;	//抢杠胡
	public static int HUN_YI_SE_SCORE = 1; //混一色
	public static int SHI_SHAN_YAO_SCORE = 1; //十三幺
	public static int TIAN_DI_HU_SCORE = 1; //天地胡 十倍
	public static int TIAN_HU_SCORE = 1; //天胡 20倍
	public static int DI_HU_SCORE = 1; //地胡 10倍
	public static int SHI_BA_LUO_HAN_SCORE = 1; //十八罗汉
	public static int DA_SHAN_YUAN_SCORE = 1; //大三元
	public static int XIAO_SHAN_YUAN_SCORE = 1; //小三元
	public static int XIAO_SI_XI_SCORE = 1; //小四喜
	public static int DA_SI_XI_SCORE = 1; //大四喜
	public static int YAO_JIU_SCORE = 1; //幺九
	public static int LAIZI4_HU_SCORE = 1; //四鬼胡牌
	public static int QUAN_FENG_SCORE = 1;//全风
	public static int QUAN_QIU_REN_SCORE = 1;//全求人
	public static int QING_YAO_JIU_SCORE = 1; //清幺九
	public static int ZI_YI_SE_SCORE = 1; //字一色
	public static int WU_GUI_JIABEI_SCORE = 1; //无鬼两倍
	public static int LIU_JU_2BEI_SCORE = 1; //流局两倍
	public static int HAI_DI_NAO_YUE_SCORE = 3; //海底捞月
	public static int MAN_TIAN_HU_SCORE = 1;//满天胡
	public static int ZIMO_MEN_QING_SCORE = 3; //自摸门清
	public static int GUN_GUN_SCORE = 5; //滚滚

	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)
	{
		//潮汕鬼牌特殊配置
		//this.config.putInt(Config.ROOM_CONFIG_LAIZI, 0); //没有癞子

		room.config.putBoolean(Config.ROOM_CONFIG_PENGPENGHU, true);
		room.config.putBoolean(Config.ROOM_CONFIG_MENG_QING, true);
		room.config.putBoolean(Config.ROOM_CONFIG_MENG_QING, true);
		room.config.putBoolean(Config.ROOM_CONFIG_HAI_DI_NAO_YUE, true);
		room.config.putBoolean(Config.ROOM_CONFIG_CHUIPAI, true);
		//荒庄荒杠
		if (!room.config.containsKey(Config.ROOM_CONFIG_HUANGZHUANGHUANGGANG))
		{
			room.config.putBoolean(Config.ROOM_CONFIG_HUANGZHUANGHUANGGANG, true);
		}
		room.config.putBoolean(Config.ROOM_CONFIG_USE_BASE_HU_SCORE, true);
		room.config.putBoolean(Config.ROOM_CONFIG_JIHU_SHI_PINGHU, true);
		room.config.putBoolean(Config.ROOM_CONFIG_DIANPAO, true);

	}

	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;
	}
}