Higher charisma will make it more likely for monsters to be affected.
Conflict will also now require the monster to see the hero.
Originally from SporkHack by Derek Ray.
change touch of death from instadeath to maxhp reduction and damage
dying from being level-drained below level 1 killed hero without saying so
and jumped straight to "do you want your possessions identified?"
+conflict will now consider your charisma and requires line of sight
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
extern boolean olfaction(struct permonst *);
unsigned long cvt_adtyp_to_mseenres(uchar);
extern void monstseesu(unsigned long);
+extern boolean resist_conflict(struct monst *);
/* ### monmove.c ### */
udist = distu(omx, omy);
/* Let steeds eat and maybe throw rider during Conflict */
if (mtmp == u.usteed) {
- if (Conflict && !resist(mtmp, RING_CLASS, 0, 0)) {
+ if (Conflict && !resist_conflict(mtmp)) {
dismount_steed(DISMOUNT_THROWN);
return 1;
}
if (appr == -2)
return 0;
- if (Conflict && !resist(mtmp, RING_CLASS, 0, 0)) {
+ if (Conflict && !resist_conflict(mtmp)) {
if (!has_edog) {
/* Guardian angel refuses to be conflicted; rather,
* it disappears, angrily, and sends in some nasties
nmon = 0;
#endif
/* perhaps the monster will resist Conflict */
- if (resist(mtmp, RING_CLASS, 0, 0))
+ if (resist_conflict(mtmp))
return 0;
if (u.ustuck == mtmp) {
}
/* continue if the monster died fighting */
- if (Conflict && !mtmp->iswiz && mtmp->mcansee) {
+ if (Conflict && !mtmp->iswiz && m_canseeu(mtmp)) {
/* Note:
* Conflict does not take effect in the first round.
* Therefore, A monster when stepping into the area will
* The call to fightm() must be _last_. The monster might
* have died if it returns 1.
*/
- if (couldsee(mtmp->mx, mtmp->my)
+ if (cansee(mtmp->mx, mtmp->my)
&& (distu(mtmp->mx, mtmp->my) <= BOLT_LIM * BOLT_LIM)
&& fightm(mtmp))
continue; /* mon might have died */
allowflags |= ALLOW_SANCT | ALLOW_SSM;
else
allowflags |= ALLOW_U;
- if (Conflict && !resist(mtmp, RING_CLASS, 0, 0))
+ if (Conflict && !resist_conflict(mtmp))
allowflags |= ALLOW_U;
if (mtmp->isshk)
allowflags |= ALLOW_SSM;
m_setseenres(mtmp, seenres);
}
+/* Can monster resist conflict caused by hero?
+
+ High-CHA heroes will be able to 'convince' monsters
+ (through the magic of the ring, of course) to fight
+ for them much more easily than low-CHA ones.
+*/
+boolean
+resist_conflict(struct monst* mtmp)
+{
+ /* always a small chance at 19 */
+ int resist_chance = min(19, (ACURR(A_CHA) - mtmp->m_lev + u.ulevel));
+
+ return (rnd(20) > resist_chance);
+}
+
/*mondata.c*/
}
pline("A wave of psychic energy pours over you!");
if (mtmp->mpeaceful
- && (!Conflict || resist(mtmp, RING_CLASS, 0, 0))) {
+ && (!Conflict || resist_conflict(mtmp))) {
pline("It feels quite soothing.");
} else if (!u.uinvulnerable) {
int dmg;
*/
if (tmp != 3 && (!mtmp->mpeaceful
- || (Conflict && !resist(mtmp, RING_CLASS, 0, 0)))) {
+ || (Conflict && !resist_conflict(mtmp)))) {
if (inrange && !scared && !noattacks(mdat)
/* [is this hp check really needed?] */
&& (Upolyd ? u.mh : u.uhp) > 0) {
gy += rn1(3, -1);
if (!priest->mpeaceful
- || (Conflict && !resist(priest, RING_CLASS, 0, 0))) {
+ || (Conflict && !resist_conflict(priest))) {
if (monnear(priest, u.ux, u.uy)) {
if (Displaced)
Your("displaced image doesn't fool %s!", mon_nam(priest));
if ((udist = distu(omx, omy)) < 3 && (shkp->data != &mons[PM_GRID_BUG]
|| (omx == u.ux || omy == u.uy))) {
- if (ANGRY(shkp) || (Conflict && !resist(shkp, RING_CLASS, 0, 0))) {
+ if (ANGRY(shkp) || (Conflict && !resist_conflict(shkp))) {
if (Displaced)
Your("displaced image doesn't fool %s!", shkname(shkp));
(void) mattacku(shkp);