コード例 #1
0
        private void LoadBattle()
        {
            win = false;
            showMenu = false;
            gameOver = false;
            switch (rand.Next(3))
            {
                case 0:
                    enemy = new Character(Character.CharacterType.Slime, Content.Load<Texture2D>("minislime2"), new Vector2(25 + 384 / 2 * 1.5f, 35 + 327 / 2 * 1.5f), 384, 327);
                    enemy.HP = enemy.MaxHP;
                    break;

                case 1:
                    enemy = new Character(Character.CharacterType.ZombieJanitor, Content.Load<Texture2D>("zombiesheet"), new Vector2(25 + 384 / 2 * 1.5f, 25 + 327 / 2 * 1.5f), 384, 327);
                    enemy.HP = enemy.MaxHP;
                    break;

                case 2:
                    enemy = new Character(Character.CharacterType.LabRat, Content.Load<Texture2D>("ratSheet"), new Vector2(25 + 384 / 2 * 1.5f, 35 + 327 / 2 * 1.5f), 384, 327);
                    enemy.HP = enemy.MaxHP;
                    break;
            }
            cadwyn = new Character(Character.CharacterType.Cadwyn, Content.Load<Texture2D>("cadwynsheet3"), new Vector2(graphics.PreferredBackBufferWidth - (385 / 2 * 1.5f + 25), graphics.PreferredBackBufferHeight - (327 / 2 * 1.5f + 25)), 384, 327);
        }
コード例 #2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            logo = new Sprite(Content.Load<Texture2D>("logo"), new Vector2(graphics.PreferredBackBufferWidth / 2, graphics.PreferredBackBufferHeight / 2), 1074, 900);
            battle = new Sprite(Content.Load<Texture2D>("BattleBackground"), new Vector2(graphics.PreferredBackBufferWidth / 2, graphics.PreferredBackBufferHeight / 2), 1280, 720);
            bubble = new Sprite(Content.Load<Texture2D>("Bubble"), new Vector2(graphics.PreferredBackBufferWidth - 175, 200), 350, 350);
            battleTheme = Content.Load<Song>("Ghostpocalypse - 7 Master");
            bossSlime = new Character(Character.CharacterType.BossSlime, Content.Load<Texture2D>("slimesheet3"), new Vector2(25 + 384 / 2 * 1.5f, 25 + 327 / 2 * 1.5f), 384, 327);
            // Put the name of the font
            _spr_font = Content.Load<SpriteFont>("FPS");
            startFont = Content.Load<SpriteFont>("StartFont");
            menuFont = Content.Load<SpriteFont>("MenuFont");
            endFont1 = Content.Load<SpriteFont>("EndFont1");
            endFont2 = Content.Load<SpriteFont>("EndFont2");
            endFont3 = Content.Load<SpriteFont>("EndFont3");
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            rand = new Random();

            cadPos = new Vector2(graphics.PreferredBackBufferWidth / 2, graphics.PreferredBackBufferHeight / 2);
            cads = Content.Load<Texture2D>("cadsmallsheet");
            cad = new Sprite(cads, cadPos, 25, 35);
            tiles = Content.Load<Texture2D>("tileset");
            m = new Map(tiles, scale);
            trans = new Vector2(0, 0); //No translation at the start.
            scale = 1;

            stepCounter = 0;

            // TODO: use this.Content to load your game content here
        }
コード例 #3
0
        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            lastKeyboardState = keyboardState;
            keyboardState = Keyboard.GetState();
            lastPlayerOneState = playerOneState;
            playerOneState = GamePad.GetState(PlayerIndex.One);

            // Update
            _elapsed_time += (float)gameTime.ElapsedGameTime.TotalMilliseconds;
            battleTimer += (float)gameTime.ElapsedGameTime.TotalMilliseconds;

            // 1 Second has passed
            if (_elapsed_time >= 1000.0f)
            {
                _fps = _total_frames;
                _total_frames = 0;
                _elapsed_time = 0;
            }

            if (showMenu && !gameOver)
            {
                switch (battleStep)
                {
                    case 0:
                        if (battleTimer >= 500.0f)
                        {
                            if (chain[0] == Skills.Skill.Attack)
                            {
                                if (cadwyn.HP > cadwyn.MaxHP / 4)
                                {
                                    cadwyn.CurrentRow = 0;
                                }

                                else
                                {
                                    cadwyn.CurrentRow = 2;
                                }
                                _frame_timer += (float)gameTime.ElapsedGameTime.TotalMilliseconds;
                                if (_frame_timer > 50)
                                {
                                    cadwyn.CurrentFrame++;
                                    _frame_timer = 0;
                                }
                                if (cadwyn.CurrentFrame == 5)
                                {
                                    cadwyn.CurrentFrame = 0;
                                    battleTimer = 0;
                                    battleStep++;
                                }
                            }

                            else
                            {
                                if (cadwyn.HP > cadwyn.MaxHP / 4)
                                {
                                    cadwyn.CurrentRow = 1;
                                }

                                else
                                {
                                    cadwyn.CurrentRow = 3;
                                }
                                _frame_timer += (float)gameTime.ElapsedGameTime.TotalMilliseconds;
                                if (_frame_timer > 50)
                                {
                                    cadwyn.CurrentFrame++;
                                    _frame_timer = 0;
                                }
                                if (cadwyn.CurrentFrame == 3)
                                {
                                    cadwyn.CurrentFrame = 0;
                                    battleTimer = 0;
                                    battleStep++;
                                }
                            }

                        }
                        break;
                    case 1:
                        if (battleTimer >= 500.0f)
                        {
                            if (chain[1] == Skills.Skill.Attack)
                            {
                                if (cadwyn.HP > cadwyn.MaxHP / 4)
                                {
                                    cadwyn.CurrentRow = 0;
                                }

                                else
                                {
                                    cadwyn.CurrentRow = 2;
                                }
                                _frame_timer += (float)gameTime.ElapsedGameTime.TotalMilliseconds;
                                if (_frame_timer > 50)
                                {
                                    cadwyn.CurrentFrame++;
                                    _frame_timer = 0;
                                }
                                if (cadwyn.CurrentFrame == 5)
                                {
                                    cadwyn.CurrentFrame = 0;
                                    battleTimer = 0;
                                    battleStep++;
                                }
                            }

                            else
                            {
                                if (cadwyn.HP > cadwyn.MaxHP / 4)
                                {
                                    cadwyn.CurrentRow = 1;
                                }

                                else
                                {
                                    cadwyn.CurrentRow = 3;
                                }
                                _frame_timer += (float)gameTime.ElapsedGameTime.TotalMilliseconds;
                                if (_frame_timer > 50)
                                {
                                    cadwyn.CurrentFrame++;
                                    _frame_timer = 0;
                                }
                                if (cadwyn.CurrentFrame == 3)
                                {
                                    cadwyn.CurrentFrame = 0;
                                    battleTimer = 0;
                                    battleStep++;
                                }
                            }

                        }
                        break;
                    case 2:
                        if (battleTimer >= 500.0f)
                        {
                            if (chain[2] == Skills.Skill.Attack)
                            {
                                if (cadwyn.HP > cadwyn.MaxHP / 4)
                                {
                                    cadwyn.CurrentRow = 0;
                                }

                                else
                                {
                                    cadwyn.CurrentRow = 2;
                                }
                                _frame_timer += (float)gameTime.ElapsedGameTime.TotalMilliseconds;
                                if (_frame_timer > 50)
                                {
                                    cadwyn.CurrentFrame++;
                                    _frame_timer = 0;
                                }
                                if (cadwyn.CurrentFrame == 5)
                                {
                                    cadwyn.CurrentFrame = 0;
                                    battleTimer = 0;
                                    battleStep++;
                                }
                            }

                            else
                            {
                                if (cadwyn.HP > cadwyn.MaxHP / 4)
                                {
                                    cadwyn.CurrentRow = 1;
                                }

                                else
                                {
                                    cadwyn.CurrentRow = 3;
                                }
                                _frame_timer += (float)gameTime.ElapsedGameTime.TotalMilliseconds;
                                if (_frame_timer > 50)
                                {
                                    cadwyn.CurrentFrame++;
                                    _frame_timer = 0;
                                }
                                if (cadwyn.CurrentFrame == 3)
                                {
                                    cadwyn.CurrentFrame = 0;

                                    battleTimer = 0;
                                    battleStep++;
                                }
                            }

                        }
                        break;
                    case 3:
                        if (battleTimer >= 750.0f)
                        {
                            cadwyn.CurrentFrame = 0;
                            enemy.Position -= new Vector2(25, 0);
                            showPrevHP[0] = false;
                            battleTimer = 0;
                            battleStep++;
                        }
                        break;
                    case 4:
                        if (battleTimer >= 750.0f)
                        {
                            enemy.Position += new Vector2(25, 0);
                            battleTimer = 0;
                            battleStep++;
                        }
                        break;
                    case 5:
                        if (battleTimer >= 1000.0f)
                        {

                            _frame_timer += (float)gameTime.ElapsedGameTime.TotalMilliseconds;
                            if (_frame_timer > 100)
                            {
                                enemy.CurrentFrame++;
                                _frame_timer = 0;
                                enemy.Position += new Vector2(25, 0);
                            }
                            if (enemy.CurrentFrame == 3)
                            {
                                enemy.CurrentFrame = 0;
                                enemy.Position += new Vector2(-50, 0);
                                cadwyn.Position += new Vector2(25, 0);
                                showPrevHP[1] = false;
                                battleTimer = 0;
                                battleStep++;
                            }
                        }
                        break;
                    case 6:
                        if (battleTimer >= 500.0f)
                        {
                            enemy.CurrentFrame = 0;
                            enemy.Position -= new Vector2(25, 0);
                            cadwyn.Position -= new Vector2(25, 0);
                            battleTimer = 0;
                            battleStep++;
                        }
                        break;
                    case 7:
                        if (battleTimer >= 500.0f)
                        {
                            battleTimer = 0;
                            battleStep = 0;
                            showMenu = false;
                            menu = new Menu(Menu.MenuType.Battle);
                            skillCount = 0;
                            chain = new List<Skills.Skill>();
                            menu.InfoText = string.Empty;
                            if (cadwyn.HP == 0)
                            {
                                gameOver = true;
                                showMenu = true;
                                break;
                            }
                            else if (enemy.HP == 0)
                            {
                                gameOver = true;
                                showMenu = true;
                            }
                        }
                        if (win)
                            if (enemy.CharType == Character.CharacterType.BossSlime)
                                currentGameState = GameState.GameOver;
                        break;
                }
            }

            // Allows the game to exit
            if (playerOneState.Buttons.Back == ButtonState.Pressed || KeyPressed(Keys.Escape))
                this.Exit();

            switch (currentGameState)
            {
                case GameState.TitleScreen:
                    if (KeyPressed(Keys.Space) || ButtonPressed(Buttons.A) || ButtonPressed(Buttons.Start))
                    {
                        currentGameState = GameState.Map;
                        MediaPlayer.Play(battleTheme);
                        MediaPlayer.IsRepeating = true;
                    }
                    break;

                case GameState.Map:
                    bool is_idle = true;

                    KeyboardState ks = Keyboard.GetState();
                    Keys[] keys = ks.GetPressedKeys();

                    foreach (Keys key in keys)
                    {
                        switch (key)
                        {
                            case Keys.Up:
                                cad.CurrentRow = 5;
                                is_idle = false;
                                trans += new Vector2(0, 4);

                                break;

                            case Keys.Down:
                                cad.CurrentRow = 4;
                                is_idle = false;
                                trans += new Vector2(0, -4);

                                break;

                            case Keys.Left:
                                cad.CurrentRow = 7;
                                is_idle = false;
                                trans += new Vector2(4, 0);

                                break;

                            case Keys.Right:
                                cad.CurrentRow = 6;
                                is_idle = false;
                                trans += new Vector2(-4, 0);

                                break;
                        }
                    }

                    if (ButtonDown(Buttons.DPadDown))
                    {
                        cad.CurrentRow = 4;
                        is_idle = false;
                        trans += new Vector2(0, -4);
                    }

                    else if (ButtonDown(Buttons.DPadUp))
                    {
                        cad.CurrentRow = 5;
                        is_idle = false;
                        trans += new Vector2(0, 4);
                    }

                    else if (ButtonDown(Buttons.DPadLeft))
                    {
                        cad.CurrentRow = 7;
                        is_idle = false;
                        trans += new Vector2(4, 0);
                    }

                    else if (ButtonDown(Buttons.DPadRight))
                    {
                        cad.CurrentRow = 6;
                        is_idle = false;
                        trans += new Vector2(-4, 0);
                    }

                    if (-400 < trans.X && trans.X < -350 && 1450 > trans.Y && trans.Y > 1350)
                    {
                        currentGameState = GameState.Battle;
                        enemy = bossSlime;
                        win = false;
                        showMenu = false;
                        gameOver = false;
                        cadwyn = new Character(Character.CharacterType.Cadwyn, Content.Load<Texture2D>("cadwynsheet3"), new Vector2(graphics.PreferredBackBufferWidth - (385 / 2 * 1.5f + 25), graphics.PreferredBackBufferHeight - (327 / 2 * 1.5f + 25)), 384, 327);
                    }

                    if (is_idle)
                    {

                        if (cad.CurrentRow == 4)
                            cad.CurrentRow = 0;

                        if (cad.CurrentRow == 5)
                            cad.CurrentRow = 1;

                        if (cad.CurrentRow == 6)
                            cad.CurrentRow = 2;

                        if (cad.CurrentRow == 7)
                            cad.CurrentRow = 3;

                        cad.CurrentFrame = 0;

                        idle_timer += (float)gameTime.ElapsedGameTime.TotalMilliseconds;

                        if (idle_timer > 3000)  //Wait for a specific time
                        {

                            cad.CurrentFrame++;

                        }

                        if (idle_timer > 3100)  //Wait for a specific time
                        {

                            cad.CurrentFrame++;

                        }

                        if (idle_timer > 3200)  //Wait for a specific time
                        {

                            cad.CurrentFrame++;

                        }

                        if (idle_timer > 3300)  //Wait for a specific time
                        {

                            cad.CurrentFrame = 0;
                            idle_timer = 0f;

                        }
                    }

                    else   //Character is moving
                    {
                        idle_timer = 0f;
                        timer += (float)gameTime.ElapsedGameTime.TotalMilliseconds;

                        if (timer > interval)
                        {
                            //Show the next frame
                            cad.CurrentFrame++;
                            //Reset the timer
                            timer = 0f;
                        }

                        if (cad.CurrentFrame == 3)  //Depending on the sprites per row of the spritesheet
                        {
                            cad.CurrentFrame = 0;
                        }

                        stepCounter++;
                    }

                    cad.SourceRect = new Rectangle(cad.Width * cad.CurrentFrame, cad.Height * cad.CurrentRow, cad.Width, cad.Height);

                    if (stepCounter > 200)
                    {
                        stepCounter = 0;
                        currentGameState = GameState.Battle;
                        LoadBattle();
                    }
                    break;

                case GameState.Battle:
                    if (!showMenu)
                    {
                        if (KeyPressed(Keys.Down) || ButtonPressed(Buttons.DPadDown))
                            menu.Iterator += 1;
                        else if (KeyPressed(Keys.Up) || ButtonPressed(Buttons.DPadUp))
                            menu.Iterator -= 1;
                        else if (KeyPressed(Keys.Space) || ButtonPressed(Buttons.A))
                        {
                            if (menu.CurrentMenuType == Menu.MenuType.Battle && menu.Iterator == 0)
                                menu = new Menu(Menu.MenuType.Fight);
                            else if (menu.CurrentMenuType == Menu.MenuType.Fight)
                            {
                                if (skillCount < 3)
                                {
                                    switch (menu.Iterator)
                                    {
                                        case 0:
                                            chain.Add(Skills.Skill.Attack);
                                            skillCount++;
                                            if (skillCount == 3)
                                            {
                                                showMenu = true;
                                                menu.InfoText += "Attack";
                                            }
                                            else
                                                menu.InfoText += "Attack-->";
                                            break;
                                        case 1:
                                            chain.Add(Skills.Skill.Fire);
                                            skillCount++;
                                            if (skillCount == 3)
                                            {
                                                showMenu = true;
                                                menu.InfoText += "Fire";
                                            }
                                            else
                                                menu.InfoText += "Fire-->";
                                            break;
                                        case 2:
                                            chain.Add(Skills.Skill.Ice);
                                            skillCount++;
                                            if (skillCount == 3)
                                            {
                                                showMenu = true;
                                                menu.InfoText += "Ice";
                                            }
                                            else
                                                menu.InfoText += "Ice-->";
                                            break;
                                        case 3:
                                            chain.Add(Skills.Skill.Bolt);
                                            skillCount++;
                                            if (skillCount == 3)
                                            {
                                                showMenu = true;
                                                menu.InfoText += "Bolt";
                                            }
                                            else
                                                menu.InfoText += "Bolt-->";
                                            break;
                                    }
                                }
                            }
                        }
                        else if (KeyPressed(Keys.Back) || ButtonPressed(Buttons.B))
                        {
                            if (menu.CurrentMenuType == Menu.MenuType.Fight)
                            {
                                menu = new Menu(Menu.MenuType.Battle);
                                skillCount = 0;
                                chain = new List<Skills.Skill>();
                                menu.InfoText = string.Empty;
                            }
                        }
                        if (skillCount == 3)
                        {
                            List<Skills.Skill> slimeChain = new List<Skills.Skill>();
                            slimeChain.Add(Skills.Skill.Attack);
                            slimeChain.Add(Skills.Skill.Fire);
                            slimeChain.Add(Skills.Skill.Attack);
                            Console.WriteLine(string.Format("Boss Slime HP before: {0:0}/{1:0}", enemy.HP, enemy.MaxHP));
                            cadwyn.attack(enemy, chain);
                            Console.WriteLine(string.Format("Boss Slime HP after: {0:0}/{1:0}", enemy.HP, enemy.MaxHP));
                            Console.WriteLine(string.Format("Cadwyn HP before: {0:0}/{1:0}", cadwyn.HP, cadwyn.MaxHP));
                            enemy.attack(cadwyn, slimeChain);
                            Console.WriteLine(string.Format("Cadwyn HP after: {0:0}/{1:0}", cadwyn.HP, cadwyn.MaxHP));
                            showMenu = true;
                            showPrevHP[0] = true;
                            showPrevHP[1] = true;
                            if (enemy.HP == 0)
                            {
                                win = true;
                                cadwyn.HP = cadwyn.PreviousHealth;
                            }
                            else if (cadwyn.HP == 0)
                                win = false;
                        }
                    }

                    if (gameOver && battleTimer >= 1000)
                    {
                        MediaPlayer.Stop();
                        currentGameState = GameState.Map;
                    }

                    break;  //end Battle
            }

            // TODO: Add your update logic here

            base.Update(gameTime);
        }
コード例 #4
0
        public void attack(Character enemy, List<Skills.Skill> chain)
        {
            PreviousHealth = _hp;
            int bonus = 10;  //bonus magic damage as percent of magic attack

            #region Attack
            if (chain[0] == Skills.Skill.Attack)
            {
                if (roll.Next(10) == 0)
                    enemy.HP -= this.ATK * 2 - enemy.DEF;
                else
                    enemy.HP -= this.ATK - enemy.DEF;
                #region Attack, Attack
                if (chain[1] == Skills.Skill.Attack)
                {
                    if (roll.Next(6) == 0)
                        enemy.HP -= this.ATK * 2 - enemy.DEF;
                    else
                        enemy.HP -= this.ATK - enemy.DEF;
                    #region Attack, Attack, Attack
                    if (chain[2] == Skills.Skill.Attack)
                    {
                        if (roll.Next(4) == 0)
                            enemy.HP -= this.ATK * 2 - enemy.DEF;
                        else
                            enemy.HP -= this.ATK - enemy.DEF;
                    }
                    #endregion
                    #region Attack, Attack, Fire
                    else if (chain[2] == Skills.Skill.Fire)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                    #region Attack, Attack, Ice
                    else if (chain[2] == Skills.Skill.Ice)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                    #region Attack, Attack, Bolt
                    else if (chain[2] == Skills.Skill.Bolt)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF / 2) * 1.25);
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                }
                #endregion
                #region Attack, Fire
                else if (chain[1] == Skills.Skill.Fire)
                {
                    if (enemy.Burned == true)
                        enemy.HP -= this.MATK - enemy.MDEF / 2;
                    else
                        enemy.HP -= this.MATK - enemy.MDEF;
                    #region Attack, Fire, Attack
                    if (chain[2] == Skills.Skill.Attack)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= 2 * this.MATK / bonus;
                        else
                            enemy.HP -= this.MATK / bonus;
                        if (roll.Next(10) == 0)
                            enemy.HP -= this.ATK * 2 - enemy.DEF;
                        else
                            enemy.HP -= this.ATK - enemy.DEF;
                    }
                    #endregion
                    #region Attack, Fire, Fire
                    else if (chain[2] == Skills.Skill.Fire)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                        {
                            enemy.HP -= this.MATK - enemy.MDEF;
                            enemy.Burned = true;
                        }
                        if (enemy.Chilled)
                            enemy.Chilled = false;
                    }
                    #endregion
                    #region Attack, Fire, Ice
                    else if (chain[2] == Skills.Skill.Ice)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                    #region Attack, Fire, Bolt
                    else if (chain[2] == Skills.Skill.Bolt)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF / 2) * 1.25);
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                }
                #endregion
                #region Attack, Ice
                else if (chain[1] == Skills.Skill.Ice)
                {
                    if (enemy.Burned == true)
                        enemy.HP -= this.MATK - enemy.MDEF / 2;
                    else
                        enemy.HP -= this.MATK - enemy.MDEF;
                    #region Attack, Ice, Attack
                    if (chain[2] == Skills.Skill.Attack)
                    {
                        if (roll.Next(10) == 0)
                            enemy.HP -= this.ATK * 2 - enemy.DEF;
                        else
                            enemy.HP -= this.ATK - enemy.DEF;
                    }
                    #endregion
                    #region Attack, Ice, Fire
                    else if (chain[2] == Skills.Skill.Fire)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                    #region Attack, Ice, Ice
                    else if (chain[2] == Skills.Skill.Ice)
                    {
                        if (enemy.Burned == true)
                        {
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                            enemy.Burned = false;
                        }
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                        if (!enemy.Chilled)
                            enemy.Chilled = true;
                    }
                    #endregion
                    #region Attack, Ice, Bolt
                    else if (chain[2] == Skills.Skill.Bolt)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF / 2) * 1.25);
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                }
                #endregion
                #region Attack, Bolt
                else if (chain[1] == Skills.Skill.Bolt)
                {
                    if (enemy.Burned == true)
                        enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF / 2) * 1.25);
                    else
                        enemy.HP -= this.MATK - enemy.MDEF;
                    #region Attack, Bolt, Attack
                    if (chain[2] == Skills.Skill.Attack)
                    {
                        if (roll.Next(10) == 0)
                            enemy.HP -= this.ATK * 2 - enemy.DEF;
                        else
                            enemy.HP -= this.ATK - enemy.DEF;
                    }
                    #endregion
                    #region Attack, Bolt, Fire
                    else if (chain[2] == Skills.Skill.Fire)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                    #region Attack, Bolt, Ice
                    else if (chain[2] == Skills.Skill.Ice)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                    #region Attack, Bolt, Bolt
                    else if (chain[2] == Skills.Skill.Bolt)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF / 2) * 1.50);
                        else
                            enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF) * 1.25);
                    }
                    #endregion
                }
                #endregion
            }
            #endregion
            #region Fire
            else if (chain[0] == Skills.Skill.Fire)
            {
                enemy.HP -= this.MATK - enemy.MDEF;
                #region Fire, Attack
                if (chain[1] == Skills.Skill.Attack)
                {
                    if (enemy.Burned == true)
                        enemy.HP -= 2 * this.MATK / bonus;
                    else
                        enemy.HP -= this.MATK / bonus;
                    if (roll.Next(10) == 0)
                        enemy.HP -= this.ATK * 2 - enemy.DEF;
                    else
                        enemy.HP -= this.ATK - enemy.DEF;
                    #region Fire, Attack, Attack
                    if (chain[2] == Skills.Skill.Attack)
                    {
                        if (roll.Next(6) == 0)
                            enemy.HP -= this.ATK * 2 - enemy.DEF;
                        else
                            enemy.HP -= this.ATK - enemy.DEF;
                    }
                    #endregion
                    #region Fire, Attack, Fire
                    else if (chain[2] == Skills.Skill.Fire)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                    #region Fire, Attack, Ice
                    else if (chain[2] == Skills.Skill.Ice)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                    #region Fire, Attack, Bolt
                    else if (chain[2] == Skills.Skill.Bolt)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF / 2) * 1.25);
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                }
                #endregion
                #region Fire, Fire
                else if (chain[1] == Skills.Skill.Fire)
                {
                    if (enemy.Burned == true)
                        enemy.HP -= this.MATK - enemy.MDEF / 2;
                    else
                    {
                        enemy.HP -= this.MATK - enemy.MDEF;
                        enemy.Burned = true;
                    }
                    if (enemy.Chilled)
                        enemy.Chilled = false;
                    #region Fire, Fire, Attack
                    if (chain[2] == Skills.Skill.Attack)
                    {
                        if (roll.Next(10) == 0)
                            enemy.HP -= this.ATK * 2 - enemy.DEF;
                        else
                            enemy.HP -= this.ATK - enemy.DEF;
                        if (enemy.Burned == true)
                            enemy.HP -= 2 * this.MATK / bonus;
                        else
                            enemy.HP -= this.MATK / bonus;
                    }
                    #endregion
                    #region Fire, Fire, Fire
                    else if (chain[2] == Skills.Skill.Fire)
                    {
                        //FIREBALL!!!
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK * 2 - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK * 2 - enemy.MDEF;
                    }
                    #endregion
                    #region Fire, Fire, Ice
                    else if (chain[2] == Skills.Skill.Ice)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                    #region Fire, Fire, Bolt
                    else if (chain[2] == Skills.Skill.Bolt)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF / 2) * 1.25);
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                }
                #endregion
                #region Fire, Ice
                else if (chain[1] == Skills.Skill.Ice)
                {
                    if (enemy.Burned == true)
                        enemy.HP -= this.MATK - enemy.MDEF / 2;
                    else
                        enemy.HP -= this.MATK - enemy.MDEF;
                    #region Fire, Ice, Attack
                    if (chain[2] == Skills.Skill.Attack)
                    {
                        if (roll.Next(10) == 0)
                            enemy.HP -= this.ATK * 2 - enemy.DEF;
                        else
                            enemy.HP -= this.ATK - enemy.DEF;
                        if (enemy.Burned == true)
                            enemy.HP -= 2 * this.MATK / bonus;
                        else
                            enemy.HP -= this.MATK / bonus;
                    }
                    #endregion
                    #region Fire, Ice, Fire
                    else if (chain[2] == Skills.Skill.Fire)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                    #region Fire, Ice, Ice
                    else if (chain[2] == Skills.Skill.Ice)
                    {
                        if (enemy.Burned == true)
                        {
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                            enemy.Burned = false;
                        }
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                        if (!enemy.Chilled)
                            enemy.Chilled = true;
                    }
                    #endregion
                    #region Fire, Ice, Bolt
                    else if (chain[2] == Skills.Skill.Bolt)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF / 2) * 1.25);
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                }
                #endregion
                #region Fire, Bolt
                else if (chain[1] == Skills.Skill.Bolt)
                {
                    if (enemy.Burned == true)
                        enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF / 2) * 1.25);
                    else
                        enemy.HP -= this.MATK - enemy.MDEF;
                    #region Fire, Bolt, Attack
                    if (chain[2] == Skills.Skill.Attack)
                    {
                        if (roll.Next(10) == 0)
                            enemy.HP -= this.ATK * 2 - enemy.DEF;
                        else
                            enemy.HP -= this.ATK - enemy.DEF;
                        if (enemy.Burned == true)
                            enemy.HP -= 2 * this.MATK / bonus;
                        else
                            enemy.HP -= this.MATK / bonus;
                    }
                    #endregion
                    #region Fire, Bolt, Fire
                    else if (chain[2] == Skills.Skill.Fire)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                    #region Fire, Bolt, Ice
                    else if (chain[2] == Skills.Skill.Ice)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                    #region Fire, Bolt, Bolt
                    else if (chain[2] == Skills.Skill.Bolt)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF / 2) * 1.50);
                        else
                            enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF) * 1.25);
                    }
                    #endregion
                }
                #endregion
            }
            #endregion
            #region Ice
            else if (chain[0] == Skills.Skill.Ice)
            {
                enemy.HP -= this.MATK - enemy.MDEF;
                #region Ice, Attack
                if (chain[1] == Skills.Skill.Attack)
                {
                    if (enemy.Burned == true)
                        enemy.HP -= 2 * this.MATK / bonus;
                    else
                        enemy.HP -= this.MATK / bonus;
                    if (roll.Next(10) == 0)
                        enemy.HP -= this.ATK * 2 - enemy.DEF;
                    else
                        enemy.HP -= this.ATK - enemy.DEF;
                    #region Ice, Attack, Attack
                    if (chain[2] == Skills.Skill.Attack)
                    {
                        if (roll.Next(6) == 0)
                            enemy.HP -= this.ATK * 2 - enemy.DEF;
                        else
                            enemy.HP -= this.ATK - enemy.DEF;
                    }
                    #endregion
                    #region Ice, Attack, Fire
                    else if (chain[2] == Skills.Skill.Fire)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                    #region Ice, Attack, Ice
                    else if (chain[2] == Skills.Skill.Ice)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                    #region Ice, Attack, Bolt
                    else if (chain[2] == Skills.Skill.Bolt)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF / 2) * 1.25);
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                }
                #endregion
                #region Ice, Fire
                else if (chain[1] == Skills.Skill.Fire)
                {
                    if (enemy.Burned == true)
                        enemy.HP -= this.MATK - enemy.MDEF / 2;
                    else
                        enemy.HP -= this.MATK - enemy.MDEF;
                    #region Ice, Fire, Attack
                    if (chain[2] == Skills.Skill.Attack)
                    {
                        if (roll.Next(10) == 0)
                            enemy.HP -= this.ATK * 2 - enemy.DEF;
                        else
                            enemy.HP -= this.ATK - enemy.DEF;
                        if (enemy.Burned == true)
                            enemy.HP -= 2 * this.MATK / bonus;
                        else
                            enemy.HP -= this.MATK / bonus;
                    }
                    #endregion
                    #region Ice, Fire, Fire
                    else if (chain[2] == Skills.Skill.Fire)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                        {
                            enemy.HP -= this.MATK - enemy.MDEF;
                            enemy.Burned = true;
                        }
                        if (enemy.Chilled)
                            enemy.Chilled = false;
                    }
                    #endregion
                    #region Ice, Fire, Ice
                    else if (chain[2] == Skills.Skill.Ice)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                    #region Ice, Fire, Bolt
                    else if (chain[2] == Skills.Skill.Bolt)
                    {
                        //Frostfire bolt!!!
                        if (enemy.Burned == true)
                            enemy.HP -= 2 * (int)Math.Round((this.MATK - enemy.MDEF / 2) * 1.25);
                        else
                        {
                            enemy.HP -= 2 * this.MATK - enemy.MDEF;
                            enemy.Burned = true;
                        }
                    }
                    #endregion
                }
                #endregion
                #region Ice, Ice
                else if (chain[1] == Skills.Skill.Ice)
                {
                    if (enemy.Burned == true)
                    {
                        enemy.HP -= this.MATK - enemy.MDEF / 2;
                        enemy.Burned = false;
                    }
                    else
                        enemy.HP -= this.MATK - enemy.MDEF;
                    if (!enemy.Chilled)
                        enemy.Chilled = true;
                    #region Ice, Ice, Attack
                    if (chain[2] == Skills.Skill.Attack)
                    {
                        if (roll.Next(10) == 0)
                            enemy.HP -= this.ATK * 2 - enemy.DEF;
                        else
                            enemy.HP -= this.ATK - enemy.DEF;
                        enemy.HP -= this.MATK / bonus;
                    }
                    #endregion
                    #region Ice, Ice, Fire
                    else if (chain[2] == Skills.Skill.Fire)
                        enemy.HP -= this.MATK - enemy.MDEF;
                    #endregion
                    #region Ice, Ice, Ice
                    else if (chain[2] == Skills.Skill.Ice)
                        //Blizzard!!!
                        enemy.HP -= 2 * this.MATK - enemy.MDEF;
                    #endregion
                    #region Ice, Ice, Bolt
                    else if (chain[2] == Skills.Skill.Bolt)
                        enemy.HP -= this.MATK - enemy.MDEF;
                    #endregion
                }
                #endregion
                #region Ice, Bolt
                else if (chain[1] == Skills.Skill.Bolt)
                {
                    if (enemy.Burned == true)
                        enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF / 2) * 1.50);
                    else
                        enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF) * 1.25);
                    #region Ice, Bolt, Attack
                    if (chain[2] == Skills.Skill.Attack)
                    {
                        if (roll.Next(10) == 0)
                            enemy.HP -= this.ATK * 2 - enemy.DEF;
                        else
                            enemy.HP -= this.ATK - enemy.DEF;
                        if (enemy.Burned == true)
                            enemy.HP -= 2 * this.MATK / bonus;
                        else
                            enemy.HP -= this.MATK / bonus;
                    }
                    #endregion
                    #region Ice, Bolt, Fire
                    else if (chain[2] == Skills.Skill.Fire)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                    #region Ice, Bolt, Ice
                    else if (chain[2] == Skills.Skill.Ice)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                    #region Ice, Bolt, Bolt
                    else if (chain[2] == Skills.Skill.Bolt)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF / 2) * 1.50);
                        else
                            enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF) * 1.25);
                    }
                    #endregion
                }
                #endregion
            }
            #endregion
            #region Bolt
            else if (chain[0] == Skills.Skill.Bolt)
            {
                if (enemy.Burned == true)
                    enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF / 2) * 1.50);
                else
                    enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF) * 1.25);
                #region Bolt, Attack
                if (chain[1] == Skills.Skill.Attack)
                {
                    if (enemy.Burned == true)
                        enemy.HP -= 2 * this.MATK / bonus;
                    else
                        enemy.HP -= this.MATK / bonus;
                    if (roll.Next(10) == 0)
                        enemy.HP -= this.ATK * 2 - enemy.DEF;
                    else
                        enemy.HP -= this.ATK - enemy.DEF;
                    #region Bolt, Attack, Attack
                    if (chain[2] == Skills.Skill.Attack)
                    {
                        if (roll.Next(6) == 0)
                            enemy.HP -= this.ATK * 2 - enemy.DEF;
                        else
                            enemy.HP -= this.ATK - enemy.DEF;
                    }
                    #endregion
                    #region Bolt, Attack, Fire
                    else if (chain[2] == Skills.Skill.Fire)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                    #region Bolt, Attack, Ice
                    else if (chain[2] == Skills.Skill.Ice)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                    #region Bolt, Attack, Bolt
                    else if (chain[2] == Skills.Skill.Bolt)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF / 2) * 1.25);
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                }
                #endregion
                #region Bolt, Fire
                else if (chain[1] == Skills.Skill.Fire)
                {
                    if (enemy.Burned == true)
                        enemy.HP -= this.MATK - enemy.MDEF / 2;
                    else
                        enemy.HP -= this.MATK - enemy.MDEF;
                    #region Bolt, Fire, Attack
                    if (chain[2] == Skills.Skill.Attack)
                    {
                        if (roll.Next(10) == 0)
                            enemy.HP -= this.ATK * 2 - enemy.DEF;
                        else
                            enemy.HP -= this.ATK - enemy.DEF;
                        if (enemy.Burned == true)
                            enemy.HP -= 2 * this.MATK / bonus;
                        else
                            enemy.HP -= this.MATK / bonus;
                    }
                    #endregion
                    #region Bolt, Fire, Fire
                    else if (chain[2] == Skills.Skill.Fire)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                        {
                            enemy.HP -= this.MATK - enemy.MDEF;
                            enemy.Burned = true;
                        }
                        if (enemy.Chilled)
                            enemy.Chilled = false;
                    }
                    #endregion
                    #region Bolt, Fire, Ice
                    else if (chain[2] == Skills.Skill.Ice)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                    #region Bolt, Fire, Bolt
                    else if (chain[2] == Skills.Skill.Bolt)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF / 2) * 1.25);
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                }
                #endregion
                #region Bolt, Ice
                else if (chain[1] == Skills.Skill.Ice)
                {
                    if (enemy.Burned == true)
                        enemy.HP -= this.MATK - enemy.MDEF / 2;
                    else
                        enemy.HP -= this.MATK - enemy.MDEF;
                    #region Bolt, Ice, Attack
                    if (chain[2] == Skills.Skill.Attack)
                    {
                        if (roll.Next(10) == 0)
                            enemy.HP -= this.ATK * 2 - enemy.DEF;
                        else
                            enemy.HP -= this.ATK - enemy.DEF;
                        if (enemy.Burned == true)
                            enemy.HP -= 2 * this.MATK / bonus;
                        else
                            enemy.HP -= this.MATK / bonus;
                    }
                    #endregion
                    #region Bolt, Ice, Fire
                    else if (chain[2] == Skills.Skill.Fire)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                    #region Bolt, Ice, Ice
                    else if (chain[2] == Skills.Skill.Ice)
                    {
                        if (enemy.Burned == true)
                        {
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                            enemy.Burned = false;
                        }
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                        if (!enemy.Chilled)
                            enemy.Chilled = true;
                    }
                    #endregion
                    #region Bolt, Ice, Bolt
                    else if (chain[2] == Skills.Skill.Bolt)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF / 2) * 1.25);
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                }
                #endregion
                #region Bolt, Bolt
                else if (chain[1] == Skills.Skill.Bolt)
                {
                    if (enemy.Burned == true)
                        enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF / 2) * 1.50);
                    else
                        enemy.HP -= (int)Math.Round((this.MATK - enemy.MDEF) * 1.25);
                    #region Bolt, Bolt, Attack
                    if (chain[2] == Skills.Skill.Attack)
                    {
                        if (roll.Next(10) == 0)
                            enemy.HP -= this.ATK * 2 - enemy.DEF;
                        else
                            enemy.HP -= this.ATK - enemy.DEF;
                        if (enemy.Burned == true)
                            enemy.HP -= 2 * this.MATK / bonus;
                        else
                            enemy.HP -= this.MATK / bonus;
                    }
                    #endregion
                    #region Bolt, Bolt, Fire
                    else if (chain[2] == Skills.Skill.Fire)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                    #region Bolt, Bolt, Ice
                    else if (chain[2] == Skills.Skill.Ice)
                    {
                        if (enemy.Burned == true)
                            enemy.HP -= this.MATK - enemy.MDEF / 2;
                        else
                            enemy.HP -= this.MATK - enemy.MDEF;
                    }
                    #endregion
                    #region Bolt, Bolt, Bolt
                    else if (chain[2] == Skills.Skill.Bolt)
                    {
                        //Thunderstorm!!!
                        if (enemy.Burned == true)
                            enemy.HP -= 2 * (int)Math.Round((this.MATK - enemy.MDEF / 2) * 1.50);
                        else
                            enemy.HP -= 2 * (int)Math.Round((this.MATK - enemy.MDEF) * 1.25);
                    }
                    #endregion
                }
                #endregion
            }
            #endregion
        }