fix: default behavior and end phase
ref: N25B-448
This commit is contained in:
@@ -1,13 +1,34 @@
|
||||
norm("Be friendly").
|
||||
phase("end").
|
||||
keyword_said(Keyword) :- (user_said(Message) & .substring(Keyword, Message, Pos)) & (Pos >= 0).
|
||||
|
||||
|
||||
+!reply_with_goal(Goal)
|
||||
: user_said(Message)
|
||||
<- +responded_this_turn;
|
||||
.findall(Norm, norm(Norm), Norms);
|
||||
.reply_with_goal(Message, Norms, Goal).
|
||||
|
||||
+!say(Text)
|
||||
<- +responded_this_turn;
|
||||
.say(Text).
|
||||
|
||||
+!reply
|
||||
: user_said(Message)
|
||||
<- .findall(Norm, norm(Norm), Norms);
|
||||
<- +responded_this_turn;
|
||||
.findall(Norm, norm(Norm), Norms);
|
||||
.reply(Message, Norms).
|
||||
|
||||
+!notify_cycle
|
||||
<- .notify_ui;
|
||||
.wait(1).
|
||||
|
||||
+user_said(Message)
|
||||
: phase("end")
|
||||
<- .notify_user_said(Message);
|
||||
!reply.
|
||||
|
||||
+!transition_phase <- true.
|
||||
+!check_triggers <- true.
|
||||
+!check_triggers
|
||||
<- true.
|
||||
|
||||
+!transition_phase
|
||||
<- true.
|
||||
|
||||
Reference in New Issue
Block a user