Add petless conduct
Breaks saves.
This commit is contained in:
@@ -59,6 +59,7 @@ initedog(struct monst *mtmp)
|
||||
EDOG(mtmp)->revivals = 0;
|
||||
EDOG(mtmp)->mhpmax_penalty = 0;
|
||||
EDOG(mtmp)->killed_by_u = 0;
|
||||
u.uconduct.pets++;
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -152,6 +153,7 @@ make_familiar(struct obj *otmp, coordxy x, coordxy y, boolean quietly)
|
||||
/* 0,1,2: b=80%,10,10; nc=10%,80,10; c=10%,10,80 */
|
||||
if (chance > 0) {
|
||||
mtmp->mtame = 0; /* not tame after all */
|
||||
u.uconduct.pets--; /* doesn't count as creating a pet */
|
||||
if (chance == 2) { /* hostile (cursed figurine) */
|
||||
if (!quietly)
|
||||
You("get a bad feeling about this.");
|
||||
|
||||
@@ -2047,6 +2047,9 @@ show_conduct(int final)
|
||||
you_have_X(buf);
|
||||
}
|
||||
|
||||
if (!u.uconduct.pets)
|
||||
you_have_never("had a pet");
|
||||
|
||||
ngenocided = num_genocides();
|
||||
if (ngenocided == 0) {
|
||||
you_have_never("genocided any monsters");
|
||||
|
||||
12
src/minion.c
12
src/minion.c
@@ -520,7 +520,17 @@ gain_guardian_angel(void)
|
||||
* [Note: this predates mon->mextra which allows a monster
|
||||
* to have both emin and edog at the same time.]
|
||||
*/
|
||||
mtmp->mtame = 10;
|
||||
/* Too nasty for the game to unexpectedly break petless conduct on
|
||||
* the final level of the game. The angel will still appear, but
|
||||
* won't be tamed. */
|
||||
if (u.uconduct.pets) {
|
||||
/* guardian angel -- the one case mtame doesn't
|
||||
* imply an edog structure, so we don't want to
|
||||
* call tamedog().
|
||||
*/
|
||||
mtmp->mtame = 10;
|
||||
u.uconduct.pets++;
|
||||
}
|
||||
/* for 'hilite_pet'; after making tame, before next message */
|
||||
newsym(mtmp->mx, mtmp->my);
|
||||
if (!Blind)
|
||||
|
||||
@@ -439,6 +439,8 @@ encodeconduct(void)
|
||||
entered-sokoban bit in the 'achieve' field */
|
||||
if (!u.uconduct.sokocheat && sokoban_in_play())
|
||||
e |= 1L << 12;
|
||||
if (!u.uconduct.pets)
|
||||
e |= 1L << 13;
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -594,6 +596,7 @@ encode_extended_conducts(char *buf)
|
||||
add_achieveX(buf, "deaf", u.uroleplay.deaf);
|
||||
add_achieveX(buf, "nudist", u.uroleplay.nudist);
|
||||
add_achieveX(buf, "bonesless", !flags.bones);
|
||||
add_achieveX(buf, "petless", !u.uconduct.pets);
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user