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 ONE_CHENG_QING_LAI_YOU = 33; //一撑清癞油  撑完一个癞子后补张胡牌，每个玩家出8分
	public static final int ONE_CHENG_YING_MO = 34; //一撑硬摸 撑完一个癞子后没有胡牌， 后面自摸胡牌，每个玩家出4分
	public static final int ONE_CHENG_LAI_YOU = 35; //一撑癞油 撑完一个癞子后补张胡牌, 牌面还有一个癞子，每个玩家出4分
	public static final int ONE_CHENG_LAI_MO = 36; //一撑癞摸  撑完一个癞子后没有胡牌， 后面自摸胡牌，, 牌面还有一个癞子, 每个玩家出2分

	public static final int TWO_CHENG_QING_LAI_YOU = 37; //二撑清癞油  撑完二个癞子后补张胡牌，每个玩家出16分
	public static final int TWO_CHENG_YING_MO = 38; //二撑硬摸 撑完二个癞子后没有胡牌， 后面自摸胡牌，每个玩家出8分
	public static final int TWO_CHENG_LAI_YOU = 39; //二撑癞油 撑完二个癞子后补张胡牌, 牌面还有一个癞子，每个玩家出8分
	public static final int TWO_CHENG_LAI_MO = 40; //二撑癞摸  撑完二个癞子后没有胡牌， 后面自摸胡牌，, 牌面还有一个癞子, 每个玩家出4分

	public static final int THREE_CHENG_QING_LAI_YOU = 41; //三撑清癞油  撑完三个癞子后补张胡牌，每个玩家出32分
	public static final int THREE_CHENG_YING_MO = 42; //三撑硬摸 撑完三个癞子后没有胡牌， 后面自摸胡牌，每个玩家出16分
	public static final int THREE_CHENG_LAI_YOU = 43; //三撑癞油 撑完三个癞子后补张胡牌, 牌面还有一个癞子，每个玩家出16分
	public static final int THREE_CHENG_LAI_MO = 44; //三撑癞摸  撑完三个癞子后没有胡牌， 后面自摸胡牌，, 牌面还有一个癞子, 每个玩家出8分

	public static final int FOUR_CHENG_QING_LAI_YOU = 45; //四撑清癞油  撑完四个癞子后补张胡牌，每个玩家出64分
	public static final int FOUR_CHENG_YING_MO = 46; //四撑硬摸 撑完四个癞子后没有胡牌， 后面自摸胡牌，每个玩家出32分
	public static final int FOUR_CHENG_LAI_YOU = 47; //四撑癞油 撑完四个癞子后补张胡牌, 牌面还有一个癞子，每个玩家出32分
	public static final int FOUR_CHENG_LAI_MO = 48; //四撑癞摸  撑完四个癞子后没有胡牌， 后面自摸胡牌，, 牌面还有一个癞子, 每个玩家出16分

	public static final int LIAN_GUN_DAI_PA = 49; //连滚带爬 胡的牌为翻牌， 并且手中还有一对翻牌

	public static final int YING_MO = 50; //硬摸 自摸胡牌
	//public static final int LIAN_GUN_DAI_PA_SCORE = ; //连滚带爬 胡的牌为翻牌， 并且手中还有一对翻牌
	public static final int YING_MO_SCORE = 2; //硬摸 自摸胡牌，每个玩家出4分

	public static final int ONE_CHENG_QING_LAI_YOU_SOCRE = 8; //一撑清癞油  撑完一个癞子后补张胡牌，每个玩家出8分
	public static final int ONE_CHENG_YING_MO_SCORE = 4; //一撑硬摸 撑完一个癞子后没有胡牌， 后面自摸胡牌，每个玩家出4分
	public static final int ONE_CHENG_LAI_YOU_SOCRE = 4; //一撑癞油 撑完一个癞子后补张胡牌, 牌面还有一个癞子，每个玩家出4分
	public static final int ONE_CHENG_LAI_MO_SCORE = 2; //一撑癞摸  撑完一个癞子后没有胡牌， 后面自摸胡牌，, 牌面还有一个癞子, 每个玩家出2分

	public static final int TWO_CHENG_QING_LAI_YOU_SOCRE = 16; //二撑清癞油  撑完二个癞子后补张胡牌，每个玩家出16分
	public static final int TWO_CHENG_YING_MO_SOCRE = 8; //二撑硬摸 撑完二个癞子后没有胡牌， 后面自摸胡牌，每个玩家出8分
	public static final int TWO_CHENG_LAI_YOU_SOCRE = 8; //二撑癞油 撑完二个癞子后补张胡牌, 牌面还有一个癞子，每个玩家出8分
	public static final int TWO_CHENG_LAI_MO_SOCRE = 4; //二撑癞摸  撑完二个癞子后没有胡牌， 后面自摸胡牌，, 牌面还有一个癞子, 每个玩家出4分

	public static final int THREE_CHENG_QING_LAI_YOU_SOCRE = 32; //三撑清癞油  撑完三个癞子后补张胡牌，每个玩家出32分
	public static final int THREE_CHENG_YING_MO_SOCRE = 16; //三撑硬摸 撑完三个癞子后没有胡牌， 后面自摸胡牌，每个玩家出16分
	public static final int THREE_CHENG_LAI_YOU_SOCRE = 16; //三撑癞油 撑完三个癞子后补张胡牌, 牌面还有一个癞子，每个玩家出16分
	public static final int THREE_CHENG_LAI_MO_SOCRE = 8; //三撑癞摸  撑完三个癞子后没有胡牌， 后面自摸胡牌，, 牌面还有一个癞子, 每个玩家出8分

	public static final int FOUR_CHENG_QING_LAI_YOU_SOCRE = 64; //四撑清癞油  撑完四个癞子后补张胡牌，每个玩家出64分
	public static final int FOUR_CHENG_YING_MO_SOCRE = 32; //四撑硬摸 撑完四个癞子后没有胡牌， 后面自摸胡牌，每个玩家出32分
	public static final int FOUR_CHENG_LAI_YOU_SOCRE = 32; //四撑癞油 撑完四个癞子后补张胡牌, 牌面还有一个癞子，每个玩家出32分
	public static final int FOUR_CHENG_LAI_MO_SOCRE = 16; //四撑癞摸  撑完四个癞子后没有胡牌， 后面自摸胡牌，, 牌面还有一个癞子, 每个玩家出16分
////////////////////////////////////////////////////////////
	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 = 1; //门清类型
	public static int QIXIAODUI_SOCRE = 2;	//七小对 倍数
	public static int HAOHUA_QIXIAODUI_SCORE = 4; //豪华七小对
	public static int HAOHUA2_QIXIAODUI_SCORE = 6; //双豪华七小对
	public static int HAOHUA3_QIXIAODUI_SCORE = 8; //三豪华七小对
	public static int QINGYISE_SCORE = 2;	//清一色
	public static int GANGSHANGHUA_SCORE = 2;	//杠上开花
	public static int PENGPENGHU_SCORE = 2;		//碰碰胡
	public static int GANGSHANGPAO_SOCRE = 1; //杠上炮
	public static int QIANG_GANG_HU_SOCRE = 1;	//抢杠胡
	public static int HUN_YI_SE_SCORE = 2; //混一色
	public static int SHI_SHAN_YAO_SCORE = 10; //十三幺
	public static int TIAN_DI_HU_SCORE = 10; //天地胡 十倍
	public static int TIAN_HU_SCORE = 10; //天胡 20倍
	public static int DI_HU_SCORE = 10; //地胡 10倍
	public static int SHI_BA_LUO_HAN_SCORE = 10; //十八罗汉
	public static int DA_SHAN_YUAN_SCORE = 6; //大三元
	public static int XIAO_SHAN_YUAN_SCORE = 4; //小三元
	public static int XIAO_SI_XI_SCORE = 4; //小四喜
	public static int DA_SI_XI_SCORE = 6; //大四喜
	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 = 2; //无鬼两倍
	public static int LIU_JU_2BEI_SCORE = 2; //流局两倍
	public static int HAI_DI_NAO_YUE_SCORE = 2; //海底捞月

	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)
	{
		//一脚癞油
		room.config.putBoolean(Config.ROOM_CONFIG_QG_TYPE, true);
		room.config.putBoolean(Config.ROOM_CONFIG_GANGBAO_TYPE, true);
		room.config.putBoolean(Config.ROOM_CONFIG_WU_FENG, true);
		room.config.putBoolean(Config.ROOM_CONFIG_DAHU_CHENG, true);

		//fang gui
		room.config.putInt(Config.ROOM_CONFIG_LAIZI, 2);
		room.config.putBoolean(Config.ROOM_CONFIG_GUO_GONG, 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;
	}
}