public static void ReceiveGuardEffect(String data)
        {
            String[] arrayData = data.Split('|');

            Player  source = Game.Instance.getPlayerInRoundByName(arrayData[0]);
            Card    c      = Game.Instance.CreatCardByGame(arrayData[1]);
            Player  target = Game.Instance.getPlayerInRoundByName(arrayData[2]);
            Boolean res    = false;

            if (arrayData[3].ToLower() == "true")
            {
                res = true;
            }


            GameControllerMulti.gameView.showMessage(String.Format(Properties._string.ThinksThatHas, source.name,
                                                                   target.name, c.name, Properties.Settings.Default.showMessage), true);

            if (res)
            {
                GameControllerMulti.gameView.showMessage(Properties._string.WellGuessed, Properties.Settings.Default.showMessage);
                GameControllerMulti.killPlayer(target);
            }
            else
            {
                GameControllerMulti.gameView.showMessage(string.Format(Properties._string.DoesNotHaveTheCard, target.name, c.GetName()), true);
            }
        }
        public static void ReceiveBaronEffect(String data)
        {
            String[] arrayData = data.Split('|');
            Player   source    = Game.Instance.getPlayerInRoundByName(arrayData[0]);
            Player   target    = Game.Instance.getPlayerInRoundByName(arrayData[1]);
            Player   dead      = Game.Instance.getPlayerInRoundByName(arrayData[2]);

            GameControllerMulti.gameView.compareCardsHand(String.Format(Properties._string.ComparingHandsOfAnd, source.name, target.name), source, target);

            if (source.player_Deck.ElementAt(0).value > target.player_Deck.ElementAt(0).value)
            {
                GameControllerMulti.gameView.showMessage(String.Format(Properties._string.WonTheBattle, source.name, target.name), true);
                GameControllerMulti.killPlayer(target);
            }
            else if (source.player_Deck.ElementAt(0).value < target.player_Deck.ElementAt(0).value)
            {
                GameControllerMulti.gameView.showMessage(String.Format(Properties._string.WonTheBattle, target.name, source.name), true);
                GameControllerMulti.killPlayer(source);
            }
            else if (arrayData[2] == "")
            {
                GameControllerMulti.gameView.showMessage(Properties._string.Draw, true);
            }
        }
Exemple #3
0
 public static void PrincessEffect(Player source, int port, Network.Client c)
 {
     c.ClientPrincessEffect(source);
     GameControllerMulti.killPlayer(source);
 }