Demonbane changes

Demonbane is now a mace, the first sac gift for priests,
and gets an invoke ability to banish demons.
This commit is contained in:
Pasi Kallinen
2022-07-19 21:23:23 +03:00
parent d713c1826b
commit b1a5a9c390
6 changed files with 37 additions and 5 deletions

View File

@@ -1831,6 +1831,35 @@ arti_invoke(struct obj *obj)
nhUse(otmp);
break;
}
case BANISH: {
if (!Inhell) {
int nvanished = 0;
struct monst *mtmp, *mtmp2;
d_level dest;
find_hell(&dest);
for (mtmp = fmon; mtmp; mtmp = mtmp2) {
mtmp2 = mtmp->nmon;
if (DEADMONSTER(mtmp) || !isok(mtmp->mx, mtmp->my))
continue;
if (!is_demon(mtmp->data) && mtmp->data->mlet != S_IMP)
continue;
if (!couldsee(mtmp->mx, mtmp->my))
continue;
dest.dlevel = rn2(dunlevs_in_dungeon(&dest));
mtmp->msleeping = mtmp->mtame = mtmp->mpeaceful = 0;
nvanished++;
migrate_mon(mtmp, ledger_no(&dest), MIGR_RANDOM);
}
if (nvanished)
pline("The demon%s disappear%s in a cloud of brimstone!",
nvanished > 1 ? "s" : "",
nvanished > 1 ? "" : "s");
}
break;
}
}
} else {
long eprop = (u.uprops[oart->inv_prop].extrinsic ^= W_ARTI),

View File

@@ -19,7 +19,6 @@ static void mon_leaving_level(struct monst *);
static void m_detach(struct monst *, struct permonst *);
static void set_mon_min_mhpmax(struct monst *, int);
static void lifesaved_monster(struct monst *);
static void migrate_mon(struct monst *, coordxy, coordxy);
static boolean ok_to_obliterate(struct monst *);
static void deal_with_overcrowding(struct monst *);
static void m_restartcham(struct monst *);
@@ -3296,7 +3295,7 @@ m_into_limbo(struct monst *mtmp)
migrate_mon(mtmp, target_lev, xyloc);
}
static void
void
migrate_mon(
struct monst *mtmp,
xint16 target_lev, /* destination level */