示例#1
0
        public void AttackTarget(Monster monster)
        {
            int loss = (random.NextDouble() < 0.5) ? 100 : 200;

            if (loss == 200)
            {
                Console.WriteLine("出现了暴击!!");
            }
            monster.Notify(loss);
        }
示例#2
0
 public void AttackTarget(Monster monster)
 {
     //木剑伤害值是20
     monster.Notify(20);
 }
示例#3
0
 public void AttackTarget(Monster monster)
 {
     //铁剑的伤害值是50
     monster.Notify(50);
 }