Exploding spheres cause real explosions

Despite active explosion attacks being called explosions in-game,
they only affected a single target, and were handled differently
from actual explosions. Make them do an actual explosion instead.
This should make spheres more interesting and inspire different
tactics handling them.

Because spheres deal more damage on average and can destroy items
in their explosions, their difficulty has been increased slightly.

Polyselfed hero exploding won't cause elemental damage to their
own gear.

Originally from xNetHack by copperwater <aosdict@gmail.com>.
This commit is contained in:
Pasi Kallinen
2021-05-22 13:27:54 +03:00
parent 7f8cfb43d2
commit 6b60618e0e
11 changed files with 220 additions and 130 deletions

View File

@@ -735,6 +735,8 @@ extern void explode(int, int, int, int, char, int);
extern long scatter(int, int, int, unsigned int, struct obj *);
extern void splatter_burning_oil(int, int, boolean);
extern void explode_oil(struct obj *, int, int);
extern int adtyp_to_expltype(int);
extern void mon_explodes(struct monst *, struct attack *);
/* ### extralev.c ### */
@@ -2740,6 +2742,7 @@ extern boolean do_stone_u(struct monst *);
extern void do_stone_mon(struct monst *, struct attack *, struct monst *,
struct mhitm_data *);
extern int damageum(struct monst *, struct attack *, int);
extern int explum(struct monst *, struct attack *);
extern void missum(struct monst *, struct attack *, boolean);
extern int passive(struct monst *, struct obj *, boolean, boolean, uchar,
boolean);

View File

@@ -527,6 +527,13 @@ enum getobj_callback_returns {
GETOBJ_SUGGEST = 2,
};
/* constant passed to explode() for gas spores because gas spores are weird
* Specifically, this is an exception to the whole "explode() uses dobuzz types"
* system (the range -1 to -9 isn't used by it, for some reason), where this is
* effectively an extra dobuzz type, and some zap.c code needs to be aware of
* it. */
#define PHYS_EXPL_TYPE -1
/*
* option setting restrictions
*/