Пример #1
0
        // Function from file: xenobio_camera.dm
        public override void Activate(int?forced_state = null)
        {
            dynamic C          = null;
            Obj     remote_eye = null;
            dynamic X          = null;
            Mob_Living_SimpleAnimal_Slime S = null;


            if (!Lang13.Bool(this.target) || !(this.owner is Mob_Living_Carbon_Human))
            {
                return;
            }
            C          = this.owner;
            remote_eye = C.remote_control;
            X          = this.target;

            if (GlobalVars.cameranet.checkTurfVis(remote_eye.loc))
            {
                foreach (dynamic _a in Lang13.Enumerate(X.stored_slimes, typeof(Mob_Living_SimpleAnimal_Slime)))
                {
                    S = _a;

                    S.loc = remote_eye.loc;
                    S.visible_message("" + S + " warps in!");
                    X.stored_slimes.Remove(S);
                }
            }
            return;
        }
Пример #2
0
        // Function from file: other_reagents.dm
        public override void reaction_turf(dynamic T = null, double?volume = null)
        {
            Obj_Effect_Decal_Cleanable    C = null;
            Mob_Living_SimpleAnimal_Slime M = null;


            if ((volume ?? 0) >= 1)
            {
                ((Ent_Static)T).clean_blood();

                foreach (dynamic _a in Lang13.Enumerate(T, typeof(Obj_Effect_Decal_Cleanable)))
                {
                    C = _a;

                    GlobalFuncs.qdel(C);
                }

                foreach (dynamic _b in Lang13.Enumerate(T, typeof(Mob_Living_SimpleAnimal_Slime)))
                {
                    M = _b;

                    M.adjustToxLoss(Rand13.Int(5, 10));
                }
            }
            return;
        }
Пример #3
0
        // Function from file: slime_extracts.dm
        public override void on_reaction(Reagents holder = null, double?created_volume = null)
        {
            Mob_Living_SimpleAnimal_Slime S = null;

            GlobalFuncs.feedback_add_details("slime_cores_used", "" + this.type);
            S     = new Mob_Living_SimpleAnimal_Slime();
            S.loc = GlobalFuncs.get_turf(holder.my_atom);
            S.visible_message("<span class='danger'>Infused with plasma, the core begins to quiver and grow, and soon a new baby slime emerges from it!</span>");
            return;
        }
Пример #4
0
        // Function from file: slime_extracts.dm
        public override void on_reaction(Reagents holder = null, double?created_volume = null)
        {
            Mob_Living_SimpleAnimal_Slime S = null;

            GlobalFuncs.feedback_add_details("slime_cores_used", "" + this.type);
            S        = new Mob_Living_SimpleAnimal_Slime();
            S.colour = Rand13.Pick(new object [] { "grey", "orange", "metal", "blue", "purple", "dark purple", "dark blue", "green", "silver", "yellow", "gold", "yellow", "red", "silver", "pink", "cerulean", "sepia", "bluespace", "pyrite", "light pink", "oil", "adamantine", "black" });
            S.loc    = GlobalFuncs.get_turf(holder.my_atom);
            S.visible_message("<span class='danger'>Infused with plasma, the core begins to quiver and grow, and soon a new baby slime emerges from it!</span>");
            return;
        }
Пример #5
0
        // Function from file: gland.dm
        public override void activate(  )
        {
            Mob_Living_SimpleAnimal_Slime Slime = null;

            this.owner.WriteMsg("<span class='warning'>You feel nauseous!</span>");
            ((Mob_Living_Carbon)this.owner).vomit(20);
            Slime         = new Mob_Living_SimpleAnimal_Slime(GlobalFuncs.get_turf(this.owner));
            Slime.Friends = new ByTable(new object [] { this.owner });
            Slime.Leader  = this.owner;
            return;
        }
Пример #6
0
        // Function from file: windowdoor.dm
        public override bool attack_slime(Mob_Living_SimpleAnimal_Slime user = null)
        {
            user.do_attack_animation(this);

            if (!user.is_adult)
            {
                return(false);
            }
            this.attack_generic(user, 25);
            return(false);
        }
Пример #7
0
        // Function from file: window.dm
        public override bool attack_slime(Mob_Living_SimpleAnimal_Slime user = null)
        {
            user.do_attack_animation(this);

            if (!user.is_adult)
            {
                return(false);
            }
            this.attack_generic(user, Rand13.Int(10, 15));
            this.update_nearby_icons();
            return(false);
        }
Пример #8
0
        // Function from file: mirror.dm
        public override bool attack_slime(Mob_Living_SimpleAnimal_Slime user = null)
        {
            user.changeNext_move(8);
            user.do_attack_animation(this);

            if (this.shattered)
            {
                GlobalFuncs.playsound(this.loc, "sound/effects/hit_on_shattered_glass.ogg", 70, 1);
                return(false);
            }
            user.visible_message("<span class='danger'>" + user + " smashes " + this + "!</span>");
            this.shatter();
            return(false);
        }
        // Function from file: slime_extracts.dm
        public override void on_reaction(Reagents holder = null, double?created_volume = null)
        {
            Mob_Living_SimpleAnimal_Slime slime = null;

            GlobalFuncs.feedback_add_details("slime_cores_used", "" + this.type);

            foreach (dynamic _a in Lang13.Enumerate(Map13.FetchViewers(null, GlobalFuncs.get_turf(holder.my_atom)), typeof(Mob_Living_SimpleAnimal_Slime)))
            {
                slime = _a;

                slime.rabid = true;
                slime.visible_message("<span class='danger'>The " + slime + " is driven into a frenzy!</span>");
            }
            return;
        }
Пример #10
0
        // Function from file: grille.dm
        public override bool attack_slime(Mob_Living_SimpleAnimal_Slime user = null)
        {
            user.changeNext_move(8);
            user.do_attack_animation(this);

            if (!user.is_adult)
            {
                return(false);
            }
            GlobalFuncs.playsound(this.loc, "sound/effects/grillehit.ogg", 80, 1);
            user.visible_message("<span class='warning'>" + user + " smashes against " + this + ".</span>", "<span class='danger'>You smash against " + this + ".</span>", "<span class='italics'>You hear twisting metal.</span>");
            this.health -= Rand13.Int(1, 2);
            this.healthcheck();
            return(false);
        }
Пример #11
0
        // Function from file: pyrotechnic_reagents.dm
        public override void reaction_turf(dynamic T = null, double?volume = null)
        {
            Mob_Living_SimpleAnimal_Slime M = null;


            if ((volume ?? 0) >= 5)
            {
                foreach (dynamic _a in Lang13.Enumerate(T, typeof(Mob_Living_SimpleAnimal_Slime)))
                {
                    M = _a;

                    M.adjustToxLoss(Rand13.Int(15, 30));
                }
            }
            return;
        }
Пример #12
0
        // Function from file: corpse.dm
        public override void createCorpse(bool death = false, string ckey = null)
        {
            dynamic A = null;
            Mob_Living_SimpleAnimal_Slime M = null;

            A = Lang13.FindIn(typeof(Mob_Living_SimpleAnimal_Slime), this.loc);

            if (Lang13.Bool(A))
            {
                return;
            }
            M        = new Mob_Living_SimpleAnimal_Slime(this.loc);
            M.colour = this.mobcolour;
            M.adjustToxLoss(9001);
            GlobalFuncs.qdel(this);
            return;
        }
Пример #13
0
        // Function from file: effects_foam.dm
        public override bool attack_slime(Mob_Living_SimpleAnimal_Slime user = null)
        {
            user.changeNext_move(8);
            user.do_attack_animation(this);

            if (!user.is_adult)
            {
                this.attack_hand(user);
                return(false);
            }

            if (Rand13.PercentChance(75 - this.metal * 25))
            {
                user.visible_message("<span class='danger'>" + user + " smashes through the foamed metal!</span>", "<span class='danger'>You smash through the metal foam wall!</span>");
                GlobalFuncs.qdel(this);
            }
            return(false);
        }
Пример #14
0
        // Function from file: monkey.dm
        public override bool attack_slime(Mob_Living_SimpleAnimal_Slime user = null)
        {
            int damage = 0;


            if (base.attack_slime(user))
            {
                damage = Rand13.Int(5, 35);

                if (user.is_adult)
                {
                    damage = Rand13.Int(20, 40);
                }
                this.adjustBruteLoss(damage);
                this.updatehealth();
            }
            return(false);
        }
Пример #15
0
        // Function from file: simple_animal.dm
        public override bool attack_slime(Mob_Living_SimpleAnimal_Slime user = null)
        {
            double damage = 0;


            if (base.attack_slime(user))
            {
                damage = Rand13.Int(15, 25);

                if (user.is_adult)
                {
                    damage = Rand13.Int(20, 35);
                }
                this.attack_threshold_check(damage);
                return(true);
            }
            return(false);
        }
Пример #16
0
        // Function from file: xenobio_camera.dm
        public override void Activate(int?forced_state = null)
        {
            dynamic C          = null;
            Obj     remote_eye = null;
            dynamic X          = null;
            Mob_Living_SimpleAnimal_Slime S = null;


            if (!Lang13.Bool(this.target) || !(this.owner is Mob_Living_Carbon_Human))
            {
                return;
            }
            C          = this.owner;
            remote_eye = C.remote_control;
            X          = this.target;

            if (GlobalVars.cameranet.checkTurfVis(remote_eye.loc))
            {
                foreach (dynamic _a in Lang13.Enumerate(remote_eye.loc, typeof(Mob_Living_SimpleAnimal_Slime)))
                {
                    S = _a;


                    if (X.stored_slimes.len >= X.max_slimes)
                    {
                        break;
                    }

                    if (!Lang13.Bool(S.ckey))
                    {
                        if (S.buckled != null)
                        {
                            S.Feedstop(true);
                        }
                        S.visible_message("" + S + " vanishes in a flash of light!");
                        S.loc = X;
                        X.stored_slimes.Add(S);
                    }
                }
            }
            return;
        }
        // Function from file: anomaly_pyro.dm
        public override void end(  )
        {
            dynamic T = null;
            Mob_Living_SimpleAnimal_Slime S = null;


            if (this.newAnomaly.loc != null)
            {
                T = GlobalFuncs.get_turf(this.newAnomaly);

                if (T is Tile_Simulated)
                {
                    ((Tile_Simulated)T).atmos_spawn_air(13, 200);
                }
                S        = new Mob_Living_SimpleAnimal_Slime(T);
                S.colour = Rand13.Pick(new object [] { "red", "orange" });
                S.rabid  = true;
                GlobalFuncs.qdel(this.newAnomaly);
            }
            return;
        }
Пример #18
0
        // Function from file: other_reagents.dm
        public override void reaction_turf(dynamic T = null, double?volume = null)
        {
            int CT = 0;
            Mob_Living_SimpleAnimal_Slime M = null;
            dynamic    hotspot = null;
            GasMixture G       = null;


            if (!(T is Tile_Simulated))
            {
                return;
            }
            CT = this.cooling_temperature;

            if ((volume ?? 0) >= 10)
            {
                ((Tile_Simulated)T).MakeSlippery();
            }

            foreach (dynamic _a in Lang13.Enumerate(T, typeof(Mob_Living_SimpleAnimal_Slime)))
            {
                M = _a;

                M.apply_water();
            }
            hotspot = Lang13.FindIn(typeof(Obj_Effect_Hotspot), T);

            if (Lang13.Bool(hotspot) && !(T is Tile_Space))
            {
                if (Lang13.Bool(T.air))
                {
                    G             = T.air;
                    G.temperature = Num13.MaxInt(Num13.MinInt(Convert.ToInt32(G.temperature - CT * 1000), Convert.ToInt32(G.temperature / CT)), 0);
                    G.react();
                    GlobalFuncs.qdel(hotspot);
                }
            }
            return;
        }
Пример #19
0
		// Range: -1 Access: 0 Flags: ( 0, 4, 255 )
		public static Mob_Living wabbajack( dynamic M = null ) {
			dynamic Robot = null;
			Ent_Item W = null;
			Mob_Living new_mob = null;
			dynamic randomize = null;
			dynamic robot = null;
			Mob_Living D = null;
			Mob_Living Robot2 = null;
			Mob_Living Slime = null;
			dynamic beast = null;
			dynamic animal = null;
			Preferences A = null;
			Mob_Living H = null;
			ByTable all_species = null;
			dynamic speciestype = null;
			dynamic S = null;
			if ( M is Mob_Living ) {
				if ( M is Mob_Living && Lang13.Int( M.stat ) != 2 ) {
					if ( Lang13.Bool( M.notransform ) ) {
						return null;
					}
					M.notransform = 1;
					M.canmove = 0;
					M.icon = null;
					((dynamic)M.overlays).Cut();
					M.invisibility = 101;
					if ( M is Mob_Living_Silicon_Robot ) {
						Robot = M;
						if ( Lang13.Bool( Robot.mmi ) ) {
							GlobalFuncs.qdel( Robot.mmi );
						}
						((dynamic)Robot).notify_ai( 1 );
					} else {
						W = null;
						foreach (dynamic _a in M ) {
							if ( !( _a is Ent_Item ) ) {
								continue;
							}
							W = _a;
							if ( W is Ent_Item_Weapon_Implant ) {
								GlobalFuncs.qdel( W );
								continue;
							}
							((dynamic)W).layer = Temp13.initial( ((dynamic)W).layer );
							((dynamic)W).loc = M.loc;
							W.dropped( M );
						};
					}
					new_mob = null;
					randomize = Rand13.pick(new object [] { "monkey", "robot", "slime", "xeno", "humanoid", "animal" });
					dynamic _f = randomize; // Was a switch-case, sorry for the mess.
					if ( _f=="monkey" ) {
						new_mob = new Mob_Living_Carbon_Monkey( M.loc );
						new_mob.languages |= 1;
					} else if ( _f=="robot" ) {
						robot = Rand13.pick(new object [] { "cyborg", "syndiborg", "drone" });
						dynamic _b = robot; // Was a switch-case, sorry for the mess.
						if ( _b=="cyborg" ) {
							new_mob = new Mob_Living_Silicon_Robot( M.loc );
						} else if ( _b=="syndiborg" ) {
							new_mob = new Mob_Living_Silicon_Robot_Syndicate( M.loc );
						} else if ( _b=="drone" ) {
							new_mob = new Mob_Living_SimpleAnimal_Drone( M.loc );
							D = new_mob;
							((dynamic)D).update_drone_hack();
						};
						if ( new_mob is Mob_Living_Silicon ) {
							((dynamic)new_mob).gender = M.gender;
							new_mob.invisibility = 0;
							new_mob.job = "Cyborg";
							Robot2 = new_mob;
							((dynamic)Robot2).mmi = new Ent_Item_Device_Mmi( new_mob );
							((dynamic)((dynamic)Robot2).mmi).transfer_identity( M );
						} else {
							new_mob.languages |= 1;
						}
					} else if ( _f=="slime" ) {
						new_mob = new Mob_Living_SimpleAnimal_Slime( M.loc );
						if ( Rand13.percentChance( 50 ) ) {
							Slime = new_mob;
							((dynamic)Slime).is_adult = 1;
						}
						new_mob.languages |= 1;
					} else if ( _f=="xeno" ) {
						if ( Rand13.percentChance( 50 ) ) {
							new_mob = new Mob_Living_Carbon_Alien_Humanoid_Hunter( M.loc );
						} else {
							new_mob = new Mob_Living_Carbon_Alien_Humanoid_Sentinel( M.loc );
						}
						new_mob.languages |= 1;
					} else if ( _f=="animal" ) {
						if ( Rand13.percentChance( 50 ) ) {
							beast = Rand13.pick(new object [] { "carp", "bear", "mushroom", "statue", "bat", "goat", "killertomato", "spiderbase", "spiderhunter", "blobbernaut", "magicarp", "chaosmagicarp" });
							dynamic _c = beast; // Was a switch-case, sorry for the mess.
							if ( _c=="carp" ) {
								new_mob = new Mob_Living_SimpleAnimal_Hostile_Carp( M.loc );
							} else if ( _c=="bear" ) {
								new_mob = new Mob_Living_SimpleAnimal_Hostile_Bear( M.loc );
							} else if ( _c=="mushroom" ) {
								new_mob = new Mob_Living_SimpleAnimal_Hostile_Mushroom( M.loc );
							} else if ( _c=="statue" ) {
								new_mob = new Mob_Living_SimpleAnimal_Hostile_Statue( M.loc );
							} else if ( _c=="bat" ) {
								new_mob = new Mob_Living_SimpleAnimal_Hostile_Retaliate_Bat( M.loc );
							} else if ( _c=="goat" ) {
								new_mob = new Mob_Living_SimpleAnimal_Hostile_Retaliate_Goat( M.loc );
							} else if ( _c=="killertomato" ) {
								new_mob = new Mob_Living_SimpleAnimal_Hostile_Killertomato( M.loc );
							} else if ( _c=="spiderbase" ) {
								new_mob = new Mob_Living_SimpleAnimal_Hostile_Poison_GiantSpider( M.loc );
							} else if ( _c=="spiderhunter" ) {
								new_mob = new Mob_Living_SimpleAnimal_Hostile_Poison_GiantSpider_Hunter( M.loc );
							} else if ( _c=="blobbernaut" ) {
								new_mob = new Mob_Living_SimpleAnimal_Hostile_Blob_Blobbernaut( M.loc );
							} else if ( _c=="magicarp" ) {
								new_mob = new Mob_Living_SimpleAnimal_Hostile_Carp_Ranged( M.loc );
							} else if ( _c=="chaosmagicarp" ) {
								new_mob = new Mob_Living_SimpleAnimal_Hostile_Carp_Ranged_Chaos( M.loc );
							};
						} else {
							animal = Rand13.pick(new object [] { "parrot", "corgi", "crab", "pug", "cat", "mouse", "chicken", "cow", "lizard", "chick", "fox", "butterfly" });
							dynamic _d = animal; // Was a switch-case, sorry for the mess.
							if ( _d=="parrot" ) {
								new_mob = new Mob_Living_SimpleAnimal_Parrot( M.loc );
							} else if ( _d=="corgi" ) {
								new_mob = new Mob_Living_SimpleAnimal_Pet_Dog_Corgi( M.loc );
							} else if ( _d=="crab" ) {
								new_mob = new Mob_Living_SimpleAnimal_Crab( M.loc );
							} else if ( _d=="pug" ) {
								new_mob = new Mob_Living_SimpleAnimal_Pet_Dog_Pug( M.loc );
							} else if ( _d=="cat" ) {
								new_mob = new Mob_Living_SimpleAnimal_Pet_Cat( M.loc );
							} else if ( _d=="mouse" ) {
								new_mob = new Mob_Living_SimpleAnimal_Mouse( M.loc );
							} else if ( _d=="chicken" ) {
								new_mob = new Mob_Living_SimpleAnimal_Chicken( M.loc );
							} else if ( _d=="cow" ) {
								new_mob = new Mob_Living_SimpleAnimal_Cow( M.loc );
							} else if ( _d=="lizard" ) {
								new_mob = new Mob_Living_SimpleAnimal_Lizard( M.loc );
							} else if ( _d=="fox" ) {
								new_mob = new Mob_Living_SimpleAnimal_Pet_Fox( M.loc );
							} else if ( _d=="butterfly" ) {
								new_mob = new Mob_Living_SimpleAnimal_Butterfly( M.loc );
							} else {
								new_mob = new Mob_Living_SimpleAnimal_Chick( M.loc );
							};
						}
						new_mob.languages |= 1;
					} else if ( _f=="humanoid" ) {
						new_mob = new Mob_Living_Carbon_Human( M.loc );
						A = new Preferences();
						new ByTable().set( 1, new_mob ).set( "icon_updates", 0 ).apply( A.GetType().GetMethod( "copy_to" ) );
						H = new_mob;
						if ( Rand13.percentChance( 50 ) ) {
							all_species = new ByTable();
							speciestype = null;
							foreach (dynamic _e in Lang13.get_all_types( typeof(Species) ) - typeof(Species) ) {
								speciestype = _e;
								S = Lang13.call( speciestype );
								if ( !Lang13.Bool( S.dangerous_existence ) ) {
									all_species += speciestype;
								}
							};
							new ByTable().set( 1, Rand13.pick( all_species ) ).set( "icon_update", 0 ).apply( H.GetType().GetMethod( "set_species" ) );
							H.real_name = ((dynamic)((dynamic)H).dna.species).random_name( ((dynamic)H).gender, 1 );
						}
						((dynamic)H).update_body();
						H.update_hair();
						((dynamic)H).update_mutcolor();
						((dynamic)((dynamic)H).dna).update_dna_identity();
					} else {
						return null;
					};
					new_mob.attack_log = M.attack_log;
					M.attack_log += "[" + GlobalFuncs.time_stamp() + "] <font color='orange'>" + M.real_name + " (" + M.ckey + ") became " + new_mob.real_name + ".</font>";
					new_mob.a_intent = "harm";
					if ( Lang13.Bool( M.mind ) ) {
						((dynamic)M.mind).transfer_to( new_mob );
					} else {
						((dynamic)new_mob).key = M.key;
					}
					((dynamic)new_mob).write( "<B>Your form morphs into that of a " + randomize + ".</B>" );
					GlobalFuncs.qdel( M );
					return new_mob;
				}
			}
			return null;
		}
Пример #20
0
 // Function from file: chameleonproj.dm
 public override bool attack_slime(Mob_Living_SimpleAnimal_Slime user = null)
 {
     this.master.disrupt();
     return(false);
 }