Fix interaction with summoned floating disc.

This commit is contained in:
rob 2022-08-29 20:24:25 +10:00
parent fb69950ec2
commit 88f66bb4a7
1 changed files with 10 additions and 3 deletions

13
io.c
View File

@ -4589,7 +4589,7 @@ void docommslf(lifeform_t *lf, char ch, lifeform_t *lf2, cell_t *targc) {
flag_t *f; flag_t *f;
object_t *o, *givenob = NULL; object_t *o, *givenob = NULL;
object_t *godstone = NULL; object_t *godstone = NULL;
int i; int i,noresponse = B_FALSE;
int askforob = B_FALSE; int askforob = B_FALSE;
alignmod = getalignmod(lf); alignmod = getalignmod(lf);
@ -5005,11 +5005,18 @@ void docommslf(lifeform_t *lf, char ch, lifeform_t *lf2, cell_t *targc) {
} }
return; return;
case 't': case 't':
if (lfhasflag(lf, F_PHANTASM) || lfhasflag(lf, F_SUMMONEDBY)) { noresponse = B_FALSE;
if (lfhasflag(lf, F_PHANTASM)) {
noresponse = B_TRUE;
} else if (lfhasflag(lf, F_SUMMONEDBY) && lf->race->id != R_FLOATINGDISC) {
noresponse = B_TRUE;
}
if (noresponse) {
if (cansee(player, lf)) msg("%s doesn't respond.", lfname); if (cansee(player, lf)) msg("%s doesn't respond.", lfname);
break; break;
} }
// ask whtehr to give/take // ask whether to give/take
initprompt(&prompt, "How will you trade?"); initprompt(&prompt, "How will you trade?");
snprintf(buf, BUFLEN, "Give items to %s",lfname); snprintf(buf, BUFLEN, "Give items to %s",lfname);
addchoice(&prompt, 'i', buf, NULL, NULL, NULL); addchoice(&prompt, 'i', buf, NULL, NULL, NULL);