private void PeopleDeckViewForm_Click(object sender, EventArgs e) { if (tar != -1) { sel = tar; PeopleConfig peopleConfig = ConfigData.GetPeopleConfig(people[tar]); cardDetail.SetInfo(-1); DeckCard[] cards = DeckBook.GetDeckByName(peopleConfig.Emethod, peopleConfig.Level); nlClickLabel1.ClearLabel(); foreach (DeckCard card in cards) { CardConfigData ccd = CardConfigManager.GetCardConfig(card.BaseId); if (ccd.Id == 0) { continue; } var name = CardConfigManager.GetCardConfig(card.BaseId).Name; string cardstr = string.Format("{0}", name); nlClickLabel1.AddLabel(cardstr, card); } Invalidate(new Rectangle(65, 35, cardWidth * xCount + 200, 630)); nlClickLabel1.Invalidate(); } }
public IdlePlayer(bool isLeft) : base(false, isLeft) { Level = 1; Job = ConfigDatas.JobConfig.Indexer.NewBie; DeckCard[] cds = DeckBook.GetDeckByName("test", Level); Cards = new ActiveCards(cds); InitBase(); }
public AIPlayer(int id, string deck, bool isLeft, int rlevel, bool isPlayerControl) : base(isPlayerControl, isLeft) { PeopleId = id; Level = rlevel; PeopleConfig peopleConfig = ConfigData.GetPeopleConfig(id); Job = peopleConfig.Job; EnergyGenerator.SetRateNpc(peopleConfig); DeckCard[] cds = DeckBook.GetDeckByName(deck, Level); Cards = new ActiveCards(cds); // PlayerAttr attr = new PlayerAttr(); // attr.ModifyMonsterData(HeroData); InitBase(); }
private void CreateCards() { DeckCard[] cds = DeckBook.GetDeckByName("rookie", 1); int index = 0; foreach (DeckCard cd in cds) { if (CardConfigManager.GetCardConfig(cd.BaseId).Id == 0) { continue; } var dcard = UserProfile.InfoCard.AddCard(cd.BaseId); UserProfile.InfoCard.SelectedDeck.SetCardAt(index++, dcard.BaseId); } #region 把所有基础卡牌都给玩家 foreach (var cd in ConfigData.MonsterDict.Values) { if (cd.Remark.Contains("基本") && UserProfile.InfoCard.GetCardCount(cd.Id) == 0) { UserProfile.InfoCard.AddCard(cd.Id); } } foreach (var cd in ConfigData.WeaponDict.Values) { if (cd.Remark.Contains("基本") && UserProfile.InfoCard.GetCardCount(cd.Id) == 0) { UserProfile.InfoCard.AddCard(cd.Id); } } foreach (var cd in ConfigData.SpellDict.Values) { if (cd.Remark.Contains("基本") && UserProfile.InfoCard.GetCardCount(cd.Id) == 0) { UserProfile.InfoCard.AddCard(cd.Id); } } #endregion }