From: Joe Wreschnig Date: Sat, 6 Apr 2013 12:39:37 +0000 (+0200) Subject: Monsters will only accept gifts if they are slightly interested in you. Monster inter... X-Git-Url: https://git.yukkurigames.com/?a=commitdiff_plain;h=e4a106dfa01b6c98a80e32a2dcd2ec501adbf952;p=rogue-pphs.git Monsters will only accept gifts if they are slightly interested in you. Monster interest degrades slowly over time, and goes away completely if you hit it. Monsters interested in you may not attack you. --- diff --git a/fight.c b/fight.c index 516d8b7..cab7ef7 100644 --- a/fight.c +++ b/fight.c @@ -61,7 +61,7 @@ bool thrown; if (did_hit) { register char *mname; - + tp->t_stats.s_int = 0; did_hit = FALSE; if (on(player, ISBLIND)) mname = "it"; @@ -104,6 +104,32 @@ register struct thing *mp; { register char *mname; + // I'm not going to wait for you forever. + if (rnd(5) == 0) + mp->t_stats.s_int--; + + if (mp->t_stats.s_int > INTERESTED) + { + const char *msgs[] = { + "The %s smiles at you.", + "The %s moves in a little closer.", + "The %s bites its lip.", + "The %s looks at you expectantly.", + }; + msg(rndchoice(msgs), monsters[mp->t_type-'A'].m_name); + return; + } + else if (2 * mp->t_stats.s_int > rnd(INTERESTED)) + { + const char *msgs[] = { + "The %s stares at you.", + "The %s hesitates.", + "The %s takes a step towards you, then back.", + }; + msg(rndchoice(msgs), monsters[mp->t_type-'A'].m_name); + return; + } + /* * Since this is an attack, stop running and any healing that was * going on at the time. diff --git a/rogue.h b/rogue.h index b79c5f9..5edf336 100644 --- a/rogue.h +++ b/rogue.h @@ -338,6 +338,8 @@ struct trap { extern struct trap traps[MAXTRAPS]; #define NUM_FEATURES 6 +#define MAYBE_INTERESTED 1 +#define INTERESTED 20 /* * Structure describing a fighting being diff --git a/romance.c b/romance.c index bafafa7..7f5da0c 100644 --- a/romance.c +++ b/romance.c @@ -112,7 +112,8 @@ int ydelta, xdelta; liking = count_bits_set( hash((op->o_type << 4) ^ op->o_which) & tp->t_stats.s_ont) - 1; - if (liking == 0 || tp->t_stats.s_int <= 3) + if (liking == 0 + || liking > 0 && tp->t_stats.s_int <= MAYBE_INTERESTED) { const char *msgs[] = { "The %s ignores %s",