示例#1
0
        // Function from file: pyrotechnics.dm
        public override void on_reaction(Reagents holder = null, double?created_volume = null)
        {
            dynamic           location = null;
            Mob_Living_Carbon C        = null;

            location = GlobalFuncs.get_turf(holder.my_atom);
            GlobalFuncs.playsound(location, "sound/effects/bang.ogg", 25, 1);

            foreach (dynamic _a in Lang13.Enumerate(GlobalFuncs.get_hearers_in_view((created_volume ?? 0) / 10, location), typeof(Mob_Living_Carbon)))
            {
                C = _a;


                if (C.check_ear_prot())
                {
                    continue;
                }
                C.show_message("<span class='warning'>BANG</span>", 2);
                C.Stun(5);
                C.Weaken(5);
                C.setEarDamage(C.ear_damage + Rand13.Int(0, 5), Num13.MaxInt(((int)(C.ear_deaf ?? 0)), 15));

                if (C.ear_damage >= 15)
                {
                    C.WriteMsg("<span class='warning'>Your ears start to ring badly!</span>");
                }
                else if (C.ear_damage >= 5)
                {
                    C.WriteMsg("<span class='warning'>Your ears start to ring!</span>");
                }
            }
            return;
        }
        // Function from file: shadowling_abilities.dm
        public override bool cast(dynamic targets = null, dynamic thearea = null, dynamic user = null)
        {
            thearea = thearea ?? Task13.User;

            dynamic           T = null;
            Mob_Living_Carbon M = null;


            if (!this.shadowling_check(thearea))
            {
                this.revert_cast();
                return(false);
            }
            thearea.WriteMsg("<span class='shadowling'>You freeze the nearby air.</span>");

            foreach (dynamic _b in Lang13.Enumerate(targets))
            {
                T = _b;


                foreach (dynamic _a in Lang13.Enumerate(T.contents, typeof(Mob_Living_Carbon)))
                {
                    M = _a;


                    if (GlobalFuncs.is_shadow_or_thrall(M))
                    {
                        if (M == thearea)
                        {
                            continue;
                        }
                        else
                        {
                            M.WriteMsg("<span class='danger'>You feel a blast of paralyzingly cold air wrap around you and flow past, but you are unaffected!</span>");
                            continue;
                        }
                    }
                    M.WriteMsg("<span class='userdanger'>A wave of shockingly cold air engulfs you!</span>");
                    M.Stun(2);
                    M.apply_damage(10, "fire");

                    if (Lang13.Bool(M.bodytemperature))
                    {
                        M.bodytemperature -= 200;
                    }

                    if (M.reagents != null)
                    {
                        M.reagents.add_reagent("frostoil", 15);
                    }
                }
            }
            return(false);
        }
示例#3
0
        // Function from file: runes.dm
        public override void invoke(dynamic user = null)
        {
            Mob_Living_Carbon C = null;
            dynamic           T = null;

            this.visible_message("<span class='warning'>" + this + " burns away, scorching the floor below!</span>");

            foreach (dynamic _a in Lang13.Enumerate(Map13.FetchViewers(null, this), typeof(Mob_Living_Carbon)))
            {
                C = _a;


                if (!GlobalFuncs.iscultist(C) && !Lang13.Bool(C.null_rod_check()))
                {
                    C.WriteMsg("<span class='cultlarge'>You feel your skin crisp as you burst into flames!</span>");
                    C.fire_act();
                }
            }
            user.apply_damage(15, "fire", Rand13.Pick(new object [] { "l_arm", "r_arm" }));
            user.WriteMsg("<span class='cultitalic'>" + this + " burns your arms!</span>");
            T = GlobalFuncs.get_turf(this);
            ((Tile_Simulated)T).burn_tile();
            GlobalFuncs.qdel(this);
            return;
        }
        // Function from file: shadowling_abilities.dm
        public override bool cast(dynamic targets = null, dynamic thearea = null, dynamic user = null)
        {
            thearea = thearea ?? Task13.User;

            dynamic           T  = null;
            Mob_Living_Carbon M  = null;
            Mob_Living_Carbon M2 = null;


            if (!this.shadowling_check(thearea))
            {
                this.revert_cast();
                return(false);
            }
            this.targetsDrained = 0;
            this.nearbyTargets  = new ByTable();

            foreach (dynamic _b in Lang13.Enumerate(targets))
            {
                T = _b;


                foreach (dynamic _a in Lang13.Enumerate(T.contents, typeof(Mob_Living_Carbon)))
                {
                    M = _a;


                    if (M == thearea)
                    {
                        continue;
                    }
                    this.targetsDrained++;
                    this.nearbyTargets.Add(M);
                }
            }

            if (!(this.targetsDrained != 0))
            {
                this.revert_cast();
                thearea.WriteMsg("<span class='warning'>There were no nearby humans for you to drain.</span>");
                return(false);
            }

            foreach (dynamic _c in Lang13.Enumerate(this.nearbyTargets, typeof(Mob_Living_Carbon)))
            {
                M2 = _c;

                ((Mob_Living)thearea).heal_organ_damage(10, 10);
                ((Mob_Living)thearea).adjustToxLoss(-10);
                ((Mob_Living)thearea).adjustOxyLoss(-10);
                ((Mob_Living)thearea).adjustStaminaLoss(-20);
                ((Mob)thearea).AdjustWeakened(-1);
                ((Mob)thearea).AdjustStunned(-1);
                M2.adjustOxyLoss(20);
                M2.adjustStaminaLoss(20);
                M2.WriteMsg("<span class='boldannounce'>You feel a wave of exhaustion and a curious draining sensation directed towards " + Task13.User + "!</span>");
            }
            thearea.WriteMsg("<span class='shadowling'>You draw life from those around you to heal your wounds.</span>");
            return(false);
        }
示例#5
0
        // Function from file: runes.dm
        public override void invoke(dynamic user = null)
        {
            Mob_Living_Carbon C = null;
            dynamic           N = null;
            Mob_Living_Carbon M = null;

            this.visible_message("<span class='warning'>" + this + " briefly bubbles before exploding!</span>");

            foreach (dynamic _a in Lang13.Enumerate(Map13.FetchViewers(null, this), typeof(Mob_Living_Carbon)))
            {
                C = _a;


                if (!GlobalFuncs.iscultist(C))
                {
                    N = C.null_rod_check();

                    if (Lang13.Bool(N))
                    {
                        C.WriteMsg(new Txt("<span class='userdanger'>").The(N).item().str(" suddenly burns hotly before returning to normal!</span>").ToString());
                        continue;
                    }
                    C.WriteMsg("<span class='cultlarge'>Your blood boils in your veins!</span>");
                    C.take_overall_damage(51, 51);
                }
            }

            foreach (dynamic _b in Lang13.Enumerate(Map13.FetchInRange(this, 1), typeof(Mob_Living_Carbon)))
            {
                M = _b;


                if (GlobalFuncs.iscultist(M))
                {
                    M.apply_damage(15, "brute", Rand13.Pick(new object [] { "l_arm", "r_arm" }));
                    M.WriteMsg("<span class='cultitalic'>" + this + " saps your strength!</span>");
                }
            }
            GlobalFuncs.explosion(GlobalFuncs.get_turf(this), -1, 0, 1, 5);
            GlobalFuncs.qdel(this);
            return;
        }
        public override bool f_action(dynamic target = null)
        {
            Mob_Living_Carbon M = null;
            Mob_Living_Carbon H = null;
            dynamic           T = null;


            if (!this.action_checks(target))
            {
                return(false);
            }
            GlobalFuncs.playsound(this.chassis, "sound/items/AirHorn.ogg", 100, 1);
            this.chassis.occupant_message("<font color='red' size='5'>HONK</font>");

            foreach (dynamic _a in Lang13.Enumerate(Map13.FetchHearersExcludeThis(this.chassis, 6), typeof(Mob_Living_Carbon)))
            {
                M = _a;


                if (M is Mob_Living_Carbon_Human)
                {
                    H = M;

                    if (((dynamic)H).ears is Obj_Item_Clothing_Ears_Earmuffs)
                    {
                        continue;
                    }
                }
                M.WriteMsg("<font color='red' size='7'>HONK</font>");
                M.SetSleeping(0);
                M.stuttering += 20;
                M.adjustEarDamage(0, 30);
                M.Weaken(3);

                if (Rand13.PercentChance(30))
                {
                    M.Stun(10);
                    M.Paralyse(4);
                }
                else
                {
                    M.Jitter(500);
                }
            }
            this.log_message("Honked from " + this.name + ". HONK!");
            T = GlobalFuncs.get_turf(this);
            GlobalFuncs.message_admins(new Txt().item(GlobalFuncs.key_name_admin(this.chassis.occupant, ((dynamic)this.chassis.occupant).client)).str("(<A HREF='?_src_=holder;adminmoreinfo=").Ref(this.chassis.occupant).str("'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=").Ref(this.chassis.occupant).str("'>FLW</A>) used a Mecha Honker in (").item(T.x).str(",").item(T.y).str(",").item(T.z).str(" - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=").item(T.x).str(";Y=").item(T.y).str(";Z=").item(T.z).str("'>JMP</a>)").ToString());
            GlobalFuncs.log_game("" + ((dynamic)this.chassis.occupant).ckey + "(" + this.chassis.occupant + ") used a Mecha Honker in (" + T.x + "," + T.y + "," + T.z + ")");
            return(true);
        }
示例#7
0
        // Function from file: touch_attacks.dm
        public bool ChargeHand(Mob_Living_Carbon user = null)
        {
            bool hand_handled = false;

            hand_handled       = true;
            this.attached_hand = Lang13.Call(this.hand_path, this);

            if (user.hand)
            {
                if (!user.equip_to_slot_if_possible(this.attached_hand, 4, false, true, true))
                {
                    if (!user.equip_to_slot_if_possible(this.attached_hand, 5, false, true, true))
                    {
                        hand_handled = false;
                    }
                }
            }
            else if (!user.equip_to_slot_if_possible(this.attached_hand, 5, false, true, true))
            {
                if (!user.equip_to_slot_if_possible(this.attached_hand, 4, false, true, true))
                {
                    hand_handled = false;
                }
            }

            if (!hand_handled)
            {
                GlobalFuncs.qdel(this.attached_hand);
                this.charge_counter = this.charge_max;
                this.attached_hand  = null;
                user.WriteMsg("<span class='warning'>Your hands are full!</span>");
                return(false);
            }
            user.WriteMsg("<span class='notice'>You channel the power of the spell to your hand.</span>");
            return(true);
        }
示例#8
0
        // Function from file: runes.dm
        public override void invoke(dynamic user = null)
        {
            Mob_Living_Carbon C = null;

            this.visible_message("<span class='warning'>" + this + " glows blue for a moment before vanishing.</span>");

            foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInRangeExcludeThis(this, 1), typeof(Mob_Living_Carbon)))
            {
                C = _a;

                C.WriteMsg("<span class='warning'>You feel a minute vibration pass through you!</span>");
            }
            GlobalFuncs.playsound(GlobalFuncs.get_turf(this), "sound/items/welder2.ogg", 25, 1);
            GlobalFuncs.empulse(this, 4, 8);
            GlobalFuncs.qdel(this);
            return;
        }
示例#9
0
        // Function from file: talisman.dm
        public override bool invoke(dynamic user = null)
        {
            Mob_Living_Carbon C = null;

            ((Ent_Static)user).visible_message(new Txt("<span class='warning'>").The(this).item().str(" in ").item(user).str("'s hand suddenly burns away in a red flash!</span>").ToString(), "<span class='cultitalic'>You speak the words of the talisman, setting your enemies on fire.</span>");

            foreach (dynamic _a in Lang13.Enumerate(Map13.FetchViewers(null, user), typeof(Mob_Living_Carbon)))
            {
                C = _a;


                if (!GlobalFuncs.iscultist(C) && !Lang13.Bool(C.null_rod_check()))
                {
                    C.WriteMsg("<span class='cultlarge'>You feel your skin crisp as you burst into flames!</span>");
                    C.fire_act();
                }
            }
            return(false);
        }
示例#10
0
        // Function from file: runes.dm
        public override void invoke(dynamic user = null)
        {
            Mob_Living_Carbon M = null;

            this.visible_message("<span class='warning'>" + this + " flares up for a moment, and then disappears into itself!</span>");
            new Obj_Effect_Timestop_Cult(GlobalFuncs.get_turf(this));

            foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInRange(this, 1), typeof(Mob_Living_Carbon)))
            {
                M = _a;


                if (GlobalFuncs.iscultist(M))
                {
                    M.apply_damage(20, "brute", "chest");
                    M.WriteMsg("<span class='cultitalic'>" + this + " temporarily stops your heart from beating!</span>");
                }
            }
            GlobalFuncs.qdel(this);
            return;
        }
示例#11
0
        // Function from file: narsie.dm
        public override void mezzer(  )
        {
            Mob_Living_Carbon M = null;


            foreach (dynamic _a in Lang13.Enumerate(Map13.FetchViewersExcludeThis(this, 8), typeof(Mob_Living_Carbon)))
            {
                M = _a;


                if (M.stat == 0)
                {
                    if (!GlobalFuncs.iscultist(M))
                    {
                        M.WriteMsg("<span class='cultsmall'>You feel conscious thought crumble away in an instant as you gaze upon " + this.name + "...</span>");
                        M.apply_effect(3, "stun");
                    }
                }
            }
            return;
        }
示例#12
0
        // Function from file: singularity.dm
        public virtual void mezzer(  )
        {
            Mob_Living_Carbon         M  = null;
            Mob_Living_Carbon         H  = null;
            Obj_Item_Clothing_Glasses MS = null;


            foreach (dynamic _a in Lang13.Enumerate(Map13.FetchViewersExcludeThis(this, 8), typeof(Mob_Living_Carbon)))
            {
                M = _a;


                if (M is Mob_Living_Carbon_Brain)
                {
                    continue;
                }

                if (M.stat == 0)
                {
                    if (M is Mob_Living_Carbon_Human)
                    {
                        H = M;

                        if (((dynamic)H).glasses is Obj_Item_Clothing_Glasses_Meson)
                        {
                            MS = ((dynamic)H).glasses;

                            if (MS.vision_flags == GlobalVars.SEE_TURFS)
                            {
                                H.WriteMsg("<span class='notice'>You look directly into the " + this.name + ", good thing you had your protective eyewear on!</span>");
                                return;
                            }
                        }
                    }
                }
                M.apply_effect(3, "stun");
                M.visible_message("<span class='danger'>" + M + " stares blankly at the " + this.name + "!</span>", "<span class='userdanger'>You look directly into the " + this.name + " and feel weak.</span>");
            }
            return;
        }
        // Function from file: gland.dm
        public override void activate(  )
        {
            dynamic           T = null;
            Mob_Living_Carbon H = null;

            this.owner.WriteMsg("<span class='notice'>You get a headache.</span>");
            T = GlobalFuncs.get_turf(this.owner);

            foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInRangeExcludeThis(T, 4), typeof(Mob_Living_Carbon)))
            {
                H = _a;


                if (H == this.owner)
                {
                    continue;
                }
                H.WriteMsg("<span class='alien'>You hear a buzz in your head </span>");
                H.confused += 20;
            }
            return;
        }
示例#14
0
        // Function from file: runes.dm
        public override void invoke(dynamic user = null)
        {
            Mob_Living_Carbon C = null;

            this.visible_message("<span class='warning'>" + this + " emits a blinding red flash!</span>");

            foreach (dynamic _a in Lang13.Enumerate(Map13.FetchViewers(null, this), typeof(Mob_Living_Carbon)))
            {
                C = _a;


                if (!GlobalFuncs.iscultist(C) && !Lang13.Bool(C.null_rod_check()))
                {
                    C.WriteMsg("<span class='cultlarge'>You feel oily shadows cover your senses.</span>");
                    C.adjustEarDamage(0, 50);
                    C.flash_eyes(1, true);
                    C.adjust_blurriness(50);
                    C.adjust_blindness(20);
                    C.silent += 10;
                }
            }
            GlobalFuncs.qdel(this);
            return;
        }
示例#15
0
        // Function from file: turf.dm
        public override bool handle_slip(Mob_Living_Carbon C = null, int s_amount = 0, int w_amount = 0, dynamic O = null, dynamic lube = null)
        {
            Ent_Dynamic buckled_obj = null;
            int?        oldlying    = null;
            int         olddir      = 0;
            int?        i           = null;
            dynamic     dam_zone    = null;


            if (GlobalFuncs.has_gravity(this))
            {
                oldlying = C.lying;

                if (C.buckled != null)
                {
                    buckled_obj = C.buckled;

                    if (!Lang13.Bool(lube & 4))
                    {
                        return(false);
                    }
                }
                else
                {
                    if (Lang13.Bool(C.lying) || !((C.status_flags & 2) != 0))
                    {
                        return(false);
                    }

                    if (C.m_intent == "walk" && Lang13.Bool(lube & 1))
                    {
                        return(false);
                    }
                }
                C.WriteMsg("<span class='notice'>You slipped" + (Lang13.Bool(O) ? " on the " + O.name : "") + "!</span>");
                C.attack_log.Add("[" + GlobalFuncs.time_stamp() + "] <font color='orange'>Slipped" + (Lang13.Bool(O) ? " on the " + O.name : "") + (Lang13.Bool(lube & 2) ? " (LUBE)" : "") + "!</font>");
                GlobalFuncs.playsound(C.loc, "sound/misc/slip.ogg", 50, 1, -3);
                C.accident(C.l_hand);
                C.accident(C.r_hand);
                olddir = C.dir;
                C.Stun(s_amount);
                C.Weaken(w_amount);
                C.__CallVerb("Stop Pulling");

                if (buckled_obj != null)
                {
                    buckled_obj.unbuckle_mob();
                    Map13.Step(buckled_obj, olddir);
                }
                else if (Lang13.Bool(lube & 2))
                {
                    i = null;
                    i = 1;

                    while ((i ?? 0) < 5)
                    {
                        Task13.Schedule(i ?? 0, (Task13.Closure)(() => {
                            Map13.Step(C, olddir);
                            C.spin(1, 1);
                            return;
                        }));
                        i++;
                    }
                }

                if (C.lying != oldlying && Lang13.Bool(lube))
                {
                    dam_zone = Rand13.Pick(new object [] { "chest", "l_hand", "r_hand", "l_leg", "r_leg" });
                    C.apply_damage(5, "brute", dam_zone);
                }
                return(true);
            }
            return(false);
        }