From b7dee52a419fd5470a063b2e34b3d2bfb7a04e5f Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Sun, 4 Oct 2009 18:15:56 +0200 Subject: 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. --- crawl-ref/source/item_use.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'crawl-ref/source/item_use.cc') diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index beb1ef5331..7418d8e98c 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -3249,6 +3249,16 @@ void jewellery_wear_effects(item_def &item) ident = ID_KNOWN_TYPE; } break; + + case AMU_GUARDIAN_SPIRIT: + if (player_spirit_shield()<2) + { + set_mp(0, false); + mpr("You feel your power drawn to a protective spirit."); + ident = ID_KNOWN_TYPE; + } + break; + } // Artefacts have completely different appearance than base types @@ -5365,6 +5375,13 @@ void use_artefact(item_def &item, bool *show_msgs, bool unmeld) if (proprt[ARTP_NOISES]) you.attribute[ATTR_NOISES] = 1; + if (proprt[ARTP_SPIRIT_SHIELD]) + { + set_mp(0, false); + mpr("You feel the spirits watch over you."); + artefact_wpn_learn_prop(item, ARTP_SPIRIT_SHIELD); + } + if (!alreadyknown && Options.autoinscribe_artefacts) add_autoinscription(item, artefact_auto_inscription(item)); -- cgit v1.2.3-54-g00ecf