// Function from file: monkey.dm public override bool attack_larva(Mob_Living_Carbon_Alien_Larva user = null) { int damage = 0; if (base.attack_larva(user)) { damage = Rand13.Int(1, 3); if (this.stat != 2) { user.amount_grown = Num13.MinInt(user.amount_grown + damage, user.max_grown); this.adjustBruteLoss(damage); this.updatehealth(); } } return(false); }
// Function from file: simple_animal.dm public override bool attack_larva(Mob_Living_Carbon_Alien_Larva user = null) { double damage = 0; if (base.attack_larva(user)) { damage = Rand13.Int(5, 10); if (this.stat != 2) { user.amount_grown = Num13.MinInt(((int)(user.amount_grown + damage)), user.max_grown); this.attack_threshold_check(damage); } return(true); } return(false); }
// Function from file: alien_larva.dm public Hud_Larva(Mob_Living_Carbon_Alien_Larva owner = null) : base(owner) { Obj_Screen_ActIntent_Alien _using = null; // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!; _using = new Obj_Screen_ActIntent_Alien(); _using.icon_state = this.mymob.a_intent; this.static_inventory.Add(_using); this.action_intent = _using; this.healths = new Obj_Screen_Healths_Alien(); this.infodisplay.Add(this.healths); this.nightvisionicon = new Obj_Screen_Alien_Nightvision(); this.nightvisionicon.screen_loc = "EAST-1:28,CENTER:17"; this.infodisplay.Add(this.nightvisionicon); this.pull_icon = new Obj_Screen_Pull(); this.pull_icon.icon = "icons/mob/screen_alien.dmi"; this.pull_icon.update_icon(this.mymob); this.pull_icon.screen_loc = "EAST-2:26,SOUTH+1:7"; this.hotkeybuttons.Add(this.pull_icon); this.zone_select = new Obj_Screen_ZoneSel_Alien(); this.zone_select.update_icon(this.mymob); this.static_inventory.Add(this.zone_select); return; }
// Function from file: alien_embryo.dm public void AttemptGrow(bool?gib_on_success = null) { gib_on_success = gib_on_success ?? true; ByTable candidates = null; dynamic C = null; Image overlay = null; dynamic xeno_loc = null; Mob_Living_Carbon_Alien_Larva new_xeno = null; if (!Lang13.Bool(this.owner)) { return; } candidates = GlobalFuncs.get_candidates("xenomorph", GlobalVars.ALIEN_AFK_BRACKET, "alien candidate"); C = null; if (candidates.len != 0) { C = Rand13.PickFromTable(candidates); } else if (Lang13.Bool(this.owner.client) && !(GlobalFuncs.jobban_isbanned(this.owner, "alien candidate") || GlobalFuncs.jobban_isbanned(this.owner, "Syndicate"))) { C = this.owner.client; } else { this.stage = 4; return; } overlay = new Image("icons/mob/alien.dmi", this.owner, "burst_lie"); this.owner.overlays += overlay; xeno_loc = GlobalFuncs.get_turf(this.owner); new_xeno = new Mob_Living_Carbon_Alien_Larva(xeno_loc); new_xeno.key = C.key; new_xeno.WriteMsg(new Sound("sound/voice/hiss5.ogg", false, false, 0, 100)); new_xeno.canmove = false; new_xeno.notransform = 1; new_xeno.invisibility = 100; Task13.Schedule(6, (Task13.Closure)(() => { if (new_xeno != null) { new_xeno.canmove = true; new_xeno.notransform = 0; new_xeno.invisibility = 0; } if (gib_on_success == true) { ((Mob)this.owner).gib(); } else { ((Mob_Living)this.owner).adjustBruteLoss(40); this.owner.overlays -= overlay; } GlobalFuncs.qdel(this); return; })); return; }
// Function from file: alien_defense.dm public override bool attack_larva(Mob_Living_Carbon_Alien_Larva user = null) { return(this.attack_alien(user)); }
// Function from file: alien_infestation.dm public bool get_alien(bool?end_if_fail = null) { end_if_fail = end_if_fail ?? false; ByTable vents = null; Obj_Machinery_Atmospherics_Components_Unary_VentPump temp_vent = null; Pipeline temp_vent_parent = null; ByTable candidates = null; Ent_Static vent = null; dynamic C = null; Mob_Living_Carbon_Alien_Larva new_xeno = null; vents = new ByTable(); foreach (dynamic _a in Lang13.Enumerate(GlobalVars.machines, typeof(Obj_Machinery_Atmospherics_Components_Unary_VentPump))) { temp_vent = _a; if (Lang13.Bool(GlobalFuncs.qdeleted(temp_vent))) { continue; } if (temp_vent.loc.z == 1 && !(temp_vent.welded == true)) { temp_vent_parent = temp_vent.parents[1]; if (temp_vent_parent.other_atmosmch.len > 20) { vents.Add(temp_vent); } } } if (!(vents.len != 0)) { GlobalFuncs.message_admins("An event attempted to spawn an alien but no suitable vents were found. Shutting down."); this.kill(); return(false); } candidates = GlobalFuncs.get_candidates("xenomorph", GlobalVars.ALIEN_AFK_BRACKET, "alien candidate"); if (!(candidates.len != 0)) { if (end_if_fail == true) { return(false); } this.find_alien(); return(false); } while (this.spawncount > 0 && vents.len != 0 && candidates.len != 0) { vent = GlobalFuncs.pick_n_take(vents); C = GlobalFuncs.pick_n_take(candidates); new_xeno = new Mob_Living_Carbon_Alien_Larva(vent.loc); new_xeno.key = C.key; this.spawncount--; this.successSpawn = true; GlobalFuncs.message_admins("" + new_xeno.key + " has been made into an alien by an event."); GlobalFuncs.log_game("" + new_xeno.key + " was spawned as an alien by an event."); } if (this.successSpawn) { return(true); } return(false); }
// Function from file: objective.dm public override int check_completion( ) { double captured_amount = 0; dynamic A = null; Mob_Living_Carbon_Human M = null; Mob_Living_Carbon_Monkey M2 = null; Mob_Living_Carbon_Alien_Larva M3 = null; Mob_Living_Carbon_Alien_Humanoid M4 = null; captured_amount = 0; A = Lang13.FindObj(typeof(Zone_Centcom_Holding)); foreach (dynamic _a in Lang13.Enumerate(A, typeof(Mob_Living_Carbon_Human))) { M = _a; if (M.stat == 2) { captured_amount += 0.5; continue; } captured_amount += 1; } foreach (dynamic _b in Lang13.Enumerate(A, typeof(Mob_Living_Carbon_Monkey))) { M2 = _b; captured_amount += 0.1; } foreach (dynamic _c in Lang13.Enumerate(A, typeof(Mob_Living_Carbon_Alien_Larva))) { M3 = _c; if (M3.stat == 2) { captured_amount += 0.5; continue; } captured_amount += 1; } foreach (dynamic _d in Lang13.Enumerate(A, typeof(Mob_Living_Carbon_Alien_Humanoid))) { M4 = _d; if (M4 is Mob_Living_Carbon_Alien_Humanoid_Royal_Queen) { if (M4.stat == 2) { captured_amount += 1.5; } else { captured_amount += 3; } continue; } if (M4.stat == 2) { captured_amount += 1; continue; } captured_amount += 2; } if (captured_amount < Convert.ToDouble(this.target_amount)) { return(0); } return(1); }