Exemple #1
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                bool hasKnife = false;

                foreach (Item item in from.Backpack.Items)
                {
                    if (item is BaseKnife)
                    {
                        hasKnife = true;
                    }
                }

                if (hasKnife && targeted is PlayerMobile && !(targeted == from))
                {
                    Item v = new BloodVial();
                    from.AddToBackpack(v);
                    m_Vial.Consume();
                }
                else if (!hasKnife)
                {
                    from.SendMessage("You are missing a knife.");
                }
                else
                {
                    from.SendMessage("The blood evaporates upon hitting the vial.");
                }
            }
Exemple #2
0
 public InternalTarget(BloodVial vial)
     : base(2, false, TargetFlags.None)
 {
     m_Vial = vial;
 }