Esempio n. 1
0
 // Function from file: blob_reagents.dm
 public override void expand_reaction(Obj_Effect_Blob B = null, Obj_Effect_Blob_Normal newB = null, dynamic T = null)
 {
     if (Rand13.PercentChance(50))
     {
         newB.expand();
     }
     return;
 }
Esempio n. 2
0
        // Function from file: blob_reagents.dm
        public override void expand_reaction(Obj_Effect_Blob B = null, Obj_Effect_Blob_Normal newB = null, dynamic T = null)
        {
            Mob_Living_SimpleAnimal_Hostile_Blob_Blobspore_Weak BS = null;


            if (Rand13.PercentChance(10))
            {
                BS          = new Mob_Living_SimpleAnimal_Hostile_Blob_Blobspore_Weak(T);
                BS.overmind = B.overmind;
                BS.update_icons();
                newB.overmind.blob_mobs.Add(BS);
            }
            return;
        }
Esempio n. 3
0
        // Function from file: theblob.dm
        public dynamic expand(dynamic T = null, Mob_Camera_Blob controller = null)
        {
            ByTable                dirs      = null;
            double                 i         = 0;
            dynamic                dirn      = null;
            int?                   make_blob = null;
            Ent_Static             A         = null;
            Obj_Effect_Blob_Normal B         = null;


            if (!Lang13.Bool(T))
            {
                dirs = new ByTable(new object [] { 1, 2, 4, 8 });

                foreach (dynamic _a in Lang13.IterateRange(1, 4))
                {
                    i = _a;

                    dirn = Rand13.PickFromTable(dirs);
                    dirs.Remove(dirn);
                    T = Map13.GetStep(this, Convert.ToInt32(dirn));

                    if (!Lang13.Bool(Lang13.FindIn(typeof(Obj_Effect_Blob), T)))
                    {
                        break;
                    }
                    else
                    {
                        T = null;
                    }
                }
            }

            if (!Lang13.Bool(T))
            {
                return(0);
            }
            make_blob = GlobalVars.TRUE;

            if (T is Tile_Space && !Lang13.Bool(Lang13.FindIn(typeof(Obj_Structure_Lattice), T)) && Rand13.PercentChance(80))
            {
                make_blob = GlobalVars.FALSE;
                GlobalFuncs.playsound(this.loc, "sound/effects/splat.ogg", 50, 1);
            }
            this.ConsumeTile();

            if (!((Ent_Static)T).CanPass(this, T, 5))
            {
                make_blob = GlobalVars.FALSE;
                ((Ent_Static)T).blob_act();
            }

            foreach (dynamic _b in Lang13.Enumerate(T, typeof(Ent_Static)))
            {
                A = _b;


                if (!A.CanPass(this, T, 5))
                {
                    make_blob = GlobalVars.FALSE;
                }
                A.blob_act();
            }

            if (Lang13.Bool(make_blob))
            {
                B = new Obj_Effect_Blob_Normal(this.loc);

                if (controller != null)
                {
                    B.overmind = controller;
                }
                else
                {
                    B.overmind = this.overmind;
                }
                B.density = true;

                if (((Base_Static)T).Enter(B, this))
                {
                    B.density = Lang13.Bool(Lang13.Initial(B, "density"));
                    B.loc     = T;
                    B.update_icon();

                    if (B.overmind != null)
                    {
                        ((Reagent_Blob)B.overmind.blob_reagent_datum).expand_reaction(this, B, T);
                    }
                    return(B);
                }
                else
                {
                    this.blob_attack_animation(T, controller);
                    ((Ent_Static)T).blob_act();
                    GlobalFuncs.qdel(B);
                    return(null);
                }
            }
            else
            {
                this.blob_attack_animation(T, controller);
            }
            return(null);
        }
Esempio n. 4
0
 // Function from file: blob_reagents.dm
 public virtual void expand_reaction(Obj_Effect_Blob B = null, Obj_Effect_Blob_Normal newB = null, dynamic T = null)
 {
     return;
 }