MinotaurCommonReadyToDuel.dl.ts 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // File created automatically by custom Dialogger on 4/4/2019, 2:05:28 AM
  2. // Do not tamper with this file.
  3. // It will be replaced automatically by Dialogger and all changes will be lost.
  4. // Instead change MinotaurCommonReadyToDuel.dl.
  5. module DialogueTrees {
  6. export let MinotaurCommonReadyToDuel = (function () {
  7. let tree : DialogueTree = new DialogueTree("MinotaurCommonReadyToDuel");
  8. let node : DialogueNode;
  9. let text : DialogueText;
  10. let set : DialogueSet;
  11. AI.talktoRules.createAndAddRule({
  12. name : "AIHook for MinotaurCommonReadyToDuel",
  13. conditions : (runner : RulebookRunner<TalkingHeads>) => {
  14. // @ts-ignore
  15. let player = WorldState.player, greeter = runner.noun.greeter, answerer = runner.noun.answerer;
  16. return (MinotaurGuard.AgreedToDuel.value == true);
  17. },
  18. priority : Rule.PRIORITY_MEDIUM,
  19. firstPriority : Rule.PRIORITY_MEDIUM,
  20. code : (runner : RulebookRunner<TalkingHeads>) => {
  21. runner.noun.options.push({
  22. tree: tree,
  23. text : new Say("I'm ready for the duel.")
  24. })
  25. },
  26. });
  27. node = new DialogueNode("caa3b54a-0cf0-48d4-9243-d3039ce93f58");
  28. node.setNext("2830b61e-3473-453f-90f0-04180bb19d2b");
  29. tree.addStartNode(node);
  30. text = new DialogueText("2830b61e-3473-453f-90f0-04180bb19d2b");
  31. text.setSay(() => { return new Say(Say.Speak("Minotaur", "Perfect. We'll do it right here, right now."), Say.PARAGRAPH_BREAK, "The minotaur cracks his neck both sides and picks up his axe with both hands. He is ready. There is no going back now.");});
  32. text.setNext("3585eabf-f4d3-422e-bd38-9f597bbc8437");
  33. tree.addNode(text);
  34. set = new DialogueSet("3585eabf-f4d3-422e-bd38-9f597bbc8437");
  35. set.setFunction(() => {
  36. // TODO: Start combat with Minotaur
  37. });
  38. tree.addNode(set);
  39. return tree;
  40. })();
  41. }