Esempio n. 1
0
        // Function from file: items.dm
        public virtual bool hit_reaction(Mob_Living_Carbon owner = null, string attack_text = null, int?final_block_chance = null, dynamic damage = null, int?attack_type = null)
        {
            attack_text        = attack_text ?? "the attack";
            final_block_chance = final_block_chance ?? 0;
            damage             = damage ?? 0;
            attack_type        = attack_type ?? 1;


            if (Rand13.PercentChance(final_block_chance ?? 0))
            {
                owner.visible_message("<span class='danger'>" + owner + " blocks " + attack_text + " with " + this + "!</span>");
                return(true);
            }
            return(false);
        }
Esempio n. 2
0
        // Function from file: singularity.dm
        public void combust_mobs(  )
        {
            Mob_Living_Carbon C = null;


            foreach (dynamic _a in Lang13.Enumerate(GlobalFuncs.ultra_range(20, this, true), typeof(Mob_Living_Carbon)))
            {
                C = _a;

                C.visible_message("<span class='warning'>" + C + "'s skin bursts into flame!</span>", "<span class='userdanger'>You feel an inner fire as your skin bursts into flames!</span>");
                C.adjust_fire_stacks(5);
                C.IgniteMob();
            }
            return;
        }
Esempio n. 3
0
        // Function from file: flamethrower.dm
        public override bool hit_reaction(Mob_Living_Carbon owner = null, string attack_text = null, int?final_block_chance = null, dynamic damage = null, int?attack_type = null)
        {
            dynamic target_turf = null;


            if (Lang13.Bool(this.ptank) && Lang13.Bool(damage) && attack_type == 3 && Rand13.PercentChance(15))
            {
                owner.visible_message("<span class='danger'>" + attack_text + " hits the fueltank on " + owner + "'s " + this + ", rupturing it! What a shot!</span>");
                target_turf = GlobalFuncs.get_turf(owner);
                this.ignite_turf(target_turf, 100);
                GlobalFuncs.qdel(this.ptank);
                return(true);
            }
            return(false);
        }
Esempio n. 4
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;
        }