Пример #1
0
        public PVEBattle(CardPlayer _player, MonsterRoom _room)
        {
            enemyMonster        = new List <Monster>();
            playerCardInHand    = new List <Card>();
            playerCardInGrave   = new List <Card>();
            playerCardVanished  = new List <Card>();
            monsterNextTurnCard = new List <Card>();
            player = _player;
            turn   = 0;
            foreach (var item in _room.RoomMonsters)
            {
                foreach (var i in Enumerable.Range(0, item.Value))
                {
                    enemyMonster.Add(item.Key);
                    item.Key.BattleStart();
                }
            }

            foreach (var item in player.CardPool)
            {
                foreach (var i in Enumerable.Range(0, item.Value))
                {
                    playerCardInGrave.Add(item.Key);
                }
            }

            Shuffle();
            player.BattleStart();
        }
Пример #2
0
 /// <summary>
 /// 进入副本
 /// </summary>
 /// <param name="dungeonTransferModel"></param>
 /// <param name="cp"></param>
 /// <param name="gameDic"></param>
 /// <returns></returns>
 public bool EnterDungeon(DungeonTransferModel dungeonTransferModel, CardPlayerTransferModel cp)
 {
     if (cardPlayer == null && dungeon == null)
     {
         cardPlayer = new CardPlayer(cp);
         dungeon    = new Dungeon(dungeonTransferModel);
         return(true);
     }
     else
     {
         return(false);
     }
 }