enlightenment for armor's effect on spell casting
Report the effect of suit and/or robe on spell casting during attribute enlightenment. Doesn't attempt to include other armor slots. That's complicated and would end up being too verbose.
This commit is contained in:
@@ -1782,6 +1782,23 @@ attributes_enlightenment(
|
|||||||
enlght_halfdmg(HALF_SPDAM, final);
|
enlght_halfdmg(HALF_SPDAM, final);
|
||||||
if (Half_gas_damage)
|
if (Half_gas_damage)
|
||||||
enl_msg(You_, "take", "took", " reduced poison gas damage", "");
|
enl_msg(You_, "take", "took", " reduced poison gas damage", "");
|
||||||
|
if (spellid(0) > NO_SPELL) { /* skip if no spells are known yet */
|
||||||
|
/* greatly simplified edition of percent_success(spell.c)--may need
|
||||||
|
to be suppressed if oversimplification leads to player confusion */
|
||||||
|
char cast_adj[QBUFSZ];
|
||||||
|
boolean suit = uarm && is_metallic(uarm),
|
||||||
|
robe = uarmc && uarmc->otyp == ROBE;
|
||||||
|
|
||||||
|
*cast_adj = '\0';
|
||||||
|
if (suit) /* omit "wearing" to shorten the text */
|
||||||
|
Sprintf(cast_adj, " impaired by metallic armor%s",
|
||||||
|
robe ? ", mitigated by your robe" : "");
|
||||||
|
else if (robe)
|
||||||
|
Strcpy(cast_adj, " enhanced by wearing a robe");
|
||||||
|
|
||||||
|
if (*cast_adj)
|
||||||
|
enl_msg("Your spell casting ", "is", "was", cast_adj, "");
|
||||||
|
}
|
||||||
/* polymorph and other shape change */
|
/* polymorph and other shape change */
|
||||||
if (Protection_from_shape_changers)
|
if (Protection_from_shape_changers)
|
||||||
you_are("protected from shape changers",
|
you_are("protected from shape changers",
|
||||||
|
|||||||
Reference in New Issue
Block a user