Example #1
0
        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();
        }
Example #2
0
 internal ActiveCards GetCopy()
 {
     ActiveCards tcards = new ActiveCards();
     tcards.cards = new List<ActiveCard>();
     foreach (ActiveCard activeCard in cards)
     {
         tcards.cards.Add(new ActiveCard(activeCard.CardId, activeCard.Level, 0));
     }
     return tcards;
 }
Example #3
0
        public ActiveCards GetCopy()
        {
            ActiveCards tcards = new ActiveCards();

            tcards.cards = new List <ActiveCard>();
            foreach (ActiveCard activeCard in cards)
            {
                tcards.cards.Add(new ActiveCard(activeCard.CardId, activeCard.Level, 0));
            }
            return(tcards);
        }
Example #4
0
        public MirrorPlayer(int id, ActiveCards cpcards, bool isLeft)
            : base(false, isLeft)
        {
            PeopleId = id;

            PeopleConfig peopleConfig = ConfigData.GetPeopleConfig(id);
            Level = peopleConfig.Level;
            Job = UserProfile.InfoBasic.Job;

            EnergyGenerator.SetRateNpc(peopleConfig);

            Cards = cpcards.GetCopy();
            InitBase();
        }
Example #5
0
        public AIPlayer(int id, string deck, bool isLeft, int rlevel, bool isPlayerControl)
            : base(isPlayerControl, isLeft)
        {
            PeopleId = id;

            Level = rlevel;
            PeopleConfig peopleConfig = ConfigData.GetPeopleConfig(id);
            Level = peopleConfig.Level;
            Job = peopleConfig.Job;

            EnergyGenerator.SetRateNpc(peopleConfig);

            DeckCard[] cds = DeckBook.GetDeckByName(deck, Level);
            Cards = new ActiveCards(cds);
          //  PlayerAttr attr = new PlayerAttr();
          //  attr.ModifyMonsterData(HeroData);
            InitBase();
        }
Example #6
0
        public RandomPlayer(int id, bool isLeft, bool isplayerControl)
            : base(isplayerControl, isLeft)
        {
            PeopleId = id;

            PeopleConfig peopleConfig = ConfigData.GetPeopleConfig(id);
            Level = peopleConfig.Level;
            Job = UserProfile.InfoBasic.Job;

            EnergyGenerator.SetRateNpc(peopleConfig);

            DeckCard[] cd = new DeckCard[GameConstants.DeckCardCount];
            for (int i = 0; i < GameConstants.DeckCardCount; i++)
            {
                cd[i] = new DeckCard(CardConfigManager.GetRandomCard(0, -1), 1, 0);
            }
            Cards = new ActiveCards(cd);
            InitBase();
        }
Example #7
0
        public HumanPlayer(bool isLeft)
            : base(true, isLeft)
        {
            PeopleId = 0;
            Level = UserProfile.InfoBasic.Level;
            Job = UserProfile.InfoBasic.Job;
            
            DeckCard[] cd = new DeckCard[GameConstants.DeckCardCount];
            for (int i = 0; i < GameConstants.DeckCardCount; i++)
            {
                int id = UserProfile.InfoCard.SelectedDeck.GetCardAt(i);
                cd[i] = UserProfile.InfoCard.GetDeckCardById(id);
            }
            Cards = new ActiveCards(cd);

            int[] energyRate = {0, 0, 0};
            CalculateEquipAndSkill(UserProfile.InfoEquip.Equipon, energyRate);
            EnergyGenerator.SetRate(energyRate, UserProfile.InfoBasic.Job);

            InitBase();
        }