Beispiel #1
0
        public override bool HandleCard(Player player, MouseState current, MouseState previous, float xPos, float yPos)
        {
            XPos = xPos;
            YPos = yPos;
            CurrentMouseState  = current;
            PreviousMouseState = previous;

            switch (bossTurnState)
            {
            case BossTurnState.STARTCOMBAT:
                HandleButtons(player);
                AnimationCounter = 0;
                return(false);

            case BossTurnState.COMBAT:

                if (CurrentCombat.HandleCombat(player, CurrentMouseState, PreviousMouseState, XPos, yPos, true, false))
                {
                    bossTurnState = BossTurnState.REWARDS;
                }

                return(false);

            case BossTurnState.REWARDS:

                if (player.DungeonArea == 14)
                {
                    bossTurnState = BossTurnState.COMPLETE;
                }
                HandleButtons(player);

                return(false);

            case BossTurnState.ROLLANIMATION:

                if (AnimationCounter < 60)
                {
                    RollAnimation();
                }
                else
                {
                    TreasureResult           = player.playerDice.RollDice();
                    RewardDie.CurrentTexture = RewardDie.DieTextures["Roll " + TreasureResult];
                    switch (TreasureResult)
                    {
                    case 1:
                        player.Armor++;
                        break;

                    case 2:
                        player.Experience += 2;
                        break;

                    case 3:
                        AwardedSpell = "Fire";
                        break;

                    case 4:
                        AwardedSpell = "Ice";
                        break;

                    case 5:
                        AwardedSpell = "Poison";
                        break;

                    case 6:
                        AwardedSpell = "Healing";
                        break;

                    default:
                        break;
                    }
                    if (TreasureResult > 2 && player.Spells.Count == 2)
                    {
                        bossTurnState = BossTurnState.REMOVESPELL;
                    }
                    else if (TreasureResult > 2)
                    {
                        player.AddSpell(AwardedSpell);
                        bossTurnState = BossTurnState.REVIEW;
                    }
                }

                return(false);

            case BossTurnState.REMOVESPELL:

                HandleButtons(player);

                return(false);

            case BossTurnState.REVIEW:

                //if (TreasureResult > 2 && player.Spells.Count == 2)
                //{
                //    bossTurnState = BossTurnState.REMOVESPELL;
                //}
                //else if (TreasureResult > 2)
                //{
                //    player.AddSpell(AwardedSpell);
                //}
                HandleButtons(player);

                return(false);

            case BossTurnState.COMPLETE:


                return(true);

            default:
                return(false);
            }
        }
Beispiel #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;
                }
            }
        }