// Function from file: dna_injector.dm public virtual void inject(dynamic M = null, dynamic user = null) { string log_msg = null; Mutation_Human HM = null; Mutation_Human HM2 = null; this.prepare(); if (Lang13.Bool(M.has_dna()) && !Lang13.Bool(M.disabilities & 128)) { M.radiation += Rand13.Int(((int)(20 / Math.Pow(this.damage_coeff, 2))), ((int)(50 / Math.Pow(this.damage_coeff, 2)))); log_msg = "" + GlobalFuncs.key_name(user) + " injected " + GlobalFuncs.key_name(M) + " with the " + this.name; foreach (dynamic _a in Lang13.Enumerate(this.remove_mutations, typeof(Mutation_Human))) { HM = _a; HM.force_lose(M); } foreach (dynamic _b in Lang13.Enumerate(this.add_mutations, typeof(Mutation_Human))) { HM2 = _b; if (HM2.name == "Monkified") { GlobalFuncs.message_admins("" + GlobalFuncs.key_name_admin(user) + " injected " + GlobalFuncs.key_name_admin(M) + " with the " + this.name + " <span class='danger'>(MONKEY)</span>"); log_msg += " (MONKEY)"; } HM2.force_give(M); } if (this.fields != null) { if (Lang13.Bool(this.fields["name"]) && Lang13.Bool(this.fields["UE"]) && Lang13.Bool(this.fields["blood_type"])) { M.real_name = this.fields["name"]; M.dna.unique_enzymes = this.fields["UE"]; M.name = M.real_name; M.dna.blood_type = this.fields["blood_type"]; } if (Lang13.Bool(this.fields["UI"])) { M.dna.uni_identity = GlobalFuncs.merge_text(M.dna.uni_identity, this.fields["UI"]); ((Mob_Living_Carbon)M).updateappearance(null, null, true); } } GlobalFuncs.log_attack(log_msg); } else { user.WriteMsg("<span class='notice'>It appears that " + M + " does not have compatible DNA.</span>"); return; } return; }
// Function from file: chameleon_skin.dm public override dynamic sting_action(Mob user = null, Ent_Static target = null) { Mob H = null; Mutation_Human HM = null; H = user; if (!(H is Mob_Living_Carbon_Human)) { return(null); } HM = GlobalVars.mutations_list["Chameleon"]; if (Lang13.Bool(((dynamic)H).dna.mutations.Contains(HM))) { HM.force_lose(H); } else { HM.force_give(H); } GlobalFuncs.feedback_add_details("changeling_powers", "CS"); return(1); }
// Function from file: dna_injector.dm public override void inject(dynamic M = null, dynamic user = null) { string log_msg = null; double endtime = 0; Mutation_Human HM = null; Mutation_Human HM2 = null; this.prepare(); if (Lang13.Bool(M.has_dna()) && !Lang13.Bool(M.disabilities & 128)) { if (Convert.ToInt32(M.stat) == 2) { user.WriteMsg(new Txt("<span class='notice'>You can't modify ").item(M).str("'s DNA while ").he_she_it_they().str("'s dead.</span>").ToString()); return; } M.radiation += Rand13.Int(((int)(20 / Math.Pow(this.damage_coeff, 2))), ((int)(50 / Math.Pow(this.damage_coeff, 2)))); log_msg = "" + GlobalFuncs.key_name(user) + " injected " + GlobalFuncs.key_name(M) + " with the " + this.name; endtime = Game13.time + this.duration; foreach (dynamic _a in Lang13.Enumerate(this.remove_mutations, typeof(Mutation_Human))) { HM = _a; if (HM.name == "Monkified") { if (M is Mob_Living_Carbon_Human) { continue; } M = HM.force_lose(M); } else { HM.force_lose(M); } } foreach (dynamic _b in Lang13.Enumerate(this.add_mutations, typeof(Mutation_Human))) { HM2 = _b; if (Lang13.Bool(M.dna.mutations.Contains(HM2)) && !Lang13.Bool(M.dna.temporary_mutations[HM2.name])) { continue; } if (HM2.name == "Monkified" && M is Mob_Living_Carbon_Human) { GlobalFuncs.message_admins("" + GlobalFuncs.key_name_admin(user) + " injected " + GlobalFuncs.key_name_admin(M) + " with the " + this.name + " <span class='danger'>(MONKEY)</span>"); log_msg += " (MONKEY)"; M = HM2.force_give(M); } else { HM2.force_give(M); } M.dna.temporary_mutations[HM2.name] = endtime; } if (this.fields != null) { if (Lang13.Bool(this.fields["name"]) && Lang13.Bool(this.fields["UE"]) && Lang13.Bool(this.fields["blood_type"])) { if (!Lang13.Bool(M.dna.previous["name"])) { M.dna.previous["name"] = M.real_name; } if (!Lang13.Bool(M.dna.previous["UE"])) { M.dna.previous["UE"] = M.dna.unique_enzymes; } if (!Lang13.Bool(M.dna.previous["blood_type"])) { M.dna.previous["blood_type"] = M.dna.blood_type; } M.real_name = this.fields["name"]; M.dna.unique_enzymes = this.fields["UE"]; M.name = M.real_name; M.dna.blood_type = this.fields["blood_type"]; M.dna.temporary_mutations["ue changed"] = endtime; } if (Lang13.Bool(this.fields["UI"])) { if (!Lang13.Bool(M.dna.previous["UI"])) { M.dna.previous["UI"] = M.dna.uni_identity; } M.dna.uni_identity = GlobalFuncs.merge_text(M.dna.uni_identity, this.fields["UI"]); ((Mob_Living_Carbon)M).updateappearance(null, null, true); M.dna.temporary_mutations["ui changed"] = endtime; } } GlobalFuncs.log_attack(log_msg); } else { user.WriteMsg("<span class='notice'>It appears that " + M + " does not have compatible DNA.</span>"); return; } return; }