// Function from file: absorb.dm
        public override dynamic sting_action(Mob user = null, Ent_Static target = null)
        {
            dynamic           G          = null;
            Mob_Living        target2    = null;
            Changeling        changeling = null;
            Mob_Dead_Observer ghost      = null;

            G          = user.get_active_hand();
            target2    = G.affecting;
            changeling = user.mind.changeling;
            user.WriteMsg("<span class='notice'>We tighen our grip. We must hold still....</span>");
            target2.do_jitter_animation(500);
            ((Mob_Living)user).do_jitter_animation(500);

            if (!GlobalFuncs.do_mob(user, target2, 20))
            {
                user.WriteMsg("<span class='warning'>The body swap has been interrupted!</span>");
                return(null);
            }
            target2.WriteMsg("<span class='userdanger'>" + user + " tightens their grip as a painful sensation invades your body.</span>");

            if (!changeling.has_dna(((dynamic)target2).dna))
            {
                changeling.add_new_profile(target2, user);
            }
            changeling.remove_profile(user);
            ghost = target2.ghostize(false);
            user.mind.transfer_to(target2);

            if (ghost != null)
            {
                ghost.mind.transfer_to(user);

                if (Lang13.Bool(ghost.key))
                {
                    user.key = ghost.key;
                }
            }
            user.Paralyse(2);
            target2.WriteMsg("<span class='warning'>Our genes cry out as we swap our " + user + " form for " + target2 + ".</span>");
            return(null);
        }
示例#2
0
        // Function from file: morgue.dm
        public void cremate(Mob user = null)
        {
            Mob_Living M = null;
            Obj        O = null;


            if (this.locked)
            {
                return;
            }

            if (this.contents.len <= 1)
            {
                this.audible_message("<span class='italics'>You hear a hollow crackle.</span>");
                return;
            }
            else
            {
                this.audible_message("<span class='italics'>You hear a roar as the crematorium activates.</span>");
                this.locked = true;
                this.update_icon();

                foreach (dynamic _a in Lang13.Enumerate(this.contents, typeof(Mob_Living)))
                {
                    M = _a;


                    if (M.stat != 2)
                    {
                        M.emote("scream");
                    }

                    if (user != null)
                    {
                        user.attack_log.Add("[" + GlobalFuncs.time_stamp() + "] Cremated <b>" + M + "/" + M.ckey + "</b>");
                        GlobalFuncs.log_attack("[" + GlobalFuncs.time_stamp() + "] <b>" + user + "/" + user.ckey + "</b> cremated <b>" + M + "/" + M.ckey + "</b>");
                    }
                    else
                    {
                        GlobalFuncs.log_attack("[" + GlobalFuncs.time_stamp() + "] <b>UNKNOWN</b> cremated <b>" + M + "/" + M.ckey + "</b>");
                    }
                    M.death(true);

                    if (M != null)
                    {
                        M.ghostize();
                        GlobalFuncs.qdel(M);
                    }
                }

                foreach (dynamic _b in Lang13.Enumerate(this.contents, typeof(Obj)))
                {
                    O = _b;


                    if (O != this.connected)
                    {
                        GlobalFuncs.qdel(O);
                    }
                }
                new Obj_Effect_Decal_Cleanable_Ash(this);
                Task13.Sleep(30);
                this.locked = false;
                this.update_icon();
                GlobalFuncs.playsound(this.loc, "sound/machines/ding.ogg", 50, 1);
            }
            return;
        }