From 7bdd34d38339dd7c2d20d6b1c75e0d223ca5b7f3 Mon Sep 17 00:00:00 2001 From: adrianna Date: Sat, 5 Mar 2016 21:14:00 +0200 Subject: [PATCH] randomly rotate serum puddles --- koperkapel/serums.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/koperkapel/serums.py b/koperkapel/serums.py index 40ebfba..38794fd 100644 --- a/koperkapel/serums.py +++ b/koperkapel/serums.py @@ -1,7 +1,9 @@ """ Tools for creating serum actors. """ +import random from pgzero.loaders import images from pygame.constants import BLEND_RGBA_MULT +from pygame.transform import rotate from .actors.surf import SurfActor SERUMS = ["smart", "fast", "strong"] @@ -41,6 +43,7 @@ class SerumFactory: def assemble(self, name): assert name in SERUMS puddle = images.load("serum%s/serum" % (self.suffix,)) + puddle = rotate(puddle, 90 * random.randint(0, 3)) serum_icon = images.load("serum%s/%s" % ( self.suffix, SERUM_TILENAME_MAP[name],)) frame = puddle.copy() -- 2.34.1