/// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            //RenderTarget2D target = new RenderTarget2D(GraphicsDevice, 1024, 576);
            //GraphicsDevice.SetRenderTarget(target);
            Text.loadContent(Content);
            Button.LoadContent(Content);
            MainMenu.loadContent(Content);
            MenuBoss.LoadContent(Content);
            //UpgradeMenu.loadContent(Content);

            PartyManager.Init();
            Resources.Init();
            SkillTree.LoadContent(Content);
            //SkillTree.Init();


            Character.load_content(Content);
            AnimatedEffect.LoadContent(Content);
            Status.LoadContent(Content);
            BattleManager.LoadContent(Content);
            SkillTree.LoadContent(Content);
            UpgradeMenu.loadContent(Content);
            LairManager.loadContent(Content);

            Menu_Song                   = Content.Load <SoundEffect>("Sounds/Epic_Loop");
            Menu_Song_Instance          = Menu_Song.CreateInstance();
            Menu_Song_Instance.IsLooped = true;
            Menu_Song_Instance.Volume   = .1f;

            Battle_Song                   = Content.Load <SoundEffect>("Sounds/VGameTune");
            Battle_Song_Instance          = Battle_Song.CreateInstance();
            Battle_Song_Instance.IsLooped = true;
            Battle_Song_Instance.Volume   = .1f;

            Main_Song                   = Content.Load <SoundEffect>("Sounds/LingeringChip");
            Main_Song_Instance          = Main_Song.CreateInstance();
            Main_Song_Instance.IsLooped = true;
            Main_Song_Instance.Volume   = .3f;
            //both songs have no duration

            EndGameText = new Text("And So,\n\nThrough much perserverence\nand a low interest mortgage\nour boss was finally\n\nLeft Alone.",
                                   new Vector2(300, 200), Text.fonts["6809Chargen-24"], Color.Cyan);
        }
        public void cast(Skill skill, Character target = null)
        {
            skillState    = SkillState.none;
            currentEffect = null;
            if ((skill == basic_attack || skill == strong_attack) && (charType != Type.Mage))
            {
                skillState = SkillState.attack;
            }
            if (skill == basic_attack && charType == Type.Mage)
            {
                Vector2 oPosition = new Vector2(sPosition.X + 60, sPosition.Y + 25);
                currentEffect = new AnimatedEffect(oPosition, BattleManager.boss.sPosition, AnimatedEffect.EffectType.magefire, true);
                skillState    = SkillState.magefire;
            }
            if (skill == cure)
            {
                Vector2 oPosition = new Vector2(target.sPosition.X + 40, target.sPosition.Y + 100);
                currentEffect = new AnimatedEffect(oPosition, BattleManager.boss.sPosition, AnimatedEffect.EffectType.cure, true);
                skillState    = SkillState.cure;
            }
            if (skill == defend)
            {
                Vector2 oPosition = sPosition;
                if (charType == Type.Brute || charType == Type.Mastermind || charType == Type.Operative)
                {
                    oPosition = new Vector2(sPosition.X + 30, sPosition.Y + 40);
                }
                else
                {
                    oPosition = new Vector2(sPosition.X + 100, sPosition.Y + 40);
                }
                currentEffect = new AnimatedEffect(oPosition, BattleManager.boss.sPosition, AnimatedEffect.EffectType.defend, true);
                skillState    = SkillState.defend;
            }
            if (skill == status)
            {
                Vector2 oPosition = new Vector2(sPosition.X + 60, sPosition.Y + 25);
                currentEffect = new AnimatedEffect(oPosition, BattleManager.boss.sPosition, AnimatedEffect.EffectType.poison_dagger, true);
                skillState    = SkillState.poison_dagger;
            }
            if (skill == SkillTree.portal_punch || skill == SkillTree.ethereal_fist)
            {
                Vector2 nPosition = new Vector2(sPosition.X + 60, sPosition.Y + 25);
                Vector2 oPosition = new Vector2(target.sPosition.X, target.sPosition.Y);
                currentEffect = new AnimatedEffect(nPosition, oPosition, AnimatedEffect.EffectType.portal_punch, true);
                skillState    = SkillState.poison_dagger;
            }
            if (skill == SkillTree.flamethrower || skill == SkillTree.shuriken)
            {
                AnimatedEffect.EffectType eff = AnimatedEffect.EffectType.flamethrower;
                if (skill == SkillTree.shuriken)
                {
                    eff = AnimatedEffect.EffectType.tophat;
                }
                Vector2 nPosition = new Vector2(sPosition.X + 60, sPosition.Y + 25);
                Vector2 oPosition = new Vector2(0, 0);
                for (int i = 0; i < BattleManager.heroes.Count(); i++)
                {
                    if (BattleManager.heroes[i] != null)
                    {
                        oPosition = new Vector2(BattleManager.heroes[i].sPosition.X, BattleManager.heroes[i].sPosition.Y);
                        if (i == 0)
                        {
                            currentEffect = new AnimatedEffect(nPosition, oPosition, eff, true);
                        }
                        if (i == 1)
                        {
                            secondEffect = new AnimatedEffect(nPosition, oPosition, eff, true);
                        }
                        if (i == 2)
                        {
                            thirdEffect = new AnimatedEffect(nPosition, oPosition, eff, true);
                        }
                        if (i == 3)
                        {
                            fourthEffect = new AnimatedEffect(nPosition, oPosition, eff, true);
                        }
                    }
                }
                skillState = SkillState.flamethrower;
            }
            if (skill.energy > this.energy)
            {
                Console.WriteLine("Character doesn't have enough energy");

                return;
            }
            this.energy -= skill.energy;

            if (statuses.Contains(Status.check_confused))
            {
                Character new_target   = null;
                int       heroes_alive = BattleManager.heroes.Count();
                while (new_target == null)
                {
                    int rand = LeaveMeAlone.random.Next(heroes_alive + 1);
                    //If this number is equal, then we target the heroes
                    if (rand == heroes_alive)
                    {
                        new_target = BattleManager.boss;
                    }
                    else
                    {
                        new_target = BattleManager.heroes[rand];
                    }
                }
                target = new_target;
            }

            skill.runnable(this, target);
        }