Monsters will only accept gifts if they are slightly interested in you. Monster inter...
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Sat, 6 Apr 2013 12:39:37 +0000 (14:39 +0200)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Sat, 6 Apr 2013 12:39:37 +0000 (14:39 +0200)
fight.c
rogue.h
romance.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
diff --git a/rogue.h b/rogue.h
index b79c5f9..5edf336 100644 (file)
--- a/rogue.h
+++ b/rogue.h
@@ -338,6 +338,8 @@ struct trap {
 extern struct trap  traps[MAXTRAPS];\r
 \r
 #define NUM_FEATURES 6\r
+#define MAYBE_INTERESTED 1\r
+#define INTERESTED 20\r
 \r
 /*\r
  * Structure describing a fighting being\r
index bafafa7..7f5da0c 100644 (file)
--- 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",