diff options
author | Adam Borowski <kilobyte@angband.pl> | 2009-10-04 18:15:56 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2009-10-05 22:02:25 +0200 |
commit | b7dee52a419fd5470a063b2e34b3d2bfb7a04e5f (patch) | |
tree | fef93966a3726abaac7e3045f869bd15ec941092 /crawl-ref/source/player.cc | |
parent | ef6ad2cc032c461e2acea1f53dc01710b8dd2305 (diff) | |
download | crawl-ref-b7dee52a419fd5470a063b2e34b3d2bfb7a04e5f.tar.gz crawl-ref-b7dee52a419fd5470a063b2e34b3d2bfb7a04e5f.zip |
Amulet of guardian spirit, it comes as an amulet or a cap.
When worn, all non-poison damage will drain mana instead, hurting hp
only after mana is depleted.
The cap brand is intended only for a fixedart, but per dpeg's request,
it will be generated on ordinary caps for now, as a test.
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index aa79a289d6..b902943ec8 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -4495,6 +4495,13 @@ int player_mental_clarity(bool calc_unid, bool items) return ((ret > 3) ? 3 : ret); } +int player_spirit_shield(bool calc_unid) +{ + return player_equip(EQ_AMULET, AMU_GUARDIAN_SPIRIT, calc_unid) + + player_equip_ego_type(EQ_HELMET, SPARM_SPIRIT_SHIELD) + + scan_artefacts(ARTP_SPIRIT_SHIELD); +} + // Returns whether the player has the effect of the amulet from a // non-amulet source. bool extrinsic_amulet_effect(jewellery_type amulet) |