示例#1
0
        //-------------- COMBAT --------------\\

        private void HeroNavigateHUD(MouseInput mouseInput)
        {
            if (this.fightHUD.CHOICEHUD == HUD.ChoiceHUD.Attack && mouseInput.IsLeftClicked())
            {
                fightHUD.HitAnim("enemy");
                FightHelper.PlayEffect("attack");
                this.fightHUD.AddLog(FightHelper.Attack(hero, enemy));
                this.turn = "enemy";
            }
            else if (this.fightHUD.CHOICEHUD == HUD.ChoiceHUD.Spells && mouseInput.IsLeftClicked())
            {
                this.fightHUD.MENUHUD = HUD.MenuHUD.Spells;
            }
            else if (this.fightHUD.CHOICEHUD == HUD.ChoiceHUD.Defend && mouseInput.IsLeftClicked())
            {
                this.hero.Defending = true;
                this.turn           = "enemy";
            }
            else if (this.fightHUD.CHOICEHUD == HUD.ChoiceHUD.Inventory && mouseInput.IsLeftClicked())
            {
                this.fightHUD.MENUHUD = HUD.MenuHUD.Inventory;
            }

            if (this.fightHUD.MENUHUD == HUD.MenuHUD.Spells && this.fightHUD.SPELLCHOICE == HUD.SpellChoice.ArcaneShock && mouseInput.IsLeftClicked())
            {
                this.fightHUD.AddLog(FightHelper.Cast(hero, enemy, new Spells.ArcaneShock()));
                this.turn = "enemy";
            }
            else if (this.fightHUD.MENUHUD == HUD.MenuHUD.Spells && this.fightHUD.SPELLCHOICE == HUD.SpellChoice.SelfCure && mouseInput.IsLeftClicked())
            {
                this.fightHUD.AddLog(FightHelper.Cast(hero, hero, new Spells.SelfCure()));
                this.turn = "enemy";
            }
        }
示例#2
0
        private void EnemyNavigateAI()
        {
            if (this.enemy.AI() == "Attack")
            {
                this.fightHUD.AddLog(FightHelper.Attack(enemy, hero));

                if (this.enemy.ID == "Slime")
                {
                    FightHelper.PlayEffect("slimeAttack");
                }
                else
                {
                    FightHelper.PlayEffect("Attack");
                }
            }
            else if (this.enemy.AI() == "Fireball")
            {
                this.fightHUD.AddLog(FightHelper.Cast(enemy, hero, new Fireball()));
                FightHelper.PlayEffect("fireball");
            }
            else if (this.enemy.AI() == "Vampiric Bite")
            {
                this.fightHUD.AddLog(FightHelper.Cast(enemy, hero, new VampiricBite()));
                FightHelper.PlayEffect("vampiricBite");
            }
            else if (this.enemy.AI() == "Dagger Throw")
            {
                this.fightHUD.AddLog(FightHelper.Cast(enemy, hero, new DaggerThrow()));
                FightHelper.PlayEffect("daggerThrow");
            }



            fightHUD.HitAnim("hero");

            if (this.hero.Defending)
            {
                this.hero.Defending = false;
            }

            this.turn = "hero";
        }