Esempio n. 1
0
        // Function from file: soulstone.dm
        public override dynamic attack_self(dynamic user = null, dynamic flag = null, bool?emp = null)
        {
            string dat = null;
            Mob_Living_SimpleAnimal_Shade A = null;


            if (!(Map13.GetDistance(this, user) <= 1))
            {
                return(null);
            }

            if (!GlobalFuncs.iscultist(user) && !GlobalFuncs.iswizard(user) && !this.usability)
            {
                ((Mob)user).Paralyse(5);
                user.WriteMsg("<span class='userdanger'>Your body is wracked with debilitating pain!</span>");
                return(null);
            }
            ((Mob)user).set_machine(this);
            dat = "<TT><B>Soul Stone</B><BR>";

            foreach (dynamic _a in Lang13.Enumerate(this, typeof(Mob_Living_SimpleAnimal_Shade)))
            {
                A = _a;

                dat += "Captured Soul: " + A.name + "<br>";
                dat += new Txt("<A href='byond://?src=").Ref(this).str(";choice=Summon'>Summon Shade</A>").ToString();
                dat += "<br>";
                dat += new Txt("<a href='byond://?src=").Ref(this).str(";choice=Close'>Close</a>").ToString();
            }
            Interface13.Browse(user, dat, "window=aicard");
            GlobalFuncs.onclose(user, "aicard");
            return(null);
        }
Esempio n. 2
0
        // Function from file: soulstone.dm
        public void init_shade(Obj_Item_Device_Soulstone C = null, dynamic T = null, dynamic U = null, bool?vic = null)
        {
            vic = vic ?? false;

            Dynamic_Overlay animation       = null;
            Mob_Living_SimpleAnimal_Shade S = null;

            new Obj_Effect_Decal_Remains_Human(T.loc);
            T.invisibility       = 101;
            animation            = new Dynamic_Overlay(T.loc);
            animation.icon_state = "blank";
            animation.icon       = "icons/mob/mob.dmi";
            animation.master     = T;
            Icon13.Flick("dust-h", animation);
            GlobalFuncs.qdel(animation);
            S               = new Mob_Living_SimpleAnimal_Shade(T.loc);
            S.loc           = C;
            S.status_flags |= 4096;
            S.canmove       = false;
            S.name          = "Shade of " + T.real_name;
            S.real_name     = "Shade of " + T.real_name;
            S.key           = T.key;
            S.faction      |= new Txt().Ref(U).ToString();

            if (GlobalFuncs.iscultist(U))
            {
                ((GameMode)GlobalVars.ticker.mode).add_cultist(S.mind);
            }
            S.__CallVerb("Cancel Camera View");
            C.icon_state = "soulstone2";
            C.name       = "Soul Stone: " + S.real_name;

            if (GlobalFuncs.iswizard(U) || this.usability)
            {
                S.WriteMsg("Your soul has been captured! You are now bound to " + U.real_name + "'s will. Help them succeed in their goals at all costs.");
            }
            else if (GlobalFuncs.iscultist(U))
            {
                S.WriteMsg("Your soul has been captured! You are now bound to the cult's will. Help them succeed in their goals at all costs.");
            }
            C.imprinted = "" + S.name;

            if (vic == true)
            {
                U.WriteMsg("<span class='info'><b>Capture successful!</b>:</span> " + T.real_name + "'s soul has been ripped from their body and stored within the soul stone.");
                U.WriteMsg("The soulstone has been imprinted with " + S.real_name + "'s mind, it will no longer react to other souls.");
            }
            return;
        }
Esempio n. 3
0
        // Function from file: soulstone.dm
        public override dynamic Topic(string href = null, ByTable href_list = null, dynamic hsrc = null)
        {
            Mob U = null;
            Mob_Living_SimpleAnimal_Shade A = null;

            U = Task13.User;

            if (!(Map13.GetDistance(this, U) <= 1) || U.machine != this)
            {
                Interface13.Browse(U, null, "window=aicard");
                U.unset_machine();
                return(null);
            }
            this.add_fingerprint(U);
            U.set_machine(this);

            dynamic _b = href_list["choice"];             // Was a switch-case, sorry for the mess.

            if (_b == "Close")
            {
                Interface13.Browse(U, null, "window=aicard");
                U.unset_machine();
                return(null);
            }
            else if (_b == "Summon")
            {
                foreach (dynamic _a in Lang13.Enumerate(this, typeof(Mob_Living_SimpleAnimal_Shade)))
                {
                    A = _a;

                    A.status_flags &= 61439;
                    A.canmove       = true;
                    A.loc           = U.loc;
                    A.__CallVerb("Cancel Camera View");
                    this.icon_state = "soulstone";

                    if (GlobalFuncs.iswizard(U) || this.usability)
                    {
                        A.WriteMsg("<b>You have been released from your prison, but you are still bound to " + U.real_name + "'s will. Help them succeed in their goals at all costs.</b>");
                    }
                    else if (GlobalFuncs.iscultist(U))
                    {
                        A.WriteMsg("<b>You have been released from your prison, but you are still bound to the cult's will. Help them succeed in their goals at all costs.</b>");
                    }
                }
            }
            this.attack_self(U);
            return(null);
        }