Monsters will only accept gifts if they are slightly interested in you. Monster inter...
[rogue-pphs.git] / fight.c
diff --git a/fight.c b/fight.c
index 516d8b7..cab7ef7 100644 (file)
--- a/fight.c
+++ b/fight.c
@@ -61,7 +61,7 @@ bool thrown;
     if (did_hit)\r
     {\r
        register char *mname;\r
-\r
+        tp->t_stats.s_int = 0;\r
        did_hit = FALSE;\r
        if (on(player, ISBLIND))\r
            mname = "it";\r
@@ -104,6 +104,32 @@ register struct thing *mp;
 {\r
     register char *mname;\r
 \r
+    // I'm not going to wait for you forever.\r
+    if (rnd(5) == 0)\r
+        mp->t_stats.s_int--;\r
+\r
+    if (mp->t_stats.s_int > INTERESTED)\r
+    {\r
+        const char *msgs[] = {\r
+            "The %s smiles at you.",\r
+            "The %s moves in a little closer.",\r
+            "The %s bites its lip.",\r
+            "The %s looks at you expectantly.",\r
+        };\r
+        msg(rndchoice(msgs), monsters[mp->t_type-'A'].m_name);\r
+        return;\r
+    }\r
+    else if (2 * mp->t_stats.s_int > rnd(INTERESTED))\r
+    {\r
+        const char *msgs[] = {\r
+            "The %s stares at you.",\r
+            "The %s hesitates.",\r
+            "The %s takes a step towards you, then back.",\r
+        };\r
+        msg(rndchoice(msgs), monsters[mp->t_type-'A'].m_name);\r
+        return;\r
+    }\r
+\r
     /*\r
      * Since this is an attack, stop running and any healing that was\r
      * going on at the time.\r