예제 #1
0
        // Function from file: augments_internal.dm
        public override double emp_act(int severity = 0)
        {
            double?      range  = null;
            dynamic      A      = null;
            Base_Dynamic L_item = null;
            Ent_Dynamic  R_item = null;


            if (!Lang13.Bool(this.owner))
            {
                return(0);
            }
            range  = (severity != 0 ? 10 : 5);
            L_item = this.owner.l_hand;
            R_item = this.owner.r_hand;
            this.release_items();
            base.emp_act(severity);

            if (L_item != null)
            {
                A = Rand13.PickFromTable(Map13.FetchInViewExcludeThis(null, range));
                ((dynamic)L_item).throw_at(A, range, 2);
                this.owner.WriteMsg("<span class='notice'>Your left arm spasms and throws the " + L_item.name + "!</span>");
            }

            if (R_item != null)
            {
                A = Rand13.PickFromTable(Map13.FetchInViewExcludeThis(null, range));
                R_item.throw_at(A, range, 2);
                this.owner.WriteMsg("<span class='notice'>Your right arm spasms and throws the " + R_item.name + "!</span>");
            }
            return(0);
        }
예제 #2
0
        // Function from file: alert.dm
        public dynamic reorganize_alerts(  )
        {
            dynamic _default = null;

            ByTable      alerts    = null;
            string       icon_pref = null;
            int?         i         = null;
            int?         i2        = null;
            Base_Dynamic alert     = null;

            alerts = this.mymob.alerts;

            if (!this.hud_shown)
            {
                i = null;
                i = 1;

                while ((i ?? 0) <= alerts.len)
                {
                    this.mymob.client.screen.Remove(alerts[alerts[i]]);
                    i++;
                }
                return(1);
            }
            i2 = null;
            i2 = 1;

            while ((i2 ?? 0) <= alerts.len)
            {
                alert = alerts[alerts[i2]];

                if (alert.icon_state == "template")
                {
                    if (!Lang13.Bool(icon_pref))
                    {
                        icon_pref = GlobalFuncs.ui_style2icon(this.mymob.client.prefs.UI_style);
                    }
                    alert.icon = icon_pref;
                }

                switch ((int?)(i2))
                {
                case 1:
                    _default = "EAST-1:28,CENTER+5:27";
                    break;

                case 2:
                    _default = "EAST-1:28,CENTER+4:25";
                    break;

                case 3:
                    _default = "EAST-1:28,CENTER+3:23";
                    break;

                case 4:
                    _default = "EAST-1:28,CENTER+2:21";
                    break;

                case 5:
                    _default = "EAST-1:28,CENTER+1:19";
                    break;

                default:
                    _default = "";
                    break;
                }
                alert.screen_loc = _default;
                this.mymob.client.screen.Or(alert);
                i2++;
            }
            return(1);
        }
예제 #3
0
        // Function from file: augments_internal.dm
        public override void ui_action_click(  )
        {
            int msg = 0;

            this.active = !this.active;

            if (this.active)
            {
                this.l_hand_obj = this.owner.l_hand;
                this.r_hand_obj = this.owner.r_hand;

                if (this.l_hand_obj != null)
                {
                    if (Lang13.Bool(this.owner.l_hand.flags & 2))
                    {
                        this.l_hand_ignore = true;
                    }
                    else
                    {
                        this.owner.l_hand.flags |= 2;
                        this.l_hand_ignore       = false;
                    }
                }

                if (this.r_hand_obj != null)
                {
                    if (Lang13.Bool(this.owner.r_hand.flags & 2))
                    {
                        this.r_hand_ignore = true;
                    }
                    else
                    {
                        this.owner.r_hand.flags |= 2;
                        this.r_hand_ignore       = false;
                    }
                }

                if (!(this.l_hand_obj != null) && !(this.r_hand_obj != null))
                {
                    this.owner.WriteMsg("<span class='notice'>You are not holding any items, your hands relax...</span>");
                    this.active = false;
                }
                else
                {
                    msg  = 0;
                    msg += (!this.l_hand_ignore && this.l_hand_obj != null ? true : false) ?1:0;
                    msg += (!this.r_hand_ignore && this.r_hand_obj != null ? 2 : 0);

                    switch ((int)(msg))
                    {
                    case 1:
                        this.owner.WriteMsg("<span class='notice'>Your left hand's grip tightens.</span>");
                        break;

                    case 2:
                        this.owner.WriteMsg("<span class='notice'>Your right hand's grip tightens.</span>");
                        break;

                    case 3:
                        this.owner.WriteMsg("<span class='notice'>Both of your hand's grips tighten.</span>");
                        break;
                    }
                }
            }
            else
            {
                this.release_items();
                this.owner.WriteMsg("<span class='notice'>Your hands relax...</span>");
                this.l_hand_obj = null;
                this.r_hand_obj = null;
            }
            return;
        }