Example #1
0
        public void CardBuilt(Card aCard)
        {
            thisPlayer.berenice = thisPlayer.resources[0]; //Berenice
            int filled = thisPlayer.builtCards.Count(x => x != null);

            thisPlayer.builtCards[filled] = aCard;

            AddColor(aCard.color);
            ShowBuiltCard(aCard);
            CardEffects.effects(aCard.effect, thisPlayer, _MasterForm.master);

            if ((thisPlayer.haveLeader[4] && aCard.color == "Yellow") || (thisPlayer.haveLeader[10] && aCard.color == "Black"))
            {
                thisPlayer.resources[0] += 2;
            }                                 //Leader Bonuses

            RemoveCard(aCard);
        }
Example #2
0
        public void CardBuilt(Card aCard, Card stageCard)
        {
            thisPlayer.berenice = thisPlayer.resources[0]; //Berenice
            int filled = thisPlayer.builtCards.Count(x => x != null);

            thisPlayer.builtCards[filled] = stageCard;

            int size = thisPlayer.wonderStages.Length;

            Card[] tempStages = new Card[size - 1];
            for (int i = 0; i < size - 1; i++)
            {
                tempStages[i] = thisPlayer.wonderStages[i + 1];
            }
            thisPlayer.wonderStages = tempStages;

            AddColor(stageCard.color);
            ShowBuiltCard(stageCard);
            CardEffects.effects(stageCard.effect, thisPlayer, _MasterForm.master);
            RemoveCard(aCard);
        }
Example #3
0
        public void ChosenCard(Card aCard)
        {
            int filled;

            switch (mode)
            {
            case "Olympus":
                CardEffects.scoreEffects(aCard.scoring, thePlayer, theMaster, aCard);
                thePlayer.decisions[0]--;
                this.Close();     //Closing calls AfterHalikarnassos/AfterDecision
                break;

            case "Spy Card":
                thePlayer.sciences[aCard.symbol - 1]++;
                thePlayer.decisions[1]--;
                spyCounter++;

                if (thePlayer.decisions[1] > 0 && theMaster.Players[pl].nColors[4] + theMaster.Players[pr].nColors[4] > spyCounter)
                {
                    for (int i = 0; i < 48; i++)
                    {
                        if (spaces[i].Text == aCard.name)
                        {
                            spaces[i].Text = "";
                            break;
                        }
                    }
                }
                else
                {
                    this.Close();
                }                          //Closing calls AfterHalikarnassos/AfterDecision
                break;

            case "Courtesan":
                CardEffects.scoreEffects(aCard.scoring, thePlayer, theMaster, aCard);
                thePlayer.decisions[2]--;
                this.Close();     //Closing calls AfterHalikarnassos/AfterDecision
                break;

            case "Science Symbol":
                thePlayer.decisions[3]--;
                if (thePlayer.decisions[3] > 0)
                {
                    spaces[0].Text  = "Compass (" + thePlayer.sciences[0].ToString() + ")";
                    spaces[16].Text = "Gear (" + thePlayer.sciences[1].ToString() + ")";
                    spaces[32].Text = "Tablet (" + thePlayer.sciences[2].ToString() + ")";
                }
                else
                {
                    this.Close();
                }                          //Closing calls AfterHalikarnassos/AfterDecision
                break;

            case "Halikarnassos":
                thePlayer.berenice = thePlayer.resources[0];     //Berenice
                CardEffects.effects(aCard.effect, thePlayer, theMaster);
                filled = thePlayer.builtCards.Count(x => x != null);
                thePlayer.builtCards[filled] = aCard;
                thePlayer.board.ShowBuiltCard(aCard);
                filled = theMaster.discardPile.Count(x => x != null);
                for (int i = 0; i < filled; i++)
                {
                    if (theMaster.discardPile[i] == aCard)
                    {
                        theMaster.discardPile[i]          = theMaster.discardPile[filled - 1];
                        theMaster.discardPile[filled - 1] = null;
                        break;
                    }
                }
                if ((thePlayer.haveLeader[4] && aCard.color == "Yellow") || (thePlayer.haveLeader[10] && aCard.color == "Black"))
                {
                    thePlayer.resources[0] += 2;
                }                                    //Leader Bonuses
                if (thePlayer.haveLeader[6] && thePlayer.berenice < thePlayer.resources[0])
                {
                    thePlayer.berenice2 = true;
                }                                                                                                               //Berenice

                thePlayer.decisions[4]--;
                this.Close();     //Closing calls AfterHalikarnassos/AfterDecision
                break;

            case "Rome":
                int cost = aCard.cost[0] - thePlayer.leaderDiscount;
                if (thePlayer.resources[0] > cost)
                {
                    if (cost < 0)
                    {
                        cost = 0;
                    }
                    thePlayer.resources[0] -= cost;
                    filled = thePlayer.builtCards.Count(x => x != null);
                    thePlayer.builtCards[filled] = aCard;
                    thePlayer.board.ShowBuiltCard(aCard);
                    CardEffects.effects(aCard.effect, thePlayer, theMaster);

                    int    size     = thePlayer.leaderHand.Length;
                    Card[] tempHand = new Card[size - 1];
                    int    j        = 0;
                    for (int i = 0; i < size; i++)
                    {
                        if (aCard != thePlayer.leaderHand[i])
                        {
                            tempHand[j] = thePlayer.leaderHand[i]; j++;
                        }
                    }
                    thePlayer.leaderHand = tempHand;

                    thePlayer.rome = false;
                    this.Close();     //Closing calls AfterHalikarnassos/AfterDecision
                }
                break;
            }
        }