// Function from file: martial.dm
        public bool elbowDrop(dynamic A = null, Mob_Living D = null)
        {
            if (D.weakened != 0 || D.resting != 0 || D.stat != 0)
            {
                D.visible_message("<span class='warning'>" + A + " elbow drops " + D + "!</span>", "<span class='userdanger'>" + A + " piledrives you with their elbow!</span>");

                if (D.stat != 0)
                {
                    D.death();
                }
                D.apply_damage(50, "brute", "chest");
                GlobalFuncs.playsound(GlobalFuncs.get_turf(D), "sound/weapons/punch1.ogg", 75, 1, -1);
                return(true);
            }
            return(this.basic_hit(A, D));
        }
        // Function from file: absorb.dm
        public override dynamic sting_action(Mob user = null, Ent_Static target = null)
        {
            Changeling changeling     = null;
            dynamic    G              = null;
            Mob_Living target2        = null;
            int?       stage          = null;
            ByTable    recent_speech  = null;
            dynamic    spoken_memory  = null;
            dynamic    spoken_memory2 = null;

            changeling             = user.mind.changeling;
            G                      = user.get_active_hand();
            target2                = G.affecting;
            changeling.isabsorbing = true;
            stage                  = null;
            stage                  = 1;

            while ((stage ?? 0) <= 3)
            {
                switch ((int?)(stage))
                {
                case 1:
                    user.WriteMsg("<span class='notice'>This creature is compatible. We must hold still...</span>");
                    break;

                case 2:
                    user.visible_message("<span class='warning'>" + user + " extends a proboscis!</span>", "<span class='notice'>We extend a proboscis.</span>");
                    break;

                case 3:
                    user.visible_message("<span class='danger'>" + user + " stabs " + target2 + " with the proboscis!</span>", "<span class='notice'>We stab " + target2 + " with the proboscis.</span>");
                    target2.WriteMsg("<span class='userdanger'>You feel a sharp stabbing pain!</span>");
                    target2.take_overall_damage(40);
                    break;
                }
                GlobalFuncs.feedback_add_details("changeling_powers", "A" + stage);

                if (!GlobalFuncs.do_mob(user, target2, 150))
                {
                    user.WriteMsg("<span class='warning'>Our absorption of " + target2 + " has been interrupted!</span>");
                    changeling.isabsorbing = false;
                    return(null);
                }
                stage++;
            }
            user.visible_message("<span class='danger'>" + user + " sucks the fluids from " + target2 + "!</span>", "<span class='notice'>We have absorbed " + target2 + ".</span>");
            target2.WriteMsg("<span class='userdanger'>You are absorbed by the changeling!</span>");

            if (!changeling.has_dna(((dynamic)target2).dna))
            {
                changeling.add_new_profile(target2, user);
            }

            if (user.nutrition < 450)
            {
                user.nutrition = Num13.MinInt(((int)(user.nutrition + target2.nutrition)), 450);
            }

            if (target2.mind != null)
            {
                target2.mind.show_memory(this, false);
                recent_speech = new ByTable();

                if (target2.say_log.len > 8)
                {
                    recent_speech = target2.say_log.Copy(target2.say_log.len - 8 + 1, 0);
                }
                else
                {
                    foreach (dynamic _b in Lang13.Enumerate(target2.say_log))
                    {
                        spoken_memory = _b;


                        if (recent_speech.len >= 8)
                        {
                            break;
                        }
                        recent_speech.Add(spoken_memory);
                    }
                }

                if (recent_speech.len != 0)
                {
                    user.mind.store_memory("<B>Some of " + target2 + "'s speech patterns, we should study these to better impersonate them!</B>");
                    user.WriteMsg("<span class='boldnotice'>Some of " + target2 + "'s speech patterns, we should study these to better impersonate them!</span>");

                    foreach (dynamic _c in Lang13.Enumerate(recent_speech))
                    {
                        spoken_memory2 = _c;

                        user.mind.store_memory("\"" + spoken_memory2 + "\"");
                        user.WriteMsg("<span class='notice'>\"" + spoken_memory2 + "\"</span>");
                    }
                    user.mind.store_memory("<B>We have no more knowledge of " + target2 + "'s speech patterns.</B>");
                    user.WriteMsg("<span class='boldnotice'>We have no more knowledge of " + target2 + "'s speech patterns.</span>");
                }

                if (target2.mind.changeling != null)
                {
                    changeling.chem_charges  += Num13.MinInt(((int)(target2.mind.changeling.chem_charges)), Convert.ToInt32(changeling.chem_storage));
                    changeling.absorbedcount += target2.mind.changeling.absorbedcount;
                    target2.mind.changeling.stored_profiles.len = 1;
                    target2.mind.changeling.absorbedcount       = 0;
                }
            }
            changeling.chem_charges = Num13.MinInt(((int)(changeling.chem_charges + 10)), Convert.ToInt32(changeling.chem_storage));
            changeling.isabsorbing  = false;
            changeling.canrespec    = true;
            target2.death(false);
            ((dynamic)target2).Drain();
            return(1);
        }
Esempio n. 3
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;
        }