summaryrefslogtreecommitdiff
path: root/src/melee2.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2015-08-21 19:10:14 +0200
committerBardur Arantsson <bardur@scientician.net>2015-09-14 05:58:27 +0200
commit3928bcfc90c4dcdeaa91aade191d4b4c7ae7d0ef (patch)
treea7382700411c10ffd70453233d05b39b17b93dff /src/melee2.cc
parentbaa22bb096d08b6304b0dada144fec128ac69974 (diff)
Use magik() instead of explicitly using rand_int()
Diffstat (limited to 'src/melee2.cc')
-rw-r--r--src/melee2.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/melee2.cc b/src/melee2.cc
index e62b72bb..05d91f3c 100644
--- a/src/melee2.cc
+++ b/src/melee2.cc
@@ -329,7 +329,7 @@ static void remove_bad_spells(int m_idx, u32b *f4p, u32b *f5p, u32b *f6p)
if (smart_learn)
{
/* Hack -- Occasionally forget player status */
- if (m_ptr->smart && (rand_int(100) < 1)) m_ptr->smart = 0L;
+ if (m_ptr->smart && magik(1)) m_ptr->smart = 0L;
/* Use the memorized flags */
smart = m_ptr->smart;