// Function from file: flashbang.dm
        public void bang(dynamic T = null, Mob_Living M = null)
        {
            bool ear_safety = false;
            int  distance   = 0;

            M.show_message("<span class='warning'>BANG</span>", 2);
            GlobalFuncs.playsound(this.loc, "sound/weapons/flashbang.ogg", 100, 1);
            ear_safety = M.check_ear_prot();
            distance   = Num13.MaxInt(1, Map13.GetDistance(this, T));

            if (M.weakeyes)
            {
                M.visible_message("<span class='disarm'><b>" + M + "</b> screams and collapses!</span>");
                M.WriteMsg("<span class='userdanger'><font size=3>AAAAGH!</font></span>");
                M.Weaken(15);
                M.Stun(15);
                M.adjust_eye_damage(8);
            }

            if (M.flash_eyes(null, null, true))
            {
                M.Stun(Num13.MaxInt(((int)(10 / distance)), 3));
                M.Weaken(Num13.MaxInt(((int)(10 / distance)), 3));
            }

            if (this.loc == M || this.loc == M.loc)
            {
                M.Stun(10);
                M.Weaken(10);
            }

            if (!ear_safety)
            {
                M.WriteMsg(new Sound("sound/weapons/flash_ring.ogg", false, true, 0, 100));
                M.Stun(Num13.MaxInt(((int)(10 / distance)), 3));
                M.Weaken(Num13.MaxInt(((int)(10 / distance)), 3));
                M.setEarDamage(M.ear_damage + Rand13.Int(0, 5), Num13.MaxInt(((int)(M.ear_deaf ?? 0)), 15));

                if (M.ear_damage >= 15)
                {
                    M.WriteMsg("<span class='warning'>Your ears start to ring badly!</span>");

                    if (Rand13.PercentChance(M.ear_damage - 10 + 5))
                    {
                        M.WriteMsg("<span class='warning'>You can't hear anything!</span>");
                        M.disabilities |= 4;
                    }
                }
                else if (M.ear_damage >= 5)
                {
                    M.WriteMsg("<span class='warning'>Your ears start to ring!</span>");
                }
            }
            return;
        }
示例#2
0
        // Function from file: flasher.dm
        public bool flash(  )
        {
            Mob_Living L = null;


            if (!Lang13.Bool(this.powered()) || !Lang13.Bool(this.bulb))
            {
                return(false);
            }

            if (this.bulb.crit_fail || this.last_flash != 0 && Game13.time < this.last_flash + 150)
            {
                return(false);
            }

            if (!((Obj_Item_Device_Assembly_Flash)this.bulb).flash_recharge(30))
            {
                this.power_change();
                return(false);
            }
            this.bulb.times_used++;
            GlobalFuncs.playsound(this.loc, "sound/weapons/flash.ogg", 100, 1);
            Icon13.Flick("" + this.base_state + "_flash", this);
            this.last_flash = Game13.time;
            this.f_use_power(1000);

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


                if (Map13.GetDistance(this, L) > this.range)
                {
                    continue;
                }

                if (L.flash_eyes(null, null, true))
                {
                    L.Weaken(this.strength);

                    if (L.weakeyes)
                    {
                        L.Weaken(this.strength * 1.5);
                        L.visible_message("<span class='disarm'><b>" + L + "</b> gasps and shields their eyes!</span>");
                    }
                }
            }
            return(true);
        }
示例#3
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;
        }
示例#4
0
        // Function from file: venus_human_trap.dm
        public override bool handle_automated_action(  )
        {
            Mob_Living L  = null;
            dynamic    B  = null;
            Mob_Living L2 = null;


            if (base.handle_automated_action())
            {
                foreach (dynamic _a in Lang13.Enumerate(this.grasping, typeof(Mob_Living)))
                {
                    L = _a;


                    if (L.stat == 2)
                    {
                        B = this.grasping[L];

                        if (Lang13.Bool(B))
                        {
                            B.End();
                        }
                        this.grasping.Remove(L);
                    }

                    if (L.Adjacent(this))
                    {
                        L.attack_animal(this);
                    }
                    else if (Rand13.PercentChance(this.grasp_pull_chance))
                    {
                        this.dir = Map13.GetDistance(this, L);
                        Map13.Step(L, Map13.GetDistance(L, this));
                        L.Weaken(3);
                    }
                }

                if (this.grasping.len < this.max_grasps)
                {
                    foreach (dynamic _b in Lang13.Enumerate(Map13.FetchInRange(this, this.grasp_range), typeof(Mob_Living)))
                    {
                        L2 = _b;


                        if (L2 == this || this.faction_check(L2))
                        {
                            continue;
                        }

                        if (!this.grasping.Contains(L2) && L2 != this.target && Rand13.PercentChance(this.grasp_chance))
                        {
                            L2.WriteMsg(new Txt("<span class='userdanger'>").the(this).item().str(" has you entangled!</span>").ToString());
                            this.grasping[L2] = this.Beam(L2, "vine", "icons/effects/spacevines.dmi", Double.PositiveInfinity, 5, typeof(Obj_Effect_Ebeam_Vine));
                            break;
                        }
                    }
                }
            }
            return(false);
        }
 // Function from file: martial.dm
 public bool backKick(dynamic A = null, Mob_Living D = null)
 {
     if (Convert.ToInt32(A.dir) == D.dir && !(D.stat != 0) && !(D.weakened != 0))
     {
         D.visible_message("<span class='warning'>" + A + " kicks " + D + " in the back!</span>", "<span class='userdanger'>" + A + " kicks you in the back, making you stumble and fall!</span>");
         Map13.StepTowards(D, Map13.GetStep(D, D.dir), 1);
         D.Weaken(4);
         GlobalFuncs.playsound(GlobalFuncs.get_turf(D), "sound/weapons/punch1.ogg", 50, 1, -1);
         return(true);
     }
     return(this.basic_hit(A, D));
 }
示例#6
0
        // Function from file: shriek.dm
        public override dynamic sting_action(Mob user = null, Ent_Static target = null)
        {
            Mob_Living          M = null;
            Obj_Machinery_Light L = null;


            foreach (dynamic _a in Lang13.Enumerate(GlobalFuncs.get_hearers_in_view(4, user), typeof(Mob_Living)))
            {
                M = _a;


                if (M is Mob_Living_Carbon)
                {
                    if (!(M.mind != null) || !(M.mind.changeling != null))
                    {
                        M.adjustEarDamage(0, 30);
                        M.confused += 25;
                        M.Jitter(50);
                    }
                    else
                    {
                        M.WriteMsg(new Sound("sound/effects/screech.ogg"));
                    }
                }

                if (M is Mob_Living_Silicon)
                {
                    M.WriteMsg(new Sound("sound/weapons/flash.ogg"));
                    M.Weaken(Rand13.Int(5, 10));
                }
            }

            foreach (dynamic _b in Lang13.Enumerate(Map13.FetchInRange(user, 4), typeof(Obj_Machinery_Light)))
            {
                L = _b;

                L.on = true;
                L.broken();
            }
            GlobalFuncs.feedback_add_details("changeling_powers", "RS");
            return(1);
        }
        // Function from file: martial.dm
        public override bool harm_act(dynamic A = null, Mob_Living D = null)
        {
            dynamic atk_verb = null;

            this.add_to_streak("H", D);

            if (this.check_streak(A, D))
            {
                return(true);
            }
            atk_verb = Rand13.Pick(new object [] { "punches", "kicks", "chops", "hits", "slams" });
            D.visible_message("<span class='danger'>" + A + " " + atk_verb + " " + D + "!</span>", "<span class='userdanger'>" + A + " " + atk_verb + " you!</span>");
            D.apply_damage(Rand13.Int(10, 15), "brute");
            GlobalFuncs.playsound(GlobalFuncs.get_turf(D), "sound/weapons/punch1.ogg", 25, 1, -1);

            if (Rand13.PercentChance(((int)(D.getBruteLoss()))) && !Lang13.Bool(D.lying))
            {
                D.visible_message("<span class='warning'>" + D + " stumbles and falls!</span>", "<span class='userdanger'>The blow sends you to the ground!</span>");
                D.Weaken(4);
            }
            return(true);
        }
示例#8
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);
        }
示例#9
0
        // Function from file: special_shadowling_abilities.dm
        public override bool cast(dynamic targets = null, dynamic thearea = null, dynamic user = null)
        {
            thearea = thearea ?? Task13.User;

            dynamic    H              = null;
            string     hatch_or_no    = null;
            Obj_Item   I              = null;
            Mob_Living M              = null;
            Obj_Machinery_Power_Apc A = null;
            Mob_Living_SimpleAnimal_AscendantShadowling A2 = null;
            Obj_Effect_ProcHolder_Spell S = null;

            H = thearea;

            if (!this.shadowling_check(H))
            {
                return(false);
            }
            hatch_or_no = Interface13.Alert(H, "It is time to ascend. Are you sure about this?", null, "Yes", "No");

            switch ((string)(hatch_or_no))
            {
            case "No":
                H.WriteMsg("<span class='warning'>You decide against ascending for now.");
                this.charge_counter = this.charge_max;
                return(false);

                break;

            case "Yes":
                H.notransform = 1;
                ((Ent_Static)H).visible_message("<span class='warning'>" + H + "'s things suddenly slip off. They gently rise into the air, red light glowing in their eyes.</span>", "<span class='shadowling'>You rise into the air and get ready for your transformation.</span>");

                foreach (dynamic _d in Lang13.Enumerate(H, typeof(Obj_Item)))
                {
                    I = _d;

                    ((Mob)H).unEquip(I);
                    Task13.Sleep(50);
                    ((Ent_Static)H).visible_message("<span class='warning'>" + H + "'s skin begins to crack and harden.</span>", "<span class='shadowling'>Your flesh begins creating a shield around yourself.</span>");
                    Task13.Sleep(100);
                    ((Ent_Static)H).visible_message("<span class='warning'>The small horns on " + H + "'s head slowly grow and elongate.</span>", "<span class='shadowling'>Your body continues to mutate. Your telepathic abilities grow.</span>");
                    Task13.Sleep(90);
                    ((Ent_Static)H).visible_message("<span class='warning'>" + H + "'s body begins to violently stretch and contort.</span>", "<span class='shadowling'>You begin to rend apart the final barriers to godhood.</span>");
                    Task13.Sleep(40);
                    H.WriteMsg("<i><b>Yes!</b></i>");
                    Task13.Sleep(10);
                    H.WriteMsg("<i><b><span class='big'>YES!!</span></b></i>");
                    Task13.Sleep(10);
                    H.WriteMsg("<i><b><span class='reallybig'>YE--</span></b></i>");
                    Task13.Sleep(1);

                    foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInRangeExcludeThis(H, 7), typeof(Mob_Living)))
                    {
                        M = _a;

                        M.Weaken(10);
                        M.WriteMsg("<span class='userdanger'>An immense pressure slams you onto the ground!</span>");
                    }
                    Game13.WriteMsg("<font size=5><span class='shadowling'><b>\"VYSHA NERADA YEKHEZET U'RUU!!\"</font></span>");
                    Game13.WriteMsg("sound/hallucinations/veryfar_noise.ogg");

                    foreach (dynamic _b in Lang13.Enumerate(GlobalVars.apcs_list, typeof(Obj_Machinery_Power_Apc)))
                    {
                        A = _b;

                        A.overload_lighting();
                    }
                    A2 = new Mob_Living_SimpleAnimal_AscendantShadowling(H.loc);

                    foreach (dynamic _c in Lang13.Enumerate(H.mind.spell_list, typeof(Obj_Effect_ProcHolder_Spell)))
                    {
                        S = _c;


                        if (S == this)
                        {
                            continue;
                        }
                        ((Mind)H.mind).remove_spell(S);
                    }
                    H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_Targeted_Annihilate(null));
                    H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_Targeted_Hypnosis(null));
                    H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_Self_ShadowlingPhaseShift(null));
                    H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_AoeTurf_AscendantStorm(null));
                    H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_Self_ShadowlingHivemindAscendant(null));
                    ((Mind)H.mind).transfer_to(A2);
                    A2.name = H.real_name;

                    if (Lang13.Bool(A2.real_name))
                    {
                        A2.real_name = H.real_name;
                    }
                    H.invisibility = 60;
                    H.loc          = A2;
                    Task13.Sleep(50);

                    if (!GlobalVars.ticker.mode.shadowling_ascended)
                    {
                        GlobalVars.SSshuttle.emergency.request(null, 0.3);
                    }
                    GlobalVars.ticker.mode.shadowling_ascended = true;
                    A2.mind.remove_spell(this);
                    GlobalFuncs.qdel(H);
                }
                break;
            }
            return(false);
        }