//获取卡片类型 public string[] GetTypes(Card c) { //卡片类型,效果1,效果2,效果3 int MAX_TYPE = 5; var types = new string[MAX_TYPE + 1]; types[0] = MseCardType.CARD_NORMAL; for (int i = 1; i < types.Length; i++) { types[i] = ""; } if (c.IsType(CardType.TYPE_MONSTER)) { CardType[] cardTypes = CardTypes.GetMonsterTypes(c.type, cfg.no10); int count = cardTypes.Length; for (int i = 0; i < count && i < MAX_TYPE; i++) { types[i + 1] = GetType(cardTypes[i]); } if (cardTypes.Length > 0) { if (c.IsType(CardType.TYPE_LINK)) { types[0] = MseCardType.CARD_LINK; } else if (c.IsType(CardType.TYPE_TOKEN)) { types[0] = (c.race == 0) ? MseCardType.CARD_TOKEN2 : MseCardType.CARD_TOKEN; } else if (c.IsType(CardType.TYPE_RITUAL)) { types[0] = MseCardType.CARD_RITUAL; } else if (c.IsType(CardType.TYPE_FUSION)) { types[0] = MseCardType.CARD_FUSION; } else if (c.IsType(CardType.TYPE_SYNCHRO)) { types[0] = MseCardType.CARD_SYNCHRO; } else if (c.IsType(CardType.TYPE_XYZ)) { types[0] = MseCardType.CARD_XYZ; } else if (c.IsType(CardType.TYPE_EFFECT)) { types[0] = MseCardType.CARD_EFFECT; } else { types[0] = MseCardType.CARD_NORMAL; if (cardTypes.Length == 1) { //xxx/通常 } } } } if (c.race == 0) //如果没有种族 { types[1] = ""; types[2] = ""; types[3] = ""; types[4] = ""; } return(types); }