// Function from file: tgstation.dme
        public override dynamic attack_hand(dynamic a = null, bool?b = null, bool?c = null)
        {
            Objective_Hijack hijack = null;
            int       obj_count     = 0;
            Objective OBJ           = null;


            if (this.charges <= 0)
            {
                a.WriteMsg("The Wish Granter lies silent.");
                return(null);
            }
            else if (!(a is Mob_Living_Carbon_Human))
            {
                a.WriteMsg("You feel a dark stirring inside of the Wish Granter, something you want nothing of. Your instincts are better than any man's.");
                return(null);
            }
            else if (GlobalFuncs.is_special_character(a) != 0)
            {
                a.WriteMsg("Even to a heart as dark as yours, you know nothing good will come of this.  Something instinctual makes you pull away.");
            }
            else if (!(this.insisting != 0))
            {
                a.WriteMsg("Your first touch makes the Wish Granter stir, listening to you.  Are you really sure you want to do this?");
                this.insisting++;
            }
            else
            {
                a.WriteMsg("You speak.  " + Rand13.Pick(new object [] { "I want the station to disappear", "Humanity is corrupt, mankind must be destroyed", "I want to be rich", "I want to rule the world", "I want immortality." }) + ".  The Wish Granter answers.");
                a.WriteMsg("Your head pounds for a moment, before your vision clears.  You are the avatar of the Wish Granter, and your power is LIMITLESS!  And it's all yours.  You need to make sure no one can take it from you.  No one can know, first.");
                this.charges--;
                this.insisting = 0;
                ((Dna)a.dna).add_mutation("Hulk");
                ((Dna)a.dna).add_mutation("X Ray Vision");
                ((Dna)a.dna).add_mutation("Cold Resistance");
                ((Dna)a.dna).add_mutation("Telekinesis");
                GlobalVars.ticker.mode.traitors.Add(a.mind);
                a.mind.special_role = "Avatar of the Wish Granter";
                hijack       = new Objective_Hijack();
                hijack.owner = a.mind;
                a.mind.objectives.Add(hijack);
                obj_count = 1;

                foreach (dynamic _a in Lang13.Enumerate(a.mind.objectives, typeof(Objective)))
                {
                    OBJ = _a;

                    a.WriteMsg("<B>Objective #" + obj_count + "</B>: " + OBJ.explanation_text);
                    obj_count++;
                }
                a.WriteMsg("You have a very bad feeling about this.");
            }
            return(null);
        }
Example #2
0
        // Function from file: wildwest.dm
        public override dynamic attack_hand(dynamic a = null, bool?b = null, bool?c = null)
        {
            dynamic          wish   = null;
            Objective_Hijack hijack = null;
            int       obj_count     = 0;
            Objective OBJ           = null;
            Mob_Living_SimpleAnimal_Hostile_Faithless F = null;

            Task13.User.set_machine(this);

            if (this.chargesa <= 0)
            {
                a.WriteMsg("The Wish Granter lies silent.");
                return(null);
            }
            else if (!(a is Mob_Living_Carbon_Human))
            {
                a.WriteMsg("You feel a dark stirring inside of the Wish Granter, something you want nothing of. Your instincts are better than any man's.");
                return(null);
            }
            else if (GlobalFuncs.is_special_character(a) != 0)
            {
                a.WriteMsg("Even to a heart as dark as yours, you know nothing good will come of this.  Something instinctual makes you pull away.");
            }
            else if (!(this.insistinga != 0))
            {
                a.WriteMsg("Your first touch makes the Wish Granter stir, listening to you.  Are you really sure you want to do this?");
                this.insistinga++;
            }
            else
            {
                this.chargesa--;
                this.insistinga = 0;
                wish            = Interface13.Input("You want...", "Wish", null, null, new ByTable(new object [] { "Power", "Wealth", "Immortality", "To Kill", "Peace" }), InputType.Null | InputType.Any);

                dynamic _c = wish;                 // Was a switch-case, sorry for the mess.
                if (_c == "Power")
                {
                    a.WriteMsg("<B>Your wish is granted, but at a terrible cost...</B>");
                    a.WriteMsg("The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart.");
                    ((Dna)a.dna).add_mutation("Laser Eyes");
                    ((Dna)a.dna).add_mutation("Cold Resistance");
                    ((Dna)a.dna).add_mutation("X Ray Vision");
                    ((Mob)a).set_species(typeof(Species_Shadow));
                }
                else if (_c == "Wealth")
                {
                    a.WriteMsg("<B>Your wish is granted, but at a terrible cost...</B>");
                    a.WriteMsg("The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart.");
                    new Obj_Structure_Closet_Syndicate_Resources_Everything(this.loc);
                    ((Mob)a).set_species(typeof(Species_Shadow));
                }
                else if (_c == "Immortality")
                {
                    a.WriteMsg("<B>Your wish is granted, but at a terrible cost...</B>");
                    a.WriteMsg("The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart.");
                    a.verbs += typeof(Mob_Living_Carbon).GetMethod("immortality");
                    ((Mob)a).set_species(typeof(Species_Shadow));
                }
                else if (_c == "To Kill")
                {
                    a.WriteMsg("<B>Your wish is granted, but at a terrible cost...</B>");
                    a.WriteMsg("The Wish Granter punishes you for your wickedness, claiming your soul and warping your body to match the darkness in your heart.");
                    GlobalVars.ticker.mode.traitors.Add(a.mind);
                    a.mind.special_role = "traitor";
                    hijack       = new Objective_Hijack();
                    hijack.owner = a.mind;
                    a.mind.objectives.Add(hijack);
                    a.WriteMsg("<B>Your inhibitions are swept away, the bonds of loyalty broken, you are free to murder as you please!</B>");
                    obj_count = 1;

                    foreach (dynamic _a in Lang13.Enumerate(a.mind.objectives, typeof(Objective)))
                    {
                        OBJ = _a;

                        a.WriteMsg("<B>Objective #" + obj_count + "</B>: " + OBJ.explanation_text);
                        obj_count++;
                    }
                    ((Mob)a).set_species(typeof(Species_Shadow));
                }
                else if (_c == "Peace")
                {
                    a.WriteMsg("<B>Whatever alien sentience that the Wish Granter possesses is satisfied with your wish. There is a distant wailing as the last of the Faithless begin to die, then silence.</B>");
                    a.WriteMsg("You feel as if you just narrowly avoided a terrible fate...");

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

                        F.death();
                    }
                }
            }
            return(null);
        }