<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.runerealm.org/index.php?action=history&amp;feed=atom&amp;title=Module%3ABlackjack_stun_calculator</id>
	<title>Module:Blackjack stun calculator - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.runerealm.org/index.php?action=history&amp;feed=atom&amp;title=Module%3ABlackjack_stun_calculator"/>
	<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=Module:Blackjack_stun_calculator&amp;action=history"/>
	<updated>2026-05-05T15:20:32Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://wiki.runerealm.org/index.php?title=Module:Blackjack_stun_calculator&amp;diff=34426&amp;oldid=prev</id>
		<title>Alex: Created page with &quot;local p = {}  function p.main(frame) 	local args = frame:getParent().args 	 	return p.calculate(tonumber(args.max_hit), tonumber(args.hitpoints)) end  function p.calculate(max_hit, hitpoints) 	local chance = 0.0 	 	for hit = 0,max_hit do 		if hit &gt; hitpoints then 			chance = chance + (2*hit-hitpoints)/(2*hit+2)/(1+max_hit) 		else 			chance = chance + hit/(2*hitpoints+2)/(1+max_hit) 		end 	end  	return &quot;On a successful hit, the stun chance with a max hit of &#039;&#039;&#039;&quot; 	  .. tos...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=Module:Blackjack_stun_calculator&amp;diff=34426&amp;oldid=prev"/>
		<updated>2024-10-16T23:00:38Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local p = {}  function p.main(frame) 	local args = frame:getParent().args 	 	return p.calculate(tonumber(args.max_hit), tonumber(args.hitpoints)) end  function p.calculate(max_hit, hitpoints) 	local chance = 0.0 	 	for hit = 0,max_hit do 		if hit &amp;gt; hitpoints then 			chance = chance + (2*hit-hitpoints)/(2*hit+2)/(1+max_hit) 		else 			chance = chance + hit/(2*hitpoints+2)/(1+max_hit) 		end 	end  	return &amp;quot;On a successful hit, the stun chance with a max hit of &amp;#039;&amp;#039;&amp;#039;&amp;quot; 	  .. tos...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = frame:getParent().args&lt;br /&gt;
	&lt;br /&gt;
	return p.calculate(tonumber(args.max_hit), tonumber(args.hitpoints))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.calculate(max_hit, hitpoints)&lt;br /&gt;
	local chance = 0.0&lt;br /&gt;
	&lt;br /&gt;
	for hit = 0,max_hit do&lt;br /&gt;
		if hit &amp;gt; hitpoints then&lt;br /&gt;
			chance = chance + (2*hit-hitpoints)/(2*hit+2)/(1+max_hit)&lt;br /&gt;
		else&lt;br /&gt;
			chance = chance + hit/(2*hitpoints+2)/(1+max_hit)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return &amp;quot;On a successful hit, the stun chance with a max hit of &amp;#039;&amp;#039;&amp;#039;&amp;quot;&lt;br /&gt;
	  .. tostring(max_hit)&lt;br /&gt;
	  .. &amp;quot;&amp;#039;&amp;#039;&amp;#039; against a monster with &amp;#039;&amp;#039;&amp;#039;&amp;quot;&lt;br /&gt;
	  .. tostring(hitpoints) &lt;br /&gt;
	  .. &amp;quot;&amp;#039;&amp;#039;&amp;#039; hitpoints is &amp;#039;&amp;#039;&amp;#039;&amp;quot;&lt;br /&gt;
	  .. string.format(&amp;#039;%.3f%%&amp;#039;, 100 * chance)&lt;br /&gt;
	  .. &amp;quot;&amp;#039;&amp;#039;&amp;#039;.&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Alex</name></author>
	</entry>
</feed>