Beispiel #1
0
        // Function from file: shadowling.dm
        public override void spec_life(Mob_Living H = null)
        {
            double     light_amount = 0;
            Ent_Static T            = null;


            if (!H.weakeyes)
            {
                H.weakeyes = true;
            }
            light_amount = 0;
            H.nutrition  = 450;

            if (H.loc is Tile)
            {
                T            = H.loc;
                light_amount = ((Tile)T).get_lumcount();

                if (light_amount > 4 && !(H.incorporeal_move != 0))
                {
                    H.take_overall_damage(0, 3.5);
                }
                else if (light_amount < 2)
                {
                    H.heal_overall_damage(2, 2);
                    H.adjustToxLoss(-5);
                    H.adjustBrainLoss(-25);
                    H.adjustCloneLoss(-1);
                }
            }
            return;
        }
Beispiel #2
0
 // Function from file: species_types.dm
 public override bool handle_chemicals(dynamic chem = null, Mob_Living H = null)
 {
     if (chem.id == "plantbgone")
     {
         H.adjustToxLoss(3);
         H.reagents.remove_reagent(chem.id, 0.4);
         return(true);
     }
     return(false);
 }
Beispiel #3
0
        // Function from file: shadowling.dm
        public override void spec_life(Mob_Living H = null)
        {
            double     light_amount = 0;
            Ent_Static T            = null;


            if (!H.weakeyes)
            {
                H.weakeyes = true;
            }
            light_amount = 0;
            H.nutrition  = 450;

            if (H.loc is Tile)
            {
                T            = H.loc;
                light_amount = ((Tile)T).get_lumcount();

                if (light_amount > 4 && !(H.incorporeal_move != 0))
                {
                    H.take_overall_damage(0, 7);

                    if (H.stat != 2)
                    {
                        H.WriteMsg("<span class='userdanger'>The light burns you!</span>");
                        H.WriteMsg("sound/weapons/sear.ogg");
                    }
                }
                else if (light_amount < 2)
                {
                    H.heal_overall_damage(5, 5);
                    H.adjustToxLoss(-5);
                    H.adjustBrainLoss(-25);
                    H.adjustCloneLoss(-1);
                    H.SetWeakened(0);
                    H.SetStunned(0);
                }
            }
            return;
        }
Beispiel #4
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 #5
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 #6
0
        // Function from file: revenant_abilities.dm
        public override bool cast(dynamic targets = null, dynamic thearea = null, dynamic user = null)
        {
            thearea = thearea ?? Task13.User;

            dynamic                   T           = null;
            Mob_Living                mob         = null;
            Mob_Living                H           = null;
            bool                      blightfound = false;
            Disease_Revblight         blight      = null;
            Obj_Effect_Spacevine      vine        = null;
            Obj_Effect_Glowshroom     shroom      = null;
            Obj_Machinery_Hydroponics tray        = null;


            if (this.attempt_cast(thearea))
            {
                foreach (dynamic _f in Lang13.Enumerate(targets))
                {
                    T = _f;

                    Task13.Schedule(0, (Task13.Closure)(() => {
                        foreach (dynamic _b in Lang13.Enumerate(T.contents, typeof(Mob_Living)))
                        {
                            mob = _b;


                            if (mob == thearea)
                            {
                                continue;
                            }
                            GlobalFuncs.PoolOrNew(typeof(Obj_Effect_Overlay_Temp_Revenant), mob.loc);

                            if (mob is Mob_Living_Carbon)
                            {
                                if (mob is Mob_Living_Carbon_Human)
                                {
                                    H = mob;

                                    if (Lang13.Bool(((dynamic)H).dna) && Lang13.Bool(((dynamic)H).dna.species))
                                    {
                                        ((Species)((dynamic)H).dna.species).handle_mutant_bodyparts(H, "#1d2953");
                                        ((Species)((dynamic)H).dna.species).handle_hair(H, "#1d2953");
                                        ((Species)((dynamic)H).dna.species).update_color(H, "#1d2953");
                                        Task13.Schedule(20, (Task13.Closure)(() => {
                                            if (H != null && Lang13.Bool(((dynamic)H).dna) && Lang13.Bool(((dynamic)H).dna.species))
                                            {
                                                ((Species)((dynamic)H).dna.species).handle_mutant_bodyparts(H);
                                                ((Species)((dynamic)H).dna.species).handle_hair(H);
                                                ((Species)((dynamic)H).dna.species).update_color(H);
                                            }
                                            return;
                                        }));
                                    }
                                    blightfound = false;

                                    foreach (dynamic _a in Lang13.Enumerate(H.viruses, typeof(Disease_Revblight)))
                                    {
                                        blight = _a;

                                        blightfound = true;

                                        if ((blight.stage ?? 0) < 5)
                                        {
                                            blight.stage++;
                                        }
                                    }

                                    if (!blightfound)
                                    {
                                        H.AddDisease(new Disease_Revblight());
                                        H.WriteMsg("<span class='revenminor'>You feel " + Rand13.Pick(new object [] { "suddenly sick", "a surge of nausea", "like your skin is <span class='italics'>wrong</span>" }) + ".</span>");
                                    }
                                }
                                else if (mob.reagents != null)
                                {
                                    mob.reagents.add_reagent("plasma", 5);
                                }
                            }
                            else
                            {
                                mob.adjustToxLoss(5);
                            }
                        }

                        foreach (dynamic _c in Lang13.Enumerate(T.contents, typeof(Obj_Effect_Spacevine)))
                        {
                            vine = _c;

                            vine.color = "#823abb";
                            GlobalFuncs.PoolOrNew(typeof(Obj_Effect_Overlay_Temp_Revenant), vine.loc);
                            Task13.Schedule(20, (Task13.Closure)(() => {
                                if (vine != null)
                                {
                                    GlobalFuncs.qdel(vine);
                                }
                                return;
                            }));
                        }

                        foreach (dynamic _d in Lang13.Enumerate(T.contents, typeof(Obj_Effect_Glowshroom)))
                        {
                            shroom = _d;

                            shroom.color = "#823abb";
                            GlobalFuncs.PoolOrNew(typeof(Obj_Effect_Overlay_Temp_Revenant), shroom.loc);
                            Task13.Schedule(20, (Task13.Closure)(() => {
                                if (shroom != null)
                                {
                                    GlobalFuncs.qdel(shroom);
                                }
                                return;
                            }));
                        }

                        foreach (dynamic _e in Lang13.Enumerate(T.contents, typeof(Obj_Machinery_Hydroponics)))
                        {
                            tray = _e;

                            GlobalFuncs.PoolOrNew(typeof(Obj_Effect_Overlay_Temp_Revenant), tray.loc);
                            tray.pestlevel = Rand13.Int(8, 10);
                            tray.weedlevel = Rand13.Int(8, 10);
                            tray.toxic     = Rand13.Int(45, 55);
                        }
                        return;
                    }));
                }
            }
            return(false);
        }