diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-25 23:35:17 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-25 23:35:17 +0000 |
commit | 4a746253d5b490b74bf195038b943583fe4c1017 (patch) | |
tree | 8630c8f492d66e6183507ba346e7a85f4d5036fe /crawl-ref/source/item_use.cc | |
parent | 3285cab37e38320a6fd566a035d96939e4fb9b3e (diff) | |
download | crawl-ref-4a746253d5b490b74bf195038b943583fe4c1017.tar.gz crawl-ref-4a746253d5b490b74bf195038b943583fe4c1017.zip |
Two changes:
1.) If Beogh can't find a nearby follower in LOS to bless, try again
without the LOS restriction (but still nearby). If this also fails, recall
a small amount of followers (1 + rnd(4) + rnd(4)) on the level. I don't
think there's much harm in Beogh actively doing something you already
have as an invocation as long as it doesn't make the invocation
superfluous (and this doesn't).
In this case, the chance of this happening should probably be lowered,
and actual reinforcement should be rarer still.
2.) Identify magical staves if you have at least 4 skill levels in the
corresponding spell school when wielding it, or gain the 4th level while
wielding it. (I decided on 4 because that is what most mages start out
with in their special school, and it seems a good enough treshold.)
Prior to that, there's still the random identification chance at casting
an appropriate spell, as before.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4639 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r-- | crawl-ref/source/item_use.cc | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 63bf8b9c88..82b868ee96 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -484,7 +484,9 @@ void wield_effects(int item_wield_2, bool showMsgs) item_def &item = you.inv[item_wield_2]; // and here we finally get to the special effects of wielding {dlb} - if (item.base_type == OBJ_MISCELLANY) + switch (item.base_type) + { + case OBJ_MISCELLANY: { if (item.sub_type == MISC_LANTERN_OF_SHADOWS) { @@ -495,9 +497,10 @@ void wield_effects(int item_wield_2, bool showMsgs) setLOSRadius(you.current_vision); you.special_wield = SPWLD_SHADOW; } + break; } - if (item.base_type == OBJ_STAVES) + case OBJ_STAVES: { if (item.sub_type == STAFF_POWER) { @@ -506,15 +509,16 @@ void wield_effects(int item_wield_2, bool showMsgs) set_ident_flags( item, ISFLAG_EQ_WEAPON_MASK ); mpr("You feel your mana capacity increase."); } - else + else if (!maybe_identify_staff(item)) { - // Most staves only give curse status when wielded and - // right now that's always "uncursed". -- bwr - set_ident_flags( item, ISFLAG_KNOW_CURSE ); + // Give curse status when wielded. + // Right now that's always "uncursed". -- bwr + set_ident_flags( item, ISFLAG_KNOW_CURSE ); } + break; } - if (item.base_type == OBJ_WEAPONS) + case OBJ_WEAPONS: { if (is_evil_item(item) && is_good_god(you.religion)) { @@ -747,7 +751,11 @@ void wield_effects(int item_wield_2, bool showMsgs) else xom_is_stimulated(64); } + break; } + default: + break; + } // switch (base type) if (showMsgs) warn_shield_penalties(); |