Unable to properly write multiple-condition IF statement

Twine Version: 2.3.14
Story Format: SugarCube

Hi all,

Experimenting with IF statements that involve multiple conditions, and cannot get the script below to behave as intended. The wheels come off whenever the _check result registers below the thresholds. In other words, text1, text2 and text3 all print as intended, when intended, but not text4, 5 and 6. The $visibility variable cannot be null and has been verified to be set by the time the user lands on this passage.

Thank you in advance for your input !

<<set _check to random(1, 20)>>\
You roll a _check !
<<if _check gt 14 and $visibility is "torch">>\
text1
<<elseif _check gt 12 and $visibility is "spell">>\
text2
<<elseif _check gt 12 and $visibility is "dim">>\
text3
<<elseif _check lt 15 and $visiblity is "torch">>\
text4
<<elseif _check lt 13 and $visiblity is "spell">>\
text5
<<elseif _check lt 13 and $visiblity is "dim">>\
text6
<</if>>

Spelling error in the last three condition lines.

:expressionless:

Thanks a lot, man.