private void button2_Click(object sender, EventArgs e) { Random s = new Random(); int sum; sum = s.Next(1, 9) + info.Adaptibility; if (sum >= 7) { MessageBox.Show("Success!"); Breakroom n = new Breakroom(info); n.Show(); this.Hide(); } else { info.Energy = info.Energy - 3; if (info.Energy <= 0) { LoseScreen x = new LoseScreen(); x.Show(); this.Hide(); } else { MessageBox.Show("You overestimated your stealth.\n\nThe receptionist lets the security dog loose, but you only loose one finger, so you continue on."); Breakroom n = new Breakroom(info); n.Show(); this.Hide(); } } //determines what happens when button2 is clicked }
private void button1_Click(object sender, EventArgs e) { Random s = new Random(); int sum; sum = s.Next(1, 9) + info.Caffeine; if (sum >= 5) { MessageBox.Show("Success!"); Breakroom n = new Breakroom(info); n.Show(); this.Hide(); } else { info.Energy = info.Energy - 2; if (info.Energy <= 0) { LoseScreen x = new LoseScreen(); x.Show(); this.Hide(); } else { MessageBox.Show("The Receptionist is in a bad mood.\nThe cup of coffee has been thrown in your face."); Breakroom n = new Breakroom(info); n.Show(); this.Hide(); } } //determines what happens when button1 is clicked }