Ejemplo n.º 1
0
        public int BattleEnd(PlayerFighter player)
        {
            message = DateTime.Now.ToString("HH:mm:ss") + "BattleEnded\n" + Environment.NewLine;
            bool win = true;

            if (fp.Durability <= 0)
            {
                win = false;
            }

            int win2 = 1;

            if (fp.Durability <= 0)
            {
                win2 = 2;
                if (sp.Durability <= 0)
                {
                    message = message + DateTime.Now.ToString("HH:mm:ss") + ": It`s a draw!" + Environment.NewLine;
                    win2    = 3;
                }
                else
                {
                    message = message + DateTime.Now.ToString("HH:mm:ss") + ": Winner is " + sp.Name + Environment.NewLine;
                }
            }
            else
            {
                message = message + DateTime.Now.ToString("HH:mm:ss") + ": Winner is " + fp.Name + Environment.NewLine;
            }

            int z = player.expgot(win, sp.Level, durp2 - sp.Durability, durp1 - fp.Durability);

            player.statist_change(win2);
            return(z);
        }
Ejemplo n.º 2
0
 private void surr_Click(object sender, EventArgs e)
 {
     currplayer1.statist_change(2);
     currplayer1.save(currplayer1);
     this.Close();
 }