<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sycarion Diversions &#187; perl</title>
	<atom:link href="http://www.sycarion.com/tag/perl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sycarion.com</link>
	<description>All Kinds of Fun!</description>
	<lastBuildDate>Sat, 28 Jan 2012 16:34:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Tiny Dungeons Project</title>
		<link>http://www.sycarion.com/tiny-dungeons-project/</link>
		<comments>http://www.sycarion.com/tiny-dungeons-project/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 15:11:14 +0000</pubDate>
		<dc:creator>John Payne</dc:creator>
				<category><![CDATA[Electrum Pieces]]></category>
		<category><![CDATA[Microlite 20]]></category>
		<category><![CDATA[critters]]></category>
		<category><![CDATA[M20]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.sycarion.com/?p=285</guid>
		<description><![CDATA[Over on the M20 boards, they are discussing a Tiny Dungeons Project. Part of it mentions the critters.pl script greywulf hosted on the old m20 site. I couldn&#8217;t find the original, but I found my modified script for M20 (my other post has it modified for Action!). CODE: #!/usr/bin/perl srand(time ^ $$ ^ unpack &#8220;%L*&#8221;, [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.sycarion.com/tiny-dungeons-project/' addthis:title='Tiny Dungeons Project' ><a class="addthis_button_facebook_like"></a><a class="addthis_button_email"></a><a class="addthis_button_twitter"></a><a class="addthis_button_printfriendly"></a><a class="addthis_button_google_plusone"></a></div>]]></description>
			<content:encoded><![CDATA[<p>Over on the M20 boards, they are discussing a <a href="http://www.forum.koboldenterprise.com/index.php?topic=587.0">Tiny Dungeons Project</a>.</p>
<p>Part of it mentions the critters.pl script greywulf hosted on the old m20 site. I couldn&#8217;t find the original, but I found my modified script for M20 (my other post has it modified for Action!).</p>
<p>CODE:</p>
<blockquote><p>#!/usr/bin/perl<br />
srand(time ^ $$ ^ unpack &#8220;%L*&#8221;, &#8216;ps axww | gzip&#8217;);<br />
$usage=&#8221;usage: $0 number maxhd\n&#8221;;<br />
$ARGV[0]=~/^(\d+)$/ &amp;&amp; ($numb = $1) || die $usage;<br />
$ARGV[1]=~/^(\d+)$/ &amp;&amp; ($maxhd = $1) || die $usage;<br />
%rule = (<br />
&#8216;W&#8217;,'VF YF YF YXF YXF YXYF B&#8217;,<br />
&#8216;B&#8217;,'PB YNF YNXF YNXF YNXYF YXYNF&#8217;,<br />
&#8216;P&#8217;,'a ambi ante circum cis co de dis ob per prae se sine sub&#8217;,<br />
&#8216;Y&#8217;,'Ca Ce Ci Co Cu Cy Da De Di Do Dy&#8217;,<br />
&#8216;X&#8217;,'Ce Ci Co o&#8217;,<br />
&#8216;V&#8217;,'a e i o u&#8217;,<br />
&#8216;F&#8217;,'Ca Ca Ca Cae Cos Com Cus Cus Cus Cus Cus Cium Cium Ces&#8217;,<br />
&#8216;C&#8217;,'b b c c ch ch d d d g g l l m m n n p p ph r r r s s s t t th th v x z Rr sH Ll&#8217;,<br />
&#8216;D&#8217;,'b b c c ch ch d d g g l l m m n n p p ph r r r s s s t t t th th v x z Rr sH Ll h qu gn pt&#8217;,<br />
&#8216;R&#8217;,'b b c c c ch ch g g p p ph t t th th&#8217;,<br />
&#8216;L&#8217;,'c ch p g f&#8217;,<br />
&#8216;H&#8217;,'c ch cl m n p ph pl pr qu t th&#8217;,<br />
&#8216;N&#8217;,'n c l r&#8217;<br />
);</p>
<p>for (1..$numb) { print &amp;parse(&#8216;W&#8217;), &#8221; : &#8220;, &amp;stats, &#8220;\n&#8221;; }</p>
<p>sub parse {<br />
$_=pop(@_);<br />
/[^A-Z]/ &amp;&amp; return $_;<br />
@TMP=split(/\s+/, $rule{$_});<br />
$_=splice(@TMP, rand @TMP, 1);<br />
for (split(&#8221;)) { print &amp;parse($_); }<br />
}</p>
<p>sub stats {<br />
$tst = int(rand()*13)+1;<br />
$hd = int(rand()*$maxhd)+1;<br />
$hp = int($hd*4.5)+int(rand()*4*$hd);<br />
$ac = 10+$hd+int(rand()*5);<br />
$tohit = $hd+int(rand()*4);<br />
$dmg = int(rand()*2)+1 . &#8216;d&#8217; . (int(rand()*6)+1)*2 . (rand&gt;0.6?&#8217;+':&#8217;-') . (int(rand()*4)+2);<br />
%weapon = ( &#8217;1&#8242; =&gt; &#8216;Bite&#8217;,<br />
&#8217;2&#8242; =&gt; &#8216;Claw&#8217;,<br />
&#8217;3&#8242; =&gt; &#8216;Talon&#8217;,<br />
&#8217;4&#8242; =&gt; &#8216;Gore&#8217;,<br />
&#8217;5&#8242; =&gt; &#8216;Slap&#8217;,<br />
&#8217;6&#8242; =&gt; &#8216;Slam&#8217;,<br />
&#8217;7&#8242; =&gt; &#8216;Sting&#8217;,<br />
&#8217;8&#8242; =&gt; &#8216;Tentacle&#8217;,<br />
&#8217;9&#8242; =&gt; &#8216;Weapon&#8217;,<br />
&#8217;10&#8242; =&gt; &#8216;Weapon&#8217;,<br />
&#8217;11&#8242; =&gt; &#8216;Weapon&#8217;,<br />
&#8217;12&#8242; =&gt; &#8216;Weapon&#8217;,<br />
&#8217;13&#8242; =&gt; &#8216;Weapon&#8217;,);<br />
$type = $weapon{$tst};<br />
#    $type = (rand&gt;0.6?&#8221;By weapon&#8221;:&#8221;Natural&#8221;);</p>
<p>return &#8220;HD$hd (${hp}hp), AC$ac, $type +$tohit ($dmg)&#8221;;<br />
}</p></blockquote>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.sycarion.com/tiny-dungeons-project/' addthis:title='Tiny Dungeons Project' ><a class="addthis_button_facebook_like"></a><a class="addthis_button_email"></a><a class="addthis_button_twitter"></a><a class="addthis_button_printfriendly"></a><a class="addthis_button_google_plusone"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.sycarion.com/tiny-dungeons-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  www.sycarion.com/tag/perl/feed/ ) in 0.37561 seconds, on Feb 7th, 2012 at 12:27 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 7th, 2012 at 1:27 pm UTC -->
