protected override bool PrivateUpdate(ScenarioFrame frame) { base.PrivateUpdate(frame); Personalities.CheckRetention(Sim); return(true); }
protected override bool PrivateUpdate(ScenarioFrame frame) { if (NewHouse != null) { List <SimDescription> sims = new List <SimDescription>(); foreach (SimDescription sim in CommonSpace.Helpers.Households.All(NewHouse)) { if (!SimTypes.IsSelectable(sim)) { if (GetValue <ManagerSim.ProgressActiveNPCOption, bool>()) { continue; } } if (Personalities.GetClanLeadership(sim).Count > 0) { sims.Add(sim); } } if (sims.Count > 0) { Common.Notify(sims[0], Common.Localize("ActivePersonality:Prompt")); } } return(false); }
public bool Allow(IScoringGenerator stats, SimDescription actor, SimDescription target, AllowCheck check) { if ((check & AllowCheck.UserDirected) == AllowCheck.None) { if (Personalities.IsOpposing(stats, actor, target, true)) { stats.IncStat("Opposing Clan"); return(false); } } SimData actorData = GetData(actor); SimData targetData = GetData(target); if (!actorData.Allowed <AllowCasteMoveOption>(targetData, true)) { stats.IncStat("Caste Denied"); return(false); } else if (actorData.Disallowed <DisallowCasteMoveOption>(targetData, true)) { stats.IncStat("Caste Denied"); return(false); } else if (!DualAllow(stats, actorData, targetData, check)) { return(false); } return(true); }
protected override bool Allow(SimDescription sim) { if (!Personalities.Allow(this, Sim)) { IncStat("Personality Denied"); return(false); } return(base.Allow(sim)); }
protected override bool TargetAllow(SimDescription sim) { if (Personalities.IsOpposing(this, Sim, sim, false)) { IncStat("Opposing Clan"); return(false); } return(base.TargetAllow(sim)); }
protected override bool CommonAllow(SimDescription sim) { if (!Personalities.Allow(this, sim)) { IncStat("User Denied"); return(false); } return(base.CommonAllow(sim)); }
public static void Postfix(Personalities __instance) { var meeps = __instance.resources.Count; var meep = __instance.resources.Find(p => p.Id == "Meep"); for (var i = 0; i < meeps; ++i) { __instance.resources[i] = meep; } }
protected override ICollection <SimDescription> GetTargets(SimDescription sim) { List <SimDescription> list = Personalities.GetClanAlliesFor(sim); if (!list.Contains(mLoser)) { list.Add(mLoser); } return(list); }
public void FichePerso(int idPerso) { Personality perso = Personalities.GetPerso(idPerso); titre.text = perso.titre; nom.text = perso.nom; profession.text = perso.profession; age.text = perso.age; description.text = perso.description; atout.text = perso.atout; handicap.text = perso.handicap; bouton.text = perso.bouton; }
private void copyPersonalityClicked(object sender, RoutedEventArgs e) { CopyPersonalityWindow window = new CopyPersonalityWindow(Personality); if (window.ShowDialog() == true) { string PersonalityName = window.PersonalityName == null ? null : window.PersonalityName.Trim(); string PersonalityDescription = window.PersonalityDescription == null ? null : window.PersonalityDescription.Trim(); Personality newPersonality = Personality.Copy(PersonalityName, PersonalityDescription); Personalities.Add(newPersonality); Personality = newPersonality; } }
public bool Allow(IScoringGenerator stats, SimDescription actor, SimDescription target, AllowCheck check) { if (Personalities.IsOpposing(stats, actor, target, true)) { stats.IncStat("Opposing Clan"); return(false); } else if (!Flirts.CanHaveAutonomousRomance(stats, actor, target, ((check & AllowCheck.Active) == AllowCheck.Active))) { return(false); } return(AllowPartner(stats, actor, target, check)); }
protected override bool PrivateUpdate(ScenarioFrame frame) { if (!mSuccess.TestBeforehand(Manager, Sim, Target)) { IncStat("Success TestBeforehand Fail"); return(false); } if (!mFailure.TestBeforehand(Manager, Sim, Target)) { IncStat("Failure TestBeforehand Fail"); return(false); } if (!RandomUtil.RandomChance(mChance)) { IncStat("Chance Fail"); return(false); } SimPersonality clan = Personalities.GetPersonality(TargetFilter.Clan); if (clan == null) { clan = Manager as SimPersonality; } if (clan == null) { IncStat("Clan Missing"); return(false); } mFail = ((!string.IsNullOrEmpty(mAcceptanceScoring)) && (AddScoring("Acceptance", ScoringLookup.GetScore(mAcceptanceScoring, Target, Sim)) <= 0)); if (!mFail) { if (!clan.RemoveFromClan(Target)) { return(false); } mSuccess.Perform(this, frame, "Success", Sim, Target); } else { mFailure.Perform(this, frame, "Failure", Sim, Target); } return(true); }
private void copyPersonalityClicked(object sender, RoutedEventArgs e) { EDDI.Instance.SpeechResponderModalWait = true; CopyPersonalityWindow window = new CopyPersonalityWindow(Personality); if (window.ShowDialog() == true) { string PersonalityName = window.PersonalityName?.Trim(); string PersonalityDescription = window.PersonalityDescription?.Trim(); Personality newPersonality = Personality.Copy(PersonalityName, PersonalityDescription); Personalities.Add(newPersonality); Personality = newPersonality; } EDDI.Instance.SpeechResponderModalWait = false; }
protected override bool Allow(SimDescription sim) { if (!Personalities.Allow(this, sim)) { IncStat("User Denied"); return(false); } else if ((mCheckAny) && (HouseholdsEx.NumPets(sim.Household) > 0)) { IncStat("Has Pets"); return(false); } return(base.Allow(sim)); }
private void deletePersonalityClicked(object sender, RoutedEventArgs e) { string messageBoxText = "Are you sure you want to delete the \"" + Personality.Name + "\" personality?"; string caption = "Delete Personality"; MessageBoxResult result = MessageBox.Show(messageBoxText, caption, MessageBoxButton.YesNo, MessageBoxImage.Warning); switch (result) { case MessageBoxResult.Yes: // Remove the personality from the list and the local filesystem Personality oldPersonality = Personality; Personalities.Remove(oldPersonality); Personality = Personalities[0]; oldPersonality.RemoveFile(); break; } }
public void configurePersonality(Personalities type) { switch (type) { case Personalities.SAF: charisma = 3; selfAssertion = 2; fear = 1; break; case Personalities.SFA: charisma = 3; selfAssertion = 1; fear = 2; break; case Personalities.AFS: charisma = 1; selfAssertion = 3; fear = 2; break; case Personalities.ASF: charisma = 2; selfAssertion = 3; fear = 1; break; case Personalities.FSA: charisma = 2; selfAssertion = 1; fear = 3; break; case Personalities.FAS: charisma = 1; selfAssertion = 2; fear = 3; break; default: break; } initializeTrustInOthers(numberOfIAs); }
protected override bool Push() { if (!mFail) { SimDescription leader = Personalities.GetClanLeader(Manager); if (leader != null) { int score = mFight.SuccessDelta.Score(new DualSimScoringParameters(Sim, leader)); if (score != 0) { return(Situations.PushMeetUp(this, Sim, leader, ManagerSituation.MeetUpType.Commercial, DetermineFirstAction(score, IsRomantic))); } } } return(Situations.PushMeetUp(this, Sim, Target, ManagerSituation.MeetUpType.Commercial, FirstAction)); }
private void deletePersonalityClicked(object sender, RoutedEventArgs e) { EDDI.Instance.SpeechResponderModalWait = true; string messageBoxText = string.Format(Properties.SpeechResponder.delete_personality_message, Personality.Name); string caption = Properties.SpeechResponder.delete_personality_caption; MessageBoxResult result = MessageBox.Show(messageBoxText, caption, MessageBoxButton.YesNo, MessageBoxImage.Warning); switch (result) { case MessageBoxResult.Yes: // Remove the personality from the list and the local filesystem Personality oldPersonality = Personality; Personalities.Remove(oldPersonality); Personality = Personalities[0]; oldPersonality.RemoveFile(); break; } EDDI.Instance.SpeechResponderModalWait = false; }
public override void Initialize() { base.Initialize(); Urges = new Urges(); AssignableSlots = new AssignableSlots(); StateMachineCategories = new StateMachineCategories(); Personalities = new Personalities(); Faces = new Faces(); Shirts = new Shirts(); Expressions = new Expressions(Root); Thoughts = new Thoughts(Root); Deaths = new Deaths(Root); StatusItemCategories = new StatusItemCategories(Root); Techs = new Techs(Root); Techs.Load(researchTreeFile); TechTreeTitles = new TechTreeTitles(Root); TechTreeTitles.Load(researchTreeFile); TechItems = new TechItems(Root); Accessories = new Accessories(Root); AccessorySlots = new AccessorySlots(Root, null, null, null); ScheduleBlockTypes = new ScheduleBlockTypes(Root); ScheduleGroups = new ScheduleGroups(Root); RoomTypeCategories = new RoomTypeCategories(Root); RoomTypes = new RoomTypes(Root); ArtifactDropRates = new ArtifactDropRates(Root); SpaceDestinationTypes = new SpaceDestinationTypes(Root); Diseases = new Diseases(Root); Sicknesses = new Database.Sicknesses(Root); SkillPerks = new SkillPerks(Root); SkillGroups = new SkillGroups(Root); Skills = new Skills(Root); ColonyAchievements = new ColonyAchievements(Root); MiscStatusItems = new MiscStatusItems(Root); CreatureStatusItems = new CreatureStatusItems(Root); BuildingStatusItems = new BuildingStatusItems(Root); ChoreTypes = new ChoreTypes(Root); Effect effect = new Effect("CenterOfAttention", DUPLICANTS.MODIFIERS.CENTEROFATTENTION.NAME, DUPLICANTS.MODIFIERS.CENTEROFATTENTION.TOOLTIP, 0f, true, true, false, null, 0f, null); effect.Add(new AttributeModifier("StressDelta", -0.008333334f, DUPLICANTS.MODIFIERS.CENTEROFATTENTION.NAME, false, false, true)); effects.Add(effect); CollectResources(Root, ResourceTable); }
public Hydra() : base() { Personalities.Add(new Personality.Hydra()); RoundOfDamage = new RoundOfDamage(); AddAttribute(MobileAttribute.NoDisarm); }
protected override ICollection <SimDescription> GetSims() { return(GetFilteredSims(Personalities.GetClanLeader(Manager))); }
public Elemental(ElementType elementType) { SetElement(elementType); Personalities.Add(new Personality.Elemental()); TypeOfMob = MobType.Other; }
public bool AllowFriend(Common.IStatGenerator stats, SimDescription actor, SimDescription target, AllowCheck check) { if ((check & AllowCheck.UserDirected) == AllowCheck.None) { if (Personalities.IsOpposing(stats, actor, target, true)) { stats.IncStat("Opposing Clan"); return(false); } if (actor.IsEP11Bot) { if (!HasFriendChips(actor)) { stats.IncStat("Allow: Robot"); return(false); } else if (actor.HasTrait(TraitNames.FearOfHumansChip)) { if (!target.IsRobot) { stats.IncStat("Allow: FearOfHumans"); return(false); } } } if (target.IsEP11Bot) { if (!HasFriendChips(target)) { stats.IncStat("Allow: Robot"); return(false); } else if (target.HasTrait(TraitNames.FearOfHumansChip)) { if (!actor.IsRobot) { stats.IncStat("Allow: FearOfHumans"); return(false); } } } } SimData actorData = GetData(actor); SimData targetData = GetData(target); if (!actorData.Allowed <AllowCasteFriendOption>(targetData, true)) { stats.IncStat("Caste Friend Denied"); return(false); } else if (actorData.Disallowed <DisallowCasteFriendOption>(targetData, true)) { stats.IncStat("Caste Friend Denied"); return(false); } return(true); }
protected virtual bool TargetAllow(SimDescription target) { if (SimTypes.IsPassporter(target)) { IncStat("Simport"); return(false); } else if (Sim == target) { IncStat("Is Actor"); return(false); } else if (target == mNotTarget) { IncStat("Not Target"); return(false); } else if (!AllowSpecies(Sim, target)) { IncStat("Species Match Denied"); return(false); } if (TestOpposing) { if (Personalities.IsOpposing(this, Sim, target, false)) { IncStat("Opposing"); return(false); } } if (!TargetAllowActive) { if (SimTypes.IsSelectable(target)) { IncStat("Active"); return(false); } } if ((!mTargetGatheringFailure) && (TargetCheckBusy)) { if (Situations.IsBusy(this, target, true)) { IncStat("Busy"); return(false); } } if (!CommonAllow(target)) { return(false); } if ((!Sim.IsHuman) || (!target.IsHuman)) { IncStat("Species Match " + Sim.Species + " - " + target.Species); } return(true); }