Ejemplo n.º 1
0
 /// <summary>
 /// Utfører operasjoner utifra hvilken knapp som er trykket
 /// </summary>
 /// <param name="answer"></param>
 public override void AnswerClicked(PlayerTextAnswer answer)
 {
     switch (answer.answerDesc)
     {
         case "combatLevelUp":
             dialogController.RemovePlayerAnswers();
             if (_player1.totalGold < 40 * _player1.combatLevel)
             {
                 dialogController.ChangeNpcDialog("Aren't you a funny one! I'm never ever selling these for the price you are offering."
                     + " (you have insufficient gold)");
                 dialogController.AddPlayerAnswer("I better go mine some gold, then.", "endConvo");
             }
             else if (_player1.totalXP < 80 * _player1.combatLevel)
             {
                 dialogController.ChangeNpcDialog("I am not comfortable selling my stuff to such an inexperienced guy as yourself. " +
                     " (you have insufficient experience)");
                 dialogController.AddPlayerAnswer("Maybe my reputation will grow if I go out in the forest and punch some wolves.",
                     "endConvo");
             }
             else
             {
                 _player1.totalXP -= 80 * _player1.combatLevel;
                 _player1.totalGold -= 40 * _player1.combatLevel;
                 _player1.levelUp();
                 dialogController.ChangeNpcDialog("Mighty fine, sir, mighty fine! I thank you with all of my heart!");
                 dialogController.AddPlayerAnswer("You weren't lying, those raw materials was all i needed to craft some new" +
                     " equipment. Thank you!", "endConvo");
             }
             break;
         case "endConvo":
             inConversation = false;
             InitialText();
             break;
     }
 }
Ejemplo n.º 2
0
 //Utfører operasjoner utifra hvilken knapp som er trykket
 public override void AnswerClicked(PlayerTextAnswer answer)
 {
     switch (answer.answerDesc)
     {
         case "insult":
             dialogController.RemovePlayerAnswers();
             dialogController.ChangeNpcDialog("Why you little imbecile! You little bastard, you! YOU FROG EATING PIECE OF DROPPINGS, YOU! I'LL KILL YOUR SKINNY ASS!");
             dialogController.AddPlayerAnswer("Maybe I should go home..", "endConvo");
             break;
         case "endConvo":
             inConversation = false;
             InitialText();
             break;
     }
 }
Ejemplo n.º 3
0
 //dersom et svar klikkes
 public abstract void AnswerClicked(PlayerTextAnswer answer);