Beispiel #1
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;
        }
Beispiel #2
0
        public void smite(  )
        {
            bool       has_smitten = false;
            Mob_Living L           = null;


            if (!this.ability_cost(40, false, true))
            {
                return;
            }

            if (!(Map13.FetchInRange(this.god_nexus, 7) != null))
            {
                this.WriteMsg("You lack the strength to smite this far from your nexus.");
                return;
            }
            has_smitten = false;

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

                L.adjustFireLoss(20);
                L.adjustBruteLoss(20);
                L.WriteMsg("<span class='danger'><B>You feel the wrath of " + this.name + "!<B></span>");
                has_smitten = true;
            }

            if (has_smitten)
            {
                this.add_faith(-40);
            }
            return;
        }
Beispiel #3
0
        // Function from file: turf.dm
        public void phase_damage_creatures(int damage = 0, dynamic U = null)
        {
            Mob_Living M  = null;
            Obj_Mecha  M2 = null;


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


                if (M == U)
                {
                    continue;
                }
                M.adjustBruteLoss(damage);
                M.Paralyse(damage / 5);
            }

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

                M2.take_damage(damage * 2, "brute");
            }
            return;
        }
Beispiel #4
0
        // Function from file: mushroom.dm
        public override bool attack_animal(Mob_Living user = null)
        {
            Mob_Living M          = null;
            double     level_gain = 0;


            if (user is Mob_Living_SimpleAnimal_Hostile_Mushroom && this.stat == 2)
            {
                M = user;

                if (this.faint_ticker < 2)
                {
                    M.visible_message("" + M + " chews a bit on " + this + ".");
                    this.faint_ticker++;
                    return(false);
                }
                M.visible_message("<span class='warning'>" + M + " devours " + this + "!</span>");
                level_gain = (this.powerlevel ?? 0) - Convert.ToDouble(((dynamic)M).powerlevel);

                if (level_gain >= -1 && !this.bruised && !Lang13.Bool(M.ckey))
                {
                    if (level_gain < 1)
                    {
                        level_gain = 1;
                    }
                    ((Mob_Living_SimpleAnimal_Hostile_Mushroom)M).LevelUp(level_gain);
                }
                M.adjustBruteLoss(-M.maxHealth);
                GlobalFuncs.qdel(this);
            }
            base.attack_animal(user);
            return(false);
        }
        // Function from file: mining_mobs.dm
        public void Trip(  )
        {
            Mob_Living M = null;


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

                this.visible_message("<span class='danger'>The " + this.name + " grabs hold of " + M.name + "!</span>");
                M.Stun(5);
                M.adjustBruteLoss(Rand13.Int(10, 15));
                this.latched = true;
            }

            if (!this.latched)
            {
                GlobalFuncs.qdel(this);
            }
            else
            {
                Task13.Schedule(50, (Task13.Closure)(() => {
                    GlobalFuncs.qdel(this);
                    return;
                }));
            }
            return;
        }
Beispiel #6
0
 // Function from file: weather.dm
 public virtual void storm_act(Mob_Living L = null)
 {
     if (Rand13.PercentChance(30))
     {
         L.WriteMsg("You're buffeted by the storm!");
         L.adjustBruteLoss(1);
     }
     return;
 }
Beispiel #7
0
        // Function from file: species_types.dm
        public override void spec_life(Mob_Living H = null)
        {
            Reagent_Toxin_Slimejelly S = null;


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

            if (!H.reagents.get_reagent_amount("slimejelly"))
            {
                if (this.recently_changed)
                {
                    H.reagents.add_reagent("slimejelly", 80);
                    this.recently_changed = false;
                }
                else
                {
                    H.reagents.add_reagent("slimejelly", 5);
                    H.adjustBruteLoss(5);
                    H.WriteMsg("<span class='danger'>You feel empty!</span>");
                }
            }

            foreach (dynamic _a in Lang13.Enumerate(H.reagents.reagent_list, typeof(Reagent_Toxin_Slimejelly)))
            {
                S = _a;


                if (S.volume < 100)
                {
                    if (H.nutrition >= 150)
                    {
                        H.reagents.add_reagent("slimejelly", 0.5);
                        H.nutrition -= 2.5;
                    }
                }

                if (S.volume < 50)
                {
                    if (Rand13.PercentChance(5))
                    {
                        H.WriteMsg("<span class='danger'>You feel drained!</span>");
                    }
                }

                if (S.volume < 10)
                {
                    H.losebreath++;
                }
            }
            return;
        }
Beispiel #8
0
        // Function from file: statue.dm
        public override int?process(dynamic seconds = null)
        {
            Mob_Living M = null;

            this.timer--;

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

                M.setToxLoss(this.intialTox);
                M.adjustFireLoss(this.intialFire - M.getFireLoss());
                M.adjustBruteLoss(this.intialBrute - M.getBruteLoss());
                M.setOxyLoss(this.intialOxy);
            }

            if (this.timer <= 0)
            {
                this.dump_contents();
                GlobalVars.SSobj.processing.Remove(this);
                GlobalFuncs.qdel(this);
            }
            return(null);
        }
Beispiel #9
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 #10
0
        // Function from file: equipment_locker.dm
        public Obj_Effect_Resonance(dynamic loc = null, dynamic creator = null, int timetoburst = 0) : base((object)(loc))
        {
            dynamic    proj_turf   = null;
            dynamic    M           = null;
            GasMixture environment = null;
            double     pressure    = 0;
            Mob_Living L           = null;
            Mob_Living L2          = null;

            proj_turf = GlobalFuncs.get_turf(this);

            if (!(proj_turf is Tile))
            {
                return;
            }

            if (proj_turf is Tile_Simulated_Mineral)
            {
                M = proj_turf;
                Task13.Schedule(timetoburst, (Task13.Closure)(() => {
                    GlobalFuncs.playsound(this, "sound/weapons/resonator_blast.ogg", 50, 1);
                    M.gets_drilled(creator);
                    GlobalFuncs.qdel(this);
                    return;
                }));
            }
            else
            {
                environment = ((Ent_Static)proj_turf).return_air();
                pressure    = environment.return_pressure();

                if (pressure < 50)
                {
                    this.name             = "strong resonance field";
                    this.resonance_damage = 50;
                }
                Task13.Schedule(timetoburst, (Task13.Closure)(() => {
                    GlobalFuncs.playsound(this, "sound/weapons/resonator_blast.ogg", 50, 1);

                    if (Lang13.Bool(creator))
                    {
                        foreach (dynamic _a in Lang13.Enumerate(this.loc, typeof(Mob_Living)))
                        {
                            L = _a;

                            GlobalFuncs.add_logs(creator, L, "used a resonator field on", "resonator");
                            L.WriteMsg("<span class='danger'>The " + this.name + " ruptured with you in it!</span>");
                            L.adjustBruteLoss(this.resonance_damage);
                        }
                    }
                    else
                    {
                        foreach (dynamic _b in Lang13.Enumerate(this.loc, typeof(Mob_Living)))
                        {
                            L2 = _b;

                            L2.WriteMsg("<span class='danger'>The " + this.name + " ruptured with you in it!</span>");
                            L2.adjustBruteLoss(this.resonance_damage);
                        }
                    }
                    GlobalFuncs.qdel(this);
                    return;
                }));
            }
            return;
        }