"You catch the %s staring at you out of the corner of eir eye.",
"The %s blushes and waves cautiously.",
};
- msg(rndchoice(msgs), monsters[tp->t_type - 'A'].m_name);
+ msg(rndchoice(msgs), killname(tp->t_type));
}
else if (attr <= 0)
{
"The %s tells you to stop it.",
"The %s is sick of your crap.",
};
- msg(rndchoice(msgs), monsters[tp->t_type - 'A'].m_name);
+ msg(rndchoice(msgs), killname(tp->t_type));
}
else
{
"The %s acts like it can't hear you.",
"The %s doesn't care.",
};
- msg(rndchoice(msgs), monsters[tp->t_type - 'A'].m_name);
+ msg(rndchoice(msgs), killname(tp->t_type));
}
}
}
"The %s ignores %s",
"The %s isn't interested in %s",
};
- msg(rndchoice(msgs), monsters[tp->t_type - 'A'].m_name,
- inv_name(op, TRUE));
+ msg(rndchoice(msgs), killname(tp->t_type), inv_name(op, TRUE));
return;
}
else if (liking > 0)
"The %s accepts %s.",
"The %s takes %s.",
};
- msg(rndchoice(msgs), monsters[tp->t_type - 'A'].m_name,
- inv_name(op, TRUE));
+ msg(rndchoice(msgs), killname(tp->t_type), inv_name(op, TRUE));
tp->t_stats.s_int += liking * 10;
}
else if (liking < 0)
"The %s breaks %s.",
"The %s hates %s.",
};
- msg(rndchoice(msgs), monsters[tp->t_type - 'A'].m_name,
- inv_name(op, TRUE));
+ msg(rndchoice(msgs), killname(tp->t_type), inv_name(op, TRUE));
tp->t_stats.s_int -= liking * 2;
}
embrace()
{
- // Figure out if the player is near something w/ enough interest.
- // Otherwise, hug something random, and make things worse.
+ register struct thing *tp = NULL;
+ register int liking;
+ register int dx, dy;
+
+ for (dx = -1; dx <= 1; ++dx)
+ {
+ for (dy = -1; dy <= 1; ++dy)
+ {
+ register struct linked_list *mob;
+ if ((mob = find_mons(hero.y + dy, hero.x + dx)))
+ {
+ register struct thing *atp = (struct thing *)ldata(mob);
+ if (!tp || atp->t_stats.s_int > tp->t_stats.s_int)
+ tp = atp;
+ }
+ }
+ }
+
+
+ if (tp == NULL)
+ {
+ msg("You wrap your arms around yourself.");
+ return;
+ }
+ else if (tp->t_stats.s_int < INTERESTED)
+ {
+ if (tp->t_stats.s_int > 0)
+ tp->t_stats.s_int /= 2;
+ else
+ tp->t_stats.s_int--;
+ msg("The %s dodges out of the way.", killname(tp->t_type));
+ return;
+ }
+
if (amulet)
{
- total_winner('K');
+ total_winner(tp->t_type);
}
else
{
- mostly_winner('K');
+ mostly_winner(tp->t_type);
}
}