1
0

_difficulty.qsrc 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # _difficulty
  2. if difficulty = 0:
  3. difficulty = 3
  4. end
  5. if $ARGS[0] = 'setdifficulty':
  6. difficulty = 3
  7. if $ARGS[1] = 'easy peasy': difficulty = 1
  8. if $ARGS[1] = 'relaxed': difficulty = 2
  9. if $ARGS[1] = 'hardcore': difficulty = 4
  10. end
  11. !! following function returns the current difficulty
  12. if $ARGS[0] = 'getdifficulty':
  13. $result = 'realistic'
  14. if difficulty = 1: $result = 'easy peasy'
  15. if difficulty = 2: $result = 'relaxed'
  16. if difficulty = 4: $result = 'hardcore'
  17. end &! --- getdifficulty ---
  18. !! following function returns the basic adjustment for stat gain via exp.
  19. !! hardcore: 80
  20. !! realistic: 60
  21. !! relaxed: 40
  22. !! easy peasy: 20
  23. !! use func('_difficulty','getexpadj')
  24. if $ARGS[0] = 'getexpadj':
  25. !!Trait ''Everything is new again'', gained from the cursed school boy start
  26. if csb_start = 1 and daystart <= 84:
  27. result = 10 * difficulty
  28. else
  29. result = 20 * difficulty
  30. end
  31. end &! --- getexpadj ---
  32. !! following function adjusts money gain by difficulty.
  33. !! use func('_difficulty','addmoney', x) with x being the base amount (for 'realistic' difficulty)
  34. if $ARGS[0] = 'addmoney':
  35. money += (ARGS[1] * (5-difficulty)) / 2
  36. end &! --- addmoney ---
  37. !! following function returns the adjusted money added (e.g. for displaying the correct amount of money earnt in texts)
  38. !! use func('_difficulty','addmoneystring', x) with x being the base amount (for 'realistic' difficulty)
  39. if $ARGS[0] = 'addmoneystring':
  40. result = (ARGS[1] * (5-difficulty)) / 2
  41. end &! --- addmoneystring ---
  42. !! following function adjusts money spent by difficulty.
  43. !! use func('_difficulty','spendmoney', x) with x being the base amount (for 'realistic' difficulty)
  44. if $ARGS[0] = 'spendmoney':
  45. money -= (ARGS[1] * (difficulty + 1)) / 4
  46. end &! --- spendmoney ---
  47. !! following function returns the adjusted money spent (e.g. for displaying the correct price in shops)
  48. !! use func('_difficulty','spendmoneystring', x) with x being the base amount (for 'realistic' difficulty)
  49. if $ARGS[0] = 'spendmoneystring':
  50. result = (ARGS[1] * (difficulty + 1)) / 4
  51. end &! --- spendmoneystring ---
  52. --- _difficulty ---------------------------------