Пример #1
0
        public dynamic steal_from_mob(  )
        {
            dynamic           stolen_item = null;
            Mob_Living_Carbon C           = null;


            if (this.stat != 0)
            {
                return(-1);
            }

            if (Lang13.Bool(this.held_item))
            {
                this.WriteMsg("<span class='warning'>You are already holding " + this.held_item + "!</span>");
                return(1);
            }
            stolen_item = null;

            foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInView(this, 1), typeof(Mob_Living_Carbon)))
            {
                C = _a;


                if (Lang13.Bool(C.l_hand) && Convert.ToDouble(C.l_hand.w_class) <= 2)
                {
                    stolen_item = C.l_hand;
                }

                if (Lang13.Bool(C.r_hand) && Convert.ToDouble(C.r_hand.w_class) <= 2)
                {
                    stolen_item = C.r_hand;
                }

                if (Lang13.Bool(stolen_item))
                {
                    C.unEquip(stolen_item);
                    this.held_item  = stolen_item;
                    stolen_item.loc = this;
                    this.visible_message("" + this + " grabs " + this.held_item + " out of " + C + "'s hand!", "<span class='notice'>You snag " + this.held_item + " out of " + C + "'s hand!</span>", "<span class='italics'>You hear the sounds of wings flapping furiously.</span>");
                    return(this.held_item);
                }
            }
            this.WriteMsg("<span class='warning'>There is nothing of interest to take!</spawn>");
            return(0);
        }