From: Simon Cross Date: Sat, 5 Mar 2016 19:20:32 +0000 (+0200) Subject: Merge branch 'master' of ctpug.org.za:koperkapel X-Git-Url: https://git.ctpug.org.za/?p=koperkapel.git;a=commitdiff_plain;h=e61150bf9b57af0112b1c86a839bbb4e028a6065;hp=685bc607ffc97579ab5522e9c799ee0eef334777 Merge branch 'master' of ctpug.org.za:koperkapel --- 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()