protected override EventResult OnStage(EventStage currentStage) { switch (currentStage) { case EventStage.START: EventState.currentEventImage = "faceWifeNeutral"; EventState.currentEventText = string.Format("{0} comes up to you. She suggests buying a special toy for your son's birthday.", WifeEventChain.NAME); if (GameData.singleton.money >= toyCost) { EventState.currentEventOptions = new string[] { "Give her " + Utilities.FormatMoney(toyCost), "Say you can't afford it" }; mCurrentOptionOutcomes = new EventStage[] { EventStage.ACCEPT, EventStage.REFUSE }; } else { EventState.currentEventOptions = new string[] { "Say you can't afford it" }; mCurrentOptionOutcomes = new EventStage[] { EventStage.REFUSE }; } break; case EventStage.ACCEPT: EventState.currentEventImage = "faceWifeHappy"; EventState.currentEventText = "\"I think this will make him very happy.\" She gives you a quick kiss and leaves the shop."; EventState.PushEvent(new SonEventBirthday(), GameData.singleton.quarter + 1); GameData.singleton.wifeRelationship += 5; BusinessState.MoneyChangeFromEvent(-toyCost); EventState.currentEventOptions = EventState.CONTINUE_OPTION; return(EventResult.DONE); case EventStage.REFUSE: EventState.currentEventImage = "faceWifeSad"; if (GameData.singleton.money <= toyCost * 5) { EventState.currentEventText = "\"That's too bad. I know things are tough right now. He'll understand.\""; } else if (GameData.singleton.money >= toyCost * 10) { EventState.currentEventText = "\"I think we could spare it. How can you neglect our son like that?\" She goes outside."; GameData.singleton.wifeRelationship -= 10; } else { EventState.currentEventText = "\"Okay, I'll see if I can find something else myself...\" She leaves."; } EventState.currentEventOptions = EventState.CONTINUE_OPTION; return(EventResult.DONE); } return(EventResult.CONTINUE); }
protected override EventResult OnStage(EventStage currentStage) { switch (currentStage) { case EventStage.START: EventState.currentEventImage = "faceOther"; EventState.currentEventText = "A man approaches you at the counter. He looks familiar. \"I'm back from my business venture!\""; EventState.currentEventOptions = new string[] { "Continue" }; mCurrentOptionOutcomes = new EventStage[] { EventStage.S2 }; break; case EventStage.S2: EventState.currentEventImage = "faceOther"; EventState.currentEventText = string.Format("\"Didn't I tell you you wouldn't regret it?\" He hands you {0}, then goes on his way.", Utilities.FormatMoney(COST)); EventState.currentEventOptions = EventState.OK_OPTION; BusinessState.MoneyChangeFromEvent(COST * 2); return(EventResult.DONE); } return(EventResult.CONTINUE); }
protected override EventResult OnStage(EventStage currentStage) { switch (currentStage) { case EventStage.START: EventState.currentEventImage = "facePlayerNeutral"; EventState.currentEventText = "\"Ah, " + NAME + "'s birthday is coming up!\""; if (GameData.singleton.money > COST) { EventState.currentEventOptions = new string[] { string.Format("Buy her a gift (-{0})", Utilities.FormatMoney(COST)), "I don't have any money to spare" }; mCurrentOptionOutcomes = new EventStage[] { EventStage.ACCEPT, EventStage.REFUSE }; } else { EventState.currentEventOptions = new string[] { "I don't have any money to spare" }; mCurrentOptionOutcomes = new EventStage[] { EventStage.REFUSE }; } break; case EventStage.ACCEPT: BusinessState.MoneyChangeFromEvent(-COST); GameData.singleton.wifeRelationship += 11f; EventState.currentEventImage = "facePlayerHappy"; EventState.currentEventText = "\"I know just the thing to get! I hope she likes it.\""; EventState.currentEventOptions = new string[] { "Ok" }; return(EventResult.DONE); case EventStage.REFUSE: GameData.singleton.wifeRelationship -= 1f; EventState.currentEventImage = "facePlayerNeutral"; EventState.currentEventText = "\"Hopefully she doesn't mind.\""; EventState.currentEventOptions = new string[] { "Ok" }; return(EventResult.DONE); } return(EventResult.CONTINUE); }
protected override EventResult OnStage(EventStage currentStage) { switch (currentStage) { case EventStage.START: EventState.currentEventImage = "faceOther"; EventState.currentEventText = "Someone approaches you at the counter. \"I have a proposition for you.\""; EventState.currentEventOptions = new string[] { "Go on..." }; mCurrentOptionOutcomes = new EventStage[] { EventStage.DECIDE }; break; case EventStage.DECIDE: EventState.currentEventImage = "faceOther"; EventState.currentEventText = string.Format("I've got an investment opportunity. Lend me {0}, and I'll pay you back double.", Utilities.FormatMoney(COST)); EventState.currentEventOptions = new string[] { "Accept the deal", "Refuse" }; mCurrentOptionOutcomes = new EventStage[] { EventStage.ACCEPT, EventStage.REFUSE }; break; case EventStage.ACCEPT: EventState.currentEventImage = "faceOther"; EventState.currentEventText = string.Format("\"You won't regret this!\", he says. He takes your {0} and leaves.", Utilities.FormatMoney(COST)); EventState.PushEvent(new InvestmentReturnEvent(), GameData.singleton.quarter + 4); BusinessState.MoneyChangeFromEvent(-COST); EventState.currentEventOptions = EventState.OK_OPTION; return(EventResult.DONE); case EventStage.REFUSE: EventState.currentEventImage = "faceOther"; EventState.currentEventText = "\"Suit yourself...\", he says. He leaves without another word."; EventState.currentEventOptions = EventState.OK_OPTION; return(EventResult.DONE); } return(EventResult.CONTINUE); }