Пример #1
0
        // Function from file: spacevine.dm
        public void grow(  )
        {
            SpacevineMutation SM = null;


            if (!(this.energy != 0))
            {
                this.icon_state = Rand13.Pick(new object [] { "Med1", "Med2", "Med3" });
                this.energy     = 1;
                this.SetOpacity(1);
                this.layer = 5;
            }
            else
            {
                this.icon_state = Rand13.Pick(new object [] { "Hvy1", "Hvy2", "Hvy3" });
                this.energy     = 2;
            }

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

                SM.on_grow(this);
            }
            return;
        }
Пример #2
0
        // Function from file: spacevine.dm
        public override dynamic Destroy(  )
        {
            SpacevineMutation        SM = null;
            Obj_Item_Seeds_Kudzuseed KZ = null;


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

                SM.on_death(this);
            }

            if (this.master != null)
            {
                this.master.vines.Remove(this);
                this.master.growth_queue.Remove(this);

                if (!(this.master.vines.len != 0))
                {
                    KZ = new Obj_Item_Seeds_Kudzuseed(this.loc);
                    KZ.mutations.Or(this.mutations);
                    KZ.potency    = Num13.MinInt(100, ((int)(this.master.mutativness * 10)));
                    KZ.production = this.master.spread_cap / Convert.ToDouble(Lang13.Initial(this.master, "spread_cap")) * 50;
                }
            }
            this.mutations = new ByTable();
            this.SetOpacity(0);

            if (Lang13.Bool(this.buckled_mob))
            {
                this.unbuckle_mob();
            }
            return(base.Destroy());
        }
Пример #3
0
        // Function from file: spacevine.dm
        public void spread(  )
        {
            dynamic           direction = null;
            Tile              stepturf  = null;
            SpacevineMutation SM        = null;

            direction = Rand13.PickFromTable(GlobalVars.cardinal);
            stepturf  = Map13.GetStep(this, Convert.ToInt32(direction));

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

                SM.on_spread(this, stepturf);
                stepturf = Map13.GetStep(this, Convert.ToInt32(direction));
            }

            if (!Lang13.Bool(Lang13.FindIn(typeof(Obj_Effect_Spacevine), stepturf)))
            {
                if (stepturf.Enter(this))
                {
                    if (this.master != null)
                    {
                        this.master.spawn_spacevine_piece(stepturf, this);
                    }
                }
            }
            return;
        }
Пример #4
0
        // Function from file: spacevine.dm
        public override dynamic attack_hand(dynamic a = null, bool?b = null, bool?c = null)
        {
            SpacevineMutation SM = null;


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

                SM.on_hit(this, a);
            }
            this.user_unbuckle_mob(a);
            return(null);
        }
Пример #5
0
        // Function from file: spacevine.dm
        public override dynamic attack_paw(dynamic a = null, dynamic b = null, dynamic c = null)
        {
            SpacevineMutation SM = null;

            ((Ent_Dynamic)a).do_attack_animation(this);

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

                SM.on_hit(this, a);
            }
            this.user_unbuckle_mob(a);
            return(null);
        }
Пример #6
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;
        }
Пример #7
0
        // Function from file: spacevine.dm
        public override dynamic Crossed(Ent_Dynamic O = null, dynamic X = null)
        {
            SpacevineMutation SM = null;


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

                    SM.on_cross(this, O);
                }
            }
            return(null);
        }
Пример #8
0
        // Function from file: seeds.dm
        public override ByTable get_analyzer_text(  )
        {
            ByTable           mut_text    = null;
            string            text_string = null;
            SpacevineMutation SM          = null;

            mut_text    = new ByTable();
            text_string = "";

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

                text_string += "" + (text_string == "" ? "" : ", ") + SM.name;
            }
            mut_text.Add("-Plant Mutations: " + (text_string == "" ? "None" : text_string));
            return(mut_text);
        }
Пример #9
0
        // Function from file: spacevine.dm
        public override dynamic temperature_expose(GasMixture air = null, dynamic exposed_temperature = null, int?exposed_volume = null)
        {
            int _override        = 0;
            SpacevineMutation SM = null;

            _override = 0;

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

                _override += SM.process_temperature(this, exposed_temperature, exposed_volume) ?1:0;
            }

            if (!(_override != 0))
            {
                GlobalFuncs.qdel(this);
            }
            return(null);
        }
Пример #10
0
        // Function from file: spacevine.dm
        public void on_chem_effect(Reagent_Toxin_Plantbgone R = null)
        {
            double            _override = 0;
            SpacevineMutation SM        = null;

            _override = 0;

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

                _override += /*[I CANNOT CONVERT SOME RANDOM SHIT TO A DOUBLE: void]*/ 0;
            }

            if (!(_override != 0) && R is Reagent_Toxin_Plantbgone)
            {
                if (Rand13.PercentChance(50))
                {
                    GlobalFuncs.qdel(this);
                }
            }
            return;
        }
Пример #11
0
        // Function from file: spacevine.dm
        public override bool ex_act(double?severity = null, dynamic target = null)
        {
            dynamic           i  = null;
            SpacevineMutation SM = null;


            if (Lang13.Bool(((dynamic)this.type).IsInstanceOfType(target)))
            {
                return(false);
            }

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

                i += SM.on_explosion(severity, target, this) ?1:0;
            }

            if (!Lang13.Bool(i) && Rand13.PercentChance(((int)(100 / (severity ?? 0)))))
            {
                GlobalFuncs.qdel(this);
            }
            return(false);
        }
Пример #12
0
        // Function from file: spacevine.dm
        public void eat(Mob_Living_SimpleAnimal_Hostile_Retaliate_Goat eater = null)
        {
            double            _override = 0;
            SpacevineMutation SM        = null;

            _override = 0;

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

                _override += /*[I CANNOT CONVERT SOME RANDOM SHIT TO A DOUBLE: void]*/ 0;
            }

            if (!(_override != 0))
            {
                if (Rand13.PercentChance(10))
                {
                    eater.say("Nom");
                }
                GlobalFuncs.qdel(this);
            }
            return;
        }
Пример #13
0
        // Function from file: spacevine.dm
        public void entangle(Ent_Dynamic V = null)
        {
            SpacevineMutation SM = null;


            if (!(V != null))
            {
                return;
            }

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

                SM.on_buckle(this, V);
            }

            if (Convert.ToInt32(((dynamic)V).stat) != 2 && ((dynamic)V).buckled != this)
            {
                ((dynamic)V).WriteMsg("<span class='danger'>The vines " + Rand13.Pick(new object [] { "wind", "tangle", "tighten" }) + " around you!</span>");
                this.buckle_mob(V);
            }
            return;
        }
Пример #14
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);
        }
Пример #15
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);
        }
Пример #16
0
        // Function from file: seeds.dm
        public override void on_chem_reaction(Reagents S = null)
        {
            ByTable           temp_mut_list = null;
            SpacevineMutation SM            = null;
            SpacevineMutation SM2           = null;
            SpacevineMutation SM3           = null;

            temp_mut_list = new ByTable();

            if (Lang13.Bool(S.has_reagent("sterilizine", 5)))
            {
                foreach (dynamic _a in Lang13.Enumerate(this.mutations, typeof(SpacevineMutation)))
                {
                    SM = _a;


                    if (SM.quality == 2)
                    {
                        temp_mut_list.Add(SM);
                    }
                }

                if (Rand13.PercentChance(20))
                {
                    this.mutations.Remove(Rand13.PickFromTable(temp_mut_list));
                }
                temp_mut_list.Cut();
            }

            if (Lang13.Bool(S.has_reagent("welding_fuel", 5)))
            {
                foreach (dynamic _b in Lang13.Enumerate(this.mutations, typeof(SpacevineMutation)))
                {
                    SM2 = _b;


                    if (SM2.quality == 1)
                    {
                        temp_mut_list.Add(SM2);
                    }
                }

                if (Rand13.PercentChance(20))
                {
                    this.mutations.Remove(Rand13.PickFromTable(temp_mut_list));
                }
                temp_mut_list.Cut();
            }

            if (Lang13.Bool(S.has_reagent("phenol", 5)))
            {
                foreach (dynamic _c in Lang13.Enumerate(this.mutations, typeof(SpacevineMutation)))
                {
                    SM3 = _c;


                    if (SM3.quality == 3)
                    {
                        temp_mut_list.Add(SM3);
                    }
                }

                if (Rand13.PercentChance(20))
                {
                    this.mutations.Remove(Rand13.PickFromTable(temp_mut_list));
                }
            }

            if (Lang13.Bool(S.has_reagent("blood", 15)))
            {
                this.production += Rand13.Int(15, -5);
            }

            if (Lang13.Bool(S.has_reagent("amatoxin", 5)))
            {
                this.production += Rand13.Int(5, -15);
            }

            if (Lang13.Bool(S.has_reagent("plasma", 5)))
            {
                this.potency += Rand13.Int(5, -15);
            }

            if (Lang13.Bool(S.has_reagent("holywater", 10)))
            {
                this.potency += Rand13.Int(15, -5);
            }
            return;
        }