Esempio n. 1
0
        public void HandleButtons(Player player)
        {
            if (SingleMouseClick())
            {
                switch (eventCardTurnState)
                {
                case EventCardTurnState.INITIAL_ROLL:

                    if (XPos > 770 && XPos < 1018 && YPos > 600 && YPos < 672)
                    {
                        eventCardTurnState = EventCardTurnState.ROLLANIMATION;
                    }

                    break;

                case EventCardTurnState.SKILL_CHECK:

                    DieSoundPlayed = false;
                    if (XPos > 770 && XPos < 1018 && YPos > 600 && YPos < 672)
                    {
                        SkillCheck         = true;
                        eventCardTurnState = EventCardTurnState.ROLLANIMATION;
                    }

                    break;

                case EventCardTurnState.ADJUSTOPTION:

                    DieSoundPlayed = false;
                    switch (Option)
                    {
                    case 1:


                        if (XPos > 650 && XPos < 730 && YPos > 300 && YPos < 380)
                        {
                            player.Food       += 1;
                            eventCardTurnState = EventCardTurnState.COMPLETE;
                        }

                        if (XPos > 730 && XPos < 810 && YPos > 300 && YPos < 380)
                        {
                            player.Health     += 2;
                            eventCardTurnState = EventCardTurnState.COMPLETE;
                        }

                        if (XPos > 1050 && XPos < 1130 && YPos > 300 && YPos < 380)
                        {
                            eventCardTurnState = EventCardTurnState.FIGHT_MONSTER;
                        }

                        break;

                    case 2:


                        if (XPos > 650 && XPos < 730 && YPos > 300 && YPos < 380)
                        {
                            player.Food       += 1;
                            eventCardTurnState = EventCardTurnState.COMPLETE;
                        }

                        if (XPos > 730 && XPos < 810 && YPos > 300 && YPos < 380)
                        {
                            player.Health     += 2;
                            eventCardTurnState = EventCardTurnState.COMPLETE;
                        }

                        if (XPos > 810 && XPos < 890 && YPos > 300 && YPos < 380)
                        {
                            player.Gold       += 2;
                            eventCardTurnState = EventCardTurnState.COMPLETE;
                        }

                        break;

                    case 3:

                        if (XPos > 730 && XPos < 810 && YPos > 300 && YPos < 380)
                        {
                            player.Health     += 2;
                            eventCardTurnState = EventCardTurnState.COMPLETE;
                        }

                        if (XPos > 810 && XPos < 890 && YPos > 300 && YPos < 380)
                        {
                            player.Gold       += 2;
                            eventCardTurnState = EventCardTurnState.COMPLETE;
                        }

                        if (XPos > 890 && XPos < 970 && YPos > 300 && YPos < 380)
                        {
                            player.Experience += 2;
                            eventCardTurnState = EventCardTurnState.COMPLETE;
                        }

                        break;

                    case 4:

                        if (XPos > 810 && XPos < 890 && YPos > 300 && YPos < 380)
                        {
                            player.Gold       += 2;
                            eventCardTurnState = EventCardTurnState.COMPLETE;
                        }

                        if (XPos > 890 && XPos < 970 && YPos > 300 && YPos < 380)
                        {
                            player.Experience += 2;
                            eventCardTurnState = EventCardTurnState.COMPLETE;
                        }

                        if (XPos > 970 && XPos < 1050 && YPos > 300 && YPos < 380)
                        {
                            player.Armor      += 1;
                            eventCardTurnState = EventCardTurnState.COMPLETE;
                        }

                        break;

                    case 5:

                        if (XPos > 890 && XPos < 970 && YPos > 300 && YPos < 380)
                        {
                            player.Experience += 2;
                            eventCardTurnState = EventCardTurnState.COMPLETE;
                        }

                        if (XPos > 970 && XPos < 1050 && YPos > 300 && YPos < 380)
                        {
                            player.Armor      += 1;
                            eventCardTurnState = EventCardTurnState.COMPLETE;
                        }

                        if (XPos > 1050 && XPos < 1130 && YPos > 300 && YPos < 380)
                        {
                            eventCardTurnState = EventCardTurnState.FIGHT_MONSTER;
                        }

                        break;

                    case 6:

                        if (XPos > 970 && XPos < 1050 && YPos > 300 && YPos < 380)
                        {
                            player.Armor      += 1;
                            eventCardTurnState = EventCardTurnState.COMPLETE;
                        }

                        if (XPos > 1050 && XPos < 1130 && YPos > 300 && YPos < 380)
                        {
                            eventCardTurnState = EventCardTurnState.FIGHT_MONSTER;
                        }

                        if (XPos > 650 && XPos < 730 && YPos > 300 && YPos < 380)
                        {
                            player.Food       += 1;
                            eventCardTurnState = EventCardTurnState.COMPLETE;
                        }

                        break;

                    default:
                        break;
                    }

                    break;

                case EventCardTurnState.HANDLE_EVENT:

                    switch (Option)
                    {
                    case 1:

                        if (XPos > 650 && XPos < 730 && YPos > 300 && YPos < 380)
                        {
                            player.Food       += 1;
                            eventCardTurnState = EventCardTurnState.COMPLETE;
                        }

                        break;

                    case 2:

                        if (XPos > 730 && XPos < 810 && YPos > 300 && YPos < 380)
                        {
                            player.Health     += 2;
                            eventCardTurnState = EventCardTurnState.COMPLETE;
                        }

                        break;

                    case 3:

                        if (XPos > 810 && XPos < 890 && YPos > 300 && YPos < 380)
                        {
                            player.Gold       += 2;
                            eventCardTurnState = EventCardTurnState.COMPLETE;
                        }

                        break;

                    case 4:

                        if (XPos > 890 && XPos < 970 && YPos > 300 && YPos < 380)
                        {
                            player.Experience += 2;
                            eventCardTurnState = EventCardTurnState.COMPLETE;
                        }

                        break;

                    case 5:

                        if (XPos > 970 && XPos < 1050 && YPos > 300 && YPos < 380)
                        {
                            player.Armor      += 1;
                            eventCardTurnState = EventCardTurnState.COMPLETE;
                        }

                        break;

                    case 6:

                        if (XPos > 1050 && XPos < 1130 && YPos > 300 && YPos < 380)
                        {
                            eventCardTurnState = EventCardTurnState.FIGHT_MONSTER;
                        }

                        break;

                    default:
                        break;
                    }

                    break;

                case EventCardTurnState.FIGHT_MONSTER:

                    if (XPos > 770 && XPos < 1018 && YPos > 600 && YPos < 672)
                    {
                        CurrentCombat      = new Combat(Buttons, CombatDice, DieSounds);
                        eventCardTurnState = EventCardTurnState.COMBAT;
                    }

                    break;
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="player"></param>
        public new void HandleButtons(Player player)
        {
            if (SingleMouseClick())
            {
                switch (bossTurnState)
                {
                case BossTurnState.STARTCOMBAT:


                    if (XPos > 770 && XPos < 1018 && YPos > 600 && YPos < 672)
                    {
                        CurrentCombat = new Combat(Buttons, CombatDice, DieSounds);
                        bossTurnState = BossTurnState.COMBAT;
                    }

                    break;

                case BossTurnState.COMBAT:
                    break;

                case BossTurnState.REWARDS:

                    if (XPos > 770 && XPos < 1018 && YPos > 600 && YPos < 672)
                    {
                        bossTurnState = BossTurnState.ROLLANIMATION;
                    }
                    break;

                case BossTurnState.ROLLANIMATION:



                    break;

                case BossTurnState.REMOVESPELL:

                    if (XPos > 770 && XPos < 1018 && YPos > 600 && YPos < 672)
                    {
                        bossTurnState = BossTurnState.COMPLETE;
                    }

                    if (XPos > 1130 && XPos < 1175 && YPos > 20 && YPos < 65)
                    {
                        player.RemoveSpell(0);
                        player.AddSpell(AwardedSpell);
                        bossTurnState = BossTurnState.REVIEW;
                    }

                    if (player.Spells.Count == 2)
                    {
                        if (XPos > 1180 && XPos < 1225 && YPos > 20 && YPos < 65)
                        {
                            player.RemoveSpell(1);
                            player.AddSpell(AwardedSpell);
                            bossTurnState = BossTurnState.REVIEW;
                        }
                    }


                    break;


                case BossTurnState.REVIEW:

                    if (XPos > 770 && XPos < 1018 && YPos > 600 && YPos < 672)
                    {
                        bossTurnState = BossTurnState.COMPLETE;
                    }

                    break;

                case BossTurnState.COMPLETE:
                    break;

                default:
                    break;
                }
            }
        }