Another artifact damage update
Make being hit by an artifact which does fire, cold, or lightning (or magic missiles, since the code is there) affect inventory even when the target resists the damage him-/her-/itself. This removes the need for the redundant fire vs slime handling that I put in yesterday. Unfortunately it also means that Valkyries who throw Mjollnir will inevitably end up destroying all their mettalic wands and rings, so I reduced the chance of it hitting upon its return.
This commit is contained in:
+3
-3
@@ -434,7 +434,7 @@ halve air elemental damage to compensate for side effect of speed system
|
|||||||
strengthen Death; weaken Famine, Pestilence, and Demogorgon
|
strengthen Death; weaken Famine, Pestilence, and Demogorgon
|
||||||
pet purple worms get nutrition from engulfing attack
|
pet purple worms get nutrition from engulfing attack
|
||||||
throwing an artifact upwards will trigger artifact hit effects when it falls
|
throwing an artifact upwards will trigger artifact hit effects when it falls
|
||||||
being hit by Fire Brand when not resistant stops the turning-into-slime process
|
being hit by Fire Brand stops the turning-into-slime process
|
||||||
monsters hitting other monsters can split puddings with weapons
|
monsters hitting other monsters can split puddings with weapons
|
||||||
be consistent with checking for iron weapons when splitting puddings
|
be consistent with checking for iron weapons when splitting puddings
|
||||||
|
|
||||||
@@ -550,12 +550,12 @@ new window-port preference options added, and some existing options
|
|||||||
made each of the end disclosure options customizable to "prompt;default no",
|
made each of the end disclosure options customizable to "prompt;default no",
|
||||||
"prompt;default yes", "show it without prompt", and
|
"prompt;default yes", "show it without prompt", and
|
||||||
"don't show it and don't prompt"
|
"don't show it and don't prompt"
|
||||||
add female role level names "Medica ossium", "Magistra", "Chevaliere",
|
add female role level names "Medica ossium", "Magistra", "Chevaliere", "Dame"
|
||||||
and "Dame"
|
|
||||||
more feedback about skill advancement from #enhance command
|
more feedback about skill advancement from #enhance command
|
||||||
USER_SOUNDS compilation option to enable use of SOUND and SOUNDDIR variables
|
USER_SOUNDS compilation option to enable use of SOUND and SOUNDDIR variables
|
||||||
in the config file for user-specified sound clips for
|
in the config file for user-specified sound clips for
|
||||||
user-specified, regex-based message patterns
|
user-specified, regex-based message patterns
|
||||||
|
resistance does not protect inventory from artifacts (cold vs Frost Brand,&c)
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific New Features
|
Platform- and/or Interface-Specific New Features
|
||||||
|
|||||||
+23
-17
@@ -721,14 +721,6 @@ int dieroll; /* needed for Magicbane and vorpal blades */
|
|||||||
if (youattack && youdefend) {
|
if (youattack && youdefend) {
|
||||||
impossible("attacking yourself with weapon?");
|
impossible("attacking yourself with weapon?");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} else if (!spec_dbon_applies) {
|
|
||||||
if (youdefend && Slimed && attacks(AD_FIRE, otmp)) {
|
|
||||||
pline_The("fiery blade hits you.");
|
|
||||||
burn_away_slime();
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
/* since damage bonus didn't apply, nothing more to do */
|
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
realizes_damage = (youdefend || vis);
|
realizes_damage = (youdefend || vis);
|
||||||
@@ -736,9 +728,11 @@ int dieroll; /* needed for Magicbane and vorpal blades */
|
|||||||
/* the four basic attacks: fire, cold, shock and missiles */
|
/* the four basic attacks: fire, cold, shock and missiles */
|
||||||
if (attacks(AD_FIRE, otmp)) {
|
if (attacks(AD_FIRE, otmp)) {
|
||||||
if (realizes_damage)
|
if (realizes_damage)
|
||||||
pline_The("fiery blade %s %s!",
|
pline_The("fiery blade %s %s%c",
|
||||||
|
!spec_dbon_applies ? "hits" :
|
||||||
(mdef->data == &mons[PM_WATER_ELEMENTAL]) ?
|
(mdef->data == &mons[PM_WATER_ELEMENTAL]) ?
|
||||||
"vaporizes part of" : "burns", hittee);
|
"vaporizes part of" : "burns",
|
||||||
|
hittee, !spec_dbon_applies ? '.' : '!');
|
||||||
if (!rn2(4)) (void) destroy_mitem(mdef, POTION_CLASS, AD_FIRE);
|
if (!rn2(4)) (void) destroy_mitem(mdef, POTION_CLASS, AD_FIRE);
|
||||||
if (!rn2(4)) (void) destroy_mitem(mdef, SCROLL_CLASS, AD_FIRE);
|
if (!rn2(4)) (void) destroy_mitem(mdef, SCROLL_CLASS, AD_FIRE);
|
||||||
if (!rn2(7)) (void) destroy_mitem(mdef, SPBOOK_CLASS, AD_FIRE);
|
if (!rn2(7)) (void) destroy_mitem(mdef, SPBOOK_CLASS, AD_FIRE);
|
||||||
@@ -747,15 +741,19 @@ int dieroll; /* needed for Magicbane and vorpal blades */
|
|||||||
}
|
}
|
||||||
if (attacks(AD_COLD, otmp)) {
|
if (attacks(AD_COLD, otmp)) {
|
||||||
if (realizes_damage)
|
if (realizes_damage)
|
||||||
pline_The("ice-cold blade freezes %s!", hittee);
|
pline_The("ice-cold blade %s %s%c",
|
||||||
|
!spec_dbon_applies ? "hits" : "freezes",
|
||||||
|
hittee, !spec_dbon_applies ? '.' : '!');
|
||||||
if (!rn2(4)) (void) destroy_mitem(mdef, POTION_CLASS, AD_COLD);
|
if (!rn2(4)) (void) destroy_mitem(mdef, POTION_CLASS, AD_COLD);
|
||||||
return realizes_damage;
|
return realizes_damage;
|
||||||
}
|
}
|
||||||
if (attacks(AD_ELEC, otmp)) {
|
if (attacks(AD_ELEC, otmp)) {
|
||||||
if (realizes_damage) {
|
if (realizes_damage) {
|
||||||
if (youattack && otmp != uwep)
|
if (youattack ? otmp != uwep : !spec_dbon_applies)
|
||||||
pline("%s %s!", Tobjnam(otmp, "hit"), hittee);
|
pline("%s %s%c", Tobjnam(otmp, "hit"),
|
||||||
pline("Lightning strikes %s!", hittee);
|
hittee, !spec_dbon_applies ? '.' : '!');
|
||||||
|
if (spec_dbon_applies)
|
||||||
|
pline("Lightning strikes %s!", hittee);
|
||||||
}
|
}
|
||||||
if (!rn2(5)) (void) destroy_mitem(mdef, RING_CLASS, AD_ELEC);
|
if (!rn2(5)) (void) destroy_mitem(mdef, RING_CLASS, AD_ELEC);
|
||||||
if (!rn2(5)) (void) destroy_mitem(mdef, WAND_CLASS, AD_ELEC);
|
if (!rn2(5)) (void) destroy_mitem(mdef, WAND_CLASS, AD_ELEC);
|
||||||
@@ -763,13 +761,21 @@ int dieroll; /* needed for Magicbane and vorpal blades */
|
|||||||
}
|
}
|
||||||
if (attacks(AD_MAGM, otmp)) {
|
if (attacks(AD_MAGM, otmp)) {
|
||||||
if (realizes_damage) {
|
if (realizes_damage) {
|
||||||
if (youattack && otmp != uwep)
|
if (youattack ? otmp != uwep : !spec_dbon_applies)
|
||||||
pline("%s %s!", Tobjnam(otmp, "hit"), hittee);
|
pline("%s %s%c", Tobjnam(otmp, "hit"),
|
||||||
pline("A hail of magic missiles strikes %s!", hittee);
|
hittee, !spec_dbon_applies ? '.' : '!');
|
||||||
|
if (spec_dbon_applies)
|
||||||
|
pline("A hail of magic missiles strikes %s!", hittee);
|
||||||
}
|
}
|
||||||
return realizes_damage;
|
return realizes_damage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!spec_dbon_applies) {
|
||||||
|
/* since damage bonus didn't apply, nothing more to do;
|
||||||
|
no further attacks have side-effects on inventory */
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Magicbane's intrinsic magic is incompatible with normal
|
* Magicbane's intrinsic magic is incompatible with normal
|
||||||
* enchantment magic. Thus, its effects have a negative
|
* enchantment magic. Thus, its effects have a negative
|
||||||
|
|||||||
+19
-12
@@ -990,18 +990,25 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */
|
|||||||
if(cansee(bhitpos.x, bhitpos.y))
|
if(cansee(bhitpos.x, bhitpos.y))
|
||||||
newsym(bhitpos.x,bhitpos.y);
|
newsym(bhitpos.x,bhitpos.y);
|
||||||
} else {
|
} else {
|
||||||
int dmg = rnd(4);
|
int dmg = rn2(2);
|
||||||
if (Blind)
|
if (!dmg) {
|
||||||
pline("%s your %s!",
|
pline(Blind ? "%s lands %s your %s." :
|
||||||
Tobjnam(obj, "hit"), body_part(ARM));
|
"%s back to you, landing %s your %s.",
|
||||||
else
|
Blind ? Something : Tobjnam(obj, "return"),
|
||||||
pline("%s back toward you, hitting your %s!",
|
Levitation ? "beneath" : "at",
|
||||||
Tobjnam(obj, "fly"), body_part(ARM));
|
makeplural(body_part(FOOT)));
|
||||||
(void) artifact_hit((struct monst *) 0, &youmonst,
|
} else {
|
||||||
obj, &dmg, 0);
|
dmg += rnd(3);
|
||||||
losehp(dmg, xname(obj), KILLED_BY);
|
pline(Blind ? "%s your %s!" :
|
||||||
if(ship_object(obj, u.ux, u.uy, FALSE))
|
"%s back toward you, hitting your %s!",
|
||||||
return;
|
Tobjnam(obj, Blind ? "hit" : "fly"),
|
||||||
|
body_part(ARM));
|
||||||
|
(void) artifact_hit((struct monst *)0,
|
||||||
|
&youmonst, obj, &dmg, 0);
|
||||||
|
losehp(dmg, xname(obj), KILLED_BY);
|
||||||
|
}
|
||||||
|
if (ship_object(obj, u.ux, u.uy, FALSE))
|
||||||
|
return;
|
||||||
dropy(obj);
|
dropy(obj);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user