summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/artefact.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2009-10-04 18:15:56 +0200
committerAdam Borowski <kilobyte@angband.pl>2009-10-05 22:02:25 +0200
commitb7dee52a419fd5470a063b2e34b3d2bfb7a04e5f (patch)
treefef93966a3726abaac7e3045f869bd15ec941092 /crawl-ref/source/artefact.cc
parentef6ad2cc032c461e2acea1f53dc01710b8dd2305 (diff)
downloadcrawl-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/artefact.cc')
-rw-r--r--crawl-ref/source/artefact.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/crawl-ref/source/artefact.cc b/crawl-ref/source/artefact.cc
index 5c8a1dafc0..94f0dc4a6b 100644
--- a/crawl-ref/source/artefact.cc
+++ b/crawl-ref/source/artefact.cc
@@ -1058,6 +1058,13 @@ void static _get_randart_properties(const item_def &item,
power_level++;
}
+ if (!done_powers && one_chance_in(10) && aclass == OBJ_ARMOUR
+ && (atype == ARM_CAP || atype == ARM_SHIELD))
+ {
+ proprt[ARTP_SPIRIT_SHIELD] = 1;
+ power_level++;
+ }
+
// Armours get fewer powers, and are also less likely to be
// cursed than weapons
if (aclass == OBJ_ARMOUR)