yielded normal size one (size prefix was being stripped off for globs)
wishing for "glob of grey ooze" failed even though grey ooze is recognized
as a variant spelling for gray ooze
+spells of healing and extra healing cast at monsters handled monster blindness
+ inconsistently compared to other healing
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
boolean atme;
{
int energy, damage, chance, n, intell;
- int skill, role_skill, res = 0;
+ int otyp, skill, role_skill, res = 0;
boolean confused = (Confusion != 0);
boolean physical_damage = FALSE;
struct obj *pseudo;
* Find the skill the hero has in a spell type category.
* See spell_skilltype for categories.
*/
- skill = spell_skilltype(pseudo->otyp);
+ otyp = pseudo->otyp;
+ skill = spell_skilltype(otyp);
role_skill = P_SKILL(skill);
- switch (pseudo->otyp) {
+ switch (otyp) {
/*
* At first spells act as expected. As the hero increases in skill
* with the appropriate spell type, some spells increase in their
}
} else {
explode(u.dx, u.dy,
- pseudo->otyp - SPE_MAGIC_MISSILE + 10,
+ otyp - SPE_MAGIC_MISSILE + 10,
spell_damage_bonus(u.ulevel / 2 + 1), 0,
- (pseudo->otyp == SPE_CONE_OF_COLD)
+ (otyp == SPE_CONE_OF_COLD)
? EXPL_FROSTY
: EXPL_FIERY);
}
}
}
break;
- } /* else fall through... */
+ } /* else */
+ /*FALLTHRU*/
/* these spells are all duplicates of wand effects */
case SPE_FORCE_BOLT:
physical_damage = TRUE;
- /* fall through */
+ /*FALLTHRU*/
case SPE_SLEEP:
case SPE_MAGIC_MISSILE:
case SPE_KNOCK:
case SPE_EXTRA_HEALING:
case SPE_DRAIN_LIFE:
case SPE_STONE_TO_FLESH:
- if (!(objects[pseudo->otyp].oc_dir == NODIR)) {
+ if (objects[otyp].oc_dir != NODIR) {
+ if (otyp == SPE_HEALING || otyp == SPE_EXTRA_HEALING) {
+ /* healing and extra healing are actually potion effects,
+ but they've been extended to take a direction like wands */
+ if (role_skill >= P_SKILLED)
+ pseudo->blessed = 1;
+ }
if (atme) {
u.dx = u.dy = u.dz = 0;
} else if (!getdir((char *) 0)) {
/* high skill yields effect equivalent to blessed scroll */
if (role_skill >= P_SKILLED)
pseudo->blessed = 1;
- /* fall through */
+ /*FALLTHRU*/
case SPE_CHARM_MONSTER:
case SPE_MAGIC_MAPPING:
case SPE_CREATE_MONSTER:
/* high skill yields effect equivalent to blessed potion */
if (role_skill >= P_SKILLED)
pseudo->blessed = 1;
- /* fall through */
+ /*FALLTHRU*/
case SPE_INVISIBILITY:
(void) peffects(pseudo);
break;
boolean wake = TRUE; /* Most 'zaps' should wake monster */
boolean reveal_invis = FALSE, learn_it = FALSE;
boolean dbldam = Role_if(PM_KNIGHT) && u.uhave.questart;
- boolean helpful_gesture = FALSE;
+ boolean skilled_spell, helpful_gesture = FALSE;
int dmg, otyp = otmp->otyp;
const char *zap_type_text = "spell";
struct obj *obj;
reveal_invis = FALSE;
notonhead = (mtmp->mx != bhitpos.x || mtmp->my != bhitpos.y);
+ skilled_spell = (otmp && otmp->oclass == SPBOOK_CLASS && otmp->blessed);
+
switch (otyp) {
case WAN_STRIKING:
zap_type_text = "wand";
- /* fall through */
+ /*FALLTHRU*/
case SPE_FORCE_BOLT:
reveal_invis = TRUE;
if (disguised_mimic)
mtmp->mhp += d(6, otyp == SPE_EXTRA_HEALING ? 8 : 4);
if (mtmp->mhp > mtmp->mhpmax)
mtmp->mhp = mtmp->mhpmax;
- if (mtmp->mblinded) {
- mtmp->mblinded = 0;
- mtmp->mcansee = 1;
- }
+ /* plain healing must be blessed to cure blindness; extra
+ healing only needs to not be cursed, so spell always cures
+ [potions quaffed by monsters behave slightly differently;
+ we use the rules for the hero here...] */
+ if (skilled_spell || otyp == SPE_EXTRA_HEALING)
+ mcureblindness(mtmp, canseemon(mtmp));
if (canseemon(mtmp)) {
if (disguised_mimic) {
if (is_obj_mappear(mtmp,STRANGE_OBJECT)) {
case SPE_EXTRA_HEALING:
learn_it = TRUE; /* (no effect for spells...) */
healup(d(6, obj->otyp == SPE_EXTRA_HEALING ? 8 : 4), 0, FALSE,
- (obj->otyp == SPE_EXTRA_HEALING));
+ (obj->blessed || obj->otyp == SPE_EXTRA_HEALING));
You_feel("%sbetter.", obj->otyp == SPE_EXTRA_HEALING ? "much " : "");
break;
case WAN_LIGHT: /* (broken wand) */