Exemplo n.º 1
0
 public static void bureaucratAction(Player p)
 {
     p.getDeck().addCardToFront(p.getGame().getBuyables()[1].buyOne());
     p.setOtherPlayerList();
     foreach (Player other in p.getOtherPlayers())
     {
         if (!other.getHand().hasDefenseCard())
         {
             Card c = other.getHand().getFirstVictoryCard();
             if (c == null)
             {
                 p.getGame().addToGameMessage(other.getName() + Internationalizer.getMessage("RevealNoVict"));
             }
             else
             {
                 other.getDeck().addCardToFront(other.getHand().remove(c));
                 p.getGame().addToGameMessage(other.getName() + Internationalizer.getMessage("BureaucratMsg1") + c.getName() + Internationalizer.getMessage("BureaucratMsg2"));
             }
         }
         else
         {
             p.getGame().addToGameMessage(other.getName() + Internationalizer.getMessage("Defended"));
         }
     }
 }
Exemplo n.º 2
0
 public static void councilRoomAction(Player p)
 {
     p.setOtherPlayerList();
     foreach (Player other in p.getOtherPlayers())
     {
         other.addDelayedFunction(new DelayedFunction(other, 0));
     }
 }
Exemplo n.º 3
0
 public static void militiaAction(Player p)
 {
     p.setOtherPlayerList();
     foreach (Player other in p.getOtherPlayers())
     {
         if (!other.getHand().hasDefenseCard())
         {
             other.addDelayedFunction(new DelayedFunction(other, 1));
         }
         else
         {
             p.getGame().addToGameMessage(other.getName() + Internationalizer.getMessage("Defended"));
         }
     }
 }
Exemplo n.º 4
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);
     }
 }
Exemplo n.º 5
0
 public static void gainCurses(Player p)
 {
     Game g = p.getGame();
     p.setOtherPlayerList();
     foreach (Player play in p.getOtherPlayers())
     {
         if (!play.getHand().hasDefenseCard())
         {
             play.getDeck().discard(g.getBuyables()[6].buyOne());//will always be the curse for the game setup.
         }
         else
         {
             p.getGame().addToGameMessage(play.getName() + Internationalizer.getMessage("Defended"));
         }
     }
 }