<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://nethackwiki.com/index.php?action=history&amp;feed=atom&amp;title=Rnl</id>
	<title>Rnl - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://nethackwiki.com/index.php?action=history&amp;feed=atom&amp;title=Rnl"/>
	<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=Rnl&amp;action=history"/>
	<updated>2026-06-04T06:19:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.32.5</generator>
	<entry>
		<id>https://nethackwiki.com/index.php?title=Rnl&amp;diff=201555&amp;oldid=prev</id>
		<title>Ardub23: NHW:Style guide#Capitalization – The game doesn't capitalize 'luck'</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=Rnl&amp;diff=201555&amp;oldid=prev"/>
		<updated>2026-04-12T22:13:54Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/wiki/NetHackWiki:Style_guide#Capitalization&quot; title=&quot;NetHackWiki:Style guide&quot;&gt;NHW:Style guide#Capitalization&lt;/a&gt; – The game doesn&amp;#039;t capitalize &amp;#039;luck&amp;#039;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 22:13, 12 April 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{DISPLAYTITLE:rnl}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{DISPLAYTITLE:rnl}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{distinguish|rn1}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{distinguish|rn1}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;)'''{{refsrc|src/rnd.c|116|nethack=3.6.6|name=main}} is a pseudo-random number function used in ''NetHack'' when a result should be weighted by [[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck&lt;/del&gt;]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;)'''{{refsrc|src/rnd.c|116|nethack=3.6.6|name=main}} is a pseudo-random number function used in ''NetHack'' when a result should be weighted by &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;the player character's &lt;/ins&gt;[[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck&lt;/ins&gt;]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;) has the same range as rn2(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;) (that is, 0&amp;amp;nbsp;&amp;amp;le; rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;)&amp;amp;nbsp;&amp;amp;lt;&amp;amp;nbsp;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;), but is weighted toward 0 if you have positive &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck&lt;/del&gt;, and toward &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&amp;amp;nbsp;&amp;amp;minus;&amp;amp;nbsp;1 if you have negative &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;) has the same range as rn2(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;) (that is, 0&amp;amp;nbsp;&amp;amp;le; rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;)&amp;amp;nbsp;&amp;amp;lt;&amp;amp;nbsp;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;), but is weighted toward 0 if you have positive &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck&lt;/ins&gt;, and toward &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&amp;amp;nbsp;&amp;amp;minus;&amp;amp;nbsp;1 if you have negative &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Formula ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Formula ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l9&quot; &gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;See source code in &amp;lt;ref name=main/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;See source code in &amp;lt;ref name=main/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;), let &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; equal your &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck&lt;/del&gt;, including the [[luck item]] bonus or penalty, whether positive, negative, or zero.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;), let &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; equal your &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck&lt;/ins&gt;, including the [[luck item]] bonus or penalty, whether positive, negative, or zero.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; &amp;amp;le; 15, &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; = {{frac|&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt;|3}}, rounded toward the nearest integer.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; &amp;amp;le; 15, &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; = {{frac|&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt;|3}}, rounded toward the nearest integer.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l19&quot; &gt;Line 19:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 19:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Otherwise, return rn2(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;) - &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt;, but no less than 0 and no more than &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; - 1.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Otherwise, return rn2(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;) - &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt;, but no less than 0 and no more than &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; - 1.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This means that rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;) is almost always equivalent to rn2(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;) &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;- Luck &lt;/del&gt;when &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; &amp;gt; 15. The chance of &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck &lt;/del&gt;being ignored is less than 3% in any case, and even smaller for stronger (positive or negative) &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck&lt;/del&gt;. For smaller values of &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;, rn2(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;) - {{sfrac|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck&lt;/del&gt;|3}} is the most likely approximation.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This means that rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;) is almost always equivalent to rn2(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;) &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;− luck &lt;/ins&gt;when &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; &amp;gt; 15. The chance of &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck &lt;/ins&gt;being ignored is less than 3% in any case, and even smaller for stronger (positive or negative) &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck&lt;/ins&gt;. For smaller values of &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;, rn2(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;) - {{sfrac|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck&lt;/ins&gt;|3}} is the most likely approximation.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== How it's used ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== How it's used ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l25&quot; &gt;Line 25:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 25:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In the tables below, some very high (99.8%) and very low (0.2%) values above are rounded to 100% or 0%. Nothing is completely 100% or 0% likely, except where spelled out as &amp;quot;certain&amp;quot; or &amp;quot;impossible&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In the tables below, some very high (99.8%) and very low (0.2%) values above are rounded to 100% or 0%. Nothing is completely 100% or 0% likely, except where spelled out as &amp;quot;certain&amp;quot; or &amp;quot;impossible&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Events based solely on &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck &lt;/del&gt;===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Events based solely on &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck &lt;/ins&gt;===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l117&quot; &gt;Line 117:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 117:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Events based on &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck &lt;/del&gt;and other stats ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Events based on &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck &lt;/ins&gt;and other stats ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l126&quot; &gt;Line 126:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 126:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Chance of kicking down a door&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Chance of kicking down a door&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| &amp;lt;code&amp;gt;rnl(35)&amp;lt;X&amp;lt;/code&amp;gt;, where X = avg(str, dex, con) + (dex if [[Samurai]] or [[Monk]]){{refsrc|dokick.c|1046}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| &amp;lt;code&amp;gt;rnl(35)&amp;lt;X&amp;lt;/code&amp;gt;, where X = avg(str, dex, con) + (dex if [[Samurai]] or [[Monk]]){{refsrc|dokick.c|1046}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| colspan=&amp;quot;9&amp;quot;| Approx {{sfrac|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;var&amp;gt;Luck&amp;lt;/var&amp;gt; &lt;/del&gt;+ X|35}} chance&amp;lt;!-- computed numbers slightly incorrect --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| colspan=&amp;quot;9&amp;quot;| Approx {{sfrac|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck &lt;/ins&gt;+ X|35}} chance&amp;lt;!-- computed numbers slightly incorrect --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Chance of kicking down a door when avg(str, dex, con) is 10&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Chance of kicking down a door when avg(str, dex, con) is 10&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l140&quot; &gt;Line 140:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 140:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Chance of opening a door&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Chance of opening a door&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| &amp;lt;code&amp;gt;rnl(20)&amp;lt;X&amp;lt;/code&amp;gt;, where X = avg(str, dex, con){{refsrc|lock.c|562}} || colspan=&amp;quot;9&amp;quot;|Approx {{sfrac|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;var&amp;gt;Luck&amp;lt;/var&amp;gt; &lt;/del&gt;+ X|20}} chance&amp;lt;ref&amp;gt;computed numbers slightly incorrect&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| &amp;lt;code&amp;gt;rnl(20)&amp;lt;X&amp;lt;/code&amp;gt;, where X = avg(str, dex, con){{refsrc|lock.c|562}} || colspan=&amp;quot;9&amp;quot;|Approx {{sfrac|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck &lt;/ins&gt;+ X|20}} chance&amp;lt;ref&amp;gt;computed numbers slightly incorrect&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Chance of opening a door when avg(str, dex, con) is 10&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Chance of opening a door when avg(str, dex, con) is 10&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l220&quot; &gt;Line 220:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 220:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Mathematical analysis ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Mathematical analysis ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Basically, rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;) generates a number between 0 and &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&amp;amp;nbsp;&amp;amp;minus;&amp;amp;nbsp;1, and adjusts it in proportion to the player's &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck&lt;/del&gt;, with a small chance (which is smaller when &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck &lt;/del&gt;tends toward the extremes) of leaving it alone. The net effect is that with positive or negative &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck&lt;/del&gt;, the highest or lowest numbers on the list become vanishingly unlikely, and the odds of getting the best and worst result increase, while the odds of getting every result in between stays the same.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Basically, rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;) generates a number between 0 and &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&amp;amp;nbsp;&amp;amp;minus;&amp;amp;nbsp;1, and adjusts it in proportion to the player's &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck&lt;/ins&gt;, with a small chance (which is smaller when &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck &lt;/ins&gt;tends toward the extremes) of leaving it alone. The net effect is that with positive or negative &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck&lt;/ins&gt;, the highest or lowest numbers on the list become vanishingly unlikely, and the odds of getting the best and worst result increase, while the odds of getting every result in between stays the same.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Further complicating the matter is that, when &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; is 15 or less, the adjustment is divided by 3, which means that for those calls there is a stepwise distribution where the odds of everything are almost completely the same within blocks of 3 numbers (&amp;amp;minus;13 to &amp;amp;minus;11, &amp;amp;minus;10 to &amp;amp;minus;8, &amp;amp;minus;7 to &amp;amp;minus;5, &amp;amp;minus;4 to &amp;amp;minus;2, &amp;amp;minus;1 to 1, 2 to 4, 5 to 7, 8 to 10, 11 to 13). Larger parameters have smoother distributions.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Further complicating the matter is that, when &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; is 15 or less, the adjustment is divided by 3, which means that for those calls there is a stepwise distribution where the odds of everything are almost completely the same within blocks of 3 numbers (&amp;amp;minus;13 to &amp;amp;minus;11, &amp;amp;minus;10 to &amp;amp;minus;8, &amp;amp;minus;7 to &amp;amp;minus;5, &amp;amp;minus;4 to &amp;amp;minus;2, &amp;amp;minus;1 to 1, 2 to 4, 5 to 7, 8 to 10, 11 to 13). Larger parameters have smoother distributions.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l226&quot; &gt;Line 226:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 226:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In addition, the function often being called in unusual manners, such as comparing it to a non-zero constant, which results in a &amp;quot;slice&amp;quot; being taken from the distribution graph at a less easily explainable point.  This is evidenced in the distrubtions for rnl(A)&amp;amp;lt;B or rnl(A)&amp;amp;gt;B above.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In addition, the function often being called in unusual manners, such as comparing it to a non-zero constant, which results in a &amp;quot;slice&amp;quot; being taken from the distribution graph at a less easily explainable point.  This is evidenced in the distrubtions for rnl(A)&amp;amp;lt;B or rnl(A)&amp;amp;gt;B above.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Since many of the comparisons are made against 0, having even &amp;amp;minus;2 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck &lt;/del&gt;can cause many results to swing against the player's favor with near certainty. &amp;amp;minus;1 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck &lt;/del&gt;is not as bad as most of these calls also have a small parameter, although it does negatively affect many things that do not call rnl (like [[prayer]] or [[wish]]ing). On the flip side, positive &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck&lt;/del&gt;'s effect tends to be much less dramatic, and +2 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck &lt;/del&gt;still has a lot of room for improvement. +1 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck &lt;/del&gt;changes almost nothing significantly; the only pronounced effect it has is to cause jousting to be much safer.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Since many of the comparisons are made against 0, having even &amp;amp;minus;2 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck &lt;/ins&gt;can cause many results to swing against the player's favor with near certainty. &amp;amp;minus;1 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck &lt;/ins&gt;is not as bad as most of these calls also have a small parameter, although it does negatively affect many things that do not call rnl (like [[prayer]] or [[wish]]ing). On the flip side, positive &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck&lt;/ins&gt;'s effect tends to be much less dramatic, and +2 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck &lt;/ins&gt;still has a lot of room for improvement. +1 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck &lt;/ins&gt;changes almost nothing significantly; the only pronounced effect it has is to cause jousting to be much safer.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Sample distribution ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Sample distribution ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This table is the computed odds of rnl(10) at each possible &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck &lt;/del&gt;for each possible result. The &amp;quot;0%&amp;quot; values are actually around 0.24–0.26% depending on the magnitude of the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This table is the computed odds of rnl(10) at each possible &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck &lt;/ins&gt;for each possible result. The &amp;quot;0%&amp;quot; values are actually around 0.24–0.26% depending on the magnitude of the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l299&quot; &gt;Line 299:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 299:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Let &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; be a random integer number from 0 to &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&amp;amp;nbsp;&amp;amp;minus;&amp;amp;nbsp;1 (inclusive).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Let &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; be a random integer number from 0 to &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&amp;amp;nbsp;&amp;amp;minus;&amp;amp;nbsp;1 (inclusive).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck&amp;amp;nbsp;=&amp;amp;nbsp;&lt;/del&gt;0, &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; is returned.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck equals &lt;/ins&gt;0, &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; is returned.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Otherwise, with {{sfrac|1|50 &amp;amp;minus; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck&lt;/del&gt;}} chance (since &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck &lt;/del&gt;ranges from &amp;amp;minus;13 to 13, the chance should be between {{sfrac|37}} and {{sfrac|63}}), &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; is returned.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Otherwise, with {{sfrac|1|50 &amp;amp;minus; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck&lt;/ins&gt;}} chance (since &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck &lt;/ins&gt;ranges from &amp;amp;minus;13 to 13, the chance should be between {{sfrac|37}} and {{sfrac|63}}), &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; is returned.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Otherwise, if &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&amp;amp;nbsp;&amp;amp;le;&amp;amp;nbsp; 15 and &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck&lt;/del&gt;&amp;amp;nbsp;&amp;amp;ge;&amp;amp;nbsp;&amp;amp;minus;5 (that is, &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; is not too big and the player is not too unlucky), {{sfrac|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck&lt;/del&gt;|3}} (truncated towards zero) is subtracted from &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, then &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; is forced into the interval [0, &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&amp;amp;nbsp;&amp;amp;minus;&amp;amp;nbsp;1] and returned.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Otherwise, if &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&amp;amp;nbsp;&amp;amp;le;&amp;amp;nbsp; 15 and &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck&lt;/ins&gt;&amp;amp;nbsp;&amp;amp;ge;&amp;amp;nbsp;&amp;amp;minus;5 (that is, &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; is not too big and the player is not too unlucky), {{sfrac|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck&lt;/ins&gt;|3}} (truncated towards zero) is subtracted from &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, then &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; is forced into the interval [0, &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&amp;amp;nbsp;&amp;amp;minus;&amp;amp;nbsp;1] and returned.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Otherwise, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck &lt;/del&gt;is subtracted from &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, then &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; is forced into the interval [0, &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&amp;amp;nbsp;&amp;amp;minus;&amp;amp;nbsp;1] and returned.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Otherwise, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;luck &lt;/ins&gt;is subtracted from &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, then &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; is forced into the interval [0, &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&amp;amp;nbsp;&amp;amp;minus;&amp;amp;nbsp;1] and returned.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== References ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== References ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ardub23</name></author>
		
	</entry>
	<entry>
		<id>https://nethackwiki.com/index.php?title=Rnl&amp;diff=173833&amp;oldid=prev</id>
		<title>Furey: 37 references. 35 of them are to NetHack 3.4.3 source code. Article has no version tag. It is {{nethack-343}}.</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=Rnl&amp;diff=173833&amp;oldid=prev"/>
		<updated>2024-07-03T01:55:09Z</updated>

		<summary type="html">&lt;p&gt;37 references. 35 of them are to NetHack 3.4.3 source code. Article has no version tag. It is {{nethack-343}}.&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 01:55, 3 July 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l312&quot; &gt;Line 312:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 312:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Random number functions]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Random number functions]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{nethack-343}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Furey</name></author>
		
	</entry>
	<entry>
		<id>https://nethackwiki.com/index.php?title=Rnl&amp;diff=145293&amp;oldid=prev</id>
		<title>Cathartes: untrapping can specifically pacify non-@, not non-human</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=Rnl&amp;diff=145293&amp;oldid=prev"/>
		<updated>2022-04-02T00:57:16Z</updated>

		<summary type="html">&lt;p&gt;untrapping can specifically pacify non-@, not non-human&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 00:57, 2 April 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l96&quot; &gt;Line 96:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 96:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| 99.5% || 99.5% || 99.5% || 99.5% || 80.0% || 60.5% || 41.0% || 21.5% || 2.0%&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| 99.5% || 99.5% || 99.5% || 99.5% || 80.0% || 60.5% || 41.0% || 21.5% || 2.0%&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Chance of a hostile, awake, unfrozen, mindful, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;nonhuman &lt;/del&gt;monster becoming peaceful when you free it from a trap not set by you&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Chance of a hostile, awake, unfrozen, mindful, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;non-{{monclasssym|@}} &lt;/ins&gt;monster becoming peaceful when you free it from a trap not set by you&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| &amp;lt;code&amp;gt;rnl(10)&amp;lt;8&amp;lt;/code&amp;gt;{{refsrc|trap.c|3166}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| &amp;lt;code&amp;gt;rnl(10)&amp;lt;8&amp;lt;/code&amp;gt;{{refsrc|trap.c|3166}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| 40.1% || 50.8% || 60.5% || 70.3% || 80.0% || 89.7% || 99.5% || 99.5% || 99.5%&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| 40.1% || 50.8% || 60.5% || 70.3% || 80.0% || 89.7% || 99.5% || 99.5% || 99.5%&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Cathartes</name></author>
		
	</entry>
	<entry>
		<id>https://nethackwiki.com/index.php?title=Rnl&amp;diff=145120&amp;oldid=prev</id>
		<title>Cathartes: &quot;adjustment&quot; is rounded toward nearest integer, not 0</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=Rnl&amp;diff=145120&amp;oldid=prev"/>
		<updated>2022-03-27T15:46:06Z</updated>

		<summary type="html">&lt;p&gt;&amp;quot;adjustment&amp;quot; is rounded toward nearest integer, not 0&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 15:46, 27 March 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{DISPLAYTITLE:rnl}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{DISPLAYTITLE:rnl}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{distinguish|rn1}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{distinguish|rn1}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;)'''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;ref name=main&amp;gt;&lt;/del&gt;{{&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;function&lt;/del&gt;|rnd.c|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;rnl&lt;/del&gt;}}&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/ref&amp;gt; &lt;/del&gt;is a pseudo-random number function used in ''NetHack'' when a result should be weighted by [[Luck]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;)'''{{&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;refsrc&lt;/ins&gt;|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;src/&lt;/ins&gt;rnd.c|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;116|nethack=3.6.6|name=main&lt;/ins&gt;}} is a pseudo-random number function used in ''NetHack'' when a result should be weighted by [[Luck]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;) has the same range as rn2(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;) (that is, 0&amp;amp;nbsp;&amp;amp;le; rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;)&amp;amp;nbsp;&amp;amp;lt;&amp;amp;nbsp;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;), but is weighted toward 0 if you have positive Luck, and toward &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&amp;amp;nbsp;&amp;amp;minus;&amp;amp;nbsp;1 if you have negative Luck.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;) has the same range as rn2(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;) (that is, 0&amp;amp;nbsp;&amp;amp;le; rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;)&amp;amp;nbsp;&amp;amp;lt;&amp;amp;nbsp;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;), but is weighted toward 0 if you have positive Luck, and toward &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&amp;amp;nbsp;&amp;amp;minus;&amp;amp;nbsp;1 if you have negative Luck.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l11&quot; &gt;Line 11:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;), let &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; equal your Luck, including the [[luck item]] bonus or penalty, whether positive, negative, or zero.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;), let &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; equal your Luck, including the [[luck item]] bonus or penalty, whether positive, negative, or zero.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; &amp;amp;le; 15, &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; = {{frac|&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt;|3}}, rounded toward &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;zero&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; &amp;amp;le; 15, &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; = {{frac|&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt;|3}}, rounded toward &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;the nearest integer&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; = 0, return [[rn2]](&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; = 0, return [[rn2]](&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Cathartes</name></author>
		
	</entry>
	<entry>
		<id>https://nethackwiki.com/index.php?title=Rnl&amp;diff=144861&amp;oldid=prev</id>
		<title>Darth l33t: /* Formula */ rewrite to clarify and remove redundancy</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=Rnl&amp;diff=144861&amp;oldid=prev"/>
		<updated>2022-03-08T20:17:21Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Formula: &lt;/span&gt; rewrite to clarify and remove redundancy&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 20:17, 8 March 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l9&quot; &gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;See source code in &amp;lt;ref name=main/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;See source code in &amp;lt;ref name=main/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Let &lt;/del&gt;&amp;lt;var&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;R&lt;/del&gt;&amp;lt;/var&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;be a random integer number from 0 to x&amp;amp;nbsp;&amp;amp;minus;&amp;amp;nbsp;1 (inclusive&lt;/del&gt;).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;For rnl(&lt;/ins&gt;&amp;lt;var&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;x&lt;/ins&gt;&amp;lt;/var&amp;gt;)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, let &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; equal your Luck, including the [[luck item]] bonus or penalty, whether positive, negative, or zero&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If &amp;lt;var&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Luck&lt;/del&gt;&amp;lt;/var&amp;gt;&amp;amp;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;nbsp&lt;/del&gt;;=&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;nbsp;0, &lt;/del&gt;&amp;lt;var&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;R&lt;/del&gt;&amp;lt;/var&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is returned&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If &amp;lt;var&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;x&lt;/ins&gt;&amp;lt;/var&amp;gt; &amp;amp;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;le&lt;/ins&gt;; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;15, &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; &lt;/ins&gt;= &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;{{frac|&lt;/ins&gt;&amp;lt;var&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;L&lt;/ins&gt;&amp;lt;/var&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|3}}, rounded toward zero&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Otherwise, let &lt;/del&gt;&amp;lt;var&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;A&lt;/del&gt;&amp;lt;/var&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;be&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;If &lt;/ins&gt;&amp;lt;var&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;L&lt;/ins&gt;&amp;lt;/var&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;= 0&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;return [[rn2]](&lt;/ins&gt;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;* {{sfrac|&amp;lt;var&amp;gt;Luck&amp;lt;/var&amp;gt;|3}} rounded to the closest integer&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;if &lt;/del&gt;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;nbsp;&amp;amp;le;&amp;amp;nbsp;15 (in this case &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; ranges from &amp;amp;minus;4 to 4&lt;/del&gt;)&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;* &amp;lt;var&amp;gt;Luck&amp;lt;/var&amp;gt;, otherwise&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;If &lt;/del&gt;&amp;lt;var&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;A&lt;/del&gt;&amp;lt;/var&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;nbsp;=&amp;amp;nbsp;0&lt;/del&gt;, &amp;lt;var&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;R&lt;/del&gt;&amp;lt;/var&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is returned&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;With chance {{sfrac|1|37 + {{!}}&lt;/ins&gt;&amp;lt;var&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;L&lt;/ins&gt;&amp;lt;/var&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;{{!}}}}&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;return rn2(&lt;/ins&gt;&amp;lt;var&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;x&lt;/ins&gt;&amp;lt;/var&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;)&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Otherwise, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;with chance {{sfrac|1|37+{{!}}A{{!}}}}&lt;/del&gt;, &amp;lt;var&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;R&lt;/del&gt;&amp;lt;/var&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is still returned (the chance is always between {{sfrac|38}} and {{sfrac|50}})&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Otherwise, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;return rn2(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;) - &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt;&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;but no less than 0 and no more than &lt;/ins&gt;&amp;lt;var&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;x&lt;/ins&gt;&amp;lt;/var&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;- 1&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Otherwise, &lt;/del&gt;&amp;lt;var&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;R&amp;lt;/var&amp;gt;&amp;amp;nbsp;&amp;amp;minus;&amp;amp;nbsp;&amp;lt;var&amp;gt;A&lt;/del&gt;&amp;lt;/var&amp;gt; is &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;forced into the interval [0, &lt;/del&gt;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;nbsp;&amp;amp;minus;&amp;amp;nbsp;1] and returned.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;This means that rnl(&lt;/ins&gt;&amp;lt;var&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;x&lt;/ins&gt;&amp;lt;/var&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;) &lt;/ins&gt;is &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;almost always equivalent to rn2(&lt;/ins&gt;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;) - &lt;/ins&gt;Luck &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;when &lt;/ins&gt;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt; &lt;/ins&gt;15&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;. The chance of Luck being ignored is less than 3% &lt;/ins&gt;in &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;any case&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;and even smaller for stronger (positive or negative) Luck. For smaller values of &lt;/ins&gt;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;rn2&lt;/ins&gt;(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;) - &lt;/ins&gt;{{sfrac|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Luck&lt;/ins&gt;|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;3&lt;/ins&gt;}} &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;is &lt;/ins&gt;the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;most likely approximation&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;This means that for &lt;/del&gt;Luck &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;in the interval [&amp;amp;minus;1,1] and &lt;/del&gt;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;nbsp;&amp;amp;le;&amp;amp;nbsp;&lt;/del&gt;15&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, rnl just returns a random integer &lt;/del&gt;in &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the interval [0&lt;/del&gt;, &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;nbsp;&amp;amp;minus;&amp;amp;nbsp;1] (because &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt;&amp;amp;nbsp;=&amp;amp;nbsp;0). For Luck of &amp;amp;minus;2 or worse, however&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;rnl has a tiny chance of returning 0 &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;between {{sfrac|1|38&lt;/del&gt;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;}} and &lt;/del&gt;{{sfrac|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;1&lt;/del&gt;|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;50&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&lt;/del&gt;}}&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, depending on Luck). For Luck of 2 or better, the chance of returning 0 increases significantly.  For example, if &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&amp;amp;nbsp;=&amp;amp;nbsp;10, &lt;/del&gt;the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;chance will be 10% for Luck between &amp;amp;minus;1 and 1, about 20% for Luck of 2 to 4, and about 49% for Luck of 11 to 13&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== How it's used ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== How it's used ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Darth l33t</name></author>
		
	</entry>
	<entry>
		<id>https://nethackwiki.com/index.php?title=Rnl&amp;diff=141224&amp;oldid=prev</id>
		<title>Actual-nh: /* Events based on Luck and other stats */ Grammar/style</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=Rnl&amp;diff=141224&amp;oldid=prev"/>
		<updated>2021-06-27T01:29:24Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Events based on Luck and other stats: &lt;/span&gt; Grammar/style&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 01:29, 27 June 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l128&quot; &gt;Line 128:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 128:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;!&amp;amp;minus;11 !! &amp;amp;minus;8 !! &amp;amp;minus;5 !! &amp;amp;minus;2 !! 0 !! +2 !! +5 !! +8 !! +11&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;!&amp;amp;minus;11 !! &amp;amp;minus;8 !! &amp;amp;minus;5 !! &amp;amp;minus;2 !! 0 !! +2 !! +5 !! +8 !! +11&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Chance &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;that &lt;/del&gt;of kicking down a door&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Chance of kicking down a door&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| &amp;lt;code&amp;gt;rnl(35)&amp;lt;X&amp;lt;/code&amp;gt;, where X = avg(str, dex, con) + (dex if [[Samurai]] or [[Monk]]){{refsrc|dokick.c|1046}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| &amp;lt;code&amp;gt;rnl(35)&amp;lt;X&amp;lt;/code&amp;gt;, where X = avg(str, dex, con) + (dex if [[Samurai]] or [[Monk]]){{refsrc|dokick.c|1046}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| colspan=&amp;quot;9&amp;quot;| Approx {{sfrac|&amp;lt;var&amp;gt;Luck&amp;lt;/var&amp;gt; + X|35}} chance&amp;lt;!-- computed numbers slightly incorrect --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| colspan=&amp;quot;9&amp;quot;| Approx {{sfrac|&amp;lt;var&amp;gt;Luck&amp;lt;/var&amp;gt; + X|35}} chance&amp;lt;!-- computed numbers slightly incorrect --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Actual-nh</name></author>
		
	</entry>
	<entry>
		<id>https://nethackwiki.com/index.php?title=Rnl&amp;diff=135767&amp;oldid=prev</id>
		<title>YakumoRising: /* Mathematical analysis */</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=Rnl&amp;diff=135767&amp;oldid=prev"/>
		<updated>2020-08-20T23:42:15Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Mathematical analysis&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 23:42, 20 August 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l226&quot; &gt;Line 226:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 226:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Basically, rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;) generates a number between 0 and &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&amp;amp;nbsp;&amp;amp;minus;&amp;amp;nbsp;1, and adjusts it in proportion to the player's Luck, with a small chance (which is smaller when Luck tends toward the extremes) of leaving it alone. The net effect is that with positive or negative Luck, the highest or lowest numbers on the list become vanishingly unlikely, and the odds of getting the best and worst result increase, while the odds of getting every result in between stays the same.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Basically, rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;) generates a number between 0 and &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&amp;amp;nbsp;&amp;amp;minus;&amp;amp;nbsp;1, and adjusts it in proportion to the player's Luck, with a small chance (which is smaller when Luck tends toward the extremes) of leaving it alone. The net effect is that with positive or negative Luck, the highest or lowest numbers on the list become vanishingly unlikely, and the odds of getting the best and worst result increase, while the odds of getting every result in between stays the same.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Further complicating the matter is that, when &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; is 15 or less, the adjustment is divided by 3, which means that for those calls there is a stepwise distribution where the odds of everything are completely the same within blocks of 3 numbers (&amp;amp;minus;13 to &amp;amp;minus;11, &amp;amp;minus;10 to &amp;amp;minus;8, &amp;amp;minus;7 to &amp;amp;minus;5, &amp;amp;minus;4 to &amp;amp;minus;2, &amp;amp;minus;1 to 1, 2 to 4, 5 to 7, 8 to 10, 11 to 13). Larger parameters have smoother distributions.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Further complicating the matter is that, when &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; is 15 or less, the adjustment is divided by 3, which means that for those calls there is a stepwise distribution where the odds of everything are &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;almost &lt;/ins&gt;completely the same within blocks of 3 numbers (&amp;amp;minus;13 to &amp;amp;minus;11, &amp;amp;minus;10 to &amp;amp;minus;8, &amp;amp;minus;7 to &amp;amp;minus;5, &amp;amp;minus;4 to &amp;amp;minus;2, &amp;amp;minus;1 to 1, 2 to 4, 5 to 7, 8 to 10, 11 to 13). Larger parameters have smoother distributions.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In addition, the function often being called in unusual manners, such as comparing it to a non-zero constant, which results in a &amp;quot;slice&amp;quot; being taken from the distribution graph at a less easily explainable point.  This is evidenced in the distrubtions for rnl(A)&amp;amp;lt;B or rnl(A)&amp;amp;gt;B above.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In addition, the function often being called in unusual manners, such as comparing it to a non-zero constant, which results in a &amp;quot;slice&amp;quot; being taken from the distribution graph at a less easily explainable point.  This is evidenced in the distrubtions for rnl(A)&amp;amp;lt;B or rnl(A)&amp;amp;gt;B above.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>YakumoRising</name></author>
		
	</entry>
	<entry>
		<id>https://nethackwiki.com/index.php?title=Rnl&amp;diff=133190&amp;oldid=prev</id>
		<title>RedFeather: /* Events based solely on Luck */ Corrected formula for wiz</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=Rnl&amp;diff=133190&amp;oldid=prev"/>
		<updated>2020-03-31T23:01:31Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Events based solely on Luck: &lt;/span&gt; Corrected formula for wiz&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 23:01, 31 March 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l45&quot; &gt;Line 45:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 45:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Chance of [[Magic marker|writing]] a scroll you have not seen, as a [[Wizard]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Chance of [[Magic marker|writing]] a scroll you have not seen, as a [[Wizard]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| &amp;lt;code&amp;gt;rnl(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;3&lt;/del&gt;)==0&amp;lt;/code&amp;gt;{{refsrc|write.c|201}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| &amp;lt;code&amp;gt;rnl(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;5&lt;/ins&gt;)==0&amp;lt;/code&amp;gt;{{refsrc|write.c|201}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| 0.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;8&lt;/del&gt;% || 0.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;8&lt;/del&gt;% || 0.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;9&lt;/del&gt;% || 0.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;9&lt;/del&gt;% || &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;33&lt;/del&gt;.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;3&lt;/del&gt;% || &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;65&lt;/del&gt;.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;8&lt;/del&gt;% || &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;98&lt;/del&gt;.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;3&lt;/del&gt;% || &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;98&lt;/del&gt;.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;3&lt;/del&gt;% || 98.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;3&lt;/del&gt;%&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| 0.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;5&lt;/ins&gt;% || 0.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;5&lt;/ins&gt;% || 0.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;5&lt;/ins&gt;% || 0.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;5&lt;/ins&gt;% || &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;20&lt;/ins&gt;.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;0&lt;/ins&gt;% || &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;39&lt;/ins&gt;.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;5&lt;/ins&gt;% || &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;59&lt;/ins&gt;.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;0&lt;/ins&gt;% || &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;78&lt;/ins&gt;.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;5&lt;/ins&gt;% || 98.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;0&lt;/ins&gt;%&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Chance of failing to set a [[land mine]] (in which case it blows up) or [[beartrap]] (nothing happens) while [[riding]] and [[Skill|unskilled]] at riding&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Chance of failing to set a [[land mine]] (in which case it blows up) or [[beartrap]] (nothing happens) while [[riding]] and [[Skill|unskilled]] at riding&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>RedFeather</name></author>
		
	</entry>
	<entry>
		<id>https://nethackwiki.com/index.php?title=Rnl&amp;diff=131608&amp;oldid=prev</id>
		<title>Ardub23: {{distinguish}} for hatnote</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=Rnl&amp;diff=131608&amp;oldid=prev"/>
		<updated>2020-01-28T04:35:56Z</updated>

		<summary type="html">&lt;p&gt;{{distinguish}} for hatnote&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 04:35, 28 January 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{DISPLAYTITLE:rnl}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{DISPLAYTITLE:rnl}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;: ''Not to be confused with [[&lt;/del&gt;rn1&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;]].&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;{{distinguish|&lt;/ins&gt;rn1&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;)'''&amp;lt;ref name=main&amp;gt;{{function|rnd.c|rnl}}&amp;lt;/ref&amp;gt; is a pseudo-random number function used in ''NetHack'' when a result should be weighted by [[Luck]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''rnl(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;)'''&amp;lt;ref name=main&amp;gt;{{function|rnd.c|rnl}}&amp;lt;/ref&amp;gt; is a pseudo-random number function used in ''NetHack'' when a result should be weighted by [[Luck]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ardub23</name></author>
		
	</entry>
	<entry>
		<id>https://nethackwiki.com/index.php?title=Rnl&amp;diff=131355&amp;oldid=prev</id>
		<title>Ardub23: Formatting fixes and layout improvements (split the big table into three); more consistent wording</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=Rnl&amp;diff=131355&amp;oldid=prev"/>
		<updated>2020-01-23T23:31:05Z</updated>

		<summary type="html">&lt;p&gt;Formatting fixes and layout improvements (split the big table into three); more consistent wording&lt;/p&gt;
&lt;a href=&quot;https://nethackwiki.com/index.php?title=Rnl&amp;amp;diff=131355&amp;amp;oldid=104702&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Ardub23</name></author>
		
	</entry>
</feed>