示例#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);
        }
示例#2
0
        private void scoring1()
        {
            int[]  totScore;
            Player p;
            int    filled;

            for (int i = 0; i < nP; i++)
            {
                p            = master.Players[i];
                totScore     = p.totalScore;
                totScore[0] += p.winScore;
                totScore[1] += p.resources[0] / 3 - p.debt;
                filled       = p.builtCards.Count(x => x != null);

                for (int j = 0; j < filled; j++)
                {
                    if (p.builtCards[j].scoring != 0)
                    {
                        CardEffects.scoreEffects(p.builtCards[j].scoring, p, master, p.builtCards[j]);
                    }
                }
            }
            int  id;
            bool decision = false;

            for (id = 0; id < nP; id++)
            {
                if (master.Players[id].decisions.Sum() > 0)
                {
                    decision = true; break;
                }
            }
            if (decision)
            {
                DecisionForm D = new DecisionForm(master.Players[id], master, this); D.Show();
            }
            else
            {
                scoring2();
            }
        }
示例#3
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);
        }
示例#4
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;
            }
        }