// Function from file: armor.dm public override bool hit_reaction(Mob_Living_Carbon owner = null, string attack_text = null, int?final_block_chance = null, dynamic damage = null, int?attack_type = null) { Mob_Living_Carbon H = null; ByTable turfs = null; dynamic T = null; dynamic picked = null; if (!this.active) { return(false); } if (Rand13.PercentChance(this.hit_reaction_chance)) { H = owner; owner.visible_message("<span class='danger'>The reactive teleport system flings " + H + " clear of " + attack_text + "!</span>"); turfs = new ByTable(); foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInRangeExcludeThis(H, this.tele_range))) { T = _a; if (T.density) { continue; } if (Convert.ToDouble(T.x) > Game13.map_size_x - this.tele_range || Convert.ToDouble(T.x) < this.tele_range) { continue; } if (Convert.ToDouble(T.y) > Game13.map_size_y - this.tele_range || Convert.ToDouble(T.y) < this.tele_range) { continue; } turfs.Add(T); } if (!(turfs.len != 0)) { turfs.Add(Rand13.PickFromTable(Map13.FetchInRangeExcludeThis(H, this.tele_range).Contains(typeof(Tile)))); } picked = Rand13.PickFromTable(turfs); if (!(picked is Tile)) { return(false); } H.forceMove(picked); H.rad_act(this.rad_amount); return(true); } return(false); }
// Function from file: radiation_storm.dm public override bool start( ) { Mob_Living_Carbon C = null; dynamic T = null; bool skip = false; dynamic a = null; Mob_Living_Carbon H = null; Mob_Living_Carbon M = null; foreach (dynamic _b in Lang13.Enumerate(GlobalVars.living_mob_list, typeof(Mob_Living_Carbon))) { C = _b; T = GlobalFuncs.get_turf(C); if (!Lang13.Bool(T)) { continue; } if (Lang13.Bool(T.z) != true) { continue; } skip = false; foreach (dynamic _a in Lang13.Enumerate(this.protected_areas)) { a = _a; if (Lang13.Bool(a.IsInstanceOfType(T.loc))) { skip = true; continue; } } if (skip) { continue; } if (Lang13.Bool(Lang13.FindIn(typeof(Obj_Machinery_Power_Apc), T))) { continue; } if (C is Mob_Living_Carbon_Human) { H = C; if (Rand13.PercentChance(5)) { H.rad_act(Rand13.Int(100, 160)); } else { H.rad_act(Rand13.Int(15, 75)); } if (Rand13.PercentChance(25)) { if (Rand13.PercentChance(75)) { GlobalFuncs.randmutb(H); } else { GlobalFuncs.randmutg(H); } H.domutcheck(); } } else if (C is Mob_Living_Carbon_Monkey) { M = C; M.rad_act(Rand13.Int(15, 75)); } } return(false); }