Added golden pinmik

This commit is contained in:
theo@manjaro 2021-09-18 20:44:22 +02:00
parent 59b933225a
commit a404444f61
12 changed files with 12 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -136,4 +136,6 @@ def getunlocks(highscore):
unlocks["normal"].append("green") unlocks["normal"].append("green")
if highscore>=250: if highscore>=250:
unlocks["normal"].append("blue") unlocks["normal"].append("blue")
if highscore>=500:
unlocks["specials"].append("gold")
return unlocks return unlocks

View File

@ -13,6 +13,11 @@ class Lemming(BaseObject):
self.normalspeed = self.basespeed # Speed "objective" self.normalspeed = self.basespeed # Speed "objective"
self.speed = 0 # Current speed, leaning towards objective speed self.speed = 0 # Current speed, leaning towards objective speed
self.scoreratio = 0.2
if skin=="gold":
self.basespeed*=1.2
self.scoreratio*=3
self.skin = skin self.skin = skin
self.selected = False # If beeing redirected self.selected = False # If beeing redirected

View File

@ -8,7 +8,7 @@ from gamedata.objects.ingame.demo import Demo
class Manager(BaseObject): class Manager(BaseObject):
def __init__(self,game): def __init__(self,game):
super().__init__(0,0,game) super().__init__(0,0,game)
self.score = 250 self.score = 0
self.lives = 5 self.lives = 5
self.basetime = 10 self.basetime = 10
self.steptime = 2 self.steptime = 2
@ -18,7 +18,6 @@ class Manager(BaseObject):
self.deathtimer = game.lib.Timer(1) # Time between each life loss self.deathtimer = game.lib.Timer(1) # Time between each life loss
self.started = False self.started = False
self.invincible = False self.invincible = False
self.scoreratio = 0.2 # Points earned per seconds and per lemming
self.endtimer = game.lib.Timer(1) # Black fade if game's over self.endtimer = game.lib.Timer(1) # Black fade if game's over
self.endrect = game.pygame.Surface((game.DISPLAY_WIDTH,game.DISPLAY_HEIGHT)) self.endrect = game.pygame.Surface((game.DISPLAY_WIDTH,game.DISPLAY_HEIGHT))
@ -50,10 +49,11 @@ class Manager(BaseObject):
self.game.gameloop.summon(Spawner(self.game,self.tiles,skins=self.skins)) self.game.gameloop.summon(Spawner(self.game,self.tiles,skins=self.skins))
def step(self): def step(self):
nblemmings = len(self.game.gameloop.findname("Lemming")) + len(self.game.gameloop.findname("Spawner")) lemmings = self.game.gameloop.findname("Lemming")
nblemmings = len(lemmings) + len(self.game.gameloop.findname("Spawner"))
# Updating score # Updating score
for i in range(nblemmings): for lemming in lemmings:
self.score+=self.scoreratio*self.game.dt self.score+=lemming.scoreratio*self.game.dt
# Spawning more lemmings # Spawning more lemmings
if (self.lives>0 and nblemmings>0): if (self.lives>0 and nblemmings>0):
if self.spawntimer.tick(self.game.dt): if self.spawntimer.tick(self.game.dt):