summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-13 09:07:44 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-13 09:07:44 +0000
commitc92159fe7f003977dee3ea4d16a18176f6435435 (patch)
tree26584944300881e655f6c80f1b6c5dfff966bc1f /crawl-ref
parent43c3f753a994754337bcae92e498a1f5b6463a83 (diff)
downloadcrawl-ref-c92159fe7f003977dee3ea4d16a18176f6435435.tar.gz
crawl-ref-c92159fe7f003977dee3ea4d16a18176f6435435.zip
Implemented Erik's randart-MR-is-multiplicative idea.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1294 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/describe.cc14
-rw-r--r--crawl-ref/source/mon-util.cc4
-rw-r--r--crawl-ref/source/player.cc6
-rw-r--r--crawl-ref/source/randart.cc2
-rw-r--r--crawl-ref/source/shopping.cc4
-rw-r--r--crawl-ref/source/unrand.h2
6 files changed, 18 insertions, 14 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 3cee706457..420fb02119 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -75,7 +75,7 @@ static void append_value( std::string & description, int valu, bool plussed )
//
// print_description
//
-// Takes a descpr string filled up with stuff from other functions,
+// Takes a descrip string filled up with stuff from other functions,
// and displays it with minor formatting to avoid cut-offs in mid
// word and such. The character $ is interpreted as a CR.
//
@@ -144,13 +144,13 @@ static void print_description( const std::string &d )
//---------------------------------------------------------------
//
-// randart_descpr
+// randart_descrip
//
// Appends the various powers of a random artefact to the description
// string.
//
//---------------------------------------------------------------
-static void randart_descpr( std::string &description, const item_def &item )
+static void randart_descrip( std::string &description, const item_def &item )
{
unsigned int old_length = description.length();
@@ -246,7 +246,7 @@ static void randart_descpr( std::string &description, const item_def &item )
description += "$It renders you almost immune to negative energy. ";
if (proprt[ RAP_MAGIC ])
- description += "$It protects you from magic. ";
+ description += "$It amplifies your intrinsic magic resistance. ";
if (proprt[ RAP_STEALTH ] < 0)
{
@@ -1184,7 +1184,7 @@ static std::string describe_weapon( const item_def &item, bool verbose)
if (item_ident( item, ISFLAG_KNOW_PROPERTIES ))
{
unsigned int old_length = description.length();
- randart_descpr( description, item );
+ randart_descrip( description, item );
if (description.length() == old_length)
description += "$";
@@ -1722,7 +1722,7 @@ static std::string describe_armour( const item_def &item, bool verbose )
if (is_random_artefact( item ))
{
if (item_ident( item, ISFLAG_KNOW_PROPERTIES ))
- randart_descpr( description, item );
+ randart_descrip( description, item );
else if (item_type_known(item))
description += "$This armour may have some hidden properties.$";
}
@@ -2822,7 +2822,7 @@ static std::string describe_jewellery( const item_def &item, bool verbose)
if (is_random_artefact( item ))
{
if (item_ident( item, ISFLAG_KNOW_PROPERTIES ))
- randart_descpr( description, item );
+ randart_descrip( description, item );
else if (item_type_known(item))
{
if (item.sub_type >= AMU_RAGE)
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 57efe0bfec..dd52595fbe 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -650,7 +650,9 @@ int mons_resist_magic( const monsters *mon )
if (u < 0)
u = mon->hit_dice * -u * 4 / 3;
- u += scan_mon_inv_randarts( mon, RAP_MAGIC );
+ // randarts have a multiplicative effect
+ u *= (scan_mon_inv_randarts( mon, RAP_MAGIC ) + 100);
+ u /= 100;
// ego armour resistance
const int armour = mon->inv[MSLOT_ARMOUR];
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index cbc7009116..89ec76be60 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -801,14 +801,16 @@ int player_res_magic(void)
break;
}
+ /* randarts - multiplicative effect */
+ rm *= (scan_randarts(RAP_MAGIC) + 100);
+ rm /= 100;
+
/* armour */
rm += 30 * player_equip_ego_type( EQ_ALL_ARMOUR, SPARM_MAGIC_RESISTANCE );
/* rings of magic resistance */
rm += 40 * player_equip( EQ_RINGS, RING_PROTECTION_FROM_MAGIC );
- /* randarts */
- rm += scan_randarts(RAP_MAGIC);
/* Enchantment skill */
rm += 2 * you.skills[SK_ENCHANTMENTS];
diff --git a/crawl-ref/source/randart.cc b/crawl-ref/source/randart.cc
index e9982e07dd..97218ee036 100644
--- a/crawl-ref/source/randart.cc
+++ b/crawl-ref/source/randart.cc
@@ -1048,7 +1048,7 @@ void randart_wpn_properties( const item_def &item,
if (one_chance_in(4 + power_level)
&& (aclass != OBJ_JEWELLERY || atype != RING_PROTECTION_FROM_MAGIC))
{
- proprt[RAP_MAGIC] = 20 + random2(40);
+ proprt[RAP_MAGIC] = 35 + random2(65);
power_level++;
}
diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc
index 31c52d943d..a5f46d5077 100644
--- a/crawl-ref/source/shopping.cc
+++ b/crawl-ref/source/shopping.cc
@@ -523,9 +523,9 @@ int randart_value( const item_def &item )
if (prop[ RAP_ELECTRICITY ])
ret += 30;
- // magic resistance is from 20-120
+ // magic resistance is from 35-100
if (prop[ RAP_MAGIC ])
- ret += 5 + prop[ RAP_MAGIC ] / 10;
+ ret += 5 + prop[ RAP_MAGIC ] / 15;
if (prop[ RAP_EYESIGHT ])
ret += 10;
diff --git a/crawl-ref/source/unrand.h b/crawl-ref/source/unrand.h
index 35f8527b70..73e8bfa60e 100644
--- a/crawl-ref/source/unrand.h
+++ b/crawl-ref/source/unrand.h
@@ -438,7 +438,7 @@
OBJ_JEWELLERY, AMU_CLARITY, +0, 0, LIGHTGREEN,
{
0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 60, // life prot, magic resistance
+ 0, 0, 0, 0, 1, 100, // life prot, magic resistance
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0,