public void AttackTarget(Monster monster) { int loss = (random.NextDouble() < 0.5) ? 100 : 200; if (loss == 200) { Console.WriteLine("出现了暴击!!"); } monster.Notify(loss); }
public void AttackTarget(Monster monster) { //木剑伤害值是20 monster.Notify(20); }
public void AttackTarget(Monster monster) { //铁剑的伤害值是50 monster.Notify(50); }