예제 #1
0
        // Function from file: artefact.dm
        public void equip_copy(Mob_Living_Carbon_Human M = null)
        {
            Obj_Item_Weapon_Multisword sword = null;
            dynamic  randomize        = null;
            dynamic  hat              = null;
            dynamic  C                = null;
            dynamic  R                = null;
            dynamic  L                = null;
            dynamic  LL               = null;
            dynamic  RL               = null;
            Obj_Item carried_item     = null;
            Obj_Item_Weapon_Card_Id W = null;

            sword          = new Obj_Item_Weapon_Multisword();
            sword.assigned = this.assigned;
            sword.faction  = new ByTable(new object [] { "" + this.assigned });
            sword.evil     = this.evil;
            randomize      = Rand13.Pick(new object [] { "mobster", "roman", "wizard", "cyborg", "syndicate", "assistant", "animu", "cultist", "highlander", "clown", "killer", "pirate", "soviet", "officer", "gladiator" });

            dynamic _b = randomize;             // Was a switch-case, sorry for the mess.

            if (_b == "mobster")
            {
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Head_Fedora(M), 11);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Shoes_Laceup(M), 12);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Gloves_Color_Black(M), 10);
                M.equip_to_slot_or_del(new Obj_Item_Device_Radio_Headset(M), 8);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Glasses_Sunglasses(M), 9);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Under_SuitJacket_ReallyBlack(M), 14);
                M.equip_to_slot_or_del(sword, 5);
            }
            else if (_b == "roman")
            {
                hat = Rand13.Pick(new object [] { typeof(Obj_Item_Clothing_Head_Helmet_Roman), typeof(Obj_Item_Clothing_Head_Helmet_Roman_Legionaire) });
                M.equip_to_slot_or_del(Lang13.Call(hat, M), 11);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Under_Roman(M), 14);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Shoes_Roman(M), 12);
                M.equip_to_slot_or_del(new Obj_Item_Weapon_Shield_Riot_Roman(M), 4);
                M.equip_to_slot_or_del(sword, 5);
            }
            else if (_b == "wizard")
            {
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Under_Color_Lightpurple(M), 14);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Suit_Wizrobe_Red(M), 13);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Shoes_Sandal(M), 12);
                M.equip_to_slot_or_del(new Obj_Item_Device_Radio_Headset(M), 8);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Head_Wizard_Red(M), 11);
                M.equip_to_slot_or_del(sword, 5);
            }
            else if (_b == "cyborg")
            {
                C = Lang13.FindIn(typeof(Obj_Item_Organ_Limb_Chest), M.organs);
                GlobalFuncs.qdel(C);
                M.organs.Add(new Obj_Item_Organ_Limb_Robot_Chest());
                R = Lang13.FindIn(typeof(Obj_Item_Organ_Limb_RArm), M.organs);
                GlobalFuncs.qdel(R);
                M.organs.Add(new Obj_Item_Organ_Limb_Robot_RArm());
                L = Lang13.FindIn(typeof(Obj_Item_Organ_Limb_LArm), M.organs);
                GlobalFuncs.qdel(L);
                M.organs.Add(new Obj_Item_Organ_Limb_Robot_LArm());
                LL = Lang13.FindIn(typeof(Obj_Item_Organ_Limb_LLeg), M.organs);
                GlobalFuncs.qdel(LL);
                M.organs.Add(new Obj_Item_Organ_Limb_Robot_LLeg());
                RL = Lang13.FindIn(typeof(Obj_Item_Organ_Limb_RLeg), M.organs);
                GlobalFuncs.qdel(RL);
                M.organs.Add(new Obj_Item_Organ_Limb_Robot_RLeg());
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Glasses_Thermal_Eyepatch(M), 9);
                M.equip_to_slot_or_del(sword, 5);
            }
            else if (_b == "syndicate")
            {
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Under_Syndicate(M), 14);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Shoes_Combat(M), 12);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Gloves_Combat(M), 10);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Head_Helmet_Swat(M), 11);
                M.equip_to_slot_or_del(new Obj_Item_Device_Radio_Headset(M), 8);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Suit_Armor_Vest(M), 13);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Mask_Gas(M), 2);
                M.equip_to_slot_or_del(sword, 5);
            }
            else if (_b == "assistant")
            {
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Under_Color_Grey(M), 14);
                M.equip_to_slot_or_del(new Obj_Item_Device_Radio_Headset(M), 8);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Shoes_Sneakers_Black(M), 12);
                M.equip_to_slot_or_del(sword, 5);
            }
            else if (_b == "animu")
            {
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Shoes_Sandal(M), 12);
                M.equip_to_slot_or_del(new Obj_Item_Device_Radio_Headset(M), 8);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Head_Kitty(M), 11);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Under_Schoolgirl_Red(M), 14);
                M.equip_to_slot_or_del(sword, 5);
            }
            else if (_b == "cultist")
            {
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Head_Culthood_Alt(M), 11);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Suit_Cultrobes_Alt(M), 13);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Shoes_Cult(M), 12);
                M.equip_to_slot_or_del(new Obj_Item_Device_Radio_Headset(M), 8);
                M.equip_to_slot_or_del(sword, 5);
            }
            else if (_b == "highlander")
            {
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Under_Kilt(M), 14);
                M.equip_to_slot_or_del(new Obj_Item_Device_Radio_Headset(M), 8);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Head_Beret(M), 11);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Shoes_Combat(M), 12);
                M.equip_to_slot_or_del(sword, 5);
            }
            else if (_b == "clown")
            {
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Under_Rank_Clown(M), 14);
                M.equip_to_slot_or_del(new Obj_Item_Device_Radio_Headset(M), 8);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Shoes_ClownShoes(M), 12);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Mask_Gas_ClownHat(M), 2);
                M.equip_to_slot_or_del(new Obj_Item_Weapon_Bikehorn(M), 15);
                M.equip_to_slot_or_del(sword, 5);
            }
            else if (_b == "killer")
            {
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Under_Overalls(M), 14);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Shoes_Sneakers_White(M), 12);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Gloves_Color_Latex(M), 10);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Mask_Surgical(M), 2);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Head_Welding(M), 11);
                M.equip_to_slot_or_del(new Obj_Item_Device_Radio_Headset(M), 8);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Suit_Apron(M), 13);
                M.equip_to_slot_or_del(new Obj_Item_Weapon_Kitchen_Knife(M), 15);
                M.equip_to_slot_or_del(new Obj_Item_Weapon_Scalpel(M), 16);
                M.equip_to_slot_or_del(sword, 5);

                foreach (dynamic _a in Lang13.Enumerate(M.contents, typeof(Obj_Item)))
                {
                    carried_item = _a;


                    if (!(carried_item is Obj_Item_Weapon_Implant))
                    {
                        carried_item.add_blood(M);
                    }
                }
            }
            else if (_b == "pirate")
            {
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Under_Pirate(M), 14);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Shoes_Sneakers_Brown(M), 12);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Head_Bandana(M), 11);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Glasses_Eyepatch(M), 9);
                M.equip_to_slot_or_del(new Obj_Item_Device_Radio_Headset(M), 8);
                M.equip_to_slot_or_del(sword, 5);
            }
            else if (_b == "soviet")
            {
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Head_Hgpiratecap(M), 11);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Shoes_Combat(M), 12);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Gloves_Combat(M), 10);
                M.equip_to_slot_or_del(new Obj_Item_Device_Radio_Headset(M), 8);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Suit_Hgpirate(M), 13);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Under_Soviet(M), 14);
                M.equip_to_slot_or_del(sword, 5);
            }
            else if (_b == "officer")
            {
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Head_Helmet_Space_Beret(M), 11);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Shoes_Combat(M), 12);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Gloves_Combat(M), 10);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Mask_Cigarette_Cigar_Havana(M), 2);
                M.equip_to_slot_or_del(new Obj_Item_Device_Radio_Headset(M), 8);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Suit_Jacket_Miljacket(M), 13);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Under_Syndicate(M), 14);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Glasses_Eyepatch(M), 9);
                M.equip_to_slot_or_del(sword, 5);
            }
            else if (_b == "gladiator")
            {
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Head_Helmet_Gladiator(M), 11);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Under_Gladiator(M), 14);
                M.equip_to_slot_or_del(new Obj_Item_Device_Radio_Headset(M), 8);
                M.equip_to_slot_or_del(new Obj_Item_Clothing_Shoes_Sandal(M), 12);
                M.equip_to_slot_or_del(sword, 5);
            }
            else
            {
                return;
            }
            M.update_icons();
            M.update_augments();
            W                 = new Obj_Item_Weapon_Card_Id();
            W.icon_state      = "centcom";
            W.access         += GlobalVars.access_maint_tunnels;
            W.assignment      = "Multiverse Traveller";
            W.registered_name = M.real_name;
            W.update_label(M.real_name);
            M.equip_to_slot_or_del(W, 7);
            return;
        }
예제 #2
0
        // Function from file: artefact.dm
        public override dynamic attack_self(dynamic user = null, dynamic flag = null, bool?emp = null)
        {
            bool    faction_check = false;
            dynamic F             = null;
            Objective_Hijackclone hijack_objective = null;
            Objective_Survive     new_objective    = null;
            ByTable candidates           = null;
            dynamic C                    = null;
            Obj_Item_Weapon_Multisword M = null;


            if (user.mind.special_role == "apprentice")
            {
                user.WriteMsg("<span class='warning'>You know better than to touch your teacher's stuff.</span>");
                return(null);
            }

            if (this.cooldown < Game13.time)
            {
                faction_check = false;

                foreach (dynamic _a in Lang13.Enumerate(this.faction))
                {
                    F = _a;


                    if (Lang13.Bool(user.faction.Contains(F)))
                    {
                        faction_check = true;
                        break;
                    }
                }

                if (!faction_check)
                {
                    this.faction  = new ByTable(new object [] { "" + user.real_name });
                    this.assigned = "" + user.real_name;
                    user.faction  = new ByTable(new object [] { "" + user.real_name });
                    user.WriteMsg("You bind the sword to yourself. You can now use it to summon help.");

                    if (!Lang13.Bool(Task13.User.mind.special_role))
                    {
                        if (Rand13.PercentChance(30))
                        {
                            user.WriteMsg("<span class='warning'><B>With your new found power you could easily conquer the station!</B></span>");
                            hijack_objective       = new Objective_Hijackclone();
                            hijack_objective.owner = Task13.User.mind;
                            Task13.User.mind.objectives.Add(hijack_objective);
                            hijack_objective.explanation_text = "Ensure only " + Task13.User.real_name + " and their copies are on the shuttle!";
                            Task13.User.WriteMsg("<B>Objective #" + 1 + "</B>: " + hijack_objective.explanation_text);
                            GlobalVars.ticker.mode.traitors.Add(Task13.User.mind);
                            Task13.User.mind.special_role = "" + Task13.User.real_name + " Prime";
                            this.evil = GlobalVars.TRUE;
                        }
                        else
                        {
                            user.WriteMsg("<span class='warning'><B>With your new found power you could easily defend the station!</B></span>");
                            new_objective                  = new Objective_Survive();
                            new_objective.owner            = Task13.User.mind;
                            new_objective.explanation_text = "Survive, and help defend the innocent from the mobs of multiverse clones.";
                            Task13.User.WriteMsg("<B>Objective #" + 1 + "</B>: " + new_objective.explanation_text);
                            Task13.User.mind.objectives.Add(new_objective);
                            GlobalVars.ticker.mode.traitors.Add(Task13.User.mind);
                            Task13.User.mind.special_role = "" + Task13.User.real_name + " Prime";
                            this.evil = GlobalVars.FALSE;
                        }
                    }
                }
                else
                {
                    candidates = GlobalFuncs.get_candidates("wizard");

                    if (candidates.len != 0)
                    {
                        C = Rand13.PickFromTable(candidates);
                        this.spawn_copy(C, GlobalFuncs.get_turf(user.loc));
                        user.WriteMsg("<span class='warning'><B>The sword flashes, and you find yourself face to face with...you!</B></span>");
                        this.cooldown = Game13.time + 400;

                        foreach (dynamic _b in Lang13.Enumerate(GlobalVars.multiverse, typeof(Obj_Item_Weapon_Multisword)))
                        {
                            M = _b;


                            if (M.assigned == this.assigned)
                            {
                                M.cooldown = this.cooldown;
                            }
                        }
                    }
                    else
                    {
                        user.WriteMsg("You fail to summon any copies of yourself. Perhaps you should try again in a bit.");
                    }
                }
            }
            else
            {
                user.WriteMsg("<span class='warning'><B>" + this + " is recharging! Keep in mind it shares a cooldown with the swords wielded by your copies.</span>");
            }
            return(null);
        }