1
Author: A Mennucc <mennucc1@debian.org>
2
Description: Add startup animation with random monster.
3
Index: monsterz-0.7.1/monsterz.py
4
===================================================================
5
--- monsterz-0.7.1.orig/monsterz.py 2013-05-26 22:22:45.000000000 -0400
6
+++ monsterz-0.7.1/monsterz.py 2013-05-26 22:28:08.000000000 -0400
8
from random import randint
9
from sys import argv, exit, platform
10
from os.path import join, isdir, isfile, dirname, expanduser
11
-from os import write, mkdir
12
+from os import write, mkdir, getenv
17
ITEM_METAL = ITEMS + 2
18
ITEM_PUZZLE = ITEMS + 3
20
+LANG = getenv('LC_MESSAGES') or getenv('LC_ALL') or getenv('LANG') or ''
22
+ITEM_NAMES = ['hairy','cloudy','cyclop','auntie','roswell','horny',
23
+ 'bluewhale','octopie','ghost']
26
+ ITEM_NAMES=['buffopelo','nuvolastra','ciclope',
27
+ 'ziantonietta','roswell','cornutazzo',
28
+ 'balenablu','polipetto','fantasmino']
34
w, h = text.get_rect().size
35
system.blit(text, (192 - w / 2 - 8, 24 + 288 - h / 2))
36
system.blit(data.normal[self.lucky], (192 + w / 2, 288))
37
+ text = fonter.render(ITEM_NAMES[self.lucky],20)
38
+ wn, hn = text.get_rect().size
39
+ system.blit(text, (192 + w/2 - wn/2 + ITEM_SIZE/2,
40
+ 24 + 288 + ITEM_SIZE - h/2 - hn/2))
41
elif self.lost_timer != -1:
44
@@ -1374,6 +1388,33 @@
48
+ wander_monster=randint(0,ITEMS-1)
51
+ def wanderer_draw(self):
52
+ if self.wander_x==None :
53
+ if randint(0,30) == 1 :
54
+ self.wander_monster = (self.wander_monster+1)%ITEMS
55
+ self.wander_y=randint(20,SCREEN_HEIGHT-ITEM_SIZE-20)
56
+ self.wander_x=-ITEM_SIZE
58
+ if randint(0,10) == 1 :
59
+ monster = data.blink[self.wander_monster]
61
+ monster = data.normal[self.wander_monster]
62
+ system.blit(monster, (self.wander_x, self.wander_y))
63
+ system.blit(fonter.render(ITEM_NAMES[self.wander_monster],
65
+ (self.wander_x+ITEM_SIZE, self.wander_y+ITEM_SIZE/2-15))
66
+ if self.wander_x < SCREEN_WIDTH/3 or self.wander_x > (SCREEN_WIDTH/3)*2 :
67
+ self.wander_x += randint(4,8)
68
+ self.wander_y += randint(-2,2)
71
+ self.wander_y += randint(-1,1)
72
+ if self.wander_x > SCREEN_WIDTH :
77
def iterate_menu(self):
80
w, h = data.logo.get_size()
81
system.blit(data.logo, (24 + 192 - w / 2, 24 + 96 - h / 2))
82
+ self.wanderer_draw()
84
if self.msat[x] > 180:
85
monster = data.surprise[shapes[x]]