示例#1
0
        public override void Attack(Npc npc)
        {
            //my own thing here
            string swing     = Program.Ask("Do you swing from the left or the right ?").ToLower();
            int    tmpDamage = damage;

            if (swing == Program.handedNess)
            {
                tmpDamage *= 2;
            }

            npc.hitpoints -= tmpDamage;
            Program.Prompt($"You swung and did {tmpDamage} point of damage to '{npc.name}'");
            npc.HealthCheck();
        }
示例#2
0
 public virtual void Attack(Npc npc)
 {
     npc.hitpoints -= damage;
     Console.WriteLine($"You bludgeon the '{npc.name}' for {damage} point(s) of damage.");
     npc.HealthCheck();
 }