combine taming of already tame monsters

Merge the recent change in the effect of blessed scroll of taming on
already tame monsters with the earlier change of any taming on already
tame monsters.  Non-blessed has a chance of boosting monst->mtame by 1
when it is less than 10, more likely the lower the current value is.
For blessed, boost by 2 after that, so possibly by 3 if it is very low.

Make spell of charm monster when skilled or expert in enchantment
spells behave the same as blessed scroll of taming.  [I'm not too sure
about this; it may make the spell too powerful.]
This commit is contained in:
PatR
2024-12-07 19:38:01 -08:00
parent a3f0b54aea
commit 13b8725ac2
4 changed files with 32 additions and 19 deletions

View File

@@ -1092,8 +1092,18 @@ dogfood(struct monst *mon, struct obj *obj)
* on the original mtmp. It now returns TRUE if the taming succeeded.
*/
boolean
tamedog(struct monst *mtmp, struct obj *obj, boolean givemsg)
tamedog(
struct monst *mtmp,
struct obj *obj, /* food or scroll/spell */
boolean givemsg)
{
boolean blessed_scroll = FALSE;
if (obj && (obj->oclass == SCROLL_CLASS || obj->oclass == SPBOOK_CLASS)) {
blessed_scroll = obj->blessed ? TRUE : FALSE;
/* the rest of this routine assumes 'obj' represents food */
obj = (struct obj *) NULL;
}
/* reduce timed sleep or paralysis, leaving mtmp->mcanmove as-is
(note: if mtmp is donning armor, this will reduce its busy time) */
if (mtmp->mfrozen)
@@ -1159,11 +1169,17 @@ tamedog(struct monst *mtmp, struct obj *obj, boolean givemsg)
return FALSE;
}
/* if already tame, taming magic might make it become tamer */
if (mtmp->mtame) {
/* maximum tameness is 20, only reachable via eating */
if (rnd(10) > mtmp->mtame)
/* maximum tameness is 20, only reachable via eating; if already tame but
less than 10, taming magic might make it become tamer; blessed scroll
or skilled spell raises low tameness by 2 or 3, uncursed by 0 or 1 */
if (mtmp->mtame && mtmp->mtame < 10) {
if (mtmp->mtame < rnd(10))
mtmp->mtame++;
if (blessed_scroll) {
mtmp->mtame += 2;
if (mtmp->mtame > 10)
mtmp->mtame = 10;
}
return FALSE; /* didn't just get tamed */
}
/* pacify angry shopkeeper but don't tame him/her/it/them */