Esempio n. 1
0
 // Function from file: spacevine.dm
 public override void on_spread(Obj_Effect_Spacevine holder = null, Tile target = null)
 {
     if (holder.energy > 1 && !Lang13.Bool(Lang13.FindIn(typeof(Obj_Effect_Spacevine), target)))
     {
         holder.master.spawn_spacevine_piece(target, holder);
     }
     return;
 }
Esempio n. 2
0
 // Function from file: spacevine.dm
 public override void on_grow(Obj_Effect_Spacevine holder = null)
 {
     if (holder.energy != 0)
     {
         holder.density = true;
     }
     return;
 }
Esempio n. 3
0
 // Function from file: spacevine.dm
 public override void on_grow(Obj_Effect_Spacevine holder = null)
 {
     if (holder.energy != 0)
     {
         holder.SetLuminosity(this.severity, 3);
     }
     return;
 }
Esempio n. 4
0
        // Function from file: spacevine.dm
        public override void on_spread(Obj_Effect_Spacevine holder = null, Tile target = null)
        {
            dynamic prey = null;

            prey = Lang13.FindIn(typeof(Obj_Effect_Spacevine), target);

            if (Lang13.Bool(prey) && !Lang13.Bool(prey.mutations.Find(this)))
            {
                GlobalFuncs.qdel(prey);
            }
            return;
        }
        // Function from file: spacevine.dm
        public override void on_grow(Obj_Effect_Spacevine holder = null)
        {
            Ent_Static spaceturf = null;


            if (holder.loc is Tile_Space)
            {
                spaceturf = holder.loc;
                ((Tile)spaceturf).ChangeTurf(typeof(Tile_Simulated_Floor_Vines));
            }
            return;
        }
        // Function from file: spacevine.dm
        public override void on_grow(Obj_Effect_Spacevine holder = null)
        {
            Obj_Structure_Alien_Resin_FlowerBudEnemy FBE = null;


            if (holder.energy == 2 && Rand13.PercentChance(((int)(this.severity ?? 0))) && !Lang13.Bool(Lang13.FindIn(typeof(Obj_Structure_Alien_Resin_FlowerBudEnemy), Map13.FetchInRange(holder, 5))))
            {
                FBE       = new Obj_Structure_Alien_Resin_FlowerBudEnemy(GlobalFuncs.get_turf(holder));
                FBE.layer = holder.layer + 0.1;
            }
            return;
        }
Esempio n. 7
0
        // Function from file: spacevine.dm
        public override bool on_hit(Obj_Effect_Spacevine holder = null, dynamic hitter = null, Obj I = null)
        {
            dynamic M = null;


            if (Rand13.PercentChance(((int)(this.severity ?? 0))) && hitter is Mob_Living)
            {
                M = hitter;
                ((Mob_Living)M).adjustBruteLoss(5);
                M.WriteMsg("<span class='alert'>You cut yourself on the thorny vines.</span>");
            }
            return(false);
        }
Esempio n. 8
0
        // Function from file: spacevine.dm
        public override void on_cross(Obj_Effect_Spacevine holder = null, Ent_Dynamic crosser = null)
        {
            Ent_Dynamic M = null;


            if (Rand13.PercentChance(((int)(this.severity ?? 0))) && crosser is Mob_Living)
            {
                M = crosser;
                ((Mob_Living)M).adjustBruteLoss(5);
                ((dynamic)M).WriteMsg("<span class='alert'>You cut yourself on the thorny vines.</span>");
            }
            return;
        }
Esempio n. 9
0
        // Function from file: spacevine.dm
        public override void on_cross(Obj_Effect_Spacevine holder = null, Ent_Dynamic crosser = null)
        {
            if (crosser is Mob_Living_Silicon)
            {
                return;
            }

            if (Rand13.PercentChance(((int)(this.severity ?? 0))) && crosser is Mob_Living)
            {
                ((dynamic)crosser).WriteMsg("<span class='alert'>You accidently touch the vine and feel a strange sensation.</span>");
                ((Mob_Living)crosser).adjustToxLoss(5);
            }
            return;
        }
        // Function from file: spacevine.dm
        public override void on_death(Obj_Effect_Spacevine holder = null, dynamic hitter = null, dynamic I = null)
        {
            Ent_Static spaceturf = null;


            if (holder.loc is Tile_Simulated_Floor_Vines)
            {
                spaceturf = holder.loc;
                Task13.Schedule(0, (Task13.Closure)(() => {
                    ((Tile)spaceturf).ChangeTurf(typeof(Tile_Space));
                    return;
                }));
            }
            return;
        }
Esempio n. 11
0
        // Function from file: spacevine.dm
        public override dynamic ChangeTurf(dynamic path = null)
        {
            Obj_Effect_Spacevine SV = null;


            foreach (dynamic _a in Lang13.Enumerate(this, typeof(Obj_Effect_Spacevine)))
            {
                SV = _a;

                GlobalFuncs.qdel(SV);
            }
            base.ChangeTurf((object)(path));
            this.UpdateAffectingLights();
            return(null);
        }
Esempio n. 12
0
        // Function from file: spacevine.dm
        public void spawn_spacevine_piece(dynamic location = null, Obj_Effect_Spacevine parent = null, ByTable muts = null)
        {
            Obj_Effect_Spacevine SV   = null;
            dynamic           randmut = null;
            SpacevineMutation M       = null;
            SpacevineMutation SM      = null;

            SV = new Obj_Effect_Spacevine(location);
            this.growth_queue.Add(SV);
            this.vines.Add(SV);
            SV.master = this;

            if (muts != null && muts.len != 0)
            {
                SV.mutations.Or(muts);
            }

            if (parent != null)
            {
                SV.mutations.Or(parent.mutations);
                SV.color = parent.color;
                SV.desc  = parent.desc;

                if (Rand13.PercentChance(((int)(this.mutativness))))
                {
                    SV.mutations.Or(Rand13.PickFromTable(this.mutations_list));
                    randmut  = Rand13.PickFromTable(SV.mutations);
                    SV.color = randmut.hue;
                    SV.desc  = "An extremely expansionistic species of vine. These are ";

                    foreach (dynamic _a in Lang13.Enumerate(SV.mutations, typeof(SpacevineMutation)))
                    {
                        M = _a;

                        SV.desc += "" + M.name + " ";
                    }
                    SV.desc += "vines.";
                }
            }

            foreach (dynamic _b in Lang13.Enumerate(SV.mutations, typeof(SpacevineMutation)))
            {
                SM = _b;

                SM.on_birth(SV);
            }
            return;
        }
Esempio n. 13
0
        // Function from file: spacevine.dm
        public override void process_mutation(Obj_Effect_Spacevine holder = null)
        {
            Ent_Static T  = null;
            GasMixture GM = null;

            T = holder.loc;

            if (T is Tile_Simulated_Floor)
            {
                GM = ((dynamic)T).air;

                if (!Lang13.Bool(GM.gases["o2"]))
                {
                    return;
                }
                GM.gases["o2"][1] -= (this.severity ?? 0) * holder.energy;
                GM.garbage_collect();
            }
            return;
        }
Esempio n. 14
0
        // Function from file: spacevine.dm
        public override bool on_hit(Obj_Effect_Spacevine holder = null, dynamic hitter = null, Obj I = null)
        {
            dynamic chance = null;


            if (Lang13.Bool(hitter))
            {
                if (I != null)
                {
                    chance = I.force * 2;
                }
                else
                {
                    chance = 8;
                }

                if (Rand13.PercentChance(Convert.ToInt32(chance)))
                {
                    GlobalFuncs.qdel(holder);
                }
            }
            return(true);
        }
Esempio n. 15
0
        // Function from file: spacevine.dm
        public override bool start(  )
        {
            ByTable turfs           = null;
            Obj_Effect_Spacevine SV = null;
            Zone_Hallway         A  = null;
            Tile_Simulated       F  = null;
            dynamic T = null;

            turfs = new ByTable();
            SV    = new Obj_Effect_Spacevine();

            foreach (dynamic _b in Lang13.Enumerate(typeof(Game13), typeof(Zone_Hallway)))
            {
                A = _b;


                foreach (dynamic _a in Lang13.Enumerate(A, typeof(Tile_Simulated)))
                {
                    F = _a;


                    if (F.Enter(SV))
                    {
                        turfs.Add(F);
                    }
                }
            }
            GlobalFuncs.qdel(SV);

            if (turfs.len != 0)
            {
                T = Rand13.PickFromTable(turfs);
                new Obj_Effect_SpacevineController(T);
            }
            return(false);
        }
 // Function from file: spacevine.dm
 public override void on_buckle(Obj_Effect_Spacevine holder = null, Ent_Dynamic buckled = null)
 {
     buckled.ex_act(this.severity);
     return;
 }
Esempio n. 17
0
 // Function from file: spacevine.dm
 public void on_chem(Obj_Effect_Spacevine holder = null, Reagent_Toxin_Plantbgone R = null)
 {
     return;
 }
Esempio n. 18
0
 // Function from file: spacevine.dm
 public virtual void on_cross(Obj_Effect_Spacevine holder = null, Ent_Dynamic crosser = null)
 {
     return;
 }
Esempio n. 19
0
 // Function from file: spacevine.dm
 public virtual bool on_hit(Obj_Effect_Spacevine holder = null, dynamic hitter = null, Obj I = null)
 {
     return(false);
 }
Esempio n. 20
0
        // Function from file: spacevine.dm
        public override int?process(dynamic seconds = null)
        {
            int     length          = 0;
            int     i               = 0;
            ByTable queue_end       = null;
            Obj_Effect_Spacevine SV = null;
            SpacevineMutation    SM = null;


            if (!(this.vines != null))
            {
                GlobalFuncs.qdel(this);
                return(null);
            }

            if (!(this.growth_queue != null))
            {
                GlobalFuncs.qdel(this);
                return(null);
            }
            length    = 0;
            length    = Num13.MinInt(((int)(this.spread_cap)), Num13.MaxInt(1, ((int)(this.vines.len / this.spread_multiplier))));
            i         = 0;
            queue_end = new ByTable();

            foreach (dynamic _b in Lang13.Enumerate(this.growth_queue, typeof(Obj_Effect_Spacevine)))
            {
                SV = _b;


                if (Lang13.Bool(SV.gc_destroyed))
                {
                    continue;
                }
                i++;
                queue_end.Add(SV);
                this.growth_queue.Remove(SV);

                foreach (dynamic _a in Lang13.Enumerate(SV.mutations, typeof(SpacevineMutation)))
                {
                    SM = _a;

                    SM.process_mutation(SV);
                }

                if (SV.energy < 2)
                {
                    if (Rand13.PercentChance(20))
                    {
                        SV.grow();
                    }
                }
                else
                {
                    SV.entangle_mob();
                }
                SV.spread();

                if (i >= length)
                {
                    break;
                }
            }
            this.growth_queue = this.growth_queue + queue_end;
            return(null);
        }
Esempio n. 21
0
 // Function from file: spacevine.dm
 public virtual void on_death(Obj_Effect_Spacevine holder = null, dynamic hitter = null, dynamic I = null)
 {
     return;
 }
Esempio n. 22
0
 // Function from file: spacevine.dm
 public virtual void on_grow(Obj_Effect_Spacevine holder = null)
 {
     return;
 }
Esempio n. 23
0
 // Function from file: spacevine.dm
 public void on_birth(Obj_Effect_Spacevine holder = null)
 {
     return;
 }
Esempio n. 24
0
        // Function from file: spacevine.dm
        public override bool on_explosion(double?severity = null, dynamic target = null, Obj_Effect_Spacevine holder = null)
        {
            bool _default = false;


            if ((severity ?? 0) < 3)
            {
                GlobalFuncs.qdel(this);
            }
            else
            {
                _default = true;
                Task13.Schedule(5, (Task13.Closure)(() => {
                    GlobalFuncs.qdel(this);
                    return;
                }));
            }
            return(_default);
        }
Esempio n. 25
0
 // Function from file: spacevine.dm
 public override void on_death(Obj_Effect_Spacevine holder = null, dynamic hitter = null, dynamic I = null)
 {
     GlobalFuncs.explosion(holder.loc, 0, 0, this.severity, 0, 0);
     return;
 }
Esempio n. 26
0
 // Function from file: spacevine.dm
 public virtual bool process_temperature(Obj_Effect_Spacevine holder = null, dynamic temp = null, int?volume = null)
 {
     return(false);
 }
Esempio n. 27
0
 // Function from file: spacevine.dm
 public virtual void process_mutation(Obj_Effect_Spacevine holder = null)
 {
     return;
 }
 // Function from file: spacevine.dm
 public override void on_spread(Obj_Effect_Spacevine holder = null, Tile target = null)
 {
     target.ex_act(this.severity, this);
     return;
 }
Esempio n. 29
0
        // Function from file: spacevine.dm
        public override dynamic attackby(dynamic A = null, dynamic user = null, string _params = null, bool?silent = null, bool?replace_spent = null)
        {
            int _override           = 0;
            SpacevineMutation    SM = null;
            Obj_Effect_Spacevine B  = null;
            dynamic WT = null;


            if (!Lang13.Bool(A) || !Lang13.Bool(user) || !(A.type != null))
            {
                return(null);
            }
            ((Mob)user).changeNext_move(8);
            _override = 0;

            foreach (dynamic _a in Lang13.Enumerate(this.mutations, typeof(SpacevineMutation)))
            {
                SM = _a;

                _override += SM.on_hit(this, user) ?1:0;
            }

            if (_override != 0)
            {
                base.attackby((object)(A), (object)(user), _params, silent, replace_spent);
                return(null);
            }

            if (A is Obj_Item_Weapon_Scythe)
            {
                foreach (dynamic _b in Lang13.Enumerate(Map13.FetchInRangeExcludeThis(this, 1), typeof(Obj_Effect_Spacevine)))
                {
                    B = _b;


                    if (Rand13.PercentChance(80))
                    {
                        GlobalFuncs.qdel(B);
                    }
                }
                GlobalFuncs.qdel(this);
            }
            else if (((Obj_Item)A).is_sharp() != 0)
            {
                GlobalFuncs.qdel(this);
            }
            else if (A is Obj_Item_Weapon_Weldingtool)
            {
                WT = A;

                if (((Obj_Item_Weapon_Weldingtool)WT).remove_fuel(0, user))
                {
                    GlobalFuncs.qdel(this);
                }
                else
                {
                    this.user_unbuckle_mob(user);
                    return(null);
                }
            }
            base.attackby((object)(A), (object)(user), _params, silent, replace_spent);
            return(null);
        }
Esempio n. 30
0
 // Function from file: spacevine.dm
 public override void on_eat(Obj_Effect_Spacevine holder = null, Mob_Living_SimpleAnimal_Hostile_Retaliate_Goat eater = null)
 {
     eater.adjustToxLoss(5);
     return;
 }