Ejemplo n.º 1
0
        public virtual bool battle()
        {
            int    rand    = Random_.Next(0, 2);
            string monster = getRandomMonster();

            if (boss == true)
            {
                BossFight oFight = new BossFight(monster, oHero);
                oFight.startFight(this);

                if (oHero.getLife() > 0)
                {
                    oHero.setPergaminho(true);
                }
            }
            else if ((monster != null))
            {
                if (rand == 0)
                {
                    Console.WriteLine("Exploring the place you see a group of monsters");
                    normalFight oFight = new normalFight(monster, oHero);
                    oFight.startFight(this);
                    if (oHero.getLife() < 1)
                    {
                        return(true);
                    }
                    else
                    {
                        //sortear uns objetos
                    }
                }
            }
            return(false);
        }
Ejemplo n.º 2
0
        public static void Main()
        {
            //MonsterFactory oFactory = new MonsterFactory();
            //Monster oZombie = oFactory.CreateMonster("Zombie", 1);
            //Monster oSpider = oFactory.CreateMonster("GigantSpider", 1);
            //oZombie.showStatus();
            //oSpider.showStatus();

            normalFight oFight = new normalFight();

            oFight.startFight();
        }
Ejemplo n.º 3
0
        public override bool battle()
        {
            int    rand    = Random_.Next(0, 2);
            string monster = getRandomMonster();

            if (monster != null)
            {
                if (rand == 0)
                {
                    Console.WriteLine("You got surrounded by enemies!");
                    normalFight oFight = new normalFight(monster, oHero);
                    oFight.startFight(this);

                    if (oHero.getLife() < 1)
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }