// 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); }
// Function from file: artefact.dm public void spawn_copy(dynamic C = null, dynamic T = null) { Mob_Living_Carbon_Human M = null; ByTable all_species = null; dynamic speciestype = null; dynamic S = null; Objective_Hijackclone hijack_objective = null; Objective_Protect new_objective = null; M = new Mob_Living_Carbon_Human(T); C.prefs.copy_to(M, false); M.key = C.key; M.mind.name = Task13.User.real_name; M.WriteMsg("<B>You are an alternate version of " + Task13.User.real_name + " from another universe! Help them accomplish their goals at all costs.</B>"); M.real_name = Task13.User.real_name; M.name = Task13.User.real_name; M.faction = new ByTable(new object [] { "" + Task13.User.real_name }); if (Rand13.PercentChance(50)) { all_species = new ByTable(); foreach (dynamic _a in Lang13.Enumerate(Lang13.GetTypes(typeof(Species)) - typeof(Species))) { speciestype = _a; S = Lang13.Call(speciestype); if (!S.dangerous_existence) { all_species.Add(speciestype); } } M.set_species(Rand13.PickFromTable(all_species), false); } M.update_body(); M.update_hair(); M.update_mutcolor(); M.dna.update_dna_identity(); this.equip_copy(M); if (Lang13.Bool(this.evil)) { hijack_objective = new Objective_Hijackclone(); hijack_objective.owner = M.mind; M.mind.objectives.Add(hijack_objective); hijack_objective.explanation_text = "Ensure only " + Task13.User.real_name + " and their copies are on the shuttle!"; M.WriteMsg("<B>Objective #" + 1 + "</B>: " + hijack_objective.explanation_text); M.mind.special_role = "multiverse traveller"; GlobalFuncs.log_game("" + M.key + " was made a multiverse traveller with the objective to help " + Task13.User.real_name + " hijack."); } else { new_objective = new Objective_Protect(); new_objective.owner = M.mind; new_objective.target = Task13.User.mind; new_objective.explanation_text = "Protect " + Task13.User.real_name + ", your copy, and help them defend the innocent from the mobs of multiverse clones."; M.mind.objectives.Add(new_objective); M.WriteMsg("<B>Objective #" + 1 + "</B>: " + new_objective.explanation_text); M.mind.special_role = "multiverse traveller"; GlobalFuncs.log_game("" + M.key + " was made a multiverse traveller with the objective to help " + Task13.User.real_name + " protect the station."); } return; }