charisma gives chance of monsters being peaceful
This commit is contained in:
parent
4f3375c58b
commit
d331bfad55
2
lf.c
2
lf.c
|
@ -23295,7 +23295,7 @@ int skillcheckvs(lifeform_t *lf1, enum CHECKTYPE ct1, int mod1, lifeform_t *lf2,
|
|||
mod2 += 5;
|
||||
}
|
||||
|
||||
// ignore the difficult, we just want the modified roll.
|
||||
// ignore the difficulty, we just want the modified roll.
|
||||
real_skillcheck(lf1, ct1, 0, mod1, &roll1);
|
||||
real_skillcheck(lf2, ct2, 0, mod2, &roll2);
|
||||
|
||||
|
|
19
map.c
19
map.c
|
@ -435,6 +435,7 @@ lifeform_t *addmonster(cell_t *c, enum RACE rid, char *racename, int randomjobok
|
|||
} else if ((player->race->id == R_MAMMOAN) && (lf->race->id == R_ELEPHANT)) {
|
||||
killflagsofid(lf->flags, F_HOSTILE);
|
||||
} else {
|
||||
int mayoverride = B_TRUE;
|
||||
// adjust hostility based on player's alignment
|
||||
switch (getalignment(player)) {
|
||||
case AL_GOOD:
|
||||
|
@ -442,18 +443,30 @@ lifeform_t *addmonster(cell_t *c, enum RACE rid, char *racename, int randomjobok
|
|||
killflagsofid(lf->flags, F_HOSTILE);
|
||||
} else if (getalignment(lf) == AL_EVIL) {
|
||||
if (!lfhasflag(lf, F_HOSTILE)) addflag(lf->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
mayoverride = B_FALSE;
|
||||
}
|
||||
break;
|
||||
case AL_EVIL:
|
||||
if (getalignment(lf) == AL_GOOD) {
|
||||
if (!lfhasflag(lf, F_HOSTILE)) {
|
||||
addflag(lf->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
}
|
||||
if (!lfhasflag(lf, F_HOSTILE)) addflag(lf->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
mayoverride = B_FALSE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if ( getattrbracket(getattr(lf, A_IQ), A_IQ, NULL) > IQ_ANIMAL) {
|
||||
int mod=0;
|
||||
if (lf->race->id == player-> race->id) {
|
||||
mod += 15;
|
||||
}
|
||||
if (skillcheckvs(player, SC_CHA, mod, lf, SC_CHA, 0)) {
|
||||
killflagsofid(lf->flags, F_HOSTILE);
|
||||
} else {
|
||||
if (!lfhasflag(lf, F_HOSTILE)) addflag(lf->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
} // end if hasequipped amu_victimisation
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue