aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Pouar <pouar@pouar.net>2020-10-03 12:25:24 -0500
committerGravatar Pouar <pouar@pouar.net>2020-10-03 12:25:24 -0500
commit54f0556108ee4a7a1a5f5f3aa5e92756d4a069b8 (patch)
treec35df080e1a99d3b96d907350372644a4f26c932
parentcan't believe I did that (diff)
make use of random-from-range again
-rw-r--r--core/libexec/methods.lisp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/libexec/methods.lisp b/core/libexec/methods.lisp
index 088e414..02338c3 100644
--- a/core/libexec/methods.lisp
+++ b/core/libexec/methods.lisp
@@ -1585,7 +1585,7 @@ randomrange is @code{(random-from-range 85 100)}"
(round (u:$ (u:$ (u:$ (u:$ (u:$ (u:$ (u:$ 2 * (level-of user)) / 5) + 2) * attack * (u:$ (calculate-stat user :attack) / (calculate-stat target :defense)))
/ 50)
+ 2)
- * (u:$ (s:random-in-range 85 101) / 100))))
+ * (u:$ (random-from-range 85 100) / 100))))
(defmethod calculate-damage ((target base-character) (user base-character) (attack move))
"Figures out the damage dealt, we use the formula
@@ -1610,7 +1610,7 @@ randomrange is @code{(random-from-range 85 100)}"
(u:$ (calculate-stat user :attack) / (calculate-stat target :defense)))
/ 50)
+ 2)
- * (* (u:$ (s:random-in-range 85 101) / 100)
+ * (* (u:$ (random-from-range 85 100) / 100)
(if (eq type-effectiveness :no-effect)
0
(expt 2 magnitude))