--- src/object1.c.orig Tue Mar 4 18:33:20 2003 +++ src/object1.c Tue Mar 4 18:36:06 2003 @@ -1618,9 +1618,10 @@ case TV_HYPNOS: { + /* We print hit points further down. --dsb */ monster_race* r_ptr = &r_info[o_ptr->pval]; modstr = basenm; - basenm = format("& %s~ (%d hp)", r_name + r_ptr->name,o_ptr->pval2); + basenm = format("& %s~", r_name + r_ptr->name); break; } @@ -2029,6 +2030,14 @@ if ((known) && (f5 & TR5_SPELL_CONTAIN) && (o_ptr->pval2 != -1)) { t = object_desc_str(t, format(" [%s]", school_spells[o_ptr->pval2].name)); + } + + /* Add symbiote hp here, after the "fake-artifact" name. --dsb */ + if (o_ptr->tval == TV_HYPNOS) + { + t = object_desc_str(t, " ("); + t = object_desc_num(t, o_ptr->pval2); + t = object_desc_str(t, " hp)"); } /* No more details wanted */ --- src/cmd5.c.orig Sat Dec 28 07:37:23 2002 +++ src/cmd5.c Tue Mar 4 18:36:06 2003 @@ -1525,6 +1525,49 @@ } /* + * Return the symbiote's name or description. + */ +cptr symbiote_name(bool capitalize) +{ + object_type *o_ptr = &inventory[INVEN_CARRY]; + static char buf[80]; + + /* Make sure there actually is a symbiote there... */ + if (!o_ptr->k_idx) + { + strcpy(buf, "A non-existent symbiote"); + } + else + { + monster_race *r_ptr = &r_info[o_ptr->pval]; + cptr s = NULL; + + if (r_ptr->flags1 & RF1_UNIQUE) + { + /* Unique monster; no preceding "your", and ignore our name. */ + strncpy(buf, r_name + r_ptr->name, sizeof(buf)); + } + else if (o_ptr->note && + (s = strstr(quark_str(o_ptr->note), "#named ")) != NULL) + { + /* We've named it. */ + strncpy(buf, s + 7, sizeof(buf)); + } + else + { + /* No special cases, just return "Your ". */ + strcpy(buf, "your "); + strncpy(buf + 5, r_name + r_ptr->name, sizeof(buf) - 5); + } + } + + /* Just in case... */ + buf[sizeof(buf) - 1] = '\0'; + if (capitalize) buf[0] = toupper(buf[0]); + return buf; +} + +/* * Use a power of the monster in symbiosis */ int use_symbiotic_power(int r_idx, bool great, bool only_number, bool no_cost) @@ -1605,9 +1648,10 @@ label = (num <= 26) ? I2A(num - 1) : I2D(num - 1 - 26); /* Build a prompt (accept all spells) */ + /* Mega Hack -- if no_cost is false, we're actually a Possessor -dsb */ strnfmt(out_val, 78, - "(Powers a-%c, *=List, ESC=exit) Use which power of your monster? ", - label); + "(Powers a-%c, *=List, ESC=exit) Use which power of your %s? ", + label, (no_cost ? "symbiote" : "body")); /* Get a spell from the user */ while (!flag && get_com(out_val, &choice)) @@ -2777,6 +2821,7 @@ object_type *o_ptr; monster_race *r_ptr; int to_s = level + p_ptr->to_s; + cptr sym_name = symbiote_name(TRUE); s32b dam; /* Get the carried monster */ @@ -2809,7 +2854,7 @@ o_ptr->pval2 += damroll(dam, 6); if (o_ptr->pval2 > max) o_ptr->pval2 = max; - msg_print("Your monster is healed"); + msg_format("%s is healed.", sym_name); /* Display the monster hitpoints */ p_ptr->redraw |= (PR_MH); @@ -2898,7 +2943,7 @@ p_ptr->chp -= hp; /* Message */ - msg_print("Your monster is healed"); + msg_format("%s is healed.", sym_name); /* Redraw */ p_ptr->redraw |= (PR_HP); @@ -2990,7 +3035,7 @@ p_ptr->csp -= hp; /* Message */ - msg_print("Your monster is healed"); + msg_format("%s is healed.", sym_name); /* Redraw */ p_ptr->redraw |= (PR_MANA); @@ -3043,7 +3088,7 @@ o_ptr->pval2 += damroll(dam, 60); if (o_ptr->pval2 > max) o_ptr->pval2 = max; - msg_print("Your monster is healed"); + msg_format("%s is healed.", sym_name); /* Display the monster hitpoints */ p_ptr->redraw |= (PR_MH); --- src/cmd1.c.orig Tue Mar 4 18:33:20 2003 +++ src/cmd1.c Tue Mar 4 18:36:06 2003 @@ -838,6 +838,8 @@ char t_name[80]; + cptr sym_name = symbiote_name(TRUE); + char temp[80]; bool blinked = FALSE, touched = FALSE; @@ -1181,7 +1183,7 @@ { strfmt(temp, act, t_name); if (t_ptr->ml) - msg_format("Your monster %s", temp); + msg_format("%s %s", sym_name, temp); } @@ -1402,7 +1404,7 @@ disturb(1, 0); /* Message */ - msg_format("Your monster misses %s.", t_name); + msg_format("%s misses %s.", sym_name, t_name); break; } } @@ -1427,7 +1429,7 @@ /* Blink away */ if (blinked) { - msg_print("You and your monster flee laughing!"); + msg_format("You and %s flee laughing!", symbiote_name(FALSE)); teleport_player(MAX_SIGHT * 2 + 5); } --- src/cmd7.c.orig Fri Feb 21 02:27:26 2003 +++ src/cmd7.c Tue Mar 4 18:36:06 2003 @@ -7995,7 +7995,7 @@ o_ptr->pval2 += hp; if (o_ptr->pval2 > max) o_ptr->pval2 = max; - msg_print("Your symbiote is healed"); + msg_format("%s is healed.", symbiote_name(TRUE)); /* Display the monster hitpoints */ p_ptr->redraw |= (PR_MH); --- src/dungeon.c.orig Tue Mar 4 18:23:47 2003 +++ src/dungeon.c Tue Mar 4 18:36:06 2003 @@ -1504,7 +1504,8 @@ if ((randint(1000) < r_ptr->level - ((p_ptr->lev * 2) + get_skill(SKILL_SYMBIOTIC)))) { - msg_print("Your monster thinks you are not enough in symbiosis."); + msg_format("%s thinks you are not enough in symbiosis.", + symbiote_name(TRUE)); carried_make_attack_normal(o_ptr->pval); } } @@ -3249,7 +3250,8 @@ if ((r_ptr->flags9 & RF9_IMPRESED) && can_create_companion()) { - msg_print("And you have given the imprint to your monster!"); + msg_format("And you have given the imprint to your %s!", + r_name + r_ptr->name); m_ptr->status = MSTATUS_COMPANION; } --- src/externs.h.orig Tue Mar 4 18:23:47 2003 +++ src/externs.h Tue Mar 4 18:36:06 2003 @@ -817,6 +817,7 @@ extern void fetch(int dir, int wgt, bool require_los); extern void do_poly_self(void); extern void brand_weapon(int brand_type); +extern cptr symbiote_name(bool capitalize); extern int use_symbiotic_power(int r_idx, bool great, bool only_number, bool no_cost); extern void cast_spell(int realm, int spell, byte level); extern u32b get_school_spell(cptr do_what); --- src/melee1.c.orig Sat Oct 5 20:01:25 2002 +++ src/melee1.c Tue Mar 4 18:36:06 2003 @@ -127,7 +127,8 @@ int k, tmp, ac, rlev; int do_cut, do_stun; - char ddesc[80] = "the carried monster"; + char ddesc[80] = "your symbiote"; + cptr sym_name = symbiote_name(TRUE); bool blinked; bool touched = FALSE, alive = TRUE; @@ -239,7 +240,7 @@ r_ptr->r_flags3 |= (RF3_EVIL); /* Message */ - msg_format("Your monster is repelled."); + msg_format("%s is repelled.", sym_name); /* Hack -- Next attack */ continue; @@ -255,7 +256,7 @@ r_ptr->r_flags3 |= (RF3_GOOD); /* Message */ - msg_format("Your monster is repelled."); + msg_format("%s is repelled.", sym_name); /* Hack -- Next attack */ continue; @@ -456,7 +457,7 @@ } /* Message */ - if (act) msg_format("Your monster %s", act); + if (act) msg_format("%s %s", sym_name, act); /* Hack -- assume all attacks are obvious */ @@ -1199,7 +1200,7 @@ disturb(1, 0); /* Message */ - msg_format("Your monster misses you."); + msg_format("%s misses you.", sym_name); break; } --- src/monster3.c.orig Sat Dec 21 00:41:26 2002 +++ src/monster3.c Tue Mar 4 18:36:06 2003 @@ -480,7 +480,7 @@ /* Build a prompt (accept all spells) */ strnfmt(out_val, 78, - "(Powers a-%c, *=List, ESC=exit) Use which power of your monster? ", + "(Powers a-%c, *=List, ESC=exit) Use which power of your golem? ", label); /* Get a spell from the user */ --- src/spells1.c.orig Sat Dec 21 00:41:26 2002 +++ src/spells1.c Tue Mar 4 18:36:06 2003 @@ -1242,9 +1242,12 @@ /* Hurt the wielded monster if any */ if ((o_ptr->k_idx) && (magik(5 + get_skill(SKILL_SYMBIOTIC))) && (!carried_monster_hit)) { + cptr sym_name = symbiote_name(TRUE); if(o_ptr->pval2-damage <= 0) { - cmsg_print(TERM_L_RED, "Your monster dies from protecting you, you feel very sad..."); + cmsg_format(TERM_L_RED, + "%s dies from protecting you, you feel very sad...", + sym_name); inven_item_increase(INVEN_CARRY, -1); inven_item_optimize(INVEN_CARRY); damage -= o_ptr->pval2; @@ -1253,7 +1256,7 @@ } else { - msg_print("Your monster takes the damage instead of you."); + msg_format("%s takes the damage instead of you.", sym_name); o_ptr->pval2 -= damage; monster_take = TRUE; } --- src/tables.c.orig Wed Dec 25 06:01:39 2002 +++ src/tables.c Tue Mar 4 18:36:06 2003 @@ -1529,7 +1529,7 @@ }, { "Major Symbiotic Healing", - "Heals your currently equipped monster" + "Heals your symbiote" }, { "Healing", @@ -1537,7 +1537,7 @@ }, { "Major Symbiotic Powers", - "Allows you to use an ability of your monster" + "Allows you to use an ability of your symbiote" }, { "Use Enemy's Powers",