Ejemplo n.º 1
0
        public override void Die(Entity byEntity)
        {
            ConsolePrinter.PrintAction(byEntity, "killed", this, true);
            OnEntityKilled(this);

            // Drop items  (give the player Potions and stuff.)
            Random rand = new Random();

            var luckFactor = rand.Next(1, 4);

            if (luckFactor == 1)
            {
                var item = GenerateItem();
                byEntity.ItemBag.Add(item);
                ConsolePrinter.PrintMessage(byEntity.Name + " gadered an item '" + item.Name + "' from " + Name + "!", false);
            }
        }
Ejemplo n.º 2
0
 public override void Die(Entity byEntity)
 {
     ConsolePrinter.PrintAction(byEntity, "killed", this, true);
     OnEntityKilled.Invoke(this);
 }