Esempio n. 1
0
        // Function from file: snacks.dm
        public override bool attack_animal(Mob_Living user = null)
        {
            dynamic sattisfaction_text = null;


            if (user is Mob_Living_SimpleAnimal)
            {
                if (user is Mob_Living_SimpleAnimal_Pet_Dog_Corgi)
                {
                    if (this.bitecount == 0 || Rand13.PercentChance(50))
                    {
                        user.emote("me", 1, new Txt("nibbles away at ").the(this).item().ToString());
                    }
                    this.bitecount++;

                    if (this.bitecount >= 5)
                    {
                        sattisfaction_text = Rand13.Pick(new object [] { "burps from enjoyment", "yaps for more", "woofs twice", new Txt("looks at the area where ").the(this).item().str(" was").ToString() });

                        if (Lang13.Bool(sattisfaction_text))
                        {
                            user.emote("me", 1, "" + sattisfaction_text);
                        }
                        GlobalFuncs.qdel(this);
                    }
                }
            }
            return(false);
        }
Esempio n. 2
0
        // Function from file: door.dm
        public void crush(  )
        {
            Mob_Living L        = null;
            Ent_Static location = null;
            Obj_Mecha  M        = null;


            foreach (dynamic _a in Lang13.Enumerate(GlobalFuncs.get_turf(this), typeof(Mob_Living)))
            {
                L = _a;


                if (L is Mob_Living_Carbon_Alien)
                {
                    L.adjustBruteLoss(22.5);
                    L.emote("roar");
                }
                else if (L is Mob_Living_Carbon_Human)
                {
                    L.adjustBruteLoss(15);
                    L.emote("scream");
                    L.Weaken(5);
                }
                else if (L is Mob_Living_Carbon_Monkey)
                {
                    L.adjustBruteLoss(15);
                    L.Weaken(5);
                }
                else
                {
                    L.adjustBruteLoss(15);
                }
                location = this.loc;

                if (location is Tile_Simulated)
                {
                    location.add_blood_floor(L);
                }
            }

            foreach (dynamic _b in Lang13.Enumerate(GlobalFuncs.get_turf(this), typeof(Obj_Mecha)))
            {
                M = _b;

                M.take_damage(15);
            }
            return;
        }
Esempio n. 3
0
        // Function from file: mutations.dm
        public override void on_life(Mob_Living owner = null)
        {
            int x_offset_old = 0;
            int y_offset_old = 0;
            int x_offset     = 0;
            int y_offset     = 0;


            if (Rand13.PercentChance(10) && owner.paralysis <= 1)
            {
                owner.Stun(10);

                dynamic _a = Rand13.Int(1, 3);                   // Was a switch-case, sorry for the mess.
                if (2 <= _a && _a <= 3)
                {
                    owner.say("" + (Rand13.PercentChance(50) ? ";" : "") + Rand13.Pick(new object [] { "SHIT", "PISS", "F**K", "C**T", "C********R", "M**********R", "T**S" }));
                }
                else if (_a == 1)
                {
                    owner.emote("twitch");
                }
                x_offset_old = owner.pixel_x;
                y_offset_old = owner.pixel_y;
                x_offset     = owner.pixel_x + Rand13.Int(-2, 2);
                y_offset     = owner.pixel_y + Rand13.Int(-1, 1);
                Icon13.Animate(new ByTable().Set(1, owner).Set("pixel_x", x_offset).Set("pixel_y", y_offset).Set("time", 1));
                Icon13.Animate(new ByTable().Set(1, owner).Set("pixel_x", x_offset_old).Set("pixel_y", y_offset_old).Set("time", 1));
            }
            return;
        }
Esempio n. 4
0
 // Function from file: mutations.dm
 public override void on_life(Mob_Living owner = null)
 {
     if (Rand13.PercentChance(5) && owner.paralysis <= 1)
     {
         owner.drop_item();
         owner.emote("cough");
     }
     return;
 }
Esempio n. 5
0
 // Function from file: effects_smoke.dm
 public override bool smoke_mob(Mob_Living C = null)
 {
     if (base.smoke_mob(C))
     {
         C.drop_item();
         C.Sleeping(Num13.MaxInt(C.sleeping, 10));
         C.emote("cough");
         return(true);
     }
     return(false);
 }
 // Function from file: effects_smoke.dm
 public override bool smoke_mob(Mob_Living C = null)
 {
     if (base.smoke_mob(C))
     {
         C.drop_item();
         C.adjustOxyLoss(1);
         C.emote("cough");
         return(true);
     }
     return(false);
 }
 // Function from file: martial.dm
 public bool wristWrench(dynamic A = null, Mob_Living D = null)
 {
     if (!(D.stat != 0) && !(D.stunned != 0) && !(D.weakened != 0))
     {
         D.visible_message("<span class='warning'>" + A + " grabs " + D + "'s wrist and wrenches it sideways!</span>", "<span class='userdanger'>" + A + " grabs your wrist and violently wrenches it to the side!</span>");
         GlobalFuncs.playsound(GlobalFuncs.get_turf(A), "sound/weapons/thudswoosh.ogg", 50, 1, -1);
         D.emote("scream");
         D.drop_item();
         D.apply_damage(5, "brute", Rand13.Pick(new object [] { "l_arm", "r_arm" }));
         D.Stun(3);
         return(true);
     }
     return(this.basic_hit(A, D));
 }
Esempio n. 8
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;
        }