diff options
author | Bardur Arantsson <bardur@scientician.net> | 2016-06-20 22:49:05 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2016-06-20 22:49:05 +0200 |
commit | d5c980c319fca578d30c888c58b9384bce889ccb (patch) | |
tree | cf4fec470a290f39b977244ca28e15afde2395ca | |
parent | 9dd2f09626ad96caae709ce1fb51c7e87ee00d36 (diff) |
Remove unused is_scroll parameter from random_resistance()
-rw-r--r-- | src/object2.cc | 18 | ||||
-rw-r--r-- | src/spells2.cc | 16 | ||||
-rw-r--r-- | src/spells2.hpp | 2 |
3 files changed, 18 insertions, 18 deletions
diff --git a/src/object2.cc b/src/object2.cc index 8b81efae..d9c0b5f7 100644 --- a/src/object2.cc +++ b/src/object2.cc @@ -2133,7 +2133,7 @@ void random_artifact_resistance(object_type * o_ptr) // gets a resistance that it doesn't actually already have. for (int tries = 0; tries < 1000; tries++) { - random_resistance(o_ptr, FALSE, ((randint(22)) + 16)); + random_resistance(o_ptr, randint(22) + 16); // Picked up a new resistance? if (f2 != o_ptr->art_flags2) { @@ -2607,9 +2607,9 @@ static void dragon_resist(object_type * o_ptr) artifact_bias = 0; if (randint(4) == 1) - random_resistance(o_ptr, FALSE, ((randint(14)) + 4)); + random_resistance(o_ptr, randint(14) + 4); else - random_resistance(o_ptr, FALSE, ((randint(22)) + 16)); + random_resistance(o_ptr, randint(22) + 16); } while (randint(2) == 1); } @@ -2858,7 +2858,7 @@ static void a_m_aux_3(object_type *o_ptr, int level, int power) { do { - random_resistance(o_ptr, FALSE, ((randint(20)) + 18)); + random_resistance(o_ptr, randint(20) + 18); } while (randint(4) == 1); @@ -3085,7 +3085,7 @@ static void a_m_aux_3(object_type *o_ptr, int level, int power) case SV_AMULET_RESISTANCE: { - if (randint(3) == 1) random_resistance(o_ptr, FALSE, ((randint(34)) + 4)); + if (randint(3) == 1) random_resistance(o_ptr, randint(34) + 4); if (randint(5) == 1) o_ptr->art_flags2 |= TR2_RES_POIS; } break; @@ -3567,23 +3567,23 @@ void add_random_ego_flag(object_type *o_ptr, int fego, bool_ *limit_blows) if (fego & ETR4_R_ELEM) { /* Make an acid/elec/fire/cold/poison resist */ - random_resistance(o_ptr, FALSE, randint(14) + 4); + random_resistance(o_ptr, randint(14) + 4); } if (fego & ETR4_R_LOW) { /* Make an acid/elec/fire/cold resist */ - random_resistance(o_ptr, FALSE, randint(12) + 4); + random_resistance(o_ptr, randint(12) + 4); } if (fego & ETR4_R_HIGH) { /* Make a high resist */ - random_resistance(o_ptr, FALSE, randint(22) + 16); + random_resistance(o_ptr, randint(22) + 16); } if (fego & ETR4_R_ANY) { /* Make any resist */ - random_resistance(o_ptr, FALSE, randint(34) + 4); + random_resistance(o_ptr, randint(34) + 4); } if (fego & ETR4_R_DRAGON) diff --git a/src/spells2.cc b/src/spells2.cc index c08cad97..010bc424 100644 --- a/src/spells2.cc +++ b/src/spells2.cc @@ -2954,7 +2954,7 @@ void curse_artifact(object_type * o_ptr) -void random_resistance (object_type * o_ptr, bool_ is_scroll, int specific) +void random_resistance(object_type *o_ptr, int specific) { /* To avoid a number of possible bugs */ if (!specific) @@ -3086,7 +3086,7 @@ void random_resistance (object_type * o_ptr, bool_ is_scroll, int specific) { case 1 : if (randint(WEIRD_LUCK) != 1) - random_resistance(o_ptr, is_scroll, specific); + random_resistance(o_ptr, specific); else { o_ptr->art_flags2 |= TR2_IM_ACID; @@ -3097,7 +3097,7 @@ void random_resistance (object_type * o_ptr, bool_ is_scroll, int specific) break; case 2: if (randint(WEIRD_LUCK) != 1) - random_resistance(o_ptr, is_scroll, specific); + random_resistance(o_ptr, specific); else { o_ptr->art_flags2 |= TR2_IM_ELEC; @@ -3108,7 +3108,7 @@ void random_resistance (object_type * o_ptr, bool_ is_scroll, int specific) break; case 3: if (randint(WEIRD_LUCK) != 1) - random_resistance(o_ptr, is_scroll, specific); + random_resistance(o_ptr, specific); else { o_ptr->art_flags2 |= TR2_IM_COLD; @@ -3119,7 +3119,7 @@ void random_resistance (object_type * o_ptr, bool_ is_scroll, int specific) break; case 4: if (randint(WEIRD_LUCK) != 1) - random_resistance(o_ptr, is_scroll, specific); + random_resistance(o_ptr, specific); else { o_ptr->art_flags2 |= TR2_IM_FIRE; @@ -3236,7 +3236,7 @@ void random_resistance (object_type * o_ptr, bool_ is_scroll, int specific) if (o_ptr->tval >= TV_CLOAK && o_ptr->tval <= TV_HARD_ARMOR) o_ptr->art_flags3 |= TR3_SH_ELEC; else - random_resistance(o_ptr, is_scroll, specific); + random_resistance(o_ptr, specific); if (!(artifact_bias)) artifact_bias = BIAS_ELEC; break; @@ -3244,7 +3244,7 @@ void random_resistance (object_type * o_ptr, bool_ is_scroll, int specific) if (o_ptr->tval >= TV_CLOAK && o_ptr->tval <= TV_HARD_ARMOR) o_ptr->art_flags3 |= TR3_SH_FIRE; else - random_resistance(o_ptr, is_scroll, specific); + random_resistance(o_ptr, specific); if (!(artifact_bias)) artifact_bias = BIAS_FIRE; break; @@ -3253,7 +3253,7 @@ void random_resistance (object_type * o_ptr, bool_ is_scroll, int specific) o_ptr->tval == TV_HELM || o_ptr->tval == TV_HARD_ARMOR) o_ptr->art_flags2 |= TR2_REFLECT; else - random_resistance(o_ptr, is_scroll, specific); + random_resistance(o_ptr, specific); break; } } diff --git a/src/spells2.hpp b/src/spells2.hpp index ae3099da..09d5ea68 100644 --- a/src/spells2.hpp +++ b/src/spells2.hpp @@ -111,4 +111,4 @@ extern void geomancy_random_wall(int y, int x); extern void geomancy_random_floor(int y, int x, bool_ kill_wall); extern void geomancy_dig(int oy, int ox, int dir, int length); extern void channel_the_elements(int y, int x, int level); -extern void random_resistance (object_type * o_ptr, bool_ is_scroll, int specific); +extern void random_resistance(object_type *o_ptr, int specific); |