Example #1
0
 // Function from file: nuclear.dm
 public override void announce(  )
 {
     Game13.WriteMsg("<B>The current game mode is - Nuclear Emergency!</B>");
     Game13.WriteMsg("<B>A " + GlobalFuncs.syndicate_name() + " Strike Force is approaching " + GlobalFuncs.station_name() + "!</B>");
     Game13.WriteMsg("A nuclear explosive was being transported by Nanotrasen to a military base. The transport ship mysteriously lost contact with Space Traffic Control (STC). About that time a strange disk was discovered around " + GlobalFuncs.station_name() + ". It was identified by Nanotrasen as a nuclear auth. disk and now Syndicate Operatives have arrived to retake the disk and detonate SS13! Also, most likely Syndicate star ships are in the vicinity so take care not to lose the disk!\n<B>Syndicate</B>: Reclaim the disk and detonate the nuclear bomb anywhere on SS13.\n<B>Personnel</B>: Hold the disk and <B>escape with the disk</B> on the shuttle!");
     return;
 }
Example #2
0
        static void Main(string[] args)
        {
            try {                                 // The goddamn debugger can't seem to handle TypeInitializationExceptions so we'll just handle it ourselves.
                Logger.Announce("Hello, world!");
                object x = GlobalVars._preloader; // This forces global initialization ASAP

                ServiceDev.Setup();
                ServiceGame.Setup();
                WebServer.Start(Config.HOST_ADDR, Config.HOST_PORT);

                Logger.Announce("Loading Map!");
                var maploader = new DMMLoader();
                maploader.LoadMap("_maps/map_files/TgStation/tgstation.2.1.3.dmm", 0, 0, 1);
                //maploader.LoadMap("maps/tgstation.dmm", 0, 0, 1);

                //DMMLoader.Load("../../../-tg-station/_maps/map_files/TgStation/tgstation.2.1.3.dmm");

                Logger.Announce("Initializing Game!");
                Game13.New();

                Logger.Announce("Starting Scheduler!");
                Task13.__RunSchedulerLoop();
            }
            catch (Exception e) {
                Logger.Error("Fatal Error in Main!", e);
                Console.ReadLine();
            }
        }
        // Function from file: cult_structures.dm
        public void summon_narnar(  )
        {
            dynamic cult_mode   = null;
            dynamic target_turf = null;


            if (GlobalVars.ticker.mode.name != "cult")
            {
                this.visible_message(new Txt("<span class='warning'>").The(this).item().str(" glows brightly once, then falls dark. It looks strangely dull and lifeless...</span>").ToString());
                GlobalFuncs.log_game("Summon Nar-Sie rune failed - gametype is not cult");
                return;
            }
            cult_mode = GlobalVars.ticker.mode;

            if (cult_mode.eldergod)
            {
                return;
            }
            Game13.WriteMsg("sound/effects/dimensional_rend.ogg");
            Game13.WriteMsg("<span class='cultitalic'><b>Rip... <span class='big'>Rrrip...</span> <span class='reallybig'>RRRRRRRRRR--</span></b></span>");
            target_turf = GlobalFuncs.get_turf(this);
            Task13.Schedule(40, (Task13.Closure)(() => {
                new Obj_Singularity_Narsie_Large(target_turf);
                cult_mode.eldergod = true;

                if (this != null)
                {
                    GlobalFuncs.qdel(this);
                }
                return;
            }));
            return;
        }
Example #4
0
        // Function from file: zlevel.dm
        public void Load(ByTable potentialRuins = null, MapTemplate template = null)
        {
            potentialRuins = potentialRuins ?? GlobalVars.space_ruins_templates;


            if (potentialRuins.len != 0)
            {
                Game13.WriteMsg("<span class='boldannounce'>Loading ruins...</span>");

                if (!(template != null))
                {
                    template = potentialRuins[Rand13.PickFromTable(potentialRuins)];
                }
                template.load(GlobalFuncs.get_turf(this), GlobalVars.TRUE);
                potentialRuins.Remove(template);
                Game13.WriteMsg("<span class='boldannounce'>Ruins loaded.</span>");
            }
            else
            {
                Game13.WriteMsg("<span class='boldannounce'>No ruins found.</span>");
                return;
            }
            GlobalFuncs.qdel(this);
            return;
        }
Example #5
0
        // Function from file: abduction.dm
        public override bool declare_completion(  )
        {
            int?team_number = null;
            Obj_Machinery_Abductor_Console console = null;
            Objective objective = null;
            dynamic   team_name = null;

            team_number = null;
            team_number = 1;

            while ((team_number ?? 0) <= (this.abductor_teams ?? 0))
            {
                console   = this.get_team_console(team_number);
                objective = this.team_objectives[team_number];
                team_name = this.team_names[team_number];

                if ((console.experiment.points ?? 0) >= Convert.ToDouble(objective.target_amount))
                {
                    Game13.WriteMsg("<span class='greenannounce'>" + team_name + " team fullfilled its mission!</span>");
                }
                else
                {
                    Game13.WriteMsg("<span class='boldannounce'>" + team_name + " team failed its mission.</span>");
                }
                team_number++;
            }
            base.declare_completion();
            return(true);
        }
Example #6
0
        // Function from file: blob_finish.dm
        public override bool declare_completion(  )
        {
            if (Lang13.Bool(this.round_converted))
            {
                base.declare_completion();
            }

            if (Convert.ToDouble(this.blobwincount) <= GlobalVars.blobs_legit.len)
            {
                GlobalFuncs.feedback_set_details("round_end_result", "win - blob took over");
                Game13.WriteMsg("<FONT size = 3><B>The blob has taken over the station!</B></FONT>");
                Game13.WriteMsg("<B>The entire station was eaten by the Blob</B>");
                GlobalFuncs.log_game("Blob mode completed with a blob victory.");
            }
            else if (this.station_was_nuked)
            {
                GlobalFuncs.feedback_set_details("round_end_result", "halfwin - nuke");
                Game13.WriteMsg("<FONT size = 3><B>Partial Win: The station has been destroyed!</B></FONT>");
                Game13.WriteMsg("<B>Directive 7-12 has been successfully carried out preventing the Blob from spreading.</B>");
                GlobalFuncs.log_game("Blob mode completed with a tie (station destroyed).");
            }
            else if (!(GlobalVars.blob_cores.len != 0))
            {
                GlobalFuncs.feedback_set_details("round_end_result", "loss - blob eliminated");
                Game13.WriteMsg("<FONT size = 3><B>The staff has won!</B></FONT>");
                Game13.WriteMsg("<B>The alien organism has been eradicated from the station</B>");
                GlobalFuncs.log_game("Blob mode completed with a crew victory.");
                Game13.WriteMsg("<span class='notice'>Rebooting in 30s</span>");
            }
            base.declare_completion();
            return(true);
        }
Example #7
0
 // Function from file: blob.dm
 public override void announce(  )
 {
     Game13.WriteMsg("<B>The current game mode is - <font color='green'>Blob</font>!</B>");
     Game13.WriteMsg("<B>A dangerous alien organism is rapidly spreading throughout the station!</B>");
     Game13.WriteMsg("You must kill it all while minimizing the damage to the station.");
     return;
 }
Example #8
0
 // Function from file: abduction.dm
 public override void announce(  )
 {
     Game13.WriteMsg("<B>The current game mode is - Abduction!</B>");
     Game13.WriteMsg("There are alien <b>abductors</b> sent to " + Game13.name + " to perform nefarious experiments!");
     Game13.WriteMsg("<b>Abductors</b> - kidnap the crew and replace their organs with experimental ones.");
     Game13.WriteMsg("<b>Crew</b> - don't get abducted and stop the abductors.");
     return;
 }
Example #9
0
 // Function from file: _handofgod.dm
 public override void announce(  )
 {
     Game13.WriteMsg("<B>The current game mode is - Hand of God!</B>");
     Game13.WriteMsg("<B>Two cults are onboard the station, seeking to overthrow the other, and anyone who stands in their way.</B>");
     Game13.WriteMsg("<B>Followers</B> - Complete your deity's objectives. Convert crewmembers to your cause by using your deity's nexus. Remember - there is no you, there is only the cult.");
     Game13.WriteMsg("<B>Prophets</B> - Command your cult by the will of your deity.  You are a high-value target, so be careful!");
     Game13.WriteMsg("<B>Personnel</B> - Do not let any cult succeed in its mission. Loyalty implants and holy water will revert them to neutral, hopefully nonviolent crew.");
     return;
 }
 // Function from file: raginmages.dm
 public override bool declare_completion(  )
 {
     if (this.finished)
     {
         GlobalFuncs.feedback_set_details("round_end_result", "loss - wizard killed");
         Game13.WriteMsg("<FONT size=3><B>The crew has managed to hold off the wizard attack! The Space Wizards Federation has been taught a lesson they will not soon forget!</B></FONT>");
     }
     base.declare_completion(  );
     return(false);
 }
Example #11
0
 // Function from file: wizard.dm
 public override bool declare_completion(  )
 {
     if (this.finished)
     {
         GlobalFuncs.feedback_set_details("round_end_result", "loss - wizard killed");
         Game13.WriteMsg("<span class='userdanger'>The wizard" + (this.wizards.len > 1 ? "s" : "") + " has been killed by the crew! The Space Wizards Federation has been taught a lesson they will not soon forget!</span>");
     }
     base.declare_completion();
     return(true);
 }
Example #12
0
        // Function from file: ticker.dm
        public void send_random_tip(  )
        {
            ByTable randomtips = null;

            randomtips = GlobalFuncs.file2list("config/tips.txt");

            if (randomtips.len != 0)
            {
                Game13.WriteMsg("<font color='purple'><b>Tip of the round: </b>" + String13.HtmlEncode(Rand13.PickFromTable(randomtips)) + "</font>");
            }
            return;
        }
Example #13
0
 // Function from file: cult.dm
 public override bool declare_completion(  )
 {
     if (this.eldergod)
     {
         GlobalFuncs.feedback_set_details("round_end_result", "win - cult win");
         Game13.WriteMsg("<span class='greentext'>The cult wins! It has succeeded in serving its dark master!</span>");
     }
     else
     {
         GlobalFuncs.feedback_set_details("round_end_result", "loss - staff stopped the cult");
         Game13.WriteMsg("<span class='redtext'>The staff managed to stop the cult!</span>");
     }
     base.declare_completion();
     return(true);
 }
Example #14
0
 // Function from file: revolution.dm
 public override bool declare_completion(  )
 {
     if (this.finished == 1)
     {
         GlobalFuncs.feedback_set_details("round_end_result", "win - heads killed");
         Game13.WriteMsg("<span class='redtext'>The heads of staff were killed or exiled! The revolutionaries win!</span>");
     }
     else if (this.finished == 2)
     {
         GlobalFuncs.feedback_set_details("round_end_result", "loss - rev heads killed");
         Game13.WriteMsg("<span class='redtext'>The heads of staff managed to stop the revolution!</span>");
     }
     base.declare_completion();
     return(true);
 }
Example #15
0
 // Function from file: monkey.dm
 public override bool declare_completion(  )
 {
     if (this.check_monkey_victory())
     {
         GlobalFuncs.feedback_set_details("round_end_result", "win - monkey win");
         GlobalFuncs.feedback_set("round_end_result", this.escaped_monkeys);
         Game13.WriteMsg("<span class='userdanger'>The monkeys have overthrown their captors! Eeek eeeek!!</span>");
     }
     else
     {
         GlobalFuncs.feedback_set_details("round_end_result", "loss - staff stopped the monkeys");
         GlobalFuncs.feedback_set("round_end_result", this.escaped_monkeys);
         Game13.WriteMsg("<span class='userdanger'>The staff managed to contain the monkey infestation!</span>");
     }
     return(false);
 }
Example #16
0
        // Function from file: subsystem.dm
        public virtual double Initialize(int start_timeofday = 0, double?zlevel = null)
        {
            double time = 0;
            string msg  = null;

            time = (Game13.timeofday - start_timeofday) / 10;
            msg  = "Initialized " + this.name + " subsystem within " + time + " seconds!";

            if (Lang13.Bool(zlevel))
            {
                GlobalFuncs.testing(msg);
                return(time);
            }
            Game13.WriteMsg("<span class='boldannounce'>" + msg + "</span>");
            return(time);
        }
Example #17
0
        // Function from file: meteor.dm
        public override bool declare_completion(  )
        {
            dynamic    text      = null;
            int        survivors = 0;
            Mob_Living player    = null;

            survivors = 0;

            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.player_list, typeof(Mob_Living)))
            {
                player = _a;


                if (player.stat != 2)
                {
                    survivors++;

                    if (player.onCentcom())
                    {
                        text += "<br><b><font size=2>" + player.real_name + " escaped to the safety of Centcom.</font></b>";
                    }
                    else if (player.onSyndieBase())
                    {
                        text += "<br><b><font size=2>" + player.real_name + " escaped to the (relative) safety of Syndicate Space.</font></b>";
                    }
                    else
                    {
                        text += "<br><font size=1>" + player.real_name + " survived but is stranded without any hope of rescue.</font>";
                    }
                }
            }

            if (survivors != 0)
            {
                Game13.WriteMsg("<span class='boldnotice'>The following survived the meteor storm</span>:" + text);
            }
            else
            {
                Game13.WriteMsg("<span class='boldnotice'>Nobody survived the meteor storm!</span>");
            }
            GlobalFuncs.feedback_set_details("round_end_result", "end - evacuation");
            GlobalFuncs.feedback_set("round_end_result", survivors);
            base.declare_completion();
            return(true);
        }
Example #18
0
        // Function from file: events.dm
        public void getHoliday(  )
        {
            double? YY      = null;
            double? MM      = null;
            double? DD      = null;
            dynamic H       = null;
            dynamic holiday = null;


            if (!GlobalVars.config.allow_holidays)
            {
                return;
            }
            YY = String13.ParseNumber(String13.FormatTime(Game13.timeofday, "YY"));
            MM = String13.ParseNumber(String13.FormatTime(Game13.timeofday, "MM"));
            DD = String13.ParseNumber(String13.FormatTime(Game13.timeofday, "DD"));

            foreach (dynamic _a in Lang13.Enumerate(Lang13.GetTypes(typeof(Holiday)) - typeof(Holiday)))
            {
                H = _a;

                holiday = Lang13.Call(H);

                if (((Holiday)holiday).shouldCelebrate(DD, MM, YY))
                {
                    ((Holiday)holiday).celebrate();

                    if (!Lang13.Bool(this.holidays))
                    {
                        this.holidays = new ByTable();
                    }
                    this.holidays[holiday.name] = holiday;
                }
            }

            if (Lang13.Bool(this.holidays))
            {
                this.holidays = GlobalFuncs.shuffle(this.holidays);
                Game13.update_status();
            }
            return;
        }
        // Function from file: narsie.dm
        public Obj_Singularity_Narsie_Large(dynamic loc = null, int?starting_energy = null, bool?temp = null) : base((object)(loc), starting_energy, temp)
        {
            dynamic A             = null;
            Image   alert_overlay = null;

            // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;
            Game13.WriteMsg("<span class='narsie'>NAR-SIE HAS RISEN</span>");
            Game13.WriteMsg(Rand13.Pick(new object [] { "sound/hallucinations/im_here1.ogg", "sound/hallucinations/im_here2.ogg" }));
            A = GlobalFuncs.get_area(this);

            if (Lang13.Bool(A))
            {
                alert_overlay = new Image("icons/mob/mob.dmi", "harvester");
                GlobalFuncs.notify_ghosts(new Txt("Nar-Sie has risen in ").the(A.name).item().str(". Reach out to the Geometer to be given a new shell for your soul.").ToString(), null, null, this, alert_overlay, true);
            }
            this.narsie_spawn_animation();
            Task13.Sleep(70);
            GlobalVars.SSshuttle.emergency.request(null, 0.3);
            return;
        }
Example #20
0
        // Function from file: jobs.dm
        public bool SetupOccupations(string faction = null)
        {
            faction = faction ?? "Station";

            dynamic all_jobs = null;
            dynamic J        = null;
            dynamic job      = null;

            this.occupations = new ByTable();
            all_jobs         = Lang13.GetTypes(typeof(Job)) - typeof(Job);

            if (!(all_jobs.len != 0))
            {
                Game13.WriteMsg("<span class='boldannounce'>Error setting up jobs, no job datums found</span>");
                return(false);
            }

            foreach (dynamic _a in Lang13.Enumerate(all_jobs))
            {
                J = _a;

                job = Lang13.Call(J);

                if (!Lang13.Bool(job))
                {
                    continue;
                }

                if (job.faction != faction)
                {
                    continue;
                }

                if (!((Job)job).config_check())
                {
                    continue;
                }
                this.occupations.Add(job);
            }
            return(true);
        }
Example #21
0
 // Function from file: shadowling.dm
 public override bool declare_completion(  )
 {
     if (this.check_shadow_victory() && GlobalVars.SSshuttle.emergency.mode >= 5)
     {
         Game13.WriteMsg("<span class='greentext'>The shadowlings have ascended and taken over the station!</span>");
     }
     else if (this.shadowling_dead && !this.check_shadow_victory())
     {
         Game13.WriteMsg("<span class='redtext'>The shadowlings have been killed by the crew!</span>");
     }
     else if (!this.check_shadow_victory() && GlobalVars.SSshuttle.emergency.mode >= 5)
     {
         Game13.WriteMsg("<span class='redtext'>The crew escaped the station before the shadowlings could ascend!</span>");
     }
     else
     {
         Game13.WriteMsg("<span class='redtext'>The shadowlings have failed!</span>");
     }
     base.declare_completion();
     return(true);
 }
Example #22
0
        // Function from file: Malf_Modules.dm
        public void detonate(int?z_level = null)
        {
            z_level = z_level ?? 1;

            dynamic    M = null;
            Mob_Living L = null;
            dynamic    T = null;


            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.player_list))
            {
                M = _a;

                M.WriteMsg("sound/machines/Alarm.ogg");
            }
            Task13.Sleep(100);

            foreach (dynamic _b in Lang13.Enumerate(GlobalVars.mob_list, typeof(Mob_Living)))
            {
                L = _b;

                T = GlobalFuncs.get_turf(L);

                if (Lang13.IntNullable(T.z) != z_level)
                {
                    continue;
                }

                if (L is Mob_Living_Silicon)
                {
                    continue;
                }
                L.WriteMsg("<span class='danger'><B>The blast wave from the " + this + " tears you atom from atom!</B></span>");
                L.dust();
            }
            Game13.WriteMsg("<B>The AI cleansed the station of life with the doomsday device!</B>");
            GlobalVars.ticker.force_ending = 1;
            return;
        }
Example #23
0
        // Function from file: master.dm
        public void Setup(double?zlevel = null)
        {
            Subsystem SS  = null;
            Subsystem SS2 = null;


            if (Lang13.Bool(zlevel) && (zlevel ?? 0) > 0 && (zlevel ?? 0) <= Game13.map_size_z)
            {
                foreach (dynamic _a in Lang13.Enumerate(this.subsystems, typeof(Subsystem)))
                {
                    SS = _a;

                    SS.Initialize(Game13.timeofday, zlevel);
                    Task13.Sleep(-1);
                }
                return;
            }
            Game13.WriteMsg("<span class='boldannounce'>Initializing subsystems...</span>");
            GlobalFuncs.preloadTemplates();
            GlobalFuncs.createRandomZlevel();
            GlobalFuncs.make_mining_asteroid_secrets();
            GlobalFuncs.setup_map_transitions();
            GlobalFuncs.sortTim(this.subsystems, typeof(GlobalFuncs).GetMethod("cmp_subsystem_priority"));

            foreach (dynamic _b in Lang13.Enumerate(this.subsystems, typeof(Subsystem)))
            {
                SS2 = _b;

                SS2.Initialize(Game13.timeofday, zlevel);
                Task13.Sleep(-1);
            }
            Game13.WriteMsg("<span class='boldannounce'>Initializations complete!</span>");
            GlobalFuncs.sortTim(this.subsystems, typeof(GlobalFuncs).GetMethod("cmp_subsystem_display"));
            Game13.sleep_offline = true;
            Game13.fps           = Convert.ToInt32(GlobalVars.config.fps);
            Task13.Sleep(-1);
            GlobalVars.Master.process();
            return;
        }
Example #24
0
 // Function from file: cult.dm
 public override void announce(  )
 {
     Game13.WriteMsg("<B>The current game mode is - Cult!</B>");
     Game13.WriteMsg("<B>Some crewmembers are attempting to start a cult!<BR>\nCultists - summon the elder god. Sacrifice crewmembers and turn them into constructs. Remember - there is no you, there is only the cult.<BR>\nPersonnel - Do not let the cult succeed in its mission. Deal with the cultists and any constructs that they might summon.</B>");
     return;
 }
Example #25
0
 // Function from file: changeling.dm
 public override void announce(  )
 {
     Game13.WriteMsg("<b>The current game mode is - Changeling!</b>");
     Game13.WriteMsg("<b>There are alien changelings on the station. Do not let the changelings succeed!</b>");
     return;
 }
 // Function from file: traitor_chan.dm
 public override void announce(  )
 {
     Game13.WriteMsg("<B>The current game mode is - Traitor+Changeling!</B>");
     Game13.WriteMsg("<B>There are alien creatures on the station along with some syndicate operatives out for their own gain! Do not let the changelings or the traitors succeed!</B>");
     return;
 }
Example #27
0
        // Function from file: _handofgod.dm
        public override bool declare_completion(  )
        {
            string    text         = null;
            Mind      red_god      = null;
            bool      godwin       = false;
            Mind      red_prophet  = null;
            Mind      player       = null;
            string    objectives   = null;
            int       count        = 0;
            Objective O            = null;
            string    text2        = null;
            Mind      blue_god     = null;
            bool      godwin2      = false;
            Mind      blue_prophet = null;
            Mind      player2      = null;
            string    objectives2  = null;
            int       count2       = 0;
            Objective O2           = null;


            if (this.red_deities.len != 0)
            {
                text = "<BR><font size=3 color='red'><B>The red cult:</b></font>";

                foreach (dynamic _d in Lang13.Enumerate(this.red_deities, typeof(Mind)))
                {
                    red_god = _d;

                    godwin = true;
                    text  += "<BR><B>" + red_god.key + "</B> was the red deity, <B>" + red_god.name + "</B> (";

                    if (Lang13.Bool(red_god.current))
                    {
                        if (Convert.ToInt32(red_god.current.stat) == 2)
                        {
                            text += "died";
                        }
                        else
                        {
                            text += "survived";
                        }
                    }
                    else
                    {
                        text += "ceased existing";
                    }
                    text += ")";

                    if (this.red_deity_prophets.len != 0)
                    {
                        foreach (dynamic _a in Lang13.Enumerate(this.red_deity_prophets, typeof(Mind)))
                        {
                            red_prophet = _a;

                            text += "<BR>The red prophet was <B>" + red_prophet.name + "</B> (<B>" + red_prophet.key + "</B>)";
                        }
                    }
                    else
                    {
                        text += "<BR>the red prophet was killed for their beliefs.";
                    }
                    text += "<BR><B>Red follower count: </B> " + this.red_deity_followers.len;
                    text += "<BR><B>Red followers:</B> ";

                    foreach (dynamic _b in Lang13.Enumerate(this.red_deity_followers, typeof(Mind)))
                    {
                        player = _b;

                        text += "" + player.name + " (" + player.key + ")";
                    }
                    objectives = "";

                    if (red_god.objectives.len != 0)
                    {
                        count = 1;

                        foreach (dynamic _c in Lang13.Enumerate(red_god.objectives, typeof(Objective)))
                        {
                            O = _c;


                            if (O.check_completion() != 0)
                            {
                                objectives += "<BR><B>Objective #" + count + "</B>: " + O.explanation_text + " <font color='green'><B>Success!</B></font>";
                                GlobalFuncs.feedback_add_details("god_objective", "" + O.type + "|SUCCESS");
                            }
                            else
                            {
                                objectives += "<BR><B>Objective #" + count + "</B>: " + O.explanation_text + " <font color='red'><B>Fail.</B></font>";
                                GlobalFuncs.feedback_add_details("god_objective", "" + O.type + "|FAIL");
                                godwin = false;
                            }
                            count++;
                        }
                    }
                    text += objectives;

                    if (godwin)
                    {
                        text += "<BR><font color='green'><B>The red cult and deity were successful!</B></font>";
                        GlobalFuncs.feedback_add_details("god_success", "SUCCESS");
                    }
                    else
                    {
                        text += "<br><font color='red'><B>The red cult and deity have failed!</B></font>";
                        GlobalFuncs.feedback_add_details("god_success", "FAIL");
                    }
                    text += "<BR>";
                }
                Game13.WriteMsg(text);
            }

            if (this.blue_deities.len != 0)
            {
                text2 = "<BR><font size=3 color='red'><B>The blue cult:</b></font>";

                foreach (dynamic _h in Lang13.Enumerate(this.blue_deities, typeof(Mind)))
                {
                    blue_god = _h;

                    godwin2 = true;
                    text2  += "<BR><B>" + blue_god.key + "</B> was the blue deity, <B>" + blue_god.name + "</B> (";

                    if (Lang13.Bool(blue_god.current))
                    {
                        if (Convert.ToInt32(blue_god.current.stat) == 2)
                        {
                            text2 += "died";
                        }
                        else
                        {
                            text2 += "survived";
                        }
                    }
                    else
                    {
                        text2 += "ceased existing";
                    }
                    text2 += ")";

                    if (this.blue_deity_prophets.len != 0)
                    {
                        foreach (dynamic _e in Lang13.Enumerate(this.blue_deity_prophets, typeof(Mind)))
                        {
                            blue_prophet = _e;

                            text2 += "<BR>The blue prophet was <B>" + blue_prophet.name + "</B> (<B>" + blue_prophet.key + "</B>)";
                        }
                    }
                    else
                    {
                        text2 += "<BR>the blue prophet was killed for their beliefs.";
                    }
                    text2 += "<BR><B>Blue follower count: </B> " + this.blue_deity_followers.len;
                    text2 += "<BR><B>Blue followers:</B> ";

                    foreach (dynamic _f in Lang13.Enumerate(this.blue_deity_followers, typeof(Mind)))
                    {
                        player2 = _f;

                        text2 += "" + player2.name + " (" + player2.key + ")";
                    }
                    objectives2 = "";

                    if (blue_god.objectives.len != 0)
                    {
                        count2 = 1;

                        foreach (dynamic _g in Lang13.Enumerate(blue_god.objectives, typeof(Objective)))
                        {
                            O2 = _g;


                            if (O2.check_completion() != 0)
                            {
                                objectives2 += "<BR><B>Objective #" + count2 + "</B>: " + O2.explanation_text + " <font color='green'><B>Success!</B></font>";
                                GlobalFuncs.feedback_add_details("god_objective", "" + O2.type + "|SUCCESS");
                            }
                            else
                            {
                                objectives2 += "<BR><B>Objective #" + count2 + "</B>: " + O2.explanation_text + " <font color='red'><B>Fail.</B></font>";
                                GlobalFuncs.feedback_add_details("god_objective", "" + O2.type + "|FAIL");
                                godwin2 = false;
                            }
                            count2++;
                        }
                    }
                    text2 += objectives2;

                    if (godwin2)
                    {
                        text2 += "<BR><font color='green'><B>The blue cult and deity were successful!</B></font>";
                        GlobalFuncs.feedback_add_details("god_success", "SUCCESS");
                    }
                    else
                    {
                        text2 += "<BR><font color='red'><B>The blue cult and deity have failed!</B></font>";
                        GlobalFuncs.feedback_add_details("god_success", "FAIL");
                    }
                    text2 += "<BR>";
                }
                Game13.WriteMsg(text2);
            }
            base.declare_completion();
            return(true);
        }
Example #28
0
 // Function from file: sandbox.dm
 public override void announce(  )
 {
     Game13.WriteMsg("<B>The current game mode is - Sandbox!</B>");
     Game13.WriteMsg("<B>Build your own station with the sandbox-panel command!</B>");
     return;
 }
Example #29
0
        // Function from file: special_shadowling_abilities.dm
        public override bool cast(dynamic targets = null, dynamic thearea = null, dynamic user = null)
        {
            thearea = thearea ?? Task13.User;

            dynamic    H              = null;
            string     hatch_or_no    = null;
            Obj_Item   I              = null;
            Mob_Living M              = null;
            Obj_Machinery_Power_Apc A = null;
            Mob_Living_SimpleAnimal_AscendantShadowling A2 = null;
            Obj_Effect_ProcHolder_Spell S = null;

            H = thearea;

            if (!this.shadowling_check(H))
            {
                return(false);
            }
            hatch_or_no = Interface13.Alert(H, "It is time to ascend. Are you sure about this?", null, "Yes", "No");

            switch ((string)(hatch_or_no))
            {
            case "No":
                H.WriteMsg("<span class='warning'>You decide against ascending for now.");
                this.charge_counter = this.charge_max;
                return(false);

                break;

            case "Yes":
                H.notransform = 1;
                ((Ent_Static)H).visible_message("<span class='warning'>" + H + "'s things suddenly slip off. They gently rise into the air, red light glowing in their eyes.</span>", "<span class='shadowling'>You rise into the air and get ready for your transformation.</span>");

                foreach (dynamic _d in Lang13.Enumerate(H, typeof(Obj_Item)))
                {
                    I = _d;

                    ((Mob)H).unEquip(I);
                    Task13.Sleep(50);
                    ((Ent_Static)H).visible_message("<span class='warning'>" + H + "'s skin begins to crack and harden.</span>", "<span class='shadowling'>Your flesh begins creating a shield around yourself.</span>");
                    Task13.Sleep(100);
                    ((Ent_Static)H).visible_message("<span class='warning'>The small horns on " + H + "'s head slowly grow and elongate.</span>", "<span class='shadowling'>Your body continues to mutate. Your telepathic abilities grow.</span>");
                    Task13.Sleep(90);
                    ((Ent_Static)H).visible_message("<span class='warning'>" + H + "'s body begins to violently stretch and contort.</span>", "<span class='shadowling'>You begin to rend apart the final barriers to godhood.</span>");
                    Task13.Sleep(40);
                    H.WriteMsg("<i><b>Yes!</b></i>");
                    Task13.Sleep(10);
                    H.WriteMsg("<i><b><span class='big'>YES!!</span></b></i>");
                    Task13.Sleep(10);
                    H.WriteMsg("<i><b><span class='reallybig'>YE--</span></b></i>");
                    Task13.Sleep(1);

                    foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInRangeExcludeThis(H, 7), typeof(Mob_Living)))
                    {
                        M = _a;

                        M.Weaken(10);
                        M.WriteMsg("<span class='userdanger'>An immense pressure slams you onto the ground!</span>");
                    }
                    Game13.WriteMsg("<font size=5><span class='shadowling'><b>\"VYSHA NERADA YEKHEZET U'RUU!!\"</font></span>");
                    Game13.WriteMsg("sound/hallucinations/veryfar_noise.ogg");

                    foreach (dynamic _b in Lang13.Enumerate(GlobalVars.apcs_list, typeof(Obj_Machinery_Power_Apc)))
                    {
                        A = _b;

                        A.overload_lighting();
                    }
                    A2 = new Mob_Living_SimpleAnimal_AscendantShadowling(H.loc);

                    foreach (dynamic _c in Lang13.Enumerate(H.mind.spell_list, typeof(Obj_Effect_ProcHolder_Spell)))
                    {
                        S = _c;


                        if (S == this)
                        {
                            continue;
                        }
                        ((Mind)H.mind).remove_spell(S);
                    }
                    H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_Targeted_Annihilate(null));
                    H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_Targeted_Hypnosis(null));
                    H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_Self_ShadowlingPhaseShift(null));
                    H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_AoeTurf_AscendantStorm(null));
                    H.mind.AddSpell(new Obj_Effect_ProcHolder_Spell_Self_ShadowlingHivemindAscendant(null));
                    ((Mind)H.mind).transfer_to(A2);
                    A2.name = H.real_name;

                    if (Lang13.Bool(A2.real_name))
                    {
                        A2.real_name = H.real_name;
                    }
                    H.invisibility = 60;
                    H.loc          = A2;
                    Task13.Sleep(50);

                    if (!GlobalVars.ticker.mode.shadowling_ascended)
                    {
                        GlobalVars.SSshuttle.emergency.request(null, 0.3);
                    }
                    GlobalVars.ticker.mode.shadowling_ascended = true;
                    A2.mind.remove_spell(this);
                    GlobalFuncs.qdel(H);
                }
                break;
            }
            return(false);
        }
Example #30
0
 // Function from file: revolution.dm
 public override void announce(  )
 {
     Game13.WriteMsg("<B>The current game mode is - Revolution!</B>");
     Game13.WriteMsg("<B>Some crewmembers are attempting to start a revolution!<BR>\nRevolutionaries - Kill the Captain, HoP, HoS, CE, RD and CMO. Convert other crewmembers (excluding the heads of staff, and security officers) to your cause by flashing them. Protect your leaders.<BR>\nPersonnel - Protect the heads of staff. Kill the leaders of the revolution, and brainwash the other revolutionaries (by beating them in the head).</B>");
     return;
 }