// Function from file: flashbang.dm public void bang(dynamic T = null, Mob_Living M = null) { bool ear_safety = false; int distance = 0; M.show_message("<span class='warning'>BANG</span>", 2); GlobalFuncs.playsound(this.loc, "sound/weapons/flashbang.ogg", 100, 1); ear_safety = M.check_ear_prot(); distance = Num13.MaxInt(1, Map13.GetDistance(this, T)); if (M.weakeyes) { M.visible_message("<span class='disarm'><b>" + M + "</b> screams and collapses!</span>"); M.WriteMsg("<span class='userdanger'><font size=3>AAAAGH!</font></span>"); M.Weaken(15); M.Stun(15); M.adjust_eye_damage(8); } if (M.flash_eyes(null, null, true)) { M.Stun(Num13.MaxInt(((int)(10 / distance)), 3)); M.Weaken(Num13.MaxInt(((int)(10 / distance)), 3)); } if (this.loc == M || this.loc == M.loc) { M.Stun(10); M.Weaken(10); } if (!ear_safety) { M.WriteMsg(new Sound("sound/weapons/flash_ring.ogg", false, true, 0, 100)); M.Stun(Num13.MaxInt(((int)(10 / distance)), 3)); M.Weaken(Num13.MaxInt(((int)(10 / distance)), 3)); M.setEarDamage(M.ear_damage + Rand13.Int(0, 5), Num13.MaxInt(((int)(M.ear_deaf ?? 0)), 15)); if (M.ear_damage >= 15) { M.WriteMsg("<span class='warning'>Your ears start to ring badly!</span>"); if (Rand13.PercentChance(M.ear_damage - 10 + 5)) { M.WriteMsg("<span class='warning'>You can't hear anything!</span>"); M.disabilities |= 4; } } else if (M.ear_damage >= 5) { M.WriteMsg("<span class='warning'>Your ears start to ring!</span>"); } } return; }
// Function from file: mutations.dm public override void on_life(Mob_Living owner = null) { int x_offset_old = 0; int y_offset_old = 0; int x_offset = 0; int y_offset = 0; if (Rand13.PercentChance(10) && owner.paralysis <= 1) { owner.Stun(10); dynamic _a = Rand13.Int(1, 3); // Was a switch-case, sorry for the mess. if (2 <= _a && _a <= 3) { owner.say("" + (Rand13.PercentChance(50) ? ";" : "") + Rand13.Pick(new object [] { "SHIT", "PISS", "F**K", "C**T", "C********R", "M**********R", "T**S" })); } else if (_a == 1) { owner.emote("twitch"); } x_offset_old = owner.pixel_x; y_offset_old = owner.pixel_y; x_offset = owner.pixel_x + Rand13.Int(-2, 2); y_offset = owner.pixel_y + Rand13.Int(-1, 1); Icon13.Animate(new ByTable().Set(1, owner).Set("pixel_x", x_offset).Set("pixel_y", y_offset).Set("time", 1)); Icon13.Animate(new ByTable().Set(1, owner).Set("pixel_x", x_offset_old).Set("pixel_y", y_offset_old).Set("time", 1)); } return; }
// Function from file: mining_mobs.dm public void Trip( ) { Mob_Living M = null; foreach (dynamic _a in Lang13.Enumerate(this.loc, typeof(Mob_Living))) { M = _a; this.visible_message("<span class='danger'>The " + this.name + " grabs hold of " + M.name + "!</span>"); M.Stun(5); M.adjustBruteLoss(Rand13.Int(10, 15)); this.latched = true; } if (!this.latched) { GlobalFuncs.qdel(this); } else { Task13.Schedule(50, (Task13.Closure)(() => { GlobalFuncs.qdel(this); return; })); } return; }
// Function from file: shadowling_abilities.dm public override bool cast(dynamic targets = null, dynamic thearea = null, dynamic user = null) { thearea = thearea ?? Task13.User; Mob_Living target = null; Mob_Living M = null; foreach (dynamic _a in Lang13.Enumerate(targets, typeof(Mob_Living))) { target = _a; if (!(target is Mob_Living_Carbon_Human)) { thearea.WriteMsg("<span class='warning'>You may only glare at humans!</span>"); this.revert_cast(); return(false); } if (!this.shadowling_check(thearea)) { this.revert_cast(); return(false); } if (target.stat != 0) { thearea.WriteMsg("<span class='warning'>" + target + " must be conscious!</span>"); this.revert_cast(); return(false); } if (GlobalFuncs.is_shadow_or_thrall(target)) { thearea.WriteMsg("<span class='warning'>You cannot glare at allies!</span>"); this.revert_cast(); return(false); } M = target; ((Ent_Static)thearea).visible_message("<span class='warning'><b>" + thearea + "'s eyes flash a blinding red!</b></span>"); target.visible_message("<span class='danger'>" + target + " freezes in place, their eyes glazing over...</span>"); if (Map13.GetDistance(target, thearea) <= 1) { target.WriteMsg("<span class='userdanger'>Your gaze is forcibly drawn into " + thearea + "'s eyes, and you are mesmerized by the heavenly lights...</span>"); } else { target.WriteMsg("<span class='userdanger'>Red lights suddenly dance in your vision, and you are mesmerized by their heavenly beauty...</span>"); } target.Stun(10); ((dynamic)M).silent += 10; } return(false); }
// Function from file: martial.dm public bool headKick(dynamic A = null, Mob_Living D = null) { if (!(D.stat != 0) && !(D.weakened != 0)) { D.visible_message("<span class='warning'>" + A + " kicks " + D + " in the head!</span>", "<span class='userdanger'>" + A + " kicks you in the jaw!</span>"); D.apply_damage(20, "brute", "head"); D.drop_item(); GlobalFuncs.playsound(GlobalFuncs.get_turf(D), "sound/weapons/punch1.ogg", 50, 1, -1); D.Stun(4); return(true); } return(this.basic_hit(A, D)); }
// Function from file: martial.dm public bool kneeStomach(dynamic A = null, Mob_Living D = null) { if (!(D.stat != 0) && !(D.weakened != 0)) { D.visible_message("<span class='warning'>" + A + " knees " + D + " in the stomach!</span>", "<span class='userdanger'>" + A + " winds you with a knee in the stomach!</span>"); D.audible_message("<b>" + D + "</b> gags!"); D.losebreath += 3; D.Stun(2); GlobalFuncs.playsound(GlobalFuncs.get_turf(D), "sound/weapons/punch1.ogg", 50, 1, -1); return(true); } return(this.basic_hit(A, D)); }
// Function from file: martial.dm public bool wristWrench(dynamic A = null, Mob_Living D = null) { if (!(D.stat != 0) && !(D.stunned != 0) && !(D.weakened != 0)) { D.visible_message("<span class='warning'>" + A + " grabs " + D + "'s wrist and wrenches it sideways!</span>", "<span class='userdanger'>" + A + " grabs your wrist and violently wrenches it to the side!</span>"); GlobalFuncs.playsound(GlobalFuncs.get_turf(A), "sound/weapons/thudswoosh.ogg", 50, 1, -1); D.emote("scream"); D.drop_item(); D.apply_damage(5, "brute", Rand13.Pick(new object [] { "l_arm", "r_arm" })); D.Stun(3); return(true); } return(this.basic_hit(A, D)); }
// Function from file: inflict_handler.dm public override bool cast(dynamic targets = null, dynamic thearea = null, dynamic user = null) { thearea = thearea ?? Task13.User; Mob_Living target = null; Mob_Living C_target = null; dynamic B = null; foreach (dynamic _b in Lang13.Enumerate(targets, typeof(Mob_Living))) { target = _b; GlobalFuncs.playsound(target, this.sound, 50, 1); switch ((string)(this.destroys)) { case "gib": target.gib(); break; case "gib_brain": if (target is Mob_Living_Carbon_Human || target is Mob_Living_Carbon_Monkey) { C_target = target; B = C_target.getorgan(typeof(Obj_Item_Organ_Internal_Brain)); if (Lang13.Bool(B)) { B.loc = GlobalFuncs.get_turf(C_target); B.transfer_identity(C_target); ((dynamic)C_target).internal_organs -= B; } } target.gib(); break; case "disintegrate": target.dust(); break; } if (!(target != null)) { continue; } target.adjustBruteLoss(this.amt_dam_brute); target.adjustFireLoss(this.amt_dam_fire); target.adjustToxLoss(this.amt_dam_tox); target.adjustOxyLoss(this.amt_dam_oxy); target.Weaken(this.amt_weakened); target.Paralyse(this.amt_paralysis); target.Stun(this.amt_stunned); target.blind_eyes(this.amt_eye_blind); target.blur_eyes(this.amt_eye_blurry); if (Lang13.Bool(this.summon_type)) { Lang13.Call(this.summon_type, target.loc, target); } } return(false); }