protected static bool TrainFirstAction(GoToLotSituation parent, GoToLotSituation.MeetUp meetUp) { try { NRaas.StoryProgression.Main.Situations.IncStat("First Action: Martial Train"); TrainingDummy choice = null; InteractionInstance interaction = parent.mSimB.InteractionQueue.GetCurrentInteraction(); if ((interaction != null) && (interaction.Target is TrainingDummy)) { choice = interaction.Target as TrainingDummy; meetUp.ForceSituationSpecificInteraction(choice, parent.mSimA, MartialArtsTrain.TrainSingleton, null, meetUp.OnSocialSucceeded, meetUp.OnSocialFailed, new InteractionPriority(InteractionPriorityLevel.UserDirected)); } else { List <TrainingDummy> choices = new List <TrainingDummy>(parent.mLot.GetObjects <TrainingDummy>(TestDummy)); if (choices.Count == 0) { return(false); } choice = RandomUtil.GetRandomObjectFromList(choices); meetUp.ForceSituationSpecificInteraction(choice, parent.mSimA, new MartialArtsTrain.Definition(parent.mSimB), null, meetUp.OnSocialSucceeded, meetUp.OnSocialFailed, new InteractionPriority(InteractionPriorityLevel.UserDirected)); } return(true); } catch (Exception e) { Common.Exception(parent.mSimA, parent.mSimB, e); return(false); } }
public static bool FirstAction(GoToLotSituation parent, GoToLotSituation.MeetUp meetUp) { try { if (parent.mSimA.IsHuman) { meetUp.ForceSituationSpecificInteraction(parent.mSimB, parent.mSimA, new SocialInteractionA.Definition("Flirt", null, null, false), null, meetUp.OnSocialSucceeded, meetUp.OnSocialFailed); } else { meetUp.ForceSituationSpecificInteraction(parent.mSimB, parent.mSimA, new SocialInteractionA.Definition("Nuzzle", null, null, false), null, meetUp.OnSocialSucceeded, meetUp.OnSocialFailed); } return(true); } catch (Exception e) { Common.DebugException(parent.mSimA, parent.mSimB, e); return(false); } }
protected bool FirstAction(GoToLotSituation parent, GoToLotSituation.MeetUp meetUp) { try { List <AthleticGameObject> choices = new List <AthleticGameObject>(parent.mLot.GetObjects <AthleticGameObject>(TestObject)); if (choices.Count == 0) { return(false); } InteractionInstance interaction = parent.mSimB.InteractionQueue.GetCurrentInteraction(); if ((interaction != null) && (interaction.Target is AthleticGameObject)) { OnSecondAction(parent.mSimA, parent.mSimB, meetUp, parent.mSimB, 0); } else { AthleticGameObject choice = RandomUtil.GetRandomObjectFromList(choices); GoToLotSituation.Action startUp = new GoToLotSituation.Action(meetUp, OnSecondAction); parent.mSimB.InteractionQueue.CancelAllInteractions(); if (choice.Cardio) { meetUp.ForceSituationSpecificInteraction(choice, parent.mSimB, AthleticGameObject.WorkOut.CardioSingleton, startUp.OnPerform, meetUp.OnSocialSucceeded, meetUp.OnSocialFailed, new InteractionPriority(InteractionPriorityLevel.UserDirected)); } else { meetUp.ForceSituationSpecificInteraction(choice, parent.mSimB, AthleticGameObject.WorkOut.StrengthSingleton, startUp.OnPerform, meetUp.OnSocialSucceeded, meetUp.OnSocialFailed, new InteractionPriority(InteractionPriorityLevel.UserDirected)); } } return(true); } catch (Exception e) { Common.Exception(parent.mSimA, parent.mSimB, e); return(false); } }
public static bool FriendlyFirstAction(GoToLotSituation parent, GoToLotSituation.MeetUp meetUp) { try { StoryProgression.Main.Situations.IncStat("First Action: Friendly"); if (parent.mSimA.IsHuman) { meetUp.ForceSituationSpecificInteraction(parent.mSimB, parent.mSimA, new SocialInteractionA.Definition("Chat", null, null, false), null, meetUp.OnSocialSucceeded, meetUp.OnSocialFailed); } else { meetUp.ForceSituationSpecificInteraction(parent.mSimB, parent.mSimA, new SocialInteractionA.Definition("Pet Socialize", null, null, false), null, meetUp.OnSocialSucceeded, meetUp.OnSocialFailed); } return(true); } catch (Exception e) { Common.DebugException(parent.mSimA, parent.mSimB, e); return(false); } }
public static bool DrinkFirstAction(GoToLotSituation parent, GoToLotSituation.MeetUp meetUp) { try { NRaas.StoryProgression.Main.Situations.IncStat("First Action: Drink"); meetUp.ForceSituationSpecificInteraction(parent.mSimB, parent.mSimA, new SocialInteractionA.Definition("Vampire Drink", null, null, false), null, meetUp.OnSocialSucceeded, meetUp.OnSocialFailed); return(true); } catch (Exception e) { Common.DebugException(parent.mSimA, parent.mSimB, e); return(false); } }
protected static bool CompeteFirstAction(GoToLotSituation parent, GoToLotSituation.MeetUp meetUp) { try { NRaas.StoryProgression.Main.Situations.IncStat("First Action: Martial Compete"); meetUp.ForceSituationSpecificInteraction(parent.mSimB, parent.mSimA, new SocialInteractionA.Definition("Challenge To Spar For Tournament", null, null, false), null, meetUp.OnSocialSucceeded, meetUp.OnSocialFailed); return(true); } catch (Exception e) { Common.Exception(parent.mSimA, parent.mSimB, e); return(false); } }
protected bool OnSecondAction(Sim a, Sim b, GoToLotSituation.MeetUp meetUp, Sim actor, float x) { if (mPushed) { return(false); } mPushed = true; InteractionInstance interactionB = b.InteractionQueue.GetCurrentInteraction(); if (interactionB == null) { return(false); } AthleticGameObject choice = interactionB.Target as AthleticGameObject; if (choice == null) { return(false); } if ((a.InteractionQueue.HasInteractionOfType(QueueTrainSimEx.Singleton)) || (a.InteractionQueue.HasInteractionOfType(AthleticGameObject.TrainSim.Singleton))) { return(true); } a.InteractionQueue.CancelAllInteractions(); QueueTrainSimEx train = meetUp.ForceSituationSpecificInteraction(choice, a, QueueTrainSimEx.Singleton, null, meetUp.OnSocialSucceeded, meetUp.OnSocialFailed, new InteractionPriority(InteractionPriorityLevel.UserDirected)) as QueueTrainSimEx; if (train == null) { return(false); } StoryProgression.Main.Skills.Post(new ReportScenario(a.SimDescription, b.SimDescription)); train.Trainee = b; return(true); }
protected static bool FirstAction(GoToLotSituation parent, GoToLotSituation.MeetUp meetUp) { try { NRaas.StoryProgression.Main.Situations.IncStat("First Action: Chess"); List <ChessTable> tables = new List <ChessTable>(parent.mLot.GetObjects <ChessTable>(TestTable)); if (tables.Count == 0) { return(false); } meetUp.ForceSituationSpecificInteraction(RandomUtil.GetRandomObjectFromList(tables), parent.mSimA, ChessTable.ChallengeSimToGameOfChess.Singleton, null, meetUp.OnSocialSucceeded, meetUp.OnSocialFailed, new InteractionPriority(InteractionPriorityLevel.UserDirected)); return(true); } catch (Exception e) { Common.Exception(parent.mSimA, parent.mSimB, e); return(false); } }
public static bool FightFirstAction(GoToLotSituation parent, GoToLotSituation.MeetUp meetUp) { try { GreyedOutTooltipCallback callBack = null; if (SocialTest.TestFight(parent.mSimA, parent.mSimB, null, true, ref callBack)) { StoryProgression.Main.Situations.IncStat("First Action: Fight"); meetUp.ForceSituationSpecificInteraction(parent.mSimA, parent.mSimB, new SocialInteractionA.Definition("Fight!", null, null, false), null, meetUp.OnSocialSucceeded, meetUp.OnSocialFailed); return(true); } else { return(EnemyFirstAction(parent, meetUp)); } } catch (Exception e) { Common.DebugException(parent.mSimA, parent.mSimB, e); return(false); } }
public static bool EnemyFirstAction(GoToLotSituation parent, GoToLotSituation.MeetUp meetUp) { try { StoryProgression.Main.Situations.IncStat("First Action: Enemy"); string action = null; if (parent.mSimA.IsHuman) { action = "Slap"; } else if (parent.mSimA.IsHorse) { action = "Stamp At"; } else if (parent.mSimA.IsADogSpecies) { action = "Growl At"; } else if (parent.mSimA.IsCat) { action = "Cat Hiss"; } if (!string.IsNullOrEmpty(action)) { meetUp.ForceSituationSpecificInteraction(parent.mSimB, parent.mSimA, new SocialInteractionA.Definition(action, null, null, false), null, meetUp.OnSocialSucceeded, meetUp.OnSocialFailed); } return(true); } catch (Exception e) { Common.DebugException(parent.mSimA, parent.mSimB, e); return(false); } }