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

            location = GlobalFuncs.get_turf(holder.my_atom);
            s        = new EffectSystem_SparkSpread();
            s.set_up(2, 1, location);
            s.start();

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


                if (C.flash_eyes())
                {
                    if (Map13.GetDistance(C, location) < 4)
                    {
                        C.Weaken(5);
                    }
                    else
                    {
                        C.Stun(5);
                    }
                }
            }
            return;
        }
Пример #2
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);
        }
        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);
        }
Пример #5
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);
        }