Advertisement
Bicorn

adjustment thingy

Mar 12th, 2017
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. #direction check
  2. same_way = (base > 0) == (amount > 0)
  3. if same_way:
  4.     amount_abs = abs(amount)
  5.     base_abs = abs(base)
  6.     if base_abs < 50:
  7.         mod = amount_abs
  8.     elif base_abs < 100:
  9.         mod = die(amount_abs)
  10.     elif test(amount_abs*5):
  11.         mod = 1
  12.     else:
  13.         mod = 0
  14.     if amount < 0:
  15.         mod = -mod
  16. else:
  17.     mod = amount
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement