I attempted to create a setup so that passages tagged with #meditate, #meditate5, #meditate10, and #meditate20 boosted the player's focus level by 1, 5, 10, and 20 points respectively. I'm having two issues with that, however. Firstly, it would double the added value for some reason (which is why in the code below I have weird values that don't match the tag number) and secondly, after it reached the #meditate20 tag, everything would increase by twenty, regardless of what the tag was. I'm not entirely sure what's wrong.
:: StoryInit
<<set $focus to 100>>
:: StoryCaption
<<nobr>><<if visitedTags("meditate")>>
<<set $focus to $focus += 1>>
<</if>>
<<if visitedTags("meditate5")>>
<<set $focus to $focus += 4>>
<</if>>
<<if visitedTags("meditate10")>>
<<set $focus to $focus += 5>>
<</if>>
<<if visitedTags("meditate20")>>
<<set $focus to $focus += 10>>
<</if>><</nobr>>
focus: $focus