Esempio n. 1
0
        private void MagicButton_Click(object sender, EventArgs e)
        {
            Player   p = new Player("Magician", 50);
            Monster  m = new Slime();
            villager v = new villager("NPC");
            Slime    s = new Slime();
            //MessageBox.Show("Slime HP is:" + m.attack());
            string message = v.attack(p);

            MessageBox.Show(m.ReportPosition());
            MessageBox.Show(message);
        }
Esempio n. 2
0
        private void button2_Click_1(object sender, EventArgs e)
        {
            villager v1 = new villager("a");

            MessageBox.Show("" + v1.Talk() + "\nIam NPC1 \nmy HP is: " + v1.GetHP());
            //Monster m1= new Monster("monster1");
            Monster m2 = new Monster("monster2");

            //m1.Attack(v1);
            //m1.Attack(m2);
            MessageBox.Show("" + v1.Talk() + "\nNPC1 was attacked \nmy HP is: " + v1.GetHP());

            //MessageBox.Show("I am monster2\nmy HP is:" + m2.GetHP());
        }