1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- # _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':
- !!Trait ''Everything is new again'', gained from the cursed school boy start
- if csb_start = 1 and daystart <= 84: result = 30 * difficulty
- if csb_start = 0: 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 ---------------------------------
|