// 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);
 }
Beispiel #2
0
        // Function from file: species_types.dm
        public override void spec_life(Mob_Living H = null)
        {
            int        light_amount = 0;
            Ent_Static T            = null;


            if (H.stat == 2)
            {
                return;
            }
            light_amount = 0;

            if (H.loc is Tile)
            {
                T            = H.loc;
                light_amount = Num13.MinInt(10, ((int)(((Tile)T).get_lumcount()))) - 5;
                H.nutrition += light_amount;

                if (H.nutrition > 550)
                {
                    H.nutrition = 550;
                }

                if (light_amount > 2)
                {
                    H.heal_overall_damage(1, 1);
                    H.adjustToxLoss(-1);
                    H.adjustOxyLoss(-1);
                }
            }

            if (H.nutrition < 200)
            {
                H.take_overall_damage(2, 0);
            }
            return;
        }
Beispiel #3
0
        // Function from file: inflict_handler.dm
        public override bool cast(dynamic targets = null, dynamic thearea = null, dynamic user = null)
        {
            thearea = thearea ?? Task13.User;

            Mob_Living target   = null;
            Mob_Living C_target = null;
            dynamic    B        = null;


            foreach (dynamic _b in Lang13.Enumerate(targets, typeof(Mob_Living)))
            {
                target = _b;

                GlobalFuncs.playsound(target, this.sound, 50, 1);

                switch ((string)(this.destroys))
                {
                case "gib":
                    target.gib();
                    break;

                case "gib_brain":

                    if (target is Mob_Living_Carbon_Human || target is Mob_Living_Carbon_Monkey)
                    {
                        C_target = target;
                        B        = C_target.getorgan(typeof(Obj_Item_Organ_Internal_Brain));

                        if (Lang13.Bool(B))
                        {
                            B.loc = GlobalFuncs.get_turf(C_target);
                            B.transfer_identity(C_target);
                            ((dynamic)C_target).internal_organs -= B;
                        }
                    }
                    target.gib();
                    break;

                case "disintegrate":
                    target.dust();
                    break;
                }

                if (!(target != null))
                {
                    continue;
                }
                target.adjustBruteLoss(this.amt_dam_brute);
                target.adjustFireLoss(this.amt_dam_fire);
                target.adjustToxLoss(this.amt_dam_tox);
                target.adjustOxyLoss(this.amt_dam_oxy);
                target.Weaken(this.amt_weakened);
                target.Paralyse(this.amt_paralysis);
                target.Stun(this.amt_stunned);
                target.blind_eyes(this.amt_eye_blind);
                target.blur_eyes(this.amt_eye_blurry);

                if (Lang13.Bool(this.summon_type))
                {
                    Lang13.Call(this.summon_type, target.loc, target);
                }
            }
            return(false);
        }
Beispiel #4
0
        // Function from file: mob_grab.dm
        public override int?process(dynamic seconds = null)
        {
            dynamic G  = null;
            dynamic G2 = null;
            bool    h  = false;
            Obj_Item_Weapon_Grab G3 = null;
            Mob_Living           L  = null;


            if (!this.confirm())
            {
                return(0);
            }

            if (Lang13.Bool(this.assailant.client))
            {
                this.assailant.client.screen -= this.hud;
                this.assailant.client.screen += this.hud;
            }

            if (this.assailant.pulling == this.affecting)
            {
                this.assailant.__CallVerb("Stop Pulling");
            }

            if (this.state <= 2)
            {
                this.allow_upgrade = true;

                if (Lang13.Bool(this.assailant.l_hand) && this.assailant.l_hand != this && this.assailant.l_hand is Obj_Item_Weapon_Grab)
                {
                    G = this.assailant.l_hand;

                    if (G.affecting != this.affecting)
                    {
                        this.allow_upgrade = false;
                    }
                }

                if (Lang13.Bool(this.assailant.r_hand) && this.assailant.r_hand != this && this.assailant.r_hand is Obj_Item_Weapon_Grab)
                {
                    G2 = this.assailant.r_hand;

                    if (G2.affecting != this.affecting)
                    {
                        this.allow_upgrade = false;
                    }
                }

                if (this.state == 2)
                {
                    h = this.affecting.hand;
                    this.affecting.hand = false;
                    this.affecting.drop_item();
                    this.affecting.hand = true;
                    this.affecting.drop_item();
                    this.affecting.hand = h;

                    foreach (dynamic _a in Lang13.Enumerate(this.affecting.grabbed_by, typeof(Obj_Item_Weapon_Grab)))
                    {
                        G3 = _a;


                        if (G3 == this)
                        {
                            continue;
                        }

                        if (G3.state == 2)
                        {
                            this.allow_upgrade = false;
                        }
                    }
                }

                if (this.allow_upgrade)
                {
                    this.hud.icon_state = "reinforce";
                }
                else
                {
                    this.hud.icon_state = "!reinforce";
                }
            }
            else if (!(this.affecting.buckled != null))
            {
                this.affecting.loc = this.assailant.loc;
            }

            if (this.state >= 3)
            {
                this.affecting.Stun(5);

                if (this.affecting is Mob_Living)
                {
                    L = this.affecting;
                    L.adjustOxyLoss(1);
                }
            }

            if (this.state >= 5)
            {
                this.affecting.Weaken(5);
                this.affecting.losebreath = Num13.MinInt(this.affecting.losebreath + 2, 3);
            }
            return(null);
        }