Mercurial > mamba
changeset 249:cb68024bdd35
Moar animals
author | Adrianna Pińska <adrianna.pinska@gmail.com> |
---|---|
date | Thu, 15 Sep 2011 01:02:19 +0200 |
parents | de3b4048e54a |
children | f52fae80cd18 |
files | data/tiles/common/lizard.png data/tiles/common/salamander.png data/tiles/common/snail.png mamba/level.py mamba/sprites.py source/svg/tiles/common/lizard.svg source/svg/tiles/common/salamander.svg source/svg/tiles/common/snail.svg |
diffstat | 8 files changed, 398 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mamba/level.py Thu Sep 15 00:40:30 2011 +0200 +++ b/mamba/level.py Thu Sep 15 01:02:19 2011 +0200 @@ -44,6 +44,9 @@ 'M': mktile(sprites.BigMouse), 'm': mktile(sprites.SmallMouse), 'f': mktile(sprites.Frog), + '@': mktile(sprites.Snail), + 'l': mktile(sprites.Lizard), + 's': mktile(sprites.Salamander), }
--- a/mamba/sprites.py Thu Sep 15 00:40:30 2011 +0200 +++ b/mamba/sprites.py Thu Sep 15 01:02:19 2011 +0200 @@ -294,6 +294,27 @@ snake.mutate('amphibious') +class Snail(EdibleTile): + image_name = "snail" + + def eat(self, snake): + print "Sloooooooooooow!" + + +class Lizard(EdibleTile): + image_name = "lizard" + + def eat(self, snake): + print "Fst!" + + +class Salamander(EdibleTile): + image_name = "salamander" + + def eat(self, snake): + print "Burninate!" + + class Painter(TileSprite): def __init__(self, colour, **kw): super(Painter, self).__init__(**kw)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/source/svg/tiles/common/lizard.svg Thu Sep 15 01:02:19 2011 +0200 @@ -0,0 +1,131 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="200" + height="200" + id="svg2" + version="1.1" + inkscape:version="0.48.1 r9760" + sodipodi:docname="lizard.svg"> + <defs + id="defs4"> + <linearGradient + id="linearGradient3765"> + <stop + style="stop-color:#0000ff;stop-opacity:1;" + offset="0" + id="stop3781" /> + <stop + id="stop3783" + offset="0.5" + style="stop-color:#0000ff;stop-opacity:0;" /> + <stop + id="stop3769" + offset="1" + style="stop-color:#0000ff;stop-opacity:1;" /> + </linearGradient> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="2.915" + inkscape:cx="100" + inkscape:cy="100" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="1172" + inkscape:window-height="752" + inkscape:window-x="108" + inkscape:window-y="0" + inkscape:window-maximized="1" + showguides="true" + inkscape:guide-bbox="true" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-852.36218)"> + <path + style="fill:#00ff00;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 27.101201,911.02427 c -4.636525,-14.98638 -7.521957,-31.93186 -5.145798,-36.36363 2.863984,-5.34162 33.975717,10.82179 39.451115,14.40823 9.005136,5.89846 10.845127,25.92582 8.919383,32.9331 12.39613,-6.63444 23.533973,-0.0889 16.809603,-39.79416 -0.95013,-5.61023 -16.374989,-17.5886 -8.576324,-20.92625 7.990404,-3.4197 2.719925,11.0982 11.320754,12.34992 10.911476,1.58799 11.652746,-19.16053 20.583186,-12.69297 7.22392,5.23167 -17.514156,11.50882 -12.006856,18.52487 4.573636,5.82661 19.961446,-1.98805 21.955406,5.1458 3.17372,11.35472 -20.17502,-6.59414 -26.072046,4.11664 -2.63917,4.79353 2.74316,14.62523 -3.43053,41.50943 -1.18817,5.17404 21.379046,21.09165 35.677526,21.61235 8.99341,0.32751 8.29781,-0.86667 24.69982,-0.34305 5.76632,0.18408 -11.70404,-18.16419 -1.71526,-20.24014 8.50691,-1.76798 3.93515,10.72321 8.57632,18.52487 4.04865,6.80565 13.70173,-18.84042 21.95541,-13.03602 8.25712,5.80682 -3.25053,9.30354 -15.78044,17.83877 -4.79854,3.26869 21.96425,1.49159 20.92624,7.20411 -1.46386,8.05608 -8.47641,0.33543 -25.72899,0 -10.36,-0.20142 -20.45777,1.05912 -31.56089,6.51801 38.27639,24.23818 23.41395,66.61375 9.60549,73.75645 19.26915,-51.96624 -16.43391,-60.82025 -25.29876,-65.36718 -6.13585,6.37051 -28.675031,26.96788 -24.100898,32.77718 9.300565,11.8119 19.423018,26.4872 4.802752,22.9845 -8.819547,-2.113 -2.006519,-10.7156 -9.948545,-15.0943 -10.074415,-5.5543 -11.262687,21.6969 -19.554032,13.7221 -7.45401,-7.1694 14.380511,-9.3989 8.919383,-18.1818 -5.499713,-8.845 -18.78324,10.0237 -21.61235,0 -4.511016,-15.98293 23.724082,0.5807 30.874786,-14.40827 9.742776,-20.42238 15.296808,-23.54823 14.408238,-30.53173 -1.362765,-10.71032 -22.429199,-19.98849 -25.385939,-20.24014 -9.316524,-0.79295 -5.031202,12.19171 -24.356776,25.38594 -6.988534,4.77131 0.173317,24.98029 -8.233276,24.01372 -6.737124,-0.77462 3.833372,-16.88204 -2.058319,-20.24014 -7.334187,-4.18029 -17.972502,17.42761 -22.984563,10.63465 -4.5669624,-6.18971 17.45689,-9.73031 15.437393,-17.15266 -1.889454,-6.9444 -21.6824244,0.5944 -20.5831914,-6.51801 1.39726,-9.04075 18.6798934,-2.62172 27.4442544,0 16.507887,4.93807 22.411534,-18.56223 27.101201,-35.33448 C 48.717137,928.08586 31.68456,925.8388 27.101201,911.02427 z" + id="path3962" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ssscsssssssssssssssscccsssssssssssssssscs" /> + <g + id="g3972"> + <path + inkscape:transform-center-y="-5.1457976" + inkscape:transform-center-x="2.058319" + transform="matrix(0.8961039,0,0,0.8961039,6.6917641,859.46828)" + d="m 44.596913,58.490566 a 13.207547,13.207547 0 1 1 -26.415094,0 13.207547,13.207547 0 1 1 26.415094,0 z" + sodipodi:ry="13.207547" + sodipodi:rx="13.207547" + sodipodi:cy="58.490566" + sodipodi:cx="31.389366" + id="path3964" + style="fill:#000000;fill-opacity:1;stroke:none" + sodipodi:type="arc" /> + <path + transform="translate(2,854.36218)" + d="m 42.571118,55.23156 a 3.6345832,3.6345832 0 1 1 -7.269166,0 3.6345832,3.6345832 0 1 1 7.269166,0 z" + sodipodi:ry="3.6345832" + sodipodi:rx="3.6345832" + sodipodi:cy="55.23156" + sodipodi:cx="38.936535" + id="path3970" + style="fill:#ffffff;fill-opacity:1;stroke:none" + sodipodi:type="arc" /> + </g> + <g + transform="translate(21.783876,-18.010291)" + id="g3972-4"> + <path + inkscape:transform-center-y="-5.1457976" + inkscape:transform-center-x="2.058319" + transform="matrix(0.8961039,0,0,0.8961039,6.6917641,859.46828)" + d="m 44.596913,58.490566 c 0,7.294327 -5.91322,13.207547 -13.207547,13.207547 -7.294327,0 -13.207547,-5.91322 -13.207547,-13.207547 0,-7.294327 5.91322,-13.207547 13.207547,-13.207547 7.294327,0 13.207547,5.91322 13.207547,13.207547 z" + sodipodi:ry="13.207547" + sodipodi:rx="13.207547" + sodipodi:cy="58.490566" + sodipodi:cx="31.389366" + id="path3964-5" + style="fill:#000000;fill-opacity:1;stroke:none" + sodipodi:type="arc" /> + <path + transform="translate(2,854.36218)" + d="m 42.571118,55.23156 c 0,2.007325 -1.627258,3.634583 -3.634583,3.634583 -2.007325,0 -3.634583,-1.627258 -3.634583,-3.634583 0,-2.007325 1.627258,-3.634583 3.634583,-3.634583 2.007325,0 3.634583,1.627258 3.634583,3.634583 z" + sodipodi:ry="3.6345832" + sodipodi:rx="3.6345832" + sodipodi:cy="55.23156" + sodipodi:cx="38.936535" + id="path3970-2" + style="fill:#ffffff;fill-opacity:1;stroke:none" + sodipodi:type="arc" /> + </g> + </g> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/source/svg/tiles/common/salamander.svg Thu Sep 15 01:02:19 2011 +0200 @@ -0,0 +1,152 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="200" + height="200" + id="svg2" + version="1.1" + inkscape:version="0.48.1 r9760" + sodipodi:docname="lizard.svg"> + <defs + id="defs4"> + <linearGradient + id="linearGradient4008"> + <stop + style="stop-color:#ff0000;stop-opacity:1;" + offset="0" + id="stop4010" /> + <stop + style="stop-color:#fffc00;stop-opacity:1;" + offset="1" + id="stop4012" /> + </linearGradient> + <linearGradient + id="linearGradient3765"> + <stop + style="stop-color:#0000ff;stop-opacity:1;" + offset="0" + id="stop3781" /> + <stop + id="stop3783" + offset="0.5" + style="stop-color:#0000ff;stop-opacity:0;" /> + <stop + id="stop3769" + offset="1" + style="stop-color:#0000ff;stop-opacity:1;" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4008" + id="linearGradient4014" + x1="7.3461123" + y1="950.87793" + x2="185.77818" + y2="950.87793" + gradientUnits="userSpaceOnUse" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="2.915" + inkscape:cx="100" + inkscape:cy="100" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="1172" + inkscape:window-height="752" + inkscape:window-x="108" + inkscape:window-y="0" + inkscape:window-maximized="1" + showguides="true" + inkscape:guide-bbox="true" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-852.36218)"> + <path + style="fill:url(#linearGradient4014);stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1" + d="m 27.101201,911.02427 c -4.636525,-14.98638 -7.521957,-31.93186 -5.145798,-36.36363 2.863984,-5.34162 33.975717,10.82179 39.451115,14.40823 9.005136,5.89846 10.845127,25.92582 8.919383,32.9331 12.39613,-6.63444 23.533973,-0.0889 16.809603,-39.79416 -0.95013,-5.61023 -16.374989,-17.5886 -8.576324,-20.92625 7.990404,-3.4197 2.719925,11.0982 11.320754,12.34992 10.911476,1.58799 11.652746,-19.16053 20.583186,-12.69297 7.22392,5.23167 -17.514156,11.50882 -12.006856,18.52487 4.573636,5.82661 19.961446,-1.98805 21.955406,5.1458 3.17372,11.35472 -20.17502,-6.59414 -26.072046,4.11664 -2.63917,4.79353 2.74316,14.62523 -3.43053,41.50943 -1.18817,5.17404 21.379046,21.09165 35.677526,21.61235 8.99341,0.32751 8.29781,-0.86667 24.69982,-0.34305 5.76632,0.18408 -11.70404,-18.16419 -1.71526,-20.24014 8.50691,-1.76798 3.93515,10.72321 8.57632,18.52487 4.04865,6.80565 13.70173,-18.84042 21.95541,-13.03602 8.25712,5.80682 -3.25053,9.30354 -15.78044,17.83877 -4.79854,3.26869 21.96425,1.49159 20.92624,7.20411 -1.46386,8.05608 -8.47641,0.33543 -25.72899,0 -10.36,-0.20142 -20.45777,1.05912 -31.56089,6.51801 38.27639,24.23818 23.41395,66.61375 9.60549,73.75645 19.26915,-51.96624 -16.43391,-60.82025 -25.29876,-65.36718 -6.13585,6.37051 -28.675031,26.96788 -24.100898,32.77718 9.300565,11.8119 19.423018,26.4872 4.802752,22.9845 -8.819547,-2.113 -2.006519,-10.7156 -9.948545,-15.0943 -10.074415,-5.5543 -11.262687,21.6969 -19.554032,13.7221 -7.45401,-7.1694 14.380511,-9.3989 8.919383,-18.1818 -5.499713,-8.845 -18.78324,10.0237 -21.61235,0 -4.511016,-15.98293 23.724082,0.5807 30.874786,-14.40827 9.742776,-20.42238 15.296808,-23.54823 14.408238,-30.53173 -1.362765,-10.71032 -22.429199,-19.98849 -25.385939,-20.24014 -9.316524,-0.79295 -5.031202,12.19171 -24.356776,25.38594 -6.988534,4.77131 0.173317,24.98029 -8.233276,24.01372 -6.737124,-0.77462 3.833372,-16.88204 -2.058319,-20.24014 -7.334187,-4.18029 -17.972502,17.42761 -22.984563,10.63465 -4.5669624,-6.18971 17.45689,-9.73031 15.437393,-17.15266 -1.889454,-6.9444 -21.6824244,0.5944 -20.5831914,-6.51801 1.39726,-9.04075 18.6798934,-2.62172 27.4442544,0 16.507887,4.93807 22.411534,-18.56223 27.101201,-35.33448 C 48.717137,928.08586 31.68456,925.8388 27.101201,911.02427 z" + id="path3962" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ssscsssssssssssssssscccsssssssssssssssscs" /> + <g + id="g3972"> + <path + inkscape:transform-center-y="-5.1457976" + inkscape:transform-center-x="2.058319" + transform="matrix(0.8961039,0,0,0.8961039,6.6917641,859.46828)" + d="m 44.596913,58.490566 a 13.207547,13.207547 0 1 1 -26.415094,0 13.207547,13.207547 0 1 1 26.415094,0 z" + sodipodi:ry="13.207547" + sodipodi:rx="13.207547" + sodipodi:cy="58.490566" + sodipodi:cx="31.389366" + id="path3964" + style="fill:#000000;fill-opacity:1;stroke:none" + sodipodi:type="arc" /> + <path + transform="translate(2,854.36218)" + d="m 42.571118,55.23156 a 3.6345832,3.6345832 0 1 1 -7.269166,0 3.6345832,3.6345832 0 1 1 7.269166,0 z" + sodipodi:ry="3.6345832" + sodipodi:rx="3.6345832" + sodipodi:cy="55.23156" + sodipodi:cx="38.936535" + id="path3970" + style="fill:#ffffff;fill-opacity:1;stroke:none" + sodipodi:type="arc" /> + </g> + <g + transform="translate(21.783876,-18.010291)" + id="g3972-4"> + <path + inkscape:transform-center-y="-5.1457976" + inkscape:transform-center-x="2.058319" + transform="matrix(0.8961039,0,0,0.8961039,6.6917641,859.46828)" + d="m 44.596913,58.490566 c 0,7.294327 -5.91322,13.207547 -13.207547,13.207547 -7.294327,0 -13.207547,-5.91322 -13.207547,-13.207547 0,-7.294327 5.91322,-13.207547 13.207547,-13.207547 7.294327,0 13.207547,5.91322 13.207547,13.207547 z" + sodipodi:ry="13.207547" + sodipodi:rx="13.207547" + sodipodi:cy="58.490566" + sodipodi:cx="31.389366" + id="path3964-5" + style="fill:#000000;fill-opacity:1;stroke:none" + sodipodi:type="arc" /> + <path + transform="translate(2,854.36218)" + d="m 42.571118,55.23156 c 0,2.007325 -1.627258,3.634583 -3.634583,3.634583 -2.007325,0 -3.634583,-1.627258 -3.634583,-3.634583 0,-2.007325 1.627258,-3.634583 3.634583,-3.634583 2.007325,0 3.634583,1.627258 3.634583,3.634583 z" + sodipodi:ry="3.6345832" + sodipodi:rx="3.6345832" + sodipodi:cy="55.23156" + sodipodi:cx="38.936535" + id="path3970-2" + style="fill:#ffffff;fill-opacity:1;stroke:none" + sodipodi:type="arc" /> + </g> + </g> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/source/svg/tiles/common/snail.svg Thu Sep 15 01:02:19 2011 +0200 @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="200" + height="200" + id="svg2" + version="1.1" + inkscape:version="0.48.1 r9760" + sodipodi:docname="snail.svg"> + <defs + id="defs4"> + <linearGradient + id="linearGradient3765"> + <stop + style="stop-color:#0000ff;stop-opacity:1;" + offset="0" + id="stop3781" /> + <stop + id="stop3783" + offset="0.5" + style="stop-color:#0000ff;stop-opacity:0;" /> + <stop + id="stop3769" + offset="1" + style="stop-color:#0000ff;stop-opacity:1;" /> + </linearGradient> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="2.915" + inkscape:cx="100" + inkscape:cy="100" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="1172" + inkscape:window-height="752" + inkscape:window-x="108" + inkscape:window-y="0" + inkscape:window-maximized="1" + showguides="true" + inkscape:guide-bbox="true" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-852.36218)"> + <g + id="g3939" + transform="translate(-3.2139137,14.619091)"> + <path + transform="translate(0,852.36218)" + sodipodi:nodetypes="ccssssccc" + inkscape:connector-curvature="0" + id="path3870" + d="m 87.135506,99.48542 c -28.632281,-3.138133 -60.023214,3.06431 -32.590051,-62.435677 0,0 9.674278,-32.1725763 -1.372213,-33.2761581 C 41.223687,2.579784 56.397249,36.535863 44.596913,38.765009 32.501226,41.049948 34.802942,5.8041323 23.327616,9.948542 c -10.2223,3.691869 15.290776,26.441256 6.44368,34.658499 -45.551662,42.308693 4.385342,75.971009 2.475702,102.562769 63.705974,38.01118 109.661942,9.45983 163.636362,10.9777 -7.0117,-18.84132 -69.77428,-36.91833 -108.747854,-58.66209 z" + style="fill:#ffff00;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + <path + sodipodi:nodetypes="cssssssssssssscc" + inkscape:connector-curvature="0" + id="path3864" + d="m 136.90035,943.72843 c 4.77273,-3.30895 -0.91173,-8.86752 -7.47924,-5.40234 -3.53964,1.86759 -3.22127,11.54354 4.52302,15.56095 3.89539,2.02077 17.65787,-0.63146 18.10793,-11.41306 0.53083,-12.71636 -2.48876,-20.52753 -18.24403,-22.61394 -14.84775,-1.96622 -24.49967,8.2436 -23.88015,22.90028 0.71621,16.94418 10.92463,25.99846 27.55653,25.14635 18.91799,-0.96924 31.90994,-14.34502 30.82317,-32.95193 -1.22022,-20.89182 -20.85057,-34.5852 -41.43233,-33.26229 -22.86567,1.46971 -37.414287,21.03351 -35.854118,43.59003 1.718075,24.83953 24.454228,43.32931 48.985428,41.53091 26.81341,-1.96556 46.74632,-26.54938 44.70923,-53.05518 -2.21243,-28.7873 -28.63631,-50.05706 -57.125,-47.88751 -25.31938,1.92819 -36.209322,10.23982 -56.837204,37.89502 -7.100594,9.51956 -13.425953,19.59672 -19.629323,21.55572 7.747722,22.44418 29.286826,22.27948 48.506622,22.79914" + style="fill:#ff6600;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + </g> + </g> +</svg>