From e408c48bb3610b22c5bc29932f19d55bffd10f34 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 9 Mar 2018 14:11:04 -0800 Subject: [PATCH] mplayer valkyries w/ Mjollnir If an mplayer Valkyrie on the Astral Plane is given a war hammer, give her gauntlets of power instead of random gloves since that will either be Mjollnir or a very wimpy endgame weapon. (Maybe someday mplayer Valkyrie's will be able to throw Mjollnir; their chance of having it on the Astral Plane is moderately high if it hasn't already been created prior to arriving there.) I also gave monsters wearing gauntlets of power a 3..6 damage bonus for hand-to-hand. While making that change, I noticed that monsters wielding a scalpel or tsurugi wouldn't split puddings, unlike the hero (a post-3.6.0 change), so fix that. --- src/mhitm.c | 12 ++++++++++-- src/mhitu.c | 9 ++++++++- src/mplayer.c | 6 ++++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/mhitm.c b/src/mhitm.c index 3427645fe..ee7dc0448 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -412,8 +412,9 @@ register struct monst *magr, *mdef; if (strike) { res[i] = hitmm(magr, mdef, mattk); if ((mdef->data == &mons[PM_BLACK_PUDDING] - || mdef->data == &mons[PM_BROWN_PUDDING]) && otmp - && objects[otmp->otyp].oc_material == IRON + || mdef->data == &mons[PM_BROWN_PUDDING]) + && (otmp && (objects[otmp->otyp].oc_material == IRON + || objects[otmp->otyp].oc_material == METAL)) && mdef->mhp > 1 && !mdef->mcan) { if (clone_mon(mdef, 0, 0)) { @@ -908,10 +909,17 @@ register struct attack *mattk; tmp = 0; } else if (mattk->aatyp == AT_WEAP) { if (otmp) { + struct obj *marmg; + if (otmp->otyp == CORPSE && touch_petrifies(&mons[otmp->corpsenm])) goto do_stone; tmp += dmgval(otmp, mdef); + if ((marmg = which_armor(magr, W_ARMG)) != 0 + && marmg->otyp == GAUNTLETS_OF_POWER) + tmp += rn1(4, 3); /* 3..6 */ + if (tmp < 1) /* is this necessary? mhitu.c has it... */ + tmp = 1; if (otmp->oartifact) { (void) artifact_hit(magr, mdef, otmp, &tmp, dieroll); if (mdef->mhp <= 0) diff --git a/src/mhitu.c b/src/mhitu.c index fb483b811..8bd4c33e1 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -972,6 +972,7 @@ register struct attack *mattk; struct obj *otmp = mon_currwep; if (mattk->aatyp == AT_WEAP && otmp) { + struct obj *marmg; int tmp; if (otmp->otyp == CORPSE @@ -983,6 +984,9 @@ register struct attack *mattk; goto do_stone; } dmg += dmgval(otmp, &youmonst); + if ((marmg = which_armor(mtmp, W_ARMG)) != 0 + && marmg->otyp == GAUNTLETS_OF_POWER) + dmg += rn1(4, 3); /* 3..6 */ if (dmg <= 0) dmg = 1; if (!(otmp->oartifact @@ -1003,7 +1007,10 @@ register struct attack *mattk; tmp -= rnd(-u.uac); if (tmp < 1) tmp = 1; - if (u.mh - tmp > 1 && objects[otmp->otyp].oc_material == IRON + if (u.mh - tmp > 1 + && (objects[otmp->otyp].oc_material == IRON + /* relevant 'metal' objects are scalpel and tsurugi */ + || objects[otmp->otyp].oc_material == METAL) && (u.umonnum == PM_BLACK_PUDDING || u.umonnum == PM_BROWN_PUDDING)) { if (tmp > 1) diff --git a/src/mplayer.c b/src/mplayer.c index ec895546c..dfb97ab85 100644 --- a/src/mplayer.c +++ b/src/mplayer.c @@ -285,7 +285,9 @@ register boolean special; mk_mplayer_armor(mtmp, cloak); mk_mplayer_armor(mtmp, helm); mk_mplayer_armor(mtmp, shield); - if (rn2(8)) + if (weapon == WAR_HAMMER) /* valkyrie: wimpy weapon or Mjollnir */ + mk_mplayer_armor(mtmp, GAUNTLETS_OF_POWER); + else if (rn2(8)) mk_mplayer_armor(mtmp, rnd_class(LEATHER_GLOVES, GAUNTLETS_OF_DEXTERITY)); if (rn2(8)) @@ -337,7 +339,7 @@ boolean special; int tryct = 0; /* roll for character class */ - pm = PM_ARCHEOLOGIST + rn2(PM_WIZARD - PM_ARCHEOLOGIST + 1); + pm = rn1(PM_WIZARD - PM_ARCHEOLOGIST + 1, PM_ARCHEOLOGIST); set_mon_data(&fakemon, &mons[pm], -1); /* roll for an available location */