|
@@ -0,0 +1,60 @@
|
|
|
+# _difficulty
|
|
|
+
|
|
|
+if difficulty = 0:
|
|
|
+ difficulty = 3
|
|
|
+end
|
|
|
+
|
|
|
+if $ARGS[0] = 'setdifficulty':
|
|
|
+ difficulty = 3
|
|
|
+ if $ARGS[1] = 'easy peasy': difficulty = 1
|
|
|
+ if $ARGS[1] = 'relaxed': difficulty = 2
|
|
|
+ if $ARGS[1] = 'hardcore': difficulty = 4
|
|
|
+end
|
|
|
+
|
|
|
+!! following function returns the current difficulty
|
|
|
+if $ARGS[0] = 'getdifficulty':
|
|
|
+ $result = 'realistic'
|
|
|
+ if difficulty = 1: $result = 'easy peasy'
|
|
|
+ if difficulty = 2: $result = 'relaxed'
|
|
|
+ if difficulty = 4: $result = 'hardcore'
|
|
|
+end &! --- getdifficulty ---
|
|
|
+
|
|
|
+
|
|
|
+!! following function returns the basic adjustment for stat gain via exp.
|
|
|
+!! hardcore: 80
|
|
|
+!! realistic: 60
|
|
|
+!! relaxed: 40
|
|
|
+!! easy peasy: 20
|
|
|
+!! use func('_difficulty','getexpadj')
|
|
|
+if $ARGS[0] = 'getexpadj':
|
|
|
+ result = 20 * difficulty
|
|
|
+end &! --- getexpadj ---
|
|
|
+
|
|
|
+!! following function adjusts money gain by difficulty.
|
|
|
+!! use func('_difficulty','addmoney', x) with x being the base amount (for 'realistic' difficulty)
|
|
|
+if $ARGS[0] = 'addmoney':
|
|
|
+ money += (ARGS[1] * (5-difficulty)) / 2
|
|
|
+end &! --- addmoney ---
|
|
|
+
|
|
|
+!! following function returns the adjusted money added (e.g. for displaying the correct amount of money earnt in texts)
|
|
|
+!! use func('_difficulty','addmoneystring', x) with x being the base amount (for 'realistic' difficulty)
|
|
|
+if $ARGS[0] = 'addmoneystring':
|
|
|
+ result = (ARGS[1] * (5-difficulty)) / 2
|
|
|
+end &! --- addmoneystring ---
|
|
|
+
|
|
|
+!! following function adjusts money spent by difficulty.
|
|
|
+!! use func('_difficulty','spendmoney', x) with x being the base amount (for 'realistic' difficulty)
|
|
|
+if $ARGS[0] = 'spendmoney':
|
|
|
+ money -= (ARGS[1] * (difficulty + 1)) / 4
|
|
|
+end &! --- spendmoney ---
|
|
|
+
|
|
|
+
|
|
|
+!! following function returns the adjusted money spent (e.g. for displaying the correct price in shops)
|
|
|
+!! use func('_difficulty','spendmoneystring', x) with x being the base amount (for 'realistic' difficulty)
|
|
|
+if $ARGS[0] = 'spendmoneystring':
|
|
|
+ result = (ARGS[1] * (difficulty + 1)) / 4
|
|
|
+end &! --- spendmoneystring ---
|
|
|
+
|
|
|
+
|
|
|
+--- _difficulty ---------------------------------
|
|
|
+
|