public void DrawAnswerButtons(QuestsController.QuestNode node) { int answersCount = node.answers.Count; int indexInHierarchy = 0; for (int childIndex = 0; childIndex < answersCount; childIndex++) { QuestsController.Answer answer = node.answers [childIndex]; if (!quest.settings.showUnavailableAnswers.value) { if (!QuestsController.IsPassRequirements(answer)) { continue; } } GameObject button = GenerateAnswerButton(answer.text, answer.imageName, indexInHierarchy); indexInHierarchy += 1; EventDelegate action = new EventDelegate(this, "SelectAnswer"); action.parameters[0].value = answer; EventDelegate.Add(button.GetComponent <UIButton>().onClick, action); if (quest.settings.showUnavailableAnswers.value) { if (!QuestsController.IsPassRequirements(answer)) { Destroy(button.GetComponent <BoxCollider>()); } } } answerButtonsGrid.GetComponent <UIGrid>().Reposition(); }
private void Start() { _controller = GetComponent <QuestsController>(); _videoPlayer = _videoPanel.GetComponent <VideoPlayer>(); _videoPlayer.loopPointReached += EndVideo; _autoPlay.GetComponent <VideoPlayer>().loopPointReached += player => _controller.NextQuest(); }
public void FinishQuest() { quest = null; //questName = ""; DialogueController.reference.Deactivate(); QuestsController.ClearLocalData(); }
public void DrawAnswerButtons(QuestsController.QuestNode node) { int answersCount = node.answers.Count; int indexInHierarchy = 0; for (int childIndex = 0; childIndex < answersCount; childIndex++) { QuestsController.Answer answer = node.answers [childIndex]; if (!quest.settings.showUnavailableAnswers.value){ if (!QuestsController.IsPassRequirements(answer)){ continue; } } GameObject button = GenerateAnswerButton(answer.text, answer.imageName,indexInHierarchy); indexInHierarchy += 1; EventDelegate action = new EventDelegate(this, "SelectAnswer"); action.parameters[0].value = answer; EventDelegate.Add(button.GetComponent<UIButton>().onClick, action); if (quest.settings.showUnavailableAnswers.value){ if (!QuestsController.IsPassRequirements(answer)){ Destroy(button.GetComponent<BoxCollider>()); } } } answerButtonsGrid.GetComponent<UIGrid>().Reposition(); }
public void ActivateQuestTasks(string choiceID) { QuestsController questsController = FindObjectOfType <QuestsController>(); int countTaskActivateResults = DbCommands.GetCountFromQry(DbQueries.GetTaskActivateCountFromChoiceIDqry(choiceID)); if (countTaskActivateResults > 0) { print("Task ACTIVATING!!!!"); List <string[]> tasksActivatedList; DbCommands.GetDataStringsFromQry(DbQueries.GetCurrentActivateTasksPlayerChoiceResultQry(choiceID), out tasksActivatedList); foreach (string[] activatedTask in tasksActivatedList) { questsUI.InsertActivatedTask(activatedTask[1], activatedTask[3], activatedTask[2]); //a list of task parts in task that are prefab types are iterated over (if any) and instantiated. List <string[]> prefabParts = new List <string[]>(); DbCommands.GetDataStringsFromQry(DbQueries.GetPrefabTaskPartsFromTaskIDqry(activatedTask[1]), out prefabParts); foreach (string[] prefabPart in prefabParts) { string prefabPath = prefabPart[0]; string partID = prefabPart[1]; UnityEngine.Object prefabTaskPartObj = Resources.Load(prefabPath); print(prefabPath); GameObject prefabTaskPart = Instantiate(prefabTaskPartObj, new Vector2(0f, 0f), Quaternion.identity) as GameObject; prefabTaskPart.GetComponent <QuestTaskPart>().InitialiseMe(partID, activatedTask[1], activatedTask[3]); prefabTaskPart.transform.SetParent(questsController.transform, false); } } } }
private void Start() { uiManager = GameObject.FindGameObjectWithTag("Canvas").GetComponent <UIManager>(); maxHealth = health; emc = GameObject.FindGameObjectWithTag("GameManager").GetComponent <EditorModeController>(); pm = GameObject.FindGameObjectWithTag("GameManager").GetComponent <PlayModeManager>(); qc = GameObject.FindGameObjectWithTag("GameManager").GetComponent <QuestsController>(); tc = GameObject.FindGameObjectWithTag("GameManager").GetComponent <TutorialController>(); }
void questStart() { int i = 0; switch (NPCCharList.CharFollower [iVivica].questControl) { case 0: Board.text = "Please type the relationships that you have with Vivica and Lucina, i.e. landlady or roommate.\n\nThe first choice it's how you're going to call Vivica, second how she is going to call you, third it's how you're going to call Lucina, fourth how Lucina will refer to you and lastly fifth how Lucina will refer to Vivica."; panRel.sortingOrder = 500; option0Name.text = "Continue"; confirmationControl = 0; option1Butt.interactable = false; NPCCharList.CharFollower [iVivica].charRelationship = 0; NPCCharList.CharFollower [iVivica].charLove = 0; NPCCharList.CharFollower [iVivica].charCorruption = 50; NPCCharList.CharFollower [iVivica].attMorality = 50; NPCCharList.CharFollower [iVivica].attWillpower = 50; NPCCharList.CharFollower [iVivica].attMagicPower = 50; break; case 1: Board.text = "The next time that you arrive to her, you can see that she is getting some things set up in her bedroom. Most of them are books related to magic theories and alchemy. You tell her that you want to know more of what happened to her. She smiles at your curiosity. <i>“But first, I wanna know about you and your adventures! I have the right to know!”</i> she says with an inquisitive tone, and you sit down and begin to talk, to which she nods happily. You talk about your time in the forest, and the guardian that your " + NPCCharList.CharFollower [loadChar(6000)].relX + " placed to take care of you. You tell of your years of training and the sacrifices made to get you to where you are today.\n\nShe looks quite interested in your past. <i>“You’re quite the survivalist, " + NPCCharList.CharFollower [iVivica].relSN + ".”</i> she said after hearing your story. You try to lighten the mood, going into the topic of your childhoods instead.. <i>“Well, of course I remember those things. What about you?”</i> she says with doubt in her eyes. You tell her that you remember, but it has been so long since then, that you want to talk with her about some good times. She sighs and nods. <i>“It has been a while, isn’t it?”</i>\n\nFull of pride, she smiles and sits next toy ou. “Do you remember that my tutors always said that I had a knack for learning? Honestly, that was a pain for me. Learning and developing before everyone else places expectations on you.” You tell her that there were acolytes in the temple, or even some noble people that were ahead of others too, something that made her cross her arms. <i>“They had nothing on me though. Always jealous. Always talking about me behind my back. They were all afraid….. yes, they were all afraid that I was better than them. That I was smarter than them! Do you agree with me, " + NPCCharList.CharFollower [iVivica].relSN + "? You were there too…”</i>"; panConfirmation.sortingOrder = 500; confirmationControl = 1; option0Name.text = "Agree"; option1Name.text = "Disagree"; break; case 2: Board.text = "You decide to hear a bit more about your " + NPCCharList.CharFollower [iVivica].relSF + ", so you decide to talk to her a bit more about her childhood, interested in filling in the gaps that you are unfamiliar with. Your little " + NPCCharList.CharFollower [iVivica].relSF + " smiles a bit confused while saying, <i>“Come on, you were there.”</i> But you tell her that since the last time you talked, you noticed how little you knew about your little " + NPCCharList.CharFollower [iVivica].relSF + "’s life. You remind her the times that both of you worked at the temple of the city and how she were always there with you.\n\nFloating closer she grins and nods at your memory, <i>“You were one of the only ones that treated me like family, as if I wasn’t someone weird or dangerous, you just treated me as… me. I wanted to help you as much as I could. You were the errand boy, so it was fun to help you carry things, even though I never was known for my strength.”</i> she says, looking at her delicate arms and hands. <i>“You were always so busy working, so I had to take any chance to spend some time with you.”</i> she says with nostalgia and gloom, her eyes looking at the floor.\n\nYour plan was to remember nice things at first, not to dive into some depressive things. Seizing the opportunity as she is looking at the floor, you seize your chance and get close to her. You tickle her sides, making her laugh with force as she tries to stop your hands from tickling her for a second.\n\n<i>“Stop it! I’m sensitive!”</i> Though at this angle you can see how little your " + NPCCharList.CharFollower [iVivica].relSF + " is covered. She is practically naked, just like your " + NPCCharList.CharFollower [loadChar(6000)].relX + ". You wonder if something similar happened to them, that would be ironic."; panConfirmation.sortingOrder = 500; confirmationControl = 2; option0Name.text = "Enjoy her body"; option1Name.text = "Resist thoughts"; break; case 3: Board.text = "This time, you ask your " + NPCCharList.CharFollower [iVivica].relSF + " about her studies in alchemy, making note of her collection of books within her room. She looks around and nods, as if its something quite obvious at that point. <i>“Do you remember the tutors that mom hired as she always knew that I was quite gifted even at a young age? Ugh, how I hated the first one…”</i> she says with a shudder. You remember that she tore through a lot of tutors, as most of them couldn’t endure her temperament and behavior.\n\nShe continues <i>“When " + NPCCharList.CharFollower [loadChar(6000)].relX + " first introduced the old one, I thought that she would bail just like the others,but surprisingly she endured long enough for me to take a liking on her sturdiness. But I remember how " + NPCCharList.CharFollower [loadChar(6000)].relX + " moved all her influences to find me the best alchemy teacher in the region, and that lady seemed to be the best of the best around here. At first I thought that she was just an old hag with no skills, but she proved me wrong quickly, with her intelligence, skill, and quick wit.”</i> she says, while sitting on your lap and resting against your chest without saying anything else.\n\nShe laughs a bit. <i>“I kinda tried something that I knew may not work and the table caught fire. Luckily the old one was able to douse it quickly. But the temple priests told " + NPCCharList.CharFollower [loadChar(6000)].relX + " to find me another place to practice. So my " + NPCCharList.CharFollower [loadChar(6000)].relX + " used the old tower at the castle, even thought it was quite ruined but it has enough space for me to practice all I wanted without risk of accidents on others.”</i> You remember the old tower, a place that you forgot what was for and your father didn’t wanted to talk about it. Your " + NPCCharList.CharFollower [loadChar(6000)].relX + " seemed reticent at first, but the alchemist convinced her, but you are not sure how. <i>“I did learned everything she asked of me. I tried my best to learn everything she had in the books she brought with her as I learned a lot from her in the field of alchemy. Even the old one was impressed with how quickly I was able to learn and apply my own thoughts into the recipes.”</i>\n\nYou feel your " + NPCCharList.CharFollower [iVivica].relSF + " tense up a bit as she continues on, <i>“But with all good things, it couldn’t last forever. You remember that fateful night when " + NPCCharList.CharFollower [loadChar(6000)].relX + " came into the tower and hurried us to leave the city with her. It was the night that our uncle attacked father. We left the tower through a secret passage to the city walls. I wondered why our " + NPCCharList.CharFollower [loadChar(6000)].relX + " was with us and not with father, thinking that you might go to him and get swept away by death.”</i> \n\nVivica clenches her fist but still goes on, <i>“We ran through the forest on a horse as far as we could, and before I could realize what happened, I was in a cave far away from the city. I was furious. I argued with the old one for hours until she told me that if I returned to the city, I would get killed. That the only thing I could do was to study more, to build up my powers and wait for the day that I would be strong enough to reclaim my heritage”</i> she says, then she looks at you with a hint of surprise and relief.\n\nYou wraps your arms around her as she accepts your embrace, but says nothing about it. After a while her stomach rumbles a bit, so you tell her that perhaps its time to go and get something to eat. <i>“Yeah, all this nostalgia is making me hungry.”</i> Both of you leave the room and head to the dining hall for some food to swallow down the bad memories."; QuestsController.RemoveID(8003); Quest vivicaQuest5 = new Quest(); NPCCharList.CharFollower [iVivica].questControl = 4; QuestsController.createQuest(vivicaQuest5, "Changes.", "Vivica opens up about her transformation.", 68, 8004); endTurnFun(); break; default: Board.text = "This is all for this version, look forward for more next month!"; endTurnFun(); break; } }
void Awake() { loadHelenaData(); introStart(); Cheats.cheatItems(); //WorldControl.PortraitIDLayer0 = 3000; Quest AbbadonQuest1 = new Quest(); Quest AlbaQuest1 = new Quest(); QuestsController.createQuest(AbbadonQuest1, "Meeting the elite: Abbadon.", "Following your head maid advice, you decide to meet one of the lords of one of the most important houses in the city, Abbadon's House.", 14, 1000); QuestsController.createQuest(AlbaQuest1, "Meeting the elite: Alba", "You'll have to face one of leaders of one of the most important houses in Aurorum, and get them to support you cause", 59, 13000); }
public void Save() { for (var i = 0; i < Controller.Instance.Quests.Length; i++) { if (Controller.Instance.Quests[i].GetId() == quest.GetId()) { Controller.Instance.Quests[i] = quest; } } QuestsController.Save(Controller.Instance.Quests, Controller.Instance.Options.jsonPrettyPrint); }
void SetTextToShow(QuestsController.QuestNode node) { textToShow = ""; foreach (QuestsController.TextPart part in node.textParts) { if (QuestsController.IsPassRequirements(part)) { textToShow += part.text; } } textToShow = textToShow.Replace("\\n", "\n"); }
void Start() { loadLucina(); Board.text = "This is all the content for Lucina for now, keep tuned for new content!"; if (QuestControl.lucinaQuest == 0) { QuestsController.RemoveID(6000); Quest LucinaQuest1 = new Quest(); QuestsController.createQuest(LucinaQuest1, "Reunion", "Helena comes at you with haste to inform you about an unexpected guess in the dungeon.", 62, 6000); } //SceneManager.LoadScene (62); }
private void LoadPrefabQuests() { List <string[]> prefabQuestsPathList = new List <string[]>(); string saveIDstr = PlayerPrefsManager.GetSaveGame().ToString(); DbCommands.GetDataStringsFromQry(DbQueries.GetPathsForActivePrefabQuestParts(saveIDstr), out prefabQuestsPathList); foreach (string[] questPrefabArray in prefabQuestsPathList) { string prefabPath = questPrefabArray[0]; UnityEngine.Object prefabObj = Resources.Load(prefabPath); GameObject questPrefab = Instantiate(prefabObj, new Vector2(0f, 0f), Quaternion.identity) as GameObject; QuestsController questsController = FindObjectOfType <QuestsController>(); questPrefab.GetComponent <QuestTaskPart>().InitialiseMe(questPrefabArray[1], questPrefabArray[2], questPrefabArray[3]); questPrefab.transform.SetParent(questsController.transform, false); } }
public void SelectAnswer(QuestsController.Answer answer) { DialogueSystem.reference.log.Add(new string[] { AITextLabel.text, AISprite.spriteName, answer.text }); DialogueSystem.reference.currentLogIndex += 1; QuestsController.ApplyResults(answer); QuestsController.QuestNode nextNode = QuestsController.FindNode(quest, answer.pointer); if (nextNode == null) { DialogueSystem.reference.FinishQuest(); return; } currentNode = nextNode; PrepareNodeInfo(currentNode); UpdateUI(); }
public void StartQuest(string questName) { quest = QuestsController.GetQuest(questName); if (quest == null) { Debug.Log("Quest doesn't exist!"); return; } if (!QuestsController.IsPassRequirements(quest)) { Debug.Log("Can't pass requirements! quest doesn't start"); return; } log = new List <string[]>(); currentLogIndex = 0; DialogueController.reference.Activate(); }
void SetSpriteToShow(QuestsController.QuestNode node) { spriteToShow = node.imageName; }
public void confirmFun(int selector) { if (selector == 0 && confirmationControl == 0) { Board.text = VivicaQuestPure.pureQuest(0); endTurnFun(); QuestsController.RemoveID(8000); Quest vivicaQuest2 = new Quest(); NPCCharList.CharFollower [loadChar(8000)].questControl = 1; QuestsController.createQuest(vivicaQuest2, "Catching up", "After a busy day you go back to your castle, just to find out there is an uninvited guest.", 68, 8001); return; } ///////////////////////////// agree / disagree if (selector == 0 && confirmationControl == 1) { Board.text = "You remember them and you know that they weren’t like that, but it wouldn’t hurt to agree and get her on your side even more. You tell her that those fools were so full of pride and jealousy that they weren’t unable to get more power. That they feared her, because they couldn’t contain her power, and that’s why they were unable to grasp true mastery over the power that surrounds them. She smiles at your honey words for her, as its obvious that was what she wanted to hear.\n\n<i>“That’s what I was saying! Maybe it was for the best. I am destined for great things.”</i> your " + NPCCharList.CharFollower [iVivica].relSF + " cheekily says. You tell her that she must get ready to push away anyone that could hamper her grow, as she has the obligation to be as strongest as she can and lead the weak. Her power demands respect from the weak-willed, especially since she is a magic-user.\n\nShe gets closer to you and hugs you slowly, pressing her face against your chest. <i>“Yes " + NPCCharList.CharFollower [iVivica].relSN + ", I am able to rend my enemies with magic. No one will separate our family again. Not while I’m around,”</i> your " + NPCCharList.CharFollower [iVivica].relSF + " says while surges of lightning course through her wings, giving you a literal magic show.\n\nYou think of the capacities of your " + NPCCharList.CharFollower [iVivica].relSF + ", and the potential that she has of helping you to further your goals. You pat her head and leave the place without saying anything else."; NPCCharList.CharFollower [iVivica].charRelationship = 5; QuestsController.RemoveID(8001); Quest vivicaQuest3 = new Quest(); NPCCharList.CharFollower [iVivica].questControl = 2; QuestsController.createQuest(vivicaQuest3, "Intimate night.", "After so many years, you finally get the chance to get closer to you " + NPCCharList.CharFollower [iVivica].relSF + ".", 68, 8002); endTurnFun(); return; } if (selector == 1 && confirmationControl == 1) { Board.text = "You were there, you remember the situation and you know that it wasn’t the case. You tell her that they weren’t jealous to the core, because they followed her instructions whenever they could. You can’t talk for all of them, but most of them looked up to her, or at least considered her knowledgeable and reliable. She shakes her head at your answer. <i>“You don’t get it. They never talked to me. How could they look up to me, if they didn’t even talked to me? They were envious!”</i> she says as some tears roll out of her eyes. You turned to see her and cleaned one of her tears with your finger, telling her that they felt inferior. You begin to mention some of the rumors they would spread around her, mentioning an inflated ego and a need to shun her, and how they tried to push it onto you.\n\nYour " + NPCCharList.CharFollower [iVivica].relSF + " closes her eyes and places her face against your chest. <i>“Why didn’t you try to tell me?!”</i> You tell her that it was because she always seemed to be so happy and cheerful when she was with you. It’s the first time that you’ve seen her like this and knowing the reason of her tears. You hug her carefully, telling her that you feel sorry for not telling her about this misunderstanding. <i>“Thanks, " + NPCCharList.CharFollower [iVivica].relSN + ". I know that I can always count on you”</i>\n\nYou embrace her for quite a while, before she separates a bit and thanks you. After that, you excuse yourself before leaving the place."; NPCCharList.CharFollower [iVivica].charReputation = 0; QuestsController.RemoveID(8001); Quest vivicaQuest3 = new Quest(); NPCCharList.CharFollower [iVivica].questControl = 2; QuestsController.createQuest(vivicaQuest3, "Intimate night.", "After so many years, you finally get the chance to get closer to you " + NPCCharList.CharFollower [iVivica].relSF + ".", 68, 8002); endTurnFun(); return; } ///////////////////////////// enjoy her body / resist thoughts if (selector == 0 && confirmationControl == 2) { Board.text = "You begin to feel aroused as she forces over you, as she tries to make you submit. Its a struggle that its more of a game rather than a challenge. But you enjoy the feeling of her naked skin against your body. Even thought you think that its something more evident, she doesn’t seems to notice, too absorbed on the play to notice your gaze. After a couple of minutes, both of you call it even and rest a bit, laughing a bit from the “combat”.\n\nBefore you leave the room your " + NPCCharList.CharFollower [iVivica].relSF + " slowly floats up you and kisses you on the cheek softly before turning around as you finally return to your duties."; NPCCharList.CharFollower [iVivica].charLove = 5; QuestsController.RemoveID(8002); Quest vivicaQuest4 = new Quest(); NPCCharList.CharFollower [iVivica].questControl = 3; QuestsController.createQuest(vivicaQuest4, "Sadness.", "You spend your night talking wth Vivica, remembering the sad past that the two of you share.", 68, 8003); endTurnFun(); return; } if (selector == 1 && confirmationControl == 2) { Board.text = "Shaking such thoughts from your mind, you see that she is struggling to tickle you, so you use your whole body to pin her against the ground and tickle the sides of her head while she tries to bite your hand, without good results. You tell her that you’re her older sibling, its obvious that you have the upper hand. You can see that she tries to raise one hand, but you quickly tell her that the magic is prohibited right now. She laughs and shakes her head. <i>“You’re such a killjoy,”</i> she says as she rest her head on the floor. <i>“You win”</i> she says, panting from the exercise.\n\nSmiling at your victory, you get up and pat your " + NPCCharList.CharFollower [iVivica].relSF + "’s head before leaving the room."; NPCCharList.CharFollower [iVivica].charLove = 0; QuestsController.RemoveID(8002); Quest vivicaQuest4 = new Quest(); NPCCharList.CharFollower [iVivica].questControl = 3; QuestsController.createQuest(vivicaQuest4, "Sadness.", "You spend your night talking wth Vivica, remembering the sad past that the two of you share.", 68, 8003); endTurnFun(); return; } ///////////////////////////// temp if (selector == 0 && confirmationControl == 9999) { Board.text = ""; return; } if (selector == 1 && confirmationControl == 9999) { Board.text = ""; return; } }
void PrepareNodeInfo(QuestsController.QuestNode node) { SetTextToShow (node); SetSpriteToShow(node); }
public void confirmFun(int selector) { ///////////////////////////// Enslave / put down if (selector == 0 && confirmationControl == 0) { Board.text = "You agree with Alba. She could make a very productive slave, which is definitely something that’s needed these days. <i>“I’m glad that you agree " + GameControl.playerName + ", it would be a waste otherwise. You heard the order boys, restrain her and take her back to the city.”</i>\n\nAlba congratulates you for the success. <i>“Things will all run smoothly soon. With the mines in our hands, we’ll be able to start producing once again. I’ve got to get back to town, but this is not done yet. We still need to decide how I will conduct business from now on. There are many details to discuss, and I’m sure you are tired from the battle, so let’s head back.Just come to my place once you are ready to talk.”</i>\n"; NPCCharList.CharRetainers.Add(NPCCharList.CharMonster [0]); NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].isRecruited = true; NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].isSlave = true; NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].cityJobs = NPCData.Jobs.CastleRest; NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].attHappiness = 75; NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].charRank = NPCData.CharRank.S; NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].coreSkillMartial = Random.Range(65, 100); NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].attPhysical = Random.Range(80, 100); fileRulesNPC npcrules = new fileRulesNPC(); RulesNPC.savedRules.Add(npcrules); RulesNPC.savedRules [RulesNPC.savedRules.Count - 1].id = NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].charID; RulesNPC.savedRules [RulesNPC.savedRules.Count - 1].idx = NPCCharList.CharRetainers.Count - 1; QuestControl.albaQuest = 3; QuestsController.RemoveID(13002); Quest AlbaQuest4 = new Quest(); QuestsController.createQuest(AlbaQuest4, "Forging the future", "Alba wants you to see her new plans for her district, and ask your opinion about it.", 59, 13003); endTurnFun(); return; } if (selector == 1 && confirmationControl == 0) { Board.text = "You can’t risk having a beast like this in the city, especially if there’s any chance that you could lose control of it. You command the soldiers to take her out, and they act immediately. The girl screams for a moment, but her pain ends quickly. <i>“Awww, that’s such a waste " + GameControl.playerName + ". Come on boys, let’s go back to the city.”</i>\n\nAlba congratulates you for the success. <i>“Things will all run smoothly soon. With the mines in our hands, we’ll be able to start producing once again. I’ve got to get back to town, but this is not done yet. We still need to decide how I will conduct business from now on. There are many details to discuss, and I’m sure you are tired from the battle, so let’s head back.Just come to my place once you are ready to talk.”</i>"; QuestControl.albaQuest = 3; QuestsController.RemoveID(13002); Quest AlbaQuest4 = new Quest(); QuestsController.createQuest(AlbaQuest4, "Forging the future", "Alba wants you to see her new plans for her district, and ask your opinion about it.", 59, 13003); endTurnFun(); return; } ///////////////////////////// Fight / Titles / Gold if (selector == 0 && confirmationControl == 100) { Board.text = "You reject her proposal and ready your weapon. <i>“So be it! Get ready then!”</i> she leaps at you with her weapon in hand, and you manage to parry her first strike. <i>“Let’s see how strong you are!”</i>"; panCombat.sortingOrder = 500; panNegotiation.sortingOrder = -500; confirmationControl = 101; option0Name.text = "Kill her"; option1Name.text = "Enslave her"; return; } if (selector == 1 && confirmationControl == 100) { Board.text = "<i>“Smart choice. Now come on boys, take your things and let’s join them.”</i> Your soldiers and theirs all sheathe their weapons, and the brigands start to gather up what little belongings they have. <i>“" + GameControl.playerName + " right? I’m glad you accepted us into your ranks. We have experience dealing with beasts, and know this forest like the palm of our hands. We’ll be pretty useful to you.”</i> You begin explaining to her what her new duties will entail, when Alba interrupts you. \n\n<i>“" + GameControl.playerName + "?! What are you doing? You were supposed to be fighting them, not having a friendly chat!”</i> You quickly calm her down, and explain to her what you are doing. <i>“Taking them under your protection? Are you crazy? These people have been robbing our population for years, the city is going to hate you for this!”</i> You tell her that things are changing, and that everybody should be allowed a second chance.\n\n<i>“It’s not like these guys haven’t had many second chances already. Fine, do as you wish. You’ll be the one to deal with the consequences though, I won’t accept responsibility for anything they do.”</i> You nod, and she leaves furiously. \n\n<i>“Such a feisty girl... maybe we should take care of her first.”</i> You shake your head, knowing that it would be the end of the both of you. <i>“Fine, I’ll play by the rules... for now.”</i> She turns around and begins to organize her group. After a moment, you start to wonder whether you made the right choice or not. \n"; QuestsController.RemoveID(13001); Quest AlbaQuest3 = new Quest(); QuestsController.createQuest(AlbaQuest3, "Riots", "Your new recruits are causing mayhem on the city, and people is discontet with it! You need to deal with them, one way or the other.", 59, 13002); QuestControl.albaQuest = 2; NPCCharList.CharRetainers.Add(NPCCharList.CharMonster [0]); NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].isRecruited = true; NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].isSlave = false; NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].cityJobs = NPCData.Jobs.CastleGuard; NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].attHappiness = 85; NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].charRank = NPCData.CharRank.S; NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].coreSkillMartial = Random.Range(65, 100); NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].attPhysical = Random.Range(60, 85); fileRulesNPC npcrules = new fileRulesNPC(); RulesNPC.savedRules.Add(npcrules); RulesNPC.savedRules [RulesNPC.savedRules.Count - 1].id = NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].charID; RulesNPC.savedRules [RulesNPC.savedRules.Count - 1].idx = NPCCharList.CharRetainers.Count - 1; NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].charID = 1000100; NPCCharList.CharRetainers[NPCCharList.CharRetainers.Count - 1].charTitles.Add(new Gentlewoman()); endTurnFun(); return; } if (selector == 2 && confirmationControl == 100) { Board.text = "<i>“Smart choice. Now come on boys, take your things and let’s join them.”</i> Your soldiers and theirs all sheathe their weapons, and the brigands start to gather up what little belongings they have. <i>“" + GameControl.playerName + " right? I’m glad you accepted us into your ranks. We have experience dealing with beasts, and know this forest like the palm of our hands. We’ll be pretty useful to you.”</i> You begin explaining to her what her new duties will entail, when Alba interrupts you. \n\n<i>“" + GameControl.playerName + "?! What are you doing? You were supposed to be fighting them, not having a friendly chat!”</i> You quickly calm her down, and explain to her what you are doing. <i>“Taking them under your protection? Are you crazy? These people have been robbing our population for years, the city is going to hate you for this!”</i> You tell her that things are changing, and that everybody should be allowed a second chance.\n\n<i>“It’s not like these guys haven’t had many second chances already. Fine, do as you wish. You’ll be the one to deal with the consequences though, I won’t accept responsibility for anything they do.”</i> You nod, and she leaves furiously. \n\n<i>“Such a feisty girl... maybe we should take care of her first.”</i> You shake your head, knowing that it would be the end of the both of you. <i>“Fine, I’ll play by the rules... for now.”</i> She turns around and begins to organize her group. After a moment, you start to wonder whether you made the right choice or not. \n"; QuestsController.RemoveID(13001); Quest AlbaQuest3 = new Quest(); QuestsController.createQuest(AlbaQuest3, "Riots", "Your new recruits are causing mayhem on the city, and people is discontet with it! You need to deal with them, one way or the other.", 59, 13002); QuestControl.albaQuest = 2; NPCCharList.CharRetainers.Add(NPCCharList.CharMonster [0]); NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].isRecruited = true; NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].cityJobs = NPCData.Jobs.CastleGuard; NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].attHappiness = 85; NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].charRank = NPCData.CharRank.S; NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].coreSkillMartial = Random.Range(65, 100); NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].attPhysical = Random.Range(60, 85); NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].charID = 1000100; endTurnFun(); GameControl.charGold -= 100; return; } ///////////////////////////// kill / enslave if (selector == 0 && confirmationControl == 101) { Board.text = "You can’t take the risk of having a bandit like her in the city, especially with the potential for rebellion. You command the soldiers to take her out, and they act immediately. The girl screams for a moment, but her pain ends quickly. <i>“Excellent choice " + GameControl.playerName + ". We are done here. Come on boys, take what you can and let’s head back to the city.”</i>\n\nOn your way back, she congratulates you. <i>“You took care of the problem very quickly, so we should be able to start producing very soon. When you are ready, just come and visit me at my house. There is one more issue to discuss, but in the meantime, I’m going to start organizing my part of the city.”</i>\n\nYou thank her for her support in the mines. <i>“Don’t worry, this is just business. There’s no sense in leaving you alone when I need you to succeed.”</i> \n\nOnce back at the city, she bows to you, and the two of you part ways.\n"; QuestControl.albaQuest = 3; QuestsController.RemoveID(13001); Quest AlbaQuest4 = new Quest(); QuestsController.createQuest(AlbaQuest4, "Forging the future", "Alba wants you to see her new plans for her district, and ask your opinion about it.", 59, 13003); endTurnFun(); return; } if (selector == 1 && confirmationControl == 101) { Board.text = "You believe that she will be more useful to you alive than dead, and command your guards to restrain her and get her ready to take home. <i>“Thank you " + GameControl.playerName + "! You won’t regret this!”</i> The thief thanks you, but you dismiss her words with a curt hand gesture. \n\n <i>“It looks like we are done here, I just hope you can deal with her " + GameControl.playerName + ". Come on boys, take what you can and let’s get back to the city.”</i>\n\nOn your way back, she congratulates you. <i>“You took care of the problem very quickly, so we should be able to start producing very soon. When you are ready, just come and visit me at my house. There is one more issue to discuss, but in the meantime, I’m going to start organizing my part of the city.”</i>\n\nYou thank her for her support in the mines. <i>“Don’t worry, this is just business. There’s no sense in leaving you alone when I need you to succeed.”</i> \n\nOnce back at the city, she bows to you, and the two of you part ways.\n"; QuestControl.albaQuest = 3; QuestsController.RemoveID(13001); Quest AlbaQuest4 = new Quest(); QuestsController.createQuest(AlbaQuest4, "Forging the future", "Alba wants you to see her new plans for her district, and ask your opinion about it.", 59, 13003); NPCCharList.CharRetainers.Add(NPCCharList.CharMonster [0]); NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].isRecruited = true; NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].isSlave = true; NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].cityJobs = NPCData.Jobs.CastleRest; NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].attHappiness = 65; NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].charRank = NPCData.CharRank.S; NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].coreSkillMartial = Random.Range(65, 100); NPCCharList.CharRetainers [NPCCharList.CharRetainers.Count - 1].attPhysical = Random.Range(60, 85); endTurnFun(); return; } ///////////////////////////// temp if (selector == 0 && confirmationControl == 9999) { Board.text = ""; return; } if (selector == 1 && confirmationControl == 9999) { Board.text = ""; return; } }
public void SetUp() { questsController = new QuestsController(); }
public void confirmFun(int selector) { ///////////////////////////// Tease him / cronfront him if (selector == 0 && confirmationControl == 0) { Board.text = VirgilQuestPure.pureQuest(1); QuestControl.virgilQuest = 2; QuestsController.RemoveID(9001); Quest virgilQuest2 = new Quest(); QuestsController.createQuest(virgilQuest2, "Improving his attitude", "Virgils attitude is of no use to you, you come up with a plan and a surprise that may help him change...", 64, 9002); endTurnFun(); return; } if (selector == 1 && confirmationControl == 0) { Board.text = VirgilQuestPure.pureQuest(2); QuestControl.virgilQuest = 2; QuestsController.RemoveID(9001); Quest virgilQuest2 = new Quest(); QuestsController.createQuest(virgilQuest2, "Improving his attitude", "Virgils attitude is of no use to you, you come up with a plan and a surprise that may help him change...", 64, 9002); endTurnFun(); return; } ///////////////////////////// easy girl / pure girl if (selector == 0 && confirmationControl == 1) { Board.text = "Yeah, this girl is probably going to make the whole process of building up his confidence faster. You start to talk good about this woman, her achievements, and why you personally recommend her. She looks at you with skepticism, since you barely knew her name at all a couple of days ago, and most of what you said about her was a lie, but all of your servants stay quiet, as they should.\n\n<i>“V-very well, if you recommend her personally, I’ll guess it would be both rude and dumb to refuse. You’ll come with me.”</i> For now, she will have to live in the small place he has in the university, but he will be able to afford a house to move soon enough.\n\nYou slap her ass when she is on her way out, and she laughs. You hint to Virgil that he can have good fun with her too. <i>“I... I’ll think about it...”</i> he says ashamed, but you know he wouldn’t do something like this anytime soon. "; NPCCharList.CharFollower [iVirgil].charCorruption += 25; NPCCharList.CharFollower [iVirgil].attLibido = 100; QuestControl.virgilQuest = 3; QuestsController.RemoveID(9002); Quest virgilQuest3 = new Quest(); QuestsController.createQuest(virgilQuest3, "The Wingman", "After giving Virgil some time to get used to his new life, you decide it's time to give the next step.", 64, 9003); endTurnFun(); return; } if (selector == 1 && confirmationControl == 1) { Board.text = "Yes, this girl will help him to build his confidence and become the righteous man that you need in your ranks. You start to talk good about this woman and her achievements. She is proud, but she is humble enough to not make it obvious. \n\n<i>“V-very well, if you recommend her personally, I’ll guess it would be both rude and dumb to refuse. You’ll come with me.”</i> For now, she will have to live in the small place he has in the university, but he will be able to afford a house to move soon enough.\n\nShe bows profusely and thanks you for being always a good leader, and you too thank her for her diligent service. You tell to Virgil that you could learn a lot of things from her, and he nods, confident that these words have truth in them."; NPCCharList.CharFollower [iVirgil].attLibido = 0; QuestControl.virgilQuest = 3; QuestsController.RemoveID(9002); Quest virgilQuest3 = new Quest(); QuestsController.createQuest(virgilQuest3, "The Wingman", "After giving Virgil some time to get used to his new life, you decide it's time to give the next step.", 64, 9003); endTurnFun(); return; } ///////////////////////////// Spike / encourage if (selector == 0 && confirmationControl == 2) { Board.text = VirgilQuestPure.pureQuest(5); NPCCharList.CharFollower [iVirgil].charCorruption += 25; NPCCharList.CharFollower [iVirgil].charAddictions [0] = 100; option0Name.text = "S**t"; option1Name.text = "Nerdy girl"; option2Name.text = "Yourself"; option2Butt.interactable = true; panConfirmation.sortingOrder = 500; confirmationControl = 3; PanLeftManagement.endTurnControl = true; QuestControl.virgilQuest = 4; int i = 0; while (i < QuestsController.ActiveQuests.Count) { QuestsController.RemoveID(9004); i++; } QuestsController.RemoveID(9003); Quest virgilQuest4 = new Quest(); QuestsController.createQuest(virgilQuest4, "Learning time!", "Hopefully he'll be able to teach whatever you need to learn.", 64, 9004); return; } if (selector == 1 && confirmationControl == 2) { Board.text = VirgilQuestPure.pureQuest(6); option0Name.text = "S**t"; option1Name.text = "Nerdy girl"; option2Name.text = "Yourself"; option2Butt.interactable = true; panConfirmation.sortingOrder = 500; confirmationControl = 3; QuestControl.virgilQuest = 4; int i = 0; while (i < QuestsController.ActiveQuests.Count) { QuestsController.RemoveID(9004); i++; } PanLeftManagement.endTurnControl = true; QuestsController.RemoveID(9003); Quest virgilQuest4 = new Quest(); QuestsController.createQuest(virgilQuest4, "Learning time!", "Hopefully he'll be able to teach whatever you need to learn.", 64, 9004); return; } ///////////////////////////// slutty nerdy yourself from spike if (selector == 0 && confirmationControl == 3) { Board.text = VirgilQuestPure.pureQuest(7); endTurnFun(); return; } if (selector == 1 && confirmationControl == 3) { Board.text = VirgilQuestPure.pureQuest(8); endTurnFun(); return; } if (selector == 2 && confirmationControl == 3) { Board.text = VirgilQuestPure.pureQuest(9); endTurnFun(); return; } ///////////////////////////// philosophy manifest if (selector == 0 && confirmationControl == 4) { Board.text = VirgilQuestPure.pureQuest(13); QuestControl.virgilQuest = 7; PanLeftManagement.endTurnControl = true; QuestsController.RemoveID(9006); Quest virgilQuest7 = new Quest(); QuestsController.createQuest(virgilQuest7, "Time out", "Virgil asks you to visit him to have a personal talk with you.", 64, 9007); endTurnFun(); return; } if (selector == 1 && confirmationControl == 4) { Board.text = VirgilQuestPure.pureQuest(14); QuestControl.virgilQuest = 7; PanLeftManagement.endTurnControl = true; QuestsController.RemoveID(9006); Quest virgilQuest7 = new Quest(); QuestsController.createQuest(virgilQuest7, "Time out", "Virgil asks you to visit him to have a personal talk with you.", 64, 9007); endTurnFun(); return; } ///////////////////////////// order freedom if (selector == 0 && confirmationControl == 5) { NPCCharList.CharFollower [iVirgil].charCorruption -= 25; if (NPCCharList.CharFollower [iVirgil].charCorruption >= 100) { NPCCharList.CharFollower [iVirgil].charCorruption = 100; } else if (NPCCharList.CharFollower [iVirgil].charCorruption < 0) { NPCCharList.CharFollower [iVirgil].charCorruption = 0; } Board.text = VirgilQuestPure.pureQuest(15); QuestControl.virgilQuest = 8; PanLeftManagement.endTurnControl = true; QuestsController.RemoveID(9007); Quest virgilQuest8 = new Quest(); QuestsController.createQuest(virgilQuest8, "Final lesson", "You finally finished your course with Virgil, what's next?.", 64, 9008); endTurnFun(); return; } if (selector == 1 && confirmationControl == 5) { NPCCharList.CharFollower [iVirgil].charCorruption += 25; if (NPCCharList.CharFollower [iVirgil].charCorruption >= 100) { NPCCharList.CharFollower [iVirgil].charCorruption = 100; } else if (NPCCharList.CharFollower [iVirgil].charCorruption < 0) { NPCCharList.CharFollower [iVirgil].charCorruption = 0; } Board.text = VirgilQuestCorrupt.corruptQuest(22); QuestControl.virgilQuest = 8; PanLeftManagement.endTurnControl = true; QuestsController.RemoveID(9007); Quest virgilQuest8 = new Quest(); QuestsController.createQuest(virgilQuest8, "Final lesson", "You finally finished your course with Virgil, what's next?.", 64, 9008); endTurnFun(); return; } ///////////////////////////// Stay / leave if (selector == 0 && confirmationControl == 6) { Board.text = VirgilQuestPure.pureQuest(17); endTurnFun(); return; } if (selector == 1 && confirmationControl == 6) { Board.text = "You profoundly apologize, but right now is not a good moment for that. You can see the sadness on his face, and you try to cheer him up telling him you both will have a lot of time for being together in the future. <i>“Y-you promise?”</i> yeah, of course you do. He jumps on you and kisses you one last time. <i>“Very well, but you will have to make up for leaving me today then.”</i> both of you laugh, and you caress his cheek before taking your stuff and leaving the place. \n\nNow it is time to deal with Celia."; endTurnFun(); return; } ///////////////////////////// let him stop him if (selector == 0 && confirmationControl == 100) { Board.text = "When he realizes you don’t mind he keeps getting closer to your crotch, but you grab his hand once he is close enough, and confront him. He panics at your reaction, and starts to beg for forgiveness <i>“No! I am sorry my Liege! My body has a mind of it’s own! I didn’t mean it!”</i> You laugh at his words, and command him to sit on the chair. He immediately does so, looking down as a scolded child. \n\nYou ask about what is his problem “I... Is...” You ask him to hurry, and he shrieks out of fear <i>“Yes!... This... Problem started with the new church! All of those skimpy clothed followers of god, the obscene sounds from the confessional... Have awoken this inside me and I cant control it... You know, I barely head outside and... Well, my body has needs!”</i>\n\nSo, what Virgil needs is a girlfriend or boyfriend uh? Well, you can take care of that, one way or another, but it’s apparent that for now you’ll not be able to get the lessons that you need out of him.\n\nYou tell him that you will help get what he needs <i>“W-what? Really? My Liege I am really thankful for that!”</i> he does a grateful low bow at you. When he stands up again, you notice he still has a raging boner. Although this is not something that is going to be fixed in a single day but, for now you could have some fun with him, what should you do..."; NPCCharList.CharFollower [iVirgil].charLove = 10; option0Name.text = "69"; option1Name.text = "Mutual masturbation"; panConfirmation.sortingOrder = 500; confirmationControl = 101; PanLeftManagement.endTurnControl = true; QuestControl.virgilQuest = 101; QuestsController.RemoveID(9001); Quest virgilQuest2 = new Quest(); QuestsController.createQuest(virgilQuest2, "Improving his attitude", "Virgils attitude is of no use to you, you come up with a plan and a surprise that may help him change...", 64, 9002); return; } if (selector == 1 && confirmationControl == 100) { Board.text = "You grab his hand before he can reacts. He shrieks out of fear <i>“Sorry my Liege! It was not my intention!”</i> But you are not happy with his answer, and ask him to explain himself. <i>“I... Eh... Is just, you know! It’s that damn church, full of scantly dressed people, those obscene sounds coming out of the confessional... You know, its messing with my head! I have... These feelings, down there, all the time!”</i> Well, at least the church is doing it’s job as you expected. \n\nNonetheless, this is of no use to you, and if he cant focus on teaching you, you’ll have to deal with this thing first. You think for a moment, while expecting the worst. Finally, you tell him that you’ll help him with his issue <i>“Seriously? Thank you my Liege! I am really grateful!”</i> You say that is nothing, and to be ready for when you come back.\n\nYou go back to your castle after this... unfortunate day, and wonder how you’ll manage to get an awkward brat like him to get laid."; NPCCharList.CharFollower [iVirgil].charLove = 0; PanLeftManagement.endTurnControl = true; QuestControl.virgilQuest = 101; QuestsController.RemoveID(9001); Quest virgilQuest2 = new Quest(); QuestsController.createQuest(virgilQuest2, "Improving his attitude", "Virgils attitude is of no use to you, you come up with a plan and a surprise that may help him change...", 64, 9002); endTurnFun(); return; } ///////////////////////////// 69 mutual if (selector == 0 && confirmationControl == 101) { Board.text = VirgilQuestCorrupt.corruptQuest(2); endTurnFun(); return; } if (selector == 1 && confirmationControl == 101) { Board.text = VirgilQuestCorrupt.corruptQuest(3); endTurnFun(); return; } ///////////////////////////// Easy girl pure girl if (selector == 0 && confirmationControl == 102) { Board.text = "Yeah, this girl is probably going to make the whole process of building up his confidence a lot faster... Or, at the very least, drain enough of his libido away for him to focus. You start to vouch the qualities of this woman and her achievements, and why you would personally recommend her. She looks at you with skepticism; considering you barely even know her name and you’re babbling nothing but random lies. Thankfully all of your servants stay quiet, as they should.\n\n<i>“V-very well, if you recommend her personally, I guess it would be both rude and stupid to refuse. You’ll come with me.”</i> For now, she will have to live in the small place he has at the university, but he will be able to afford a house to move soon enough.\n\nYou slap her ass when she is on her way out, and she laughs. You hint to Virgil that he can have good fun with her too. <i>“I... I’ll make sure to test that out, my Liege...”</i> he says, the erection in his pants growing bigger.\n\nLastly, you hand him a bag of gold coins; enough to buy some new clothing appropriate for his new station. <i>“My Liege... This is too much I... I’ll repay you all of this, I swear!”</i> You nod, knowing he will but for now he needs to get used to his new life. With some luck, this will help with his attitude... at least bossing someone around and not being dependent on Celia’s mood swings should have some positive effect on him. "; NPCCharList.CharFollower [iVirgil].charCorruption += 25; NPCCharList.CharFollower [iVirgil].attLibido = 100; QuestControl.virgilQuest = 102; QuestsController.RemoveID(9002); Quest virgilQuest3 = new Quest(); QuestsController.createQuest(virgilQuest3, "The Wingman", "After giving Virgil some time to get used to his new life, you decide it's time to give the next step.", 64, 9003); endTurnFun(); return; } if (selector == 1 && confirmationControl == 102) { Board.text = "Yes, this girl will help him to build his confidence and become the righteous man that you need in your endeavors. You start to talk up the qualities of this this woman and her achievements. She is proud, but she’s humble enough to not make it obvious. \n\n<i>“V-very well, if you recommend her personally, I’ll guess it would be both rude and dumb to refuse. You’ll come with me.”</i> For now, she will have to live in the small place he has in the university, but he will be able to afford a house to move soon enough.\n\nShe bows profusely and thanks you for being such a good leader, and you too thank her for her diligent service. You tell to Virgil that he could learn a lot of things from her... but he ignores you, day dreaming with a smile on his face about what he’ll do to her. Oh boy...\n\nLastly, you hand him a bag of gold coins; enough to buy some new clothing appropriate for his new station. <i>“My Liege... This is too much I... I’ll repay you all of this, I swear!”</i> You nod, knowing he will but for now he needs to get used to his new life. With some luck, this will help with his attitude... at least bossing someone around and not being dependent on Celia’s mood swings should have some positive effect on him. "; NPCCharList.CharFollower [iVirgil].charCorruption -= 25; NPCCharList.CharFollower [iVirgil].attLibido = 0; QuestControl.virgilQuest = 102; QuestsController.RemoveID(9002); Quest virgilQuest3 = new Quest(); QuestsController.createQuest(virgilQuest3, "The Wingman", "After giving Virgil some time to get used to his new life, you decide it's time to give the next step.", 64, 9003); endTurnFun(); return; } ///////////////////////////// Do drugs / encourage from wingman if (selector == 0 && confirmationControl == 103) { Board.text = VirgilQuestCorrupt.corruptQuest(6); PanLeftManagement.endTurnControl = true; NPCCharList.CharFollower [iVirgil].charCorruption += 25; NPCCharList.CharFollower [iVirgil].charAddictions [0] = 100; option0Name.text = "S**t"; option1Name.text = "Nerdy girl"; option2Name.text = "Yourself"; option2Butt.interactable = true; confirmationControl = 104; QuestControl.virgilQuest = 103; QuestsController.RemoveID(9003); Quest virgilQuest4 = new Quest(); QuestsController.createQuest(virgilQuest4, "Learning time!", "Hopefully he'll be able to teach whatever you need to learn. ", 64, 9004); return; } if (selector == 1 && confirmationControl == 103) { Board.text = VirgilQuestCorrupt.corruptQuest(7); NPCCharList.CharFollower [iVirgil].charCorruption -= 25; option0Name.text = "S**t"; option1Name.text = "Nerdy girl"; option2Name.text = "Yourself"; option2Butt.interactable = true; confirmationControl = 105; QuestControl.virgilQuest = 103; QuestsController.RemoveID(9003); Quest virgilQuest4 = new Quest(); QuestsController.createQuest(virgilQuest4, "Learning time!", "Hopefully he'll be able to teach whatever you need to learn. ", 64, 9004); return; } ///////////////////////////// drugs sluty nerdy yoursef if (selector == 0 && confirmationControl == 104) { Board.text = VirgilQuestCorrupt.corruptQuest(8); option0Name.text = "F**k him"; option1Name.text = "F**k her"; option2Name.text = "Leave"; option2Butt.interactable = true; confirmationControl = 106; return; } if (selector == 1 && confirmationControl == 104) { Board.text = VirgilQuestCorrupt.corruptQuest(9); option0Name.text = "Have sex"; option1Name.text = "Leave"; option2Name.text = ""; option2Butt.interactable = false; confirmationControl = 108; return; } if (selector == 2 && confirmationControl == 104) { Board.text = VirgilQuestPure.pureQuest(9); endTurnFun(); return; } ///////////////////////////// encourage sluty nerdy yoursef if (selector == 0 && confirmationControl == 105) //s**t { Board.text = VirgilQuestCorrupt.corruptQuest(14); option0Name.text = "F**k him"; option1Name.text = "F**k her"; option2Name.text = "Leave"; option2Butt.interactable = true; confirmationControl = 107; return; } if (selector == 1 && confirmationControl == 105) { Board.text = VirgilQuestCorrupt.corruptQuest(18); option0Name.text = "Have sex"; option1Name.text = "Leave"; option2Name.text = ""; option2Butt.interactable = false; confirmationControl = 109; return; } if (selector == 2 && confirmationControl == 105) { Board.text = VirgilQuestPure.pureQuest(9); endTurnFun(); return; } ///////////////////////////// drug / s**t / F**k him f**k her leave if (selector == 0 && confirmationControl == 106) { Board.text = VirgilQuestCorrupt.corruptQuest(11); endTurnFun(); return; } if (selector == 1 && confirmationControl == 106) { Board.text = VirgilQuestCorrupt.corruptQuest(12); endTurnFun(); return; } if (selector == 1 && confirmationControl == 106) { Board.text = VirgilQuestCorrupt.corruptQuest(13); endTurnFun(); return; } ///////////////////////////// encourage / s**t / F**k him f**k her leave if (selector == 0 && confirmationControl == 107) { Board.text = VirgilQuestCorrupt.corruptQuest(15); endTurnFun(); return; } if (selector == 1 && confirmationControl == 107) { Board.text = VirgilQuestCorrupt.corruptQuest(12); endTurnFun(); return; } if (selector == 1 && confirmationControl == 107) { Board.text = VirgilQuestCorrupt.corruptQuest(13); endTurnFun(); return; } ///////////////////////////// drug / nerdy / have sex leave if (selector == 0 && confirmationControl == 108) { Board.text = VirgilQuestCorrupt.corruptQuest(16); endTurnFun(); return; } if (selector == 1 && confirmationControl == 108) { Board.text = VirgilQuestCorrupt.corruptQuest(17); endTurnFun(); return; } ///////////////////////////// encourage / nerdy / have sex leave if (selector == 0 && confirmationControl == 109) { Board.text = VirgilQuestCorrupt.corruptQuest(19); endTurnFun(); return; } if (selector == 1 && confirmationControl == 109) { Board.text = VirgilQuestCorrupt.corruptQuest(20); endTurnFun(); return; } ///////////////////////////// philosophy manifest if (selector == 0 && confirmationControl == 110) { Board.text = VirgilQuestPure.pureQuest(13); QuestControl.virgilQuest = 106; PanLeftManagement.endTurnControl = true; QuestsController.RemoveID(9006); Quest virgilQuest7c = new Quest(); QuestsController.createQuest(virgilQuest7c, "Time out", "Virgil asks you to visit him to have a personal talk with you.", 64, 9007); endTurnFun(); return; } if (selector == 1 && confirmationControl == 110) { Board.text = VirgilQuestPure.pureQuest(14); QuestControl.virgilQuest = 106; PanLeftManagement.endTurnControl = true; QuestsController.RemoveID(9006); Quest virgilQuest7c = new Quest(); QuestsController.createQuest(virgilQuest7c, "Time out", "Virgil asks you to visit him to have a personal talk with you.", 64, 9007); endTurnFun(); return; } ///////////////////////////// temp if (selector == 0 && confirmationControl == 9999) { Board.text = ""; return; } if (selector == 1 && confirmationControl == 9999) { Board.text = ""; return; } }
public void OnDisable() { QuestsController.Save(Controller.Instance.Quests, Controller.Instance.Options.jsonPrettyPrint); }
public void OnGUI() { GUIHelper.Init(); scrollPos = EditorGUILayout.BeginScrollView(scrollPos); GUILayout.BeginVertical(GUIHelper.windowStyle); // If empty show this message. if (Controller.Instance.Quests.Length <= 0) { EditorGUILayout.HelpBox("No quests yet.", MessageType.Info); } // Quests loop to list. foreach (Quest quest in Controller.Instance.Quests) { GUILayout.BeginHorizontal(); // Set label properties. GUILayout.BeginHorizontal(); if (EditorGUIUtility.isProSkin) { GUIHelper.labelStyle.normal.textColor = Color.white; } GUIHelper.labelStyle.alignment = TextAnchor.MiddleLeft; var questName = DictionariesHelper.ContainsKey(quest.Name, Controller.Instance.Options.currentLanguage); if (questName != null) { GUILayout.Label(questName.value, GUIHelper.labelStyle); } GUILayout.EndHorizontal(); GUILayout.Space(10.0f); // Setting buttons. GUILayout.BeginHorizontal(GUILayout.MaxWidth(position.width / 2)); if (GUILayout.Button("Edit", GUILayout.Height(GUIHelper.BUTTON_HEIGHT_SMALL))) { QuestEditor.Open(quest); } if (GUILayout.Button("Delete", GUILayout.Height(GUIHelper.BUTTON_HEIGHT_SMALL))) { if (EditorUtility.DisplayDialog("Are you sure?", "Do you really want to delete?\nThis data will be lost forever.", "Yes", "No")) { QuestEditor.Init(QuestEditor.State.Close); Controller.Instance.Quests = ArrayHelper.Remove(Controller.Instance.Quests, quest); QuestsController.Save(Controller.Instance.Quests, Controller.Instance.Options.jsonPrettyPrint); } } GUILayout.EndHorizontal(); GUILayout.EndHorizontal(); } // Add button. if (GUILayout.Button("Add Quest", GUILayout.Height(GUIHelper.BUTTON_HEIGHT))) { var quest = new Quest(); Controller.Instance.Quests = ArrayHelper.Add(Controller.Instance.Quests, quest); quest.questStates = ArrayHelper.Add(quest.questStates, new QuestState()); foreach (var language in Controller.Instance.Options.languagesList) { quest.questStates[0].ShortDescription = ArrayHelper.Add(quest.questStates[0].ShortDescription, new LanguageDictionary(language, "in progress.")); quest.questStates[0].LongDescription = ArrayHelper.Add(quest.questStates[0].LongDescription, new LanguageDictionary(language, "")); } QuestsController.Save(Controller.Instance.Quests, Controller.Instance.Options.jsonPrettyPrint); QuestEditor.Open(quest); } GUILayout.EndVertical(); EditorGUILayout.EndScrollView(); }
void Awake() { reference = this; }
void SetTextToShow(QuestsController.QuestNode node) { textToShow = ""; foreach (QuestsController.TextPart part in node.textParts) { if (QuestsController.IsPassRequirements (part)) { textToShow += part.text; } } textToShow = textToShow.Replace("\\n", "\n"); }
static string lordlady; // lord/lady void questStart() { int i = 0; switch (QuestControl.virgilQuest) { case 0: // intro - Aurorum university WorldControl.day += 2; Board.text = VirgilQuestCorrupt.corruptQuest(0); // this detects both WorldControl.PortraitIDLayer0 = 10050; WorldControl.day += 2; //create new quest iVar = loadChar(7000); if (NPCCharList.CharFollower [iVar].charCorruption > 50) { NPCCharList.CharFollower [loadChar(10000)].charCorruption = 50; NPCCharList.CharFollower [iVirgil].charCorruption = 50; QuestControl.virgilQuest = 100; } else { NPCCharList.CharFollower [loadChar(10000)].charCorruption = 0; NPCCharList.CharFollower [iVirgil].charCorruption = 0; QuestControl.virgilQuest = 1; } while (i < QuestsController.ActiveQuests.Count) { QuestsController.RemoveID(9000); i++; } QuestsController.RemoveID(9000); Quest virgilQuest1 = new Quest(); QuestsController.createQuest(virgilQuest1, "First lesson", "After your unsuccesful meeting with Celia, you decide to visit Virgil and learn the basics of the city.", 64, 9001); endTurnFun(); break; case 1: // First lesson pure WorldControl.day += 2; Board.text = VirgilQuestPure.pureQuest(0); option0Name.text = "Tease him"; option1Name.text = "Confront him"; panConfirmation.sortingOrder = 500; confirmationControl = 0; break; case 2: // improving his attitude WorldControl.day += 2; Board.text = VirgilQuestPure.pureQuest(3); option0Name.text = "Easy girl"; option1Name.text = "Pure girl"; panConfirmation.sortingOrder = 500; confirmationControl = 1; break; case 3: // wingman WorldControl.day += 2; Board.text = VirgilQuestPure.pureQuest(4); option0Name.text = "Spike"; option1Name.text = "Encourage"; panConfirmation.sortingOrder = 500; confirmationControl = 2; break; case 4: // learning time I pure Board.text = VirgilQuestPure.pureQuest(10); WorldControl.day += 2; QuestControl.virgilQuest = 5; PanLeftManagement.endTurnControl = true; QuestsController.RemoveID(9004); Quest virgilQuest5 = new Quest(); QuestsController.createQuest(virgilQuest5, "Learning time II", "Today's lesson is about alchemy and other relevant topics.", 64, 9005); endTurnFun(); break; case 5: // learning time II pure Board.text = VirgilQuestPure.pureQuest(11); WorldControl.day += 2; QuestControl.virgilQuest = 6; PanLeftManagement.endTurnControl = true; QuestsController.RemoveID(9005); Quest virgilQuest6 = new Quest(); QuestsController.createQuest(virgilQuest6, "Learning time III", "The final lesson!", 64, 9006); endTurnFun(); break; case 6: // learning time III pure WorldControl.day += 2; Board.text = VirgilQuestPure.pureQuest(12); option0Name.text = "Philosophy book"; option1Name.text = "Manifest"; panConfirmation.sortingOrder = 500; confirmationControl = 4; while (i < QuestsController.ActiveQuests.Count) { QuestsController.RemoveID(9004); i++; } break; case 7: // time out WorldControl.day += 2; Board.text = "Virgil asked you to meet him tonight, but instead of the usual place, his office, he says he’ll wait for you at the rooftop of the building. \n\nOnce there, you find the Wallaby waiting for you at one of the corners. He raises his hand and salutes you, but you can see he is worried. When you arrive at his side, the first question you ask is why he chose this particular place. \n\n<i>“Eh?... Is it that weird?... Well, I wanted to talk about something but, the office was not a good place for that and I don’t really know many places of the city to visit that are appropriate.”</i> \n\nYou nod and ask if everything is all right. <i>“That’s a good question, my Liege, I wonder exactly the same thing... Is everything all right? In this city? With me?... Things have been changing since you arrived and... I need guidance. I want you to help me to understand where we’re going. Can you help me " + GameControl.playerName + "?”</i>\n\nThe both of you turn around and look at the city. At this time of the night there is a peaceful aura created by the silence and the dim lights illuminating the streets, but you know that he is right, things have and will keep changing.\n\nYou look at him, his concerned expression more pronounced thanks to the moonlight, waiting for you.\n\nAt this point, you think this might be the last chance you have to influence him before is too late, although past decisions can still out weight what you tell him now, it’s worth a shot. \n\nYou could suggest him that the future of the city relies on order, a strong social structure and probably tough policy. You could, too, tell him that it is time to go back to the original roots, to return to that primal stage of society and to let freedom reign. \n\n<i>“" + GameControl.playerName + "?”</i>\n\nWhat will you tell him?"; option0Name.text = "Order"; option1Name.text = "Freedom"; panConfirmation.sortingOrder = 500; confirmationControl = 5; break; case 8: // finally lesson WorldControl.day += 2; QuestControl.virgilQuest = 200; QuestsController.RemoveID(9008); Quest celiaQuest1 = new Quest(); NPCCharList.CharFollower [iVirgil].isRecruited = true; if (NPCCharList.CharFollower [loadChar(10000)].charCorruption >= 50) { QuestsController.createQuest(celiaQuest1, "Meeting Celia", "Although you already met Celia, you didn't had the chance to speak with the dean.", 67, 10000); } else { QuestsController.createQuest(celiaQuest1, "Meeting Celia", "Although you already met Celia, you didn't had the chance to speak with the dean.", 67, 10000); } PanLeftManagement.endTurnControl = true; if (NPCCharList.CharFollower [iVirgil].charCorruption >= 50) { NPCCharList.CharFollower [iVirgil].charCorruption = 100; Board.text = VirgilQuestCorrupt.corruptQuest(23); } else { NPCCharList.CharFollower [iVirgil].charCorruption = 0; Board.text = VirgilQuestPure.pureQuest(16); } if (NPCCharList.CharFollower [iVirgil].charLove > 0) { option0Name.text = "Stay"; option1Name.text = "Leave"; panConfirmation.sortingOrder = 500; confirmationControl = 6; } else { endTurnFun(); } break; case 100: // first lesson corr WorldControl.day += 2; Board.text = VirgilQuestCorrupt.corruptQuest(1); option0Name.text = "Let him"; option1Name.text = "Stop him"; panConfirmation.sortingOrder = 500; confirmationControl = 100; break; case 101: WorldControl.day += 2; Board.text = VirgilQuestCorrupt.corruptQuest(4); option0Name.text = "Easy girl"; option1Name.text = "Pure girl"; panConfirmation.sortingOrder = 500; confirmationControl = 102; break; case 102: WorldControl.day += 2; Board.text = VirgilQuestCorrupt.corruptQuest(5); option0Name.text = "Do drugs"; // dont do drugs kids option1Name.text = "Encourage him"; panConfirmation.sortingOrder = 500; confirmationControl = 103; break; case 103: // learning time I Board.text = VirgilQuestCorrupt.corruptQuest(21); WorldControl.day += 2; QuestControl.virgilQuest = 104; PanLeftManagement.endTurnControl = true; QuestsController.RemoveID(9004); Quest virgilQuest5c = new Quest(); QuestsController.createQuest(virgilQuest5c, "Learning time II", "Hopefully he'll be able to teach whatever you need to learn.", 64, 9005); endTurnFun(); break; case 104: // learning time II WorldControl.day += 2; Board.text = VirgilQuestPure.pureQuest(11); QuestControl.virgilQuest = 105; PanLeftManagement.endTurnControl = true; QuestsController.RemoveID(9005); Quest virgilQuest6c = new Quest(); QuestsController.createQuest(virgilQuest6c, "Learning time III", "The final lesson!", 64, 9006); endTurnFun(); break; case 105: // learning time III Board.text = VirgilQuestPure.pureQuest(12); WorldControl.day += 2; option0Name.text = "Philosophy book"; // dont do drugs kids option1Name.text = "Manifest"; panConfirmation.sortingOrder = 500; confirmationControl = 110; while (i < QuestsController.ActiveQuests.Count) { QuestsController.RemoveID(9004); i++; } break; case 106: // time out QuestControl.virgilQuest = 7; questStart(); break; case 107: // final lesson QuestControl.virgilQuest = 8; questStart(); return; default: Board.text = "This is all the content available for Virgil in 0.2.5 dev, look forward the next update!"; endTurnFun(); //the quest currently ends at 200 break; } }
public void OnGUI() { GUIHelper.Init(); scrollPos = EditorGUILayout.BeginScrollView(scrollPos); GUILayout.BeginVertical(GUIHelper.windowStyle); switch (state) { case State.None: Init(State.Close); break; case State.CreateEdit: // Set quest name. GUILayout.Label("Name: "); var questName = DictionariesHelper.ContainsKey(quest.Name, Controller.Instance.Options.currentLanguage); if (questName == null) { quest.Name = ArrayHelper.Add(quest.Name, new LanguageDictionary(Controller.Instance.Options.currentLanguage, "")); } GUI.SetNextControlName("name"); DictionariesHelper.ContainsKey(quest.Name, Controller.Instance.Options.currentLanguage).value = EditorGUILayout.TextField(DictionariesHelper.ContainsKey(quest.Name, Controller.Instance.Options.currentLanguage).value); GUIHelper.Focus("name"); EditorGUILayout.Space(); EditorGUILayout.SelectableLabel(string.Format("Quest Unique ID: {0}", quest.GetId())); // Set label properties for quest states header. GUILayout.BeginHorizontal(); if (EditorGUIUtility.isProSkin) { GUIHelper.labelStyle.normal.textColor = Color.white; } GUIHelper.labelStyle.alignment = TextAnchor.MiddleLeft; GUILayout.Label("Quest states:", GUIHelper.labelStyle); GUILayout.EndHorizontal(); GUIHelper.Separator(); // Loop of the quest states. foreach (var questState in quest.questStates) { GUILayout.BeginHorizontal(); var index = ArrayHelper.GetIndex(quest.questStates, questState); GUILayout.Label(string.Format("{0}.", (index + 1).ToString()), GUILayout.Width(25)); // Descriptions. EditorGUILayout.BeginVertical(); EditorGUILayout.LabelField("Short description:"); var questStateShortDescription = DictionariesHelper.ContainsKey(questState.ShortDescription, Controller.Instance.Options.currentLanguage); if (questStateShortDescription == null) { questState.ShortDescription = ArrayHelper.Add(questState.ShortDescription, new LanguageDictionary(Controller.Instance.Options.currentLanguage, "")); } DictionariesHelper.ContainsKey(questState.ShortDescription, Controller.Instance.Options.currentLanguage).value = EditorGUILayout.TextArea(DictionariesHelper .ContainsKey(questState.ShortDescription, Controller.Instance.Options.currentLanguage).value); EditorGUILayout.Space(); EditorGUILayout.LabelField("Long description:"); var questStateLongDescription = DictionariesHelper.ContainsKey(questState.LongDescription, Controller.Instance.Options.currentLanguage); if (questStateLongDescription == null) { questState.LongDescription = ArrayHelper.Add(questState.LongDescription, new LanguageDictionary(Controller.Instance.Options.currentLanguage, "")); } DictionariesHelper.ContainsKey(questState.LongDescription, Controller.Instance.Options.currentLanguage).value = EditorGUILayout.TextArea(DictionariesHelper .ContainsKey(questState.LongDescription, Controller.Instance.Options.currentLanguage).value); EditorGUILayout.Space(); EditorGUILayout.SelectableLabel(string.Format("Quest State Unique ID: {0}", questState.GetId())); EditorGUILayout.BeginHorizontal(); if (GUILayout.Button("Up", GUILayout.Height(GUIHelper.BUTTON_HEIGHT_SMALL))) { if (index > 0) { quest.questStates = ArrayHelper.Swap(quest.questStates, index, index - 1); QuestsController.Save(Controller.Instance.Quests, Controller.Instance.Options.jsonPrettyPrint); } } if (GUILayout.Button("Down", GUILayout.Height(GUIHelper.BUTTON_HEIGHT_SMALL))) { if (index < quest.questStates.Length - 1) { quest.questStates = ArrayHelper.Swap(quest.questStates, index, index + 1); QuestsController.Save(Controller.Instance.Quests, Controller.Instance.Options.jsonPrettyPrint); } } if (GUILayout.Button("Delete", GUILayout.Height(GUIHelper.BUTTON_HEIGHT_SMALL))) { if (EditorUtility.DisplayDialog("Are you sure?", "Do you really want to delete?\nThis data will be lost forever.", "Yes", "No")) { quest.questStates = ArrayHelper.Remove(quest.questStates, questState); QuestsController.Save(Controller.Instance.Quests, Controller.Instance.Options.jsonPrettyPrint); } } EditorGUILayout.EndHorizontal(); EditorGUILayout.EndVertical(); EditorGUILayout.EndHorizontal(); GUIHelper.Separator(); } // Buttons. EditorGUILayout.Space(); GUILayout.BeginHorizontal(); if (GUILayout.Button("Add quest state", GUILayout.Width(position.width / 2), GUILayout.Height(GUIHelper.BUTTON_HEIGHT_SMALL))) { quest.AddState("Short description.", "Long description."); Save(); } GUILayout.EndHorizontal(); EditorGUILayout.Separator(); GUILayout.BeginHorizontal(); if (GUILayout.Button("Save and close", GUILayout.Height(GUIHelper.BUTTON_HEIGHT))) { Save(); Close(); } GUILayout.EndHorizontal(); // Save and close on press Enter. if (focusedWindow != null) { if (focusedWindow.ToString() == "(Diplomata.Editor.Windows.QuestEditor)") { if (Event.current.keyCode == KeyCode.Return) { Save(); Close(); } } } break; } GUILayout.EndVertical(); EditorGUILayout.EndScrollView(); }
void Start() { questContainer = GameObject.Find("QuestsContainer").gameObject.GetComponent <QuestsController>(); //questsScrollView = GameObject.Find("QuestsScrollView").gameObject.GetComponent<ScrollView>(); }
private void Start() { qc = GameObject.FindGameObjectWithTag("GameManager").GetComponent <QuestsController>(); }
void Update() { this.transform.Rotate(Vector3.forward * Time.deltaTime * rotationSpeed); qc = GameObject.FindGameObjectWithTag("GameManager").GetComponent <QuestsController>(); }
public void SelectAnswer(QuestsController.Answer answer) { DialogueSystem.reference.log.Add (new string[]{AITextLabel.text, AISprite.spriteName, answer.text}); DialogueSystem.reference.currentLogIndex += 1; QuestsController.ApplyResults (answer); QuestsController.QuestNode nextNode = QuestsController.FindNode (quest, answer.pointer); if (nextNode == null) { DialogueSystem.reference.FinishQuest(); return; } currentNode = nextNode; PrepareNodeInfo (currentNode); UpdateUI(); }