Przeglądaj źródła

Clearer Priority

Reddo 5 lat temu
rodzic
commit
e2ae7ecbbd

+ 1 - 0
app/World/Classes/Action/ActionAttack.ts

@@ -247,6 +247,7 @@ Elements.HyperlinkHandler.HyperlinkingRulebook.addRule(new Rule(
     {
         name : "Hyperlink - Attack",
         firstPriority : Rule.PRIORITY_HIGHEST,
+        priority : Rule.PRIORITY_MEDIUM,
         code : (rulebook : RulebookRunner<Thing>) => {
             let thing = <Thing> rulebook.noun;
 

+ 3 - 2
app/World/Classes/Action/ActionTalk.ts

@@ -22,8 +22,8 @@ class ActionTalk extends Action {
             let thing = (<Thing>action.getNoun(0));
 
             if (thing instanceof Person) {
-                action.say = new Say("It doesn't look like ", new SayHeSheIt(thing), " wants to talk.");
-            } else {
+                action.say = new Say(...Say.Mention(action.actor), " greet", action.actor == WorldState.player ? " " : "s ", ...Say.Mention(thing), ". There is no response.");
+            } else if (action.actor == WorldState.player) {
                 action.say = new Say("How are you going to talk to that?")
             }
         }
@@ -38,6 +38,7 @@ Elements.HyperlinkHandler.HyperlinkingRulebook.addRule(new Rule(
     {
         name : "Hyperlink - Talk",
         firstPriority : Rule.PRIORITY_HIGHEST,
+        priority : Rule.PRIORITY_HIGHEST,
         code : (rulebook : RulebookRunner<Thing>) => {
             let thing = <Thing> rulebook.noun;