I think it might be a bug.
If you crank up the debug output using "trace 6" and enter "ask wilbur about wilbur's skin", it looks like the parser is rejecting the match it makes on "wilbur's skin" even though it initially seems to identify it as a higher-quality match:
Quote:
[DSA on Dr Wilbur's DNA with reason = 0 p1 = 0 p2 = 0]
Trying Dr Wilbur's DNA (49) at word 4
Matched (1)
Match with quality 1
Match added to list
[DSA on Dr Wilbur's skin with reason = 0 p1 = 0 p2 = 0]
Trying Dr Wilbur's skin (50) at word 4
Matched (2)
Match with quality 2
Match filtered out: token filter -29354
[ND made 1 matches]
[ND returned Dr Wilbur's DNA]
There is no reply.
If you look at the generated I6 file, you can see that it is creating separate Consult_Grammar_N functions using separate Noun_Filter_N functions for each of the after rules created. Following are some excerpts from auto.inf when I compiled your sample code:
Code:
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: After (B24_after)
! ----------------------------------------------------------------------------------------------------
! Rule 1/2 ! After asking Wilbur about ~[DNA]~:
! === which is equally specific with ===
! Rule 2/2 ! After asking Wilbur about ~[skin]~:
! ----------------------------------------------------------------------------------------------------
! No specific request
! After asking Wilbur about ~[DNA]~:
[ R_740 ;
if ((action ==##Ask) && (actor==player) && ((noun == I95_dr_wilbur) && (true)) && (Consult_Grammar_100(consult_from, consult_words)~=GPR_FAIL)) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_740, 740);
! phrase 1
! [1: say ~'Your genetic code has somehow been altered.'~]
say__p=1;ParaContent(); print (PrintText) SC_12; new_line; .L_Say3; .L_SayX3;
RulebookSucceeds(); rtrue;
} ! Runs only when pattern matches
else if (debug_rules > 1) DB_Rule(R_740, 740, true);
rfalse;
];
! No specific request
! After asking Wilbur about ~[skin]~:
[ R_741 ;
if ((action ==##Ask) && (actor==player) && ((noun == I95_dr_wilbur) && (true)) && (Consult_Grammar_101(consult_from, consult_words)~=GPR_FAIL)) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_741, 741);
! phrase 1
! [1: say ~'Yes, that was where I scraped off some DNA for my sample.'~]
say__p=1;ParaContent(); print (PrintText) SC_13; new_line; .L_Say4; .L_SayX4;
RulebookSucceeds(); rtrue;
} ! Runs only when pattern matches
else if (debug_rules > 1) DB_Rule(R_741, 741, true);
rfalse;
];
! ----------------------------------------------------------------------------------------------------
[ Consult_Grammar_100
range_from ! call parameter: word number of snippet start
range_words ! call parameter: snippet length
original_wn ! first word of text parsed
group_wn ! first word matched against A/B/C/... disjunction
w ! for use by individual grammar lines
rv ! for use by individual grammar lines
;
wn = range_from; original_wn = wn; rv = GPR_PREPOSITION;
w = ParseTokenStopped(ROUTINE_FILTER_TT, Noun_Filter_4);
if (w == GPR_FAIL) jump Fail_1; rv = w;
if ((range_words==0) || (wn-range_from==range_words)) return rv;
.Fail_1; rv = GPR_PREPOSITION; wn = original_wn;
return GPR_FAIL;
];
[ Consult_Grammar_101
range_from ! call parameter: word number of snippet start
range_words ! call parameter: snippet length
original_wn ! first word of text parsed
group_wn ! first word matched against A/B/C/... disjunction
w ! for use by individual grammar lines
rv ! for use by individual grammar lines
;
wn = range_from; original_wn = wn; rv = GPR_PREPOSITION;
w = ParseTokenStopped(ROUTINE_FILTER_TT, Noun_Filter_5);
if (w == GPR_FAIL) jump Fail_1; rv = w;
if ((range_words==0) || (wn-range_from==range_words)) return rv;
.Fail_1; rv = GPR_PREPOSITION; wn = original_wn;
return GPR_FAIL;
];
[ Noun_Filter_4 x;
x=noun;
return ((noun ofclass K16_dna));
];
[ Noun_Filter_5 x;
x=noun;
return ((noun ofclass K17_skin));
];
So it looks like it *wants* to do what you're asking it to, but when it's evaluating rules, it seems to skip over whichever after rule is defined second. I'm not really sure why.
One thing you might not have intended: You'll get the same response whether you ask about "felix's dna" or "wilbur's dna".