Exemplo n.º 1
0
 public static void thiefAction(Player p, StatusObject o)
 {
     p.clearThiefList();
     p.setOtherPlayerList();
     o.setSelectTrashFromThief(true);
     foreach (Player other in p.getOtherPlayers())
     {
         List<Card> cards = new List<Card>();
         if (!other.getHand().hasDefenseCard())
         {
             for (int i = 0; i < 2; i++)
             {
                 Card c = other.getDeck().draw();
                 if (c == null)
                 {
                     continue;
                 }
                 else if (c.getType() == 1)
                 {
                     cards.Add(c);
                 }
                 else
                 {
                     other.getDeck().discard(c);
                 }
                 p.getGame().addToGameMessage(other.getName() + Internationalizer.getMessage("ThiefMsg1") + c.getName() + Internationalizer.getMessage("ThiefMsg2"));
             }
         }
         else
         {
             p.getGame().addToGameMessage(other.getName() + Internationalizer.getMessage("Defended"));
         }
         p.getThiefList().Add(cards);
     }
 }