Ejemplo n.º 1
0
        private void OnDiscard(Player player, JToken data)
        {
            if (player.Hand.Count <= 12)
            {
                this.UpdateHand(player);
                return;
            }

            List <string> cardNames = Jsonify.ArrayToList <string>(data["cards"]);

            player.Discard(player.Hand.GetCards <Card>(cardNames));
        }
Ejemplo n.º 2
0
        private void OnPlayCardStage(Player player, JToken data)
        {
            QuestCard quest = this.matches[player].CurrentStory as QuestCard;
            QuestArea area  = quest.StageBuilder;

            List <string>     cardNames = Jsonify.ArrayToList <string>(data["cards"]);
            List <FoeCard>    foe       = player.Hand.GetCards <FoeCard>(cardNames);
            List <WeaponCard> weapons   = player.Hand.GetCards <WeaponCard>(cardNames);
            List <TestCard>   test      = player.Hand.GetCards <TestCard>(cardNames);

            player.Hand.Transfer(area, test.Cast <Card>().ToList());
            player.Hand.Transfer(area, foe.Cast <Card>().ToList());
            player.Hand.Transfer(area, weapons.Cast <Card>().ToList());

            this.UpdateHand(player);
            this.UpdateOtherArea(player, area.Cards);
            this.UpdatePlayerArea(player);
        }
Ejemplo n.º 3
0
        private void OnPlayCards(Player player, JToken data)
        {
            List <string> cardNames = Jsonify.ArrayToList <string>(data["cards"]);

            player.Play(player.Hand.GetCards <BattleCard>(cardNames));
        }