// Function from file: antag_spawner.dm public override void spawn_antag(dynamic C = null, dynamic T = null, string type = null) { type = type ?? ""; dynamic holder = null; Mob_Living_SimpleAnimal_Slaughter S = null; Objective_Assassinate new_objective = null; Objective new_objective2 = null; holder = GlobalFuncs.PoolOrNew(typeof(Obj_Effect_Dummy_Slaughter), T); S = new Mob_Living_SimpleAnimal_Slaughter(holder); S.holder = holder; S.key = C.key; S.mind.assigned_role = "Slaughter Demon"; S.mind.special_role = "Slaughter Demon"; GlobalVars.ticker.mode.traitors.Add(S.mind); new_objective = new Objective_Assassinate(); new_objective.owner = S.mind; new_objective.target = Task13.User.mind; new_objective.explanation_text = "Kill " + Task13.User.real_name + ", the one who summoned you."; S.mind.objectives.Add(new_objective); new_objective2 = new Objective(); new_objective2.owner = S.mind; new_objective2.explanation_text = "Kill everyone else while you're at it."; S.mind.objectives.Add(new_objective2); S.WriteMsg(S.playstyle_string); S.WriteMsg("<B>You are currently not currently in the same plane of existence as the station. Ctrl+Click a blood pool to manifest.</B>"); S.WriteMsg("<B>Objective #" + 1 + "</B>: " + new_objective.explanation_text); S.WriteMsg("<B>Objective #" + 2 + "</B>: " + new_objective2.explanation_text); return; }
// Function from file: double_agents.dm public override void forge_traitor_objectives(Mind traitor = null) { dynamic target_mind = null; Objective_Destroy destroy_objective = null; Objective_Assassinate kill_objective = null; Objective_Survive survive_objective = null; Objective_Escape escape_objective = null; if (this.target_list.len != 0 && Lang13.Bool(this.target_list[traitor])) { target_mind = this.target_list[traitor]; if (target_mind.current is Mob_Living_Silicon) { destroy_objective = new Objective_Destroy(); destroy_objective.owner = traitor; destroy_objective.target = target_mind; destroy_objective.update_explanation_text(); traitor.objectives.Add(destroy_objective); } else { kill_objective = new Objective_Assassinate(); kill_objective.owner = traitor; kill_objective.target = target_mind; kill_objective.update_explanation_text(); traitor.objectives.Add(kill_objective); } if (traitor.current is Mob_Living_Silicon) { survive_objective = new Objective_Survive(); survive_objective.owner = traitor; traitor.objectives.Add(survive_objective); } else { escape_objective = new Objective_Escape(); escape_objective.owner = traitor; traitor.objectives.Add(escape_objective); } } else { base.forge_traitor_objectives(traitor); } return; }
// Function from file: ninja_event.dm public override bool start( ) { ByTable spawn_locs = null; Obj_Effect_Landmark L = null; ByTable candidates = null; dynamic C = null; Mind Mind = null; ByTable possible_targets = null; Mind M = null; ByTable objectives = null; Objective_Download O = null; Objective_Steal_Special O2 = null; int? selected = null; Mind M2 = null; dynamic is_bad_guy = null; Objective_Assassinate O3 = null; Objective_Protect O4 = null; int? selected2 = null; dynamic M3 = null; dynamic is_bad_guy2 = null; Objective_Debrain O5 = null; Objective_Capture O6 = null; Objective_Survive O7 = null; dynamic N = null; if (!Lang13.Bool(this.spawn_loc)) { spawn_locs = new ByTable(); foreach (dynamic _b in Lang13.Enumerate(GlobalVars.landmarks_list, typeof(Obj_Effect_Landmark))) { L = _b; if (L.loc is Tile) { switch ((string)(L.name)) { case "ninjaspawn": case "carpspawn": spawn_locs.Add(L.loc); break; } } } if (!(spawn_locs.len != 0)) { this.kill(); return(false); } this.spawn_loc = Rand13.PickFromTable(spawn_locs); } if (!Lang13.Bool(this.spawn_loc)) { this.kill(); return(false); } if (!Lang13.Bool(this.key)) { candidates = GlobalFuncs.get_candidates("space ninja"); if (!(candidates.len != 0)) { this.kill(); return(false); } C = Rand13.PickFromTable(candidates); this.key = C.key; } if (!Lang13.Bool(this.key)) { this.kill(); return(false); } Mind = GlobalFuncs.create_ninja_mind(this.key); Mind.active = true; possible_targets = new ByTable(); foreach (dynamic _c in Lang13.Enumerate(GlobalVars.ticker.minds, typeof(Mind))) { M = _c; if (Lang13.Bool(M.current) && Convert.ToInt32(M.current.stat) != 2) { if (M.current is Mob_Living_Carbon_Human) { if (Lang13.Bool(M.special_role)) { possible_targets[M] = 0; } else if (GlobalVars.command_positions.Contains(M.assigned_role)) { possible_targets[M] = 1; } } } } objectives = new ByTable(new object [] { 1, 2, 3, 4 }); while (Mind.objectives.len < 6) { dynamic _d = GlobalFuncs.pick_n_take(objectives); // Was a switch-case, sorry for the mess. if (_d == 1) { O = new Objective_Download(); O.owner = Mind; O.gen_amount_goal(); Mind.objectives.Add(O); } else if (_d == 2) { O2 = new Objective_Steal_Special(); O2.owner = Mind; Mind.objectives.Add(O2); } else if (_d == 3) { if (!(possible_targets.len != 0)) { continue; } selected = Rand13.Int(1, possible_targets.len); M2 = possible_targets[selected]; is_bad_guy = possible_targets[M2]; possible_targets.Cut(selected, (selected ?? 0) + 1); if (Lang13.Bool(is_bad_guy ^ this.helping_station)) { O3 = new Objective_Assassinate(); O3.owner = Mind; O3.target = M2; O3.explanation_text = new Txt("Slay ").the(M2.current.real_name).item().str(", the ").item(M2.assigned_role).str(".").ToString(); Mind.objectives.Add(O3); } else { O4 = new Objective_Protect(); O4.owner = Mind; O4.target = M2; O4.explanation_text = new Txt("Protect ").the(M2.current.real_name).item().str(", the ").item(M2.assigned_role).str(", from harm.").ToString(); Mind.objectives.Add(O4); } } else if (_d == 4) { if (!(possible_targets.len != 0)) { continue; } selected2 = Rand13.Int(1, possible_targets.len); M3 = possible_targets[selected2]; is_bad_guy2 = possible_targets[M3]; possible_targets.Cut(selected2, (selected2 ?? 0) + 1); if (Lang13.Bool(is_bad_guy2 ^ this.helping_station)) { O5 = new Objective_Debrain(); O5.owner = Mind; O5.target = M3; O5.explanation_text = "Steal the brain of " + M3.current.real_name + "."; Mind.objectives.Add(O5); } else { O6 = new Objective_Capture(); O6.owner = Mind; O6.gen_amount_goal(); Mind.objectives.Add(O6); } } else { break; } } O7 = new Objective_Survive(); O7.owner = Mind; Mind.objectives.Add(O7); Mind.store_memory("I am an elite mercenary assassin of the mighty Spider Clan. A <font color='red'><B>SPACE NINJA</B></font>!"); Mind.store_memory("Suprise is my weapon. Shadows are my armor. Without them, I am nothing. (//initialize your suit by right clicking on it, to use abilities like stealth)!"); Mind.store_memory("Officially, " + (this.helping_station != 0 ? "Nanotrasen" : "The Syndicate") + " are my employer."); this.Ninja = GlobalFuncs.create_space_ninja(this.spawn_loc); Mind.transfer_to(this.Ninja); if (this.Ninja.wear_suit is Obj_Item_Clothing_Suit_Space_SpaceNinja) { N = this.Ninja.wear_suit; ((Obj_Item_Clothing_Suit_Space_SpaceNinja)N).randomize_param(); } this.Ninja.v_internal = this.Ninja.s_store; this.Ninja.update_internals_hud_icon(true); if (this.Ninja.mind != Mind) { throw new Exception("Ninja created with incorrect mind"); return(false); } this.Ninja.WriteMsg(new Sound("sound/effects/ninja_greeting.ogg")); this.success_spawn = true; return(false); }