private static void Fight(Entity inspector, Entity drugPusher, out ActionSequence showdownInspector, out ActionSequence showdownPusher) { showdownInspector = new ActionSequence("ShowdownInspectorFight"); showdownPusher = new ActionSequence("ShowdownPusherFight"); showdownInspector.Add(new PlayParticleEffectAction(Particles.Dustup, inspector, drugPusher)); CommonActions.AddSyncEntityAction(inspector, drugPusher, showdownInspector, showdownPusher); showdownPusher.Add(new TriggerAnimationAction(Util.AnimationEvent.TriggerPunch1)); showdownInspector.Add(new TriggerAnimationAction(Util.AnimationEvent.TriggerGetHit)); showdownPusher.Add(new PauseAction(1)); CommonActions.AddSyncEntityAction(inspector, drugPusher, showdownInspector, showdownPusher); showdownPusher.Add(new TriggerAnimationAction(Util.AnimationEvent.TriggerGetHit)); showdownInspector.Add(new TriggerAnimationAction(Util.AnimationEvent.TriggerPunch1)); showdownPusher.Add(new PauseAction(1)); CommonActions.AddSyncEntityAction(inspector, drugPusher, showdownInspector, showdownPusher); showdownPusher.Add(new TriggerAnimationAction(Util.AnimationEvent.TriggerPunch1)); showdownInspector.Add(new TriggerAnimationAction(Util.AnimationEvent.TriggerGetHit)); showdownPusher.Add(new PauseAction(1)); CommonActions.AddSyncEntityAction(inspector, drugPusher, showdownInspector, showdownPusher); showdownPusher.Add(new TriggerAnimationAction(Util.AnimationEvent.TriggerGetHit)); showdownInspector.Add(new TriggerAnimationAction(Util.AnimationEvent.TriggerPunch1)); showdownPusher.Add(new PauseAction(1)); CommonActions.AddSyncEntityAction(inspector, drugPusher, showdownInspector, showdownPusher); }
/** * Day 2 * */ #region Day 2 - Morning public static ActionSequence InspectorQuestions(Entity security) { var questionTime = new ActionSequence("InspectorQuestions"); questionTime.Add(StaticStates.Get <PlayerDecisionsState>().AcceptedDrugPushersOffer ? CommonActions.TalkToPlayer(new InspectorSuspicious()) : CommonActions.TalkToPlayer(new InspectorNice())); questionTime.Add(new DialogueBranchAction(new Dictionary <DialogueOutcome, Action> { { DialogueOutcome.Agree, () => { var sequence = new ActionSequence("Help inspector."); sequence.Add(new ConversationAction(new NoResponseConversation("Thanks for the help! Glad I could count on you to keep the ship safe.", DialogueOutcome.Agree))); sequence.Add(new UpdateMoodAction(Mood.Happy)); ActionManagerSystem.Instance.AddActionToFrontOfQueueForEntity(security, sequence); StaticStates.Get <PlayerDecisionsState>().ToldInspectorAboutDrugPusher = true; } }, { DialogueOutcome.Disagree, () => { var sequence = new ActionSequence("Didn't help inspector."); sequence.Add(new ConversationAction(new NoResponseConversation("Thanks for your time. Let me know if you see anything suspicious.", DialogueOutcome.Default))); ActionManagerSystem.Instance.AddActionToFrontOfQueueForEntity(security, sequence); StaticStates.Get <PlayerDecisionsState>().ToldInspectorAboutDrugPusher = false; } } })); questionTime.Add(new LeaveBarAction()); return(questionTime); }
public static void Start(List <Entity> matchingEntities) { var loveStoryActions = LoveStory.DayTwoNight(); foreach (var actionPair in loveStoryActions) { var entity = actionPair.GetEntity(); var action = actionPair.GetGameAction(); ActionManagerSystem.Instance.QueueAction(entity, action); } var mcGraw = EntityQueries.GetEntityWithName(matchingEntities, NPCS.McGraw.Name); var jannet = EntityQueries.GetEntityWithName(matchingEntities, NPCS.Jannet.Name); var q = EntityQueries.GetEntityWithName(matchingEntities, NPCS.Q.Name); var player = EntityQueries.GetEntityWithName(matchingEntities, NPCName.You); //Jannet var jannetSequence = new ActionSequence("Jannet night"); jannetSequence.Add(new CallbackAction(() => { EventSystem.EndDrinkMakingEvent.Invoke(); ActionManagerSystem.Instance.AddActionToFrontOfQueueForEntity(player, new TeleportAction(Locations.CenterOfBar())); })); //This is kind of dirty - but demo! jannetSequence.Add(new PauseAction(0.1f)); //WORKAROUND FOR SYNC ACTION BUG jannetSequence.Add(new TeleportAction(Locations.SitDownPoint1())); jannetSequence.Add(new SetReactiveConversationAction(new JannetNightTwo(), jannet)); jannetSequence.Add(CommonActions.SitDownLoop()); ActionManagerSystem.Instance.QueueAction(jannet, jannetSequence); //McGraw and Q DrugStory.DrugPusherInspectorShowdown(mcGraw, q, Locations.SitDownPoint2()); }
public static void Start(List <Entity> matchingEntities) { Analytics.CustomEvent("Day Two Started"); var mcGraw = EntityQueries.GetEntityWithName(matchingEntities, NPCS.McGraw.Name); var player = EntityQueries.GetEntityWithName(matchingEntities, NPCName.You); var loveStoryActions = LoveStory.DayTwoMorning(); foreach (var actionPair in loveStoryActions) { var entity = actionPair.GetEntity(); var action = actionPair.GetGameAction(); ActionManagerSystem.Instance.QueueAction(entity, action); } //McGraw var mcGrawSequence = new ActionSequence("McGraw Day Two Morning"); mcGrawSequence.Add(new CallbackAction(() => { EventSystem.EndDrinkMakingEvent.Invoke(); ActionManagerSystem.Instance.AddActionToFrontOfQueueForEntity(player, new TeleportAction(Locations.CenterOfBar())); })); //This is kind of dirty - but demo! mcGrawSequence.Add(new PauseAction(2.0f)); //WORKAROUND FOR SYNC ACTION BUG mcGrawSequence.Add(DrugStory.InspectorQuestions(mcGraw)); ActionManagerSystem.Instance.QueueAction(mcGraw, mcGrawSequence); }
public static void TolstoyRomantic(Entity main, Entity other, out ActionSequence mainActionSequence, out ActionSequence otherActionSequence) { mainActionSequence = new ActionSequence("TolstoyRomanticOneMain"); otherActionSequence = new ActionSequence("TolstoyRomanticOneOther"); var ordering = CommonActions.GoToPaypointAndOrderDrink(main, DrinkRecipes.GetRandomDrinkRecipe()); mainActionSequence.Add(ordering); var talkToPlayer = CommonActions.TalkToPlayer(new TolstoyOneDialogue()); mainActionSequence.Add(talkToPlayer); otherActionSequence.Add(CommonActions.Wander()); var sync = new SyncedAction(main, other); mainActionSequence.Add(sync); otherActionSequence.Add(sync); mainActionSequence.Add(new SetTargetEntityAction(other)); mainActionSequence.Add(new GoToMovingEntityAction()); otherActionSequence.Add(new SetTargetEntityAction(main)); otherActionSequence.Add(new GoToMovingEntityAction()); var sync2 = new SyncedAction(main, other); mainActionSequence.Add(sync2); otherActionSequence.Add(sync2); var branchingDialogue = new DialogueBranchAction( new Dictionary <DialogueOutcome, Action> { { DialogueOutcome.Romantic, () => { ActionManagerSystem.Instance.AddActionToFrontOfQueueForEntity(main, new UpdateMoodAction(Mood.Happy)); } }, { DialogueOutcome.Mean, () => { ActionManagerSystem.Instance.AddActionToFrontOfQueueForEntity(main, new UpdateMoodAction(Mood.Angry)); } }, { DialogueOutcome.Nice, () => { ActionManagerSystem.Instance.AddActionToFrontOfQueueForEntity(main, new UpdateMoodAction(Mood.Happy)); } } }); mainActionSequence.Add(branchingDialogue); otherActionSequence.Add(new PauseAction(3)); otherActionSequence.Add(new UpdateMoodAction(Mood.Angry)); var sync3 = new SyncedAction(main, other); mainActionSequence.Add(sync3); otherActionSequence.Add(sync3); mainActionSequence.Add(CommonActions.TalkToPlayer(new TolstoyTwoDialogue())); mainActionSequence.Add(new LeaveBarAction()); otherActionSequence.Add(new LeaveBarAction()); }
public static List <EntityActionPair> DayOneNight(Entity[] chosenSeats) { var actions = new List <EntityActionPair>(); var tolstoy = EntityStateSystem.Instance.GetEntityWithName(NPCS.Tolstoy.Name); var ellie = EntityStateSystem.Instance.GetEntityWithName(NPCS.Ellie.Name); //Tolstoy var tolstoySequence = new ActionSequence("Tolstoy night"); tolstoySequence.Add(new TeleportAction(chosenSeats[1].GameObject.transform)); tolstoySequence.Add(new SetReactiveConversationAction(new TolstoyNightOne(), tolstoy)); tolstoySequence.Add(CommonActions.SitDownLoop()); actions.Add(new EntityActionPair(tolstoy, tolstoySequence)); //Ellie var ellieSequence = new ActionSequence("Ellie night"); ellieSequence.Add(new TeleportAction(chosenSeats[2].GameObject.transform)); ellieSequence.Add(new SetReactiveConversationAction(new EllieNightOne(), ellie)); ellieSequence.Add(CommonActions.SitDownLoop()); actions.Add(new EntityActionPair(ellie, ellieSequence)); return(actions); }
private void OnPurchaseWaypointFree() { var waitingCharacter = waitForPurchaseWaypoint.GetState <UserState>().User; if (waitingCharacter == null) { return; } if (!ActionManagerSystem.Instance.IsEntityIdle(waitingCharacter)) { return; } waitForPurchaseWaypoint.GetState <UserState>().ClearReserver(); waitForPurchaseWaypoint.GetState <UserState>().ClearUser(); var purchaseSequence = new ActionSequence("Purchase"); purchaseSequence.Add(DrinkOrders.GetRandomOrder(waitingCharacter)); purchaseSequence.Add(CommonActions.GoToSeat()); purchaseSequence.Add(CommonActions.SitDownLoop()); AddPurchaseActionsForCharacter(waitingCharacter, purchaseSequence); }
public static ActionSequence TalkToBarPatronsLoop() { var sequence = new ActionSequence("TalkToBarPatrons", true); sequence.Add(TalkToBarPatron()); sequence.Add(new CallbackAction(() => sequence.Add(TalkToBarPatronsLoop()))); //Lol return(sequence); }
public static ActionSequence StandUp() { var standUp = new ActionSequence("Stand up"); standUp.Add(new StandUpAction()); standUp.Add(new ReleaseWaypointAction()); return(standUp); }
public static ActionSequence GoToSeat() { var sitDown = new ActionSequence("Sit down"); sitDown.Add(new GetWaypointAction(Goal.Sit, reserve: true, closest: true)); //This assumes more seats than NPCs! sitDown.Add(new GoToWaypointAction()); return(sitDown); }
public static ActionSequence TalkToBarPatron() { var sequence = new ActionSequence("TalkToBarPatrons", true); sequence.Add(new GetSittingBarPatron()); sequence.Add(new GoToMovingEntityAction()); sequence.Add(new PauseAction(5f)); return(sequence); }
public static ActionSequence BuyDrinkAndSitDown(Entity entity) { var purchaseSequence = new ActionSequence("Purchase"); purchaseSequence.Add(DrinkOrders.GetRandomOrder(entity)); purchaseSequence.Add(CommonActions.GoToSeat()); purchaseSequence.Add(CommonActions.SitDownLoop()); return(purchaseSequence); }
public static ActionSequence TalkToPlayer(Conversation conversation) { var player = StaticStates.Get <PlayerState>().Player; var talking = new ActionSequence("TalkToPlayer", isCancellable: false); talking.Add(new SetTargetEntityAction(player)); talking.Add(new GoToMovingEntityAction()); talking.Add(new ConversationAction(conversation)); return(talking); }
public static List <EntityActionPair> DayOneMorning() { var actions = new List <EntityActionPair>(); var tolstoy = EntityStateSystem.Instance.GetEntityWithName(NPCS.Tolstoy.Name); var ellie = EntityStateSystem.Instance.GetEntityWithName(NPCS.Ellie.Name); //Ellie var ellieSequence = new ActionSequence("Ellie morning"); ellieSequence.Add(new TeleportAction(Locations.SitDownPoint1())); ellieSequence.Add(new SetReactiveConversationAction(new EllieMorningOne(), ellie)); ellieSequence.Add(CommonActions.SitDownLoop()); ActionManagerSystem.Instance.QueueAction(ellie, ellieSequence); //Tolstoy var tolstoySequence = new ActionSequence("Tolstoy morning"); tolstoySequence.Add(new TeleportAction(Locations.SitDownPoint2())); tolstoySequence.Add(new SetReactiveConversationAction(new TolstoyMorningOne(), tolstoy)); tolstoySequence.Add(new TriggerAnimationAction(Util.AnimationEvent.SittingStartTrigger)); tolstoySequence.Add(CommonActions.WaitForDrink(tolstoy, "None", new DrinkOrders.AlwaysSucceedsDrinkOrder(), 99999)); tolstoySequence.Add(new UpdateMoodAction(Mood.Happy)); tolstoySequence.Add(new ConversationAction(new TolstoyMorningGivenDrink())); tolstoySequence.Add(new SetReactiveConversationAction(new TolstoyMorningAfterDrink())); tolstoySequence.Add(new CallbackAction(() => { StaticStates.Get <PlayerDecisionsState>().GaveTolstoyDrink = true; StaticStates.Get <OutcomeTrackerState>().AddOutcome("Tolstoy's was suprised by your kindness."); })); tolstoySequence.Add(CommonActions.SitDownLoop()); ActionManagerSystem.Instance.QueueAction(tolstoy, tolstoySequence); return(actions); }
private static ActionSequence DrugPusherPaysYou() { var getPayed = new ActionSequence("DrugPusherPaysYou"); getPayed.Add(CommonActions.TalkToPlayer(new DrugPusherPayment())); getPayed.Add(new TriggerAnimationAction(AnimationEvent.ItemRecieveTrigger)); getPayed.Add(new PauseAction(0.5f)); getPayed.Add(new ModifyMoneyAction(100, PaymentType.DrugMoney)); getPayed.Add(new LeaveBarAction()); return(getPayed); }
public static ActionSequence WalkToWaypoint() { var walk = new ActionSequence("Walk to Random Waypoint"); var waypoints = GameObject.FindGameObjectsWithTag("Waypoint"); var waypointPositions = waypoints.Select(go => go.transform.position).ToList(); var targetPosition = waypointPositions[Random.Range(0, waypointPositions.Count)]; walk.Add(new PauseAction(Random.Range(0, 10))); walk.Add(new GoToPositionAction(targetPosition)); return(walk); }
private static ActionSequence DrugPusherAskToDrink(Entity drugPusher) { var incorrectDrinkConversation = new NoResponseConversation("Well.. this isn't right. I hope you do better when you serve him drinks.", DialogueOutcome.Default); var correctDrinkConversation = new NoResponseConversation("Mm, great drink. Make them like this and there's no way he can do his job.", DialogueOutcome.Default); var sequence = new ActionSequence("DrugPusherAskToDrink"); sequence.Add(new ConversationAction(new DrugPusherAskToGetinspectorDrunk())); sequence.Add(DrinkOrders.GetRandomAlcoholicDrinkOrder(drugPusher, correctDrinkConversation: correctDrinkConversation, incorrectDrinkConversation: incorrectDrinkConversation)); sequence.Add(CommonActions.Wander()); sequence.Add(CommonActions.TalkToBarPatronsLoop()); return(sequence); }
// Intro private static ActionSequence InspectorAskToDrink(Entity inspector) { var incorrectDrinkConversation = new NoResponseConversation("Well.. this isn't right. I hope you do better when you serve him drinks.", DialogueOutcome.Default); var correctDrinkConversation = new NoResponseConversation("Mm, great drink. Make them like this and he'll be sure to slip up.", DialogueOutcome.Default); var sequence = new ActionSequence("InspectorAskToDrink"); sequence.Add(new ConversationAction(new InspectorAskToGetDrugPusherDrunk())); sequence.Add(DrinkOrders.GetRandomAlcoholicDrinkOrder(inspector, correctDrinkConversation: correctDrinkConversation, incorrectDrinkConversation: incorrectDrinkConversation)); sequence.Add(CommonActions.GoToSeat()); sequence.Add(CommonActions.SitDownLoop()); return(sequence); }
public static void Start(List <Entity> matchingEntities) { var seats = EntityStateSystem.Instance.GetEntitiesWithState <GoalSatisfierState>().Where(entity => entity.GetState <GoalSatisfierState>().SatisfiedGoals.Contains(Goal.Sit)); var chosenSeats = seats.PickRandom(4).ToArray(); var loveStoryActions = LoveStory.DayOneNight(chosenSeats); foreach (var actionPair in loveStoryActions) { var entity = actionPair.GetEntity(); var action = actionPair.GetGameAction(); ActionManagerSystem.Instance.QueueAction(entity, action); } var jannet = EntityQueries.GetEntityWithName(matchingEntities, NPCS.Jannet.Name); var q = EntityQueries.GetEntityWithName(matchingEntities, NPCS.Q.Name); var player = EntityQueries.GetEntityWithName(matchingEntities, NPCName.You); //Jannet var jannetSequence = new ActionSequence("Jannet night"); jannetSequence.Add(new CallbackAction(() => { EventSystem.EndDrinkMakingEvent.Invoke(); ActionManagerSystem.Instance.AddActionToFrontOfQueueForEntity(player, new TeleportAction(Locations.CenterOfBar())); })); //This is kind of dirty - but demo! jannetSequence.Add(new TeleportAction(chosenSeats[0].GameObject.transform)); jannetSequence.Add(new SetReactiveConversationAction(new JannetNightOne(), jannet)); jannetSequence.Add(CommonActions.SitDownLoop()); ActionManagerSystem.Instance.QueueAction(jannet, jannetSequence); //Q var qSequence = new ActionSequence("Q night"); qSequence.Add(new PauseAction(2.0f)); //WORKAROUND FOR SYNC ACTION BUG if (StaticStates.Get <PlayerDecisionsState>().AcceptedDrugPushersOffer) { qSequence.Add(DrugPusherPaysYou()); } else { qSequence.Add(new TeleportAction(chosenSeats[3].GameObject.transform)); qSequence.Add(new SetReactiveConversationAction(new QNightOneRefused(), q)); qSequence.Add(CommonActions.SitDownLoop()); } ActionManagerSystem.Instance.QueueAction(q, qSequence); }
public static ActionSequence OrderDrink(Entity entity, DrinkOrder drinkOrder, Conversation conversation, Conversation correctDrinkConversation = null, Conversation incorrectDrinkConversation = null, Dictionary <String, GameAction> otherDrinkActions = null, int orderTimeoutInMins = 40) { var wrapper = new ActionSequence("DrinkOrderThenClear"); var orderDrink = new ParallelUntilAllCompleteAction("OrderDrink"); orderDrink.Add(new ReportSuccessDecorator(new ConversationAction(conversation))); var waitForDrink = new ConditionalActionSequence("WaitForDrink"); waitForDrink.Add(new StartDrinkOrderAction(drinkOrder)); waitForDrink.Add(CommonActions.WaitForDrink(entity, drinkOrder.OrderedItem, drinkOrder, orderTimeoutInMins, correctDrinkConversation: correctDrinkConversation, incorrectDrinkConversation: incorrectDrinkConversation, otherDrinkActions: otherDrinkActions)); orderDrink.Add(waitForDrink); wrapper.Add(orderDrink); wrapper.Add(new ClearConversationAction()); return(wrapper); }
public static void AddSyncEntityAction(Entity a, Entity b, ActionSequence aSequence, ActionSequence bSequence) { var sync = new SyncedAction(a, b); aSequence.Add(sync); bSequence.Add(sync); }
public static ActionSequence PlayerUseBar() { var useBar = new ActionSequence("Use bar"); useBar.Add(new MakeDrinkAction()); return(useBar); }
public static ActionSequence ShortSitDown(Entity entity) { var sitDown = new ActionSequence("Short Sit down"); sitDown.Add(new GetWaypointAction(Goal.Sit, reserve: true, closest: false)); //This assumes more seats than NPCs! sitDown.Add(new GoToWaypointAction()); sitDown.Add(new SitDownAction()); sitDown.Add(new TriggerAnimationAction(AnimationEvent.ChairTalk1Trigger)); sitDown.Add(new PauseAction(4.0f)); sitDown.Add(new TriggerAnimationAction(AnimationEvent.ChairTalk1Trigger)); sitDown.Add(new PauseAction(3.0f)); sitDown.Add(new StandUpAction()); sitDown.Add(new ReleaseWaypointAction()); sitDown.Add(Wander()); return(sitDown); }
public static ActionSequence GettingFrosty(Entity main) { var sequence = new ActionSequence("GettingFrosty"); sequence.Add(CommonActions.TalkToPlayer(new WeirdOrderDialogue())); sequence.Add(new DialogueBranchAction(new Dictionary <DialogueOutcome, Action> { { DialogueOutcome.Bad, () => { ActionManagerSystem.Instance.AddActionToFrontOfQueueForEntity(main, new UpdateMoodAction(Mood.Angry)); } }, { DialogueOutcome.Default, () => { ActionManagerSystem.Instance.AddActionToFrontOfQueueForEntity(main, CommonActions.WaitForDrink(main, "Mind Meld", new DrinkOrders.ExactDrinkorder(DrinkRecipes.GetDrinkRecipe("Mind Meld"), main.GetState <NameState>().Name), 10)); } } })); return(sequence); }
public static List <EntityActionPair> DayTwoMorning() { var actions = new List <EntityActionPair>(); var playerChoices = StaticStates.Get <PlayerDecisionsState>(); if (!playerChoices.GaveTolstoyDrink && playerChoices.TolstoyAdviceChoice == PlayerDecisionsState.TolstoyAdviceChoices.FindFavoriteDrink) { var tolstoy = EntityStateSystem.Instance.GetEntityWithName(NPCS.Tolstoy.Name); //Tolstoy var tolstoySequence = new ActionSequence("Tolstoy Day Two Morning"); tolstoySequence.Add(new TeleportAction(Locations.SitDownPoint2())); tolstoySequence.Add(new SetReactiveConversationAction(new TolstoyMorningTwo(), tolstoy)); tolstoySequence.Add(CommonActions.SitDownLoop()); actions.Add(new EntityActionPair(tolstoy, tolstoySequence)); } return(actions); }
public static ActionSequence Wander() { var wander = new ActionSequence("Wander Around"); var barBounds = BoundsLookup.Instance.GetBarBounds(); var widthHeight = barBounds.size * 0.8f; var offset = new Vector3(widthHeight.x / 2.0f - Random.value * widthHeight.x, 0.0f, widthHeight.z / 2.0f - Random.value * widthHeight.z); var target = barBounds.center + offset; target.y = 0; wander.Add(new GoToPositionAction(target)); return(wander); }
public static ActionSequence EllieAskForDrink(Entity ellie) { var incorrectDrinkConversation = new NoResponseConversation("This doesn't seem quite right. I'm sure you'll do better next time.", DialogueOutcome.Default); var correctDrinkConversation = new NoResponseConversation("Mm, delicious!.", DialogueOutcome.Default); var favoriteDrinkActions = new ActionSequence("Favorite drink received."); favoriteDrinkActions.Add(new ConversationAction(new FavoriteDrinkConversation())); favoriteDrinkActions.Add(new UpdateMoodAction(Mood.Happy)); var otherDrinkActions = new Dictionary <String, GameAction>() { { elliesFavoriteDrink, favoriteDrinkActions } }; var sequence = new ActionSequence("Ellie ask for drink."); sequence.Add(DrinkOrders.GetRandomAlcoholicDrinkOrder(ellie, correctDrinkConversation: correctDrinkConversation, incorrectDrinkConversation: incorrectDrinkConversation, otherDrinkActions: otherDrinkActions)); sequence.Add(CommonActions.GoToSeat()); sequence.Add(CommonActions.SitDownLoop()); return(sequence); }
private static ActionSequence DrinkTest(int currentSuccesses, int maxSuccesses, Entity drinker, List <Conversation> failureConversations, List <Conversation> successConversations, List <GameAction> betweenDrinks, GameAction afterSuccess) { var sequence = new ActionSequence("DrinkTest: " + drinker); var drinkOrder = DrinkOrders.GetRandomAlcoholicDrinkOrderWithoutFailure(drinker); sequence.Add(new OnActionStatusDecorator( drinkOrder, () => { var successSequence = new ActionSequence("DrinkTestSuccess1: " + drinker); if (currentSuccesses + 1 == maxSuccesses) { successSequence.Add(new ClearConversationAction()); successSequence.Add(new EndDrinkOrderAction()); successSequence.Add(new ConversationAction(successConversations[currentSuccesses])); successSequence.Add(new ReleaseWaypointAction()); successSequence.Add(afterSuccess); } else { var nextDrinkTest = DrinkTest(currentSuccesses + 1, maxSuccesses, drinker, failureConversations, successConversations, betweenDrinks, afterSuccess); successSequence.Add(new ClearConversationAction()); successSequence.Add(new EndDrinkOrderAction()); successSequence.Add(new ConversationAction(successConversations[currentSuccesses])); successSequence.Add(new ReleaseWaypointAction()); successSequence.Add(betweenDrinks[currentSuccesses]); successSequence.Add(new DestoryEntityInInventoryAction()); successSequence.Add(new QueueForBarWithPriority(nextDrinkTest)); } ActionManagerSystem.Instance.AddActionToFrontOfQueueForEntity(drinker, successSequence); }, () => { var failureSequence = new ActionSequence("DrinkTestFail: " + currentSuccesses + " " + drinker); failureSequence.Add(new ClearConversationAction()); failureSequence.Add(new EndDrinkOrderAction()); failureSequence.Add(new ConversationAction(failureConversations[currentSuccesses])); failureSequence.Add(new DestoryEntityInInventoryAction()); failureSequence.Add(new ReleaseWaypointAction()); failureSequence.Add(new LeaveBarAction()); ActionManagerSystem.Instance.AddActionToFrontOfQueueForEntity(drinker, failureSequence); StaticStates.Get <PlayerDecisionsState>().NumberOfDrinksServedInDrugStory = currentSuccesses; } )); return(sequence); }
private static void DoAcceptActionSequence(Entity drugPusher, Conversation conversation) { var acceptSequence = new ActionSequence("AcceptedDrugOffer"); acceptSequence.Add(new ClearConversationAction()); acceptSequence.Add(new ConversationAction(conversation)); acceptSequence.Add(new UpdateMoodAction(Mood.Happy)); acceptSequence.Add(new PauseAction(0.5f)); acceptSequence.Add(new ReleaseWaypointAction()); acceptSequence.Add(new GoToPositionAction(Locations.OutsideDoorLocation())); acceptSequence.Add(CommonActions.TalkToBarPatronsLoop()); ActionManagerSystem.Instance.AddActionToFrontOfQueueForEntity(drugPusher, acceptSequence); StaticStates.Get <OutcomeTrackerState>().AddOutcome("You are now in business with Q - what could go wrong?"); StaticStates.Get <PlayerDecisionsState>().AcceptedDrugPushersOffer = true; }
private static void DoRejectActionSequence(Entity drugPusher, Conversation conversation) { var disagreeSequence = new ActionSequence("RefusedDrugOffer"); disagreeSequence.Add(new ClearConversationAction()); disagreeSequence.Add(new ConversationAction(conversation)); disagreeSequence.Add(new UpdateMoodAction(Mood.Angry)); disagreeSequence.Add(new PauseAction(0.5f)); disagreeSequence.Add(new ReleaseWaypointAction()); disagreeSequence.Add(new LeaveBarAction()); ActionManagerSystem.Instance.AddActionToFrontOfQueueForEntity(drugPusher, disagreeSequence); StaticStates.Get <OutcomeTrackerState>().AddOutcome("Q is not happy. You have the impression your predecessor paid less attention to the rules."); StaticStates.Get <PlayerDecisionsState>().AcceptedDrugPushersOffer = false; }