public override bool Run() { List <SimDescription> aliens = AlienUtilsEx.GetAliens(); if (aliens == null) { Logger.Append("Debug - Trigger Alien Abduction: No Aliens"); return(false); } List <Sim> abductees = AlienUtilsEx.GetAbductees(Target); if (abductees == null) { Logger.Append("Debug - Trigger Alien Abduction: No Abductees"); return(false); } Sim abductee = RandomUtil.GetRandomObjectFromList <Sim>(abductees); SimDescription alien = RandomUtil.GetRandomObjectFromList <SimDescription>(aliens); if (!AlienUtilsEx.CanSimBeAbducted(abductee)) { Logger.Append("Debug - Trigger Alien Abduction: Can't Abduct Sim"); return(false); } AlienAbductionSituationEx.Create(alien, abductee, Target); return(true); }
public override bool Run() { if (Target == null) { return(false); } List <SimDescription> aliens = AlienUtilsEx.GetValidAliens(); Lot lot = Target.LotCurrent; if (aliens == null) { Common.DebugNotify("DEBUG - Abduct Sim: No valid aliens"); return(false); } if (lot == null) { Common.DebugNotify("DEBUG - Abduct Sim: Target's current lot is null"); return(false); } SimDescription alien = RandomUtil.GetRandomObjectFromList(aliens); AlienAbductionSituationEx.Create(alien, Target, lot); return(true); }
public override bool Run() { if (Target == null) { return(false); } List <SimDescription> aliens = AlienUtilsEx.GetValidAliens(); List <Sim> abductees = AlienUtilsEx.GetValidAbductees(Target); if (aliens == null) { Common.DebugNotify("DEBUG - Trigger Abduction: No valid aliens."); return(false); } if (abductees == null) { Common.DebugNotify("DEBUG - Trigger Abduction: No valid abductees."); return(false); } Sim abductee = RandomUtil.GetRandomObjectFromList(abductees); SimDescription alien = RandomUtil.GetRandomObjectFromList(aliens); AlienAbductionSituationEx.Create(alien, abductee, Target); return(true); }
public override bool Run() { if (Target == null) { return(false); } List <SimDescription> aliens = AlienUtilsEx.GetValidAliens(); SimDescription alien = RandomUtil.GetRandomObjectFromList <SimDescription>(aliens); List <Sim> abductees = AlienUtilsEx.GetValidAbductees(Target); Sim abductee = RandomUtil.GetRandomObjectFromList <Sim>(abductees); AlienAbductionSituationEx.Create(alien, abductee, Target); return(true); }