SHARE
TWEET

DQuest - Corrected to-hit algorithm

Omnikron13 Mar 1st, 2012 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (define to-hit
  2.  (lambda ($attacker $defender)
  3.   (if (> $attacker (* $defender 2))
  4.    2
  5.    (if (> $attacker $defender)
  6.     3
  7.     (if (>= (* $attacker 2) $defender)
  8.      4
  9.      (if (>= (* $attacker 3) $defender)
  10.       5
  11.       6))))))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top