Example #1
0
        // Function from file: powers.dm
        public void expand_blob(dynamic T = null)
        {
            dynamic    B              = null;
            dynamic    OB             = null;
            Mob_Living L              = null;
            double     mob_protection = 0;


            if (!this.can_attack())
            {
                return;
            }
            B = Lang13.FindIn(typeof(Obj_Effect_Blob), T);

            if (Lang13.Bool(B))
            {
                this.WriteMsg("<span class='warning'>There is a blob there!</span>");
                return;
            }
            OB = Lang13.FindIn(typeof(Obj_Effect_Blob), GlobalFuncs.circlerange(T, 1));

            if (!Lang13.Bool(OB))
            {
                this.WriteMsg("<span class='warning'>There is no blob adjacent to the target tile!</span>");
                return;
            }

            if (!this.can_buy(5))
            {
                return;
            }
            this.last_attack = Game13.time;
            ((Obj_Effect_Blob)OB).expand(T, this);

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


                if (Lang13.Bool(L.faction.Contains("blob")))
                {
                    continue;
                }
                mob_protection = L.get_permeability_protection();
                ((Reagent)this.blob_reagent_datum).reaction_mob(L, GlobalVars.VAPOR, 25, true, mob_protection, this);
                this.blob_reagent_datum.send_message(L);
            }
            return;
        }