Example #1
0
        void Pelea()
        {
            int r = rnd.Next(1, 100);

            if (r <= 20)
            {
                Combate cmbt = new Combate();
                this.AddOwnedForm(cmbt);
                if (this.OwnedForms != null)
                {
                    cmbt.Show();
                }
            }
        }
Example #2
0
        void Pelea(Casilla csl)
        {
            this.Enabled = false;
            int r = rnd.Next(1, 100);

            if (r <= 20)
            {
                Combate cmbt = new Combate(ref player, csl);

                //EstadisticasCombate cmbt = new EstadisticasCombate(ref player);
                this.AddOwnedForm(cmbt);
                if (this.OwnedForms != null)
                {
                    cmbt.Show();
                    cantCombates++;
                    if (cantCombates == 5)
                    {
                        pintarPuertaSalida();
                    }
                }
            }
        }