So I have these three difficulty levels.
One of which is
$difficultyEasy
How would I make this a modifier on dice rolls BEFORE they take place later in the game? (not on the same passage for example, that way I don’t have to include the code each time there’s a dice-roll event.
Code I have tried:
<<if $difficultyEasy>> <<set $roll to -=10>>Bonus Dice Roll of -10!<</if>>
So it affects this later on in the game etc.
<span id='dice-button'><<button 'Melee!'>>
<<set $roll to random(0, 60)>>
<<if $roll gte $pcStats.mel>>
<<replace '#dice-outcome'>>
You rolled $roll!
You got hit!
<</replace>>
<<set $CurHP -= 10>><</if>>
<<if $CurHP lt 1>>
<<goto [[Death1]]>>
<<else>>
<<if $roll lte $pcStats.mel>>
<<set $GenemyHP -= 18>>
<<replace '#dice-outcome'>>
You rolled $roll.
You hit it!
The Thing loses 18 HP!
Enemy HP Remaining - <<print "$GenemyHP">><br><br>Player HP Remaining - <<print "$CurHP">>
<</replace>>
<<if $GenemyHP lte 0>>
<<replace '#dice-outcome'>>
You rolled a $roll.<br>
You killed it.
[[Resume|Combat Outcome]]
<</replace>>
<<replace '#dice-button'>><</replace>> /% remove button %/
<</if>>
<</if>>
<</if>>
<</button>>
</span>```