// Function from file: Hallucination.dm public void fake_blood(Ent_Static target = null) { Obj_Effect_Overlay O = null; Image I = null; O = new Obj_Effect_Overlay(target.loc); O.name = "blood"; I = new Image("icons/effects/blood.dmi", O, "floor" + Rand13.Int(1, 7), O.dir, 1); ((dynamic)target).WriteMsg(I); Task13.Schedule(300, (Task13.Closure)(() => { GlobalFuncs.qdel(O); return; })); return; }
// Function from file: walls.dm public virtual void thermitemelt(dynamic user = null) { Obj_Effect_Overlay O = null; dynamic F = null; this.overlays = new ByTable(); O = new Obj_Effect_Overlay(this); O.name = "thermite"; O.desc = "Looks hot."; O.icon = "icons/effects/fire.dmi"; O.icon_state = "2"; O.anchored = 1; O.opacity = true; O.density = true; O.layer = 5; GlobalFuncs.playsound(this, "sound/items/welder.ogg", 100, 1); if (this.thermite >= 50) { F = this.ChangeTurf(typeof(Tile_Simulated_Floor_Plating)); ((Tile_Simulated)F).burn_tile(); F.icon_state = "wall_thermite"; ((Ent_Static)F).add_hiddenprint(user); Task13.Schedule(Num13.MaxInt(100, ((int)(300 - this.thermite))), (Task13.Closure)(() => { if (O != null) { GlobalFuncs.qdel(O); } return; })); } else { this.thermite = 0; Task13.Schedule(50, (Task13.Closure)(() => { if (O != null) { GlobalFuncs.qdel(O); } return; })); } return; }
// Function from file: telekinesis.dm public void apply_focus_overlay( ) { Obj_Effect_Overlay O = null; if (!Lang13.Bool(this.focus)) { return; } O = new Obj_Effect_Overlay(Map13.GetTile(Convert.ToInt32(this.focus.x), Convert.ToInt32(this.focus.y), Convert.ToInt32(this.focus.z))); O.name = "sparkles"; O.anchored = 1; O.density = false; O.layer = GlobalVars.FLY_LAYER; O.dir = Convert.ToInt32(Rand13.PickFromTable(GlobalVars.cardinal)); O.icon = "icons/effects/effects.dmi"; O.icon_state = "nothing"; Icon13.Flick("empdisable", O); Task13.Schedule(5, (Task13.Closure)(() => { GlobalFuncs.qdel(O); return; })); return; }
// Function from file: spell.dm public virtual dynamic before_cast(dynamic targets = null) { Ent_Static target = null; Ent_Static location = null; Obj_Effect_Overlay spell = null; if (this.overlay == true) { foreach (dynamic _a in Lang13.Enumerate(targets, typeof(Ent_Static))) { target = _a; location = null; if (target is Mob_Living) { location = target.loc; } else if (target is Tile) { location = target; } spell = new Obj_Effect_Overlay(location); spell.icon = this.overlay_icon; spell.icon_state = this.overlay_icon_state; spell.anchored = 1; spell.density = false; Task13.Schedule(this.overlay_lifespan ?1:0, (Task13.Closure)(() => { GlobalFuncs.qdel(spell); return; })); } } return(null); }
// Function from file: dumbfire.dm public override bool cast(dynamic targets = null, dynamic thearea = null, dynamic user = null) { thearea = thearea ?? Task13.User; dynamic target = null; dynamic projectile = null; Type projectile_type = null; Ent_Static current_loc = null; int? i = null; dynamic L = null; Obj_Effect_Overlay trail = null; this.playMagSound(); foreach (dynamic _a in Lang13.Enumerate(targets)) { target = _a; Task13.Schedule(0, (Task13.Closure)(() => { projectile = null; if (this.proj_type is string) { projectile_type = Lang13.FindClass(this.proj_type); projectile = Lang13.Call(projectile_type, thearea); } if (this.proj_type is Obj_Effect_ProcHolder_Spell) { projectile = new Obj_Effect_ProcHolder_Spell_Targeted_Trigger(thearea); projectile.linked_spells.Add(this.proj_type); } projectile.icon = this.proj_icon; projectile.icon_state = this.proj_icon_state; projectile.dir = Map13.GetDistance(projectile, target); projectile.name = this.proj_name; current_loc = thearea.loc; projectile.loc = current_loc; i = null; i = 0; while ((i ?? 0) < (this.proj_lifespan ?? 0)) { if (!Lang13.Bool(projectile)) { break; } if (this.proj_insubstantial) { projectile.loc = Map13.GetStep(projectile, Convert.ToInt32(projectile.dir)); } else { Map13.Step(projectile, Convert.ToInt32(projectile.dir)); } if (projectile.loc == current_loc || i == this.proj_lifespan) { ((Obj_Effect_ProcHolder_Spell)projectile).cast(current_loc, null, thearea); break; } L = Lang13.FindIn(typeof(Mob_Living), Map13.FetchInRange(this.proj_trigger_range, projectile) - thearea); if (Lang13.Bool(L) && Convert.ToInt32(L.stat) != 2) { ((Obj_Effect_ProcHolder_Spell)projectile).cast(L.loc, null, thearea); break; } if (this.proj_trail && Lang13.Bool(projectile)) { Task13.Schedule(0, (Task13.Closure)(() => { if (Lang13.Bool(projectile)) { trail = new Obj_Effect_Overlay(projectile.loc); trail.icon = this.proj_trail_icon; trail.icon_state = this.proj_trail_icon_state; trail.density = false; Task13.Schedule(this.proj_trail_lifespan ?1:0, (Task13.Closure)(() => { GlobalFuncs.qdel(trail); return; })); } return; })); } current_loc = projectile.loc; Task13.Sleep(this.proj_step_delay); i++; } if (Lang13.Bool(projectile)) { GlobalFuncs.qdel(projectile); } return; })); } return(false); }
// Function from file: wizard.dm public override bool cast(dynamic targets = null, dynamic thearea = null, dynamic user = null) { thearea = thearea ?? Task13.User; ByTable thrownatoms = null; dynamic throwtarget = null; int distfromcaster = 0; dynamic T = null; Ent_Dynamic AM = null; Ent_Dynamic AM2 = null; Obj_Effect_Overlay targeteffect = null; Ent_Dynamic M = null; Ent_Dynamic M2 = null; thrownatoms = new ByTable(); this.playMagSound(); foreach (dynamic _b in Lang13.Enumerate(targets)) { T = _b; foreach (dynamic _a in Lang13.Enumerate(T, typeof(Ent_Dynamic))) { AM = _a; thrownatoms.Add(AM); } } foreach (dynamic _c in Lang13.Enumerate(thrownatoms, typeof(Ent_Dynamic))) { AM2 = _c; if (AM2 == thearea || Lang13.Bool(AM2.anchored)) { continue; } targeteffect = new Obj_Effect_Overlay() { icon = "icons/effects/effects.dmi", icon_state = "shieldsparkles", mouse_opacity = 0, density = false }; targeteffect.icon_state = this.animation; AM2.overlays.Add(targeteffect); throwtarget = GlobalFuncs.get_edge_target_turf(thearea, Map13.GetDistance(thearea, Map13.GetStepAway(AM2, thearea, null))); distfromcaster = Map13.GetDistance(thearea, AM2); Task13.Schedule(10, (Task13.Closure)(() => { AM2.overlays.Remove(targeteffect); GlobalFuncs.qdel(targeteffect); return; })); if (distfromcaster == 0) { if (AM2 is Mob_Living) { M = AM2; ((dynamic)M).Weaken(5); ((dynamic)M).adjustBruteLoss(5); ((dynamic)M).WriteMsg("<span class='userdanger'>You're slammed into the floor by " + thearea + "!</span>"); } } else { if (AM2 is Mob_Living) { M2 = AM2; ((dynamic)M2).Weaken(2); ((dynamic)M2).WriteMsg("<span class='userdanger'>You're thrown back by " + thearea + "!</span>"); } AM2.throw_at_fast(throwtarget, Num13.MaxInt(3, Num13.MinInt(this.maxthrow - Num13.MaxInt(0, Num13.MinInt(distfromcaster - 2, distfromcaster)), this.maxthrow)), 1, thearea); } } return(false); }
// Function from file: ed209bot.dm public override double emp_act(int severity = 0) { Obj_Effect_Overlay pulse2 = null; ByTable targets = null; Mob_Living_Carbon C = null; dynamic toshoot = null; dynamic toarrest = null; if (severity == 2 && Rand13.PercentChance(70)) { base.emp_act(severity - 1); } else { pulse2 = new Obj_Effect_Overlay(this.loc); pulse2.icon = "icons/effects/effects.dmi"; pulse2.icon_state = "empdisable"; pulse2.name = "emp sparks"; pulse2.anchored = 1; pulse2.dir = Convert.ToInt32(Rand13.PickFromTable(GlobalVars.cardinal)); Task13.Schedule(10, (Task13.Closure)(() => { GlobalFuncs.qdel(pulse2); return; })); targets = new ByTable(); foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInView(this, 12), typeof(Mob_Living_Carbon))) { C = _a; if (C.stat == 2) { continue; } targets.Add(C); } if (targets.len != 0) { if (Rand13.PercentChance(50)) { toshoot = Rand13.PickFromTable(targets); if (Lang13.Bool(toshoot)) { targets.Remove(toshoot); if (Rand13.PercentChance(50) && this.emagged < 2) { this.emagged = 2; this.set_weapon(); this.shootAt(toshoot); this.emagged = 0; this.set_weapon(); } else { this.shootAt(toshoot); } } } else if (Rand13.PercentChance(50)) { if (targets.len != 0) { toarrest = Rand13.PickFromTable(targets); if (Lang13.Bool(toarrest)) { this.target = toarrest; this.v_mode = 1; } } } } } return(0); }
// Function from file: projectile.dm public override bool cast(dynamic targets = null, dynamic thearea = null, dynamic user = null) { thearea = thearea ?? Task13.User; Mob_Living target = null; dynamic projectile = null; Type projectile_type = null; Ent_Static current_loc = null; int? i = null; Obj_Effect_Overlay trail = null; this.playMagSound(); foreach (dynamic _a in Lang13.Enumerate(targets, typeof(Mob_Living))) { target = _a; Task13.Schedule(0, (Task13.Closure)(() => { projectile = null; if (this.proj_type is string) { projectile_type = Lang13.FindClass(this.proj_type); projectile = Lang13.Call(projectile_type, thearea); } if (this.proj_type is Obj_Effect_ProcHolder_Spell) { projectile = new Obj_Effect_ProcHolder_Spell_Targeted_Trigger(thearea); projectile.linked_spells.Add(this.proj_type); } projectile.icon = this.proj_icon; projectile.icon_state = this.proj_icon_state; projectile.dir = Map13.GetDistance(target, projectile); projectile.name = this.proj_name; current_loc = thearea.loc; projectile.loc = current_loc; i = null; i = 0; while ((i ?? 0) < (this.proj_lifespan ?? 0)) { if (!Lang13.Bool(projectile)) { break; } if (this.proj_homing) { if (this.proj_insubstantial) { projectile.dir = Map13.GetDistance(projectile, target); projectile.loc = Map13.GetStepTowards(projectile, target, 0); } else { Map13.StepTowards(projectile, target, 0); } } else if (this.proj_insubstantial) { projectile.loc = Map13.GetStep(projectile, this.dir); } else { Map13.Step(projectile, this.dir); } if (!Lang13.Bool(projectile)) { break; } if (!(target != null) || !this.proj_lingering && projectile.loc == current_loc) { GlobalFuncs.qdel(projectile); break; } if (this.proj_trail && Lang13.Bool(projectile)) { Task13.Schedule(0, (Task13.Closure)(() => { if (Lang13.Bool(projectile)) { trail = new Obj_Effect_Overlay(projectile.loc); trail.icon = this.proj_trail_icon; trail.icon_state = this.proj_trail_icon_state; trail.density = false; Task13.Schedule(this.proj_trail_lifespan, (Task13.Closure)(() => { GlobalFuncs.qdel(trail); return; })); } return; })); } if (Map13.FetchInRange(this.proj_trigger_range, target.loc).Contains(projectile.loc)) { ((Obj_Effect_ProcHolder_Spell)projectile).perform(new ByTable(new object [] { target }), null, thearea); break; } current_loc = projectile.loc; Task13.Sleep(this.proj_step_delay); i++; } if (Lang13.Bool(projectile)) { GlobalFuncs.qdel(projectile); } return; })); } return(false); }