all repos — Legends-RPG @ 67a59bf2adedc592acf37113bd4e64d10ffcf0ab

A fantasy mini-RPG built with Python and Pygame.

There is now a different shop owner for each shop type.
Justin Armstrong justinmeister@gmail.com
Sat, 22 Mar 2014 10:35:51 -0700
commit

67a59bf2adedc592acf37113bd4e64d10ffcf0ab

parent

d8373003d109394bfb66273042e2a2fb96a2b738

M data/states/shop.pydata/states/shop.py

@@ -262,7 +262,7 @@ background.image = surface

background.rect = background.image.get_rect() player = self.make_sprite('player', 96, 32, 150) - shop_owner = self.make_sprite('man1', 32, 32, 600) + shop_owner = self.make_sprite(self.key, 32, 32, 600) counter = self.make_counter() background.image.blit(player.image, player.rect)

@@ -322,6 +322,7 @@ """Where our hero gets rest"""

def __init__(self): super(Inn, self).__init__() self.name = 'Inn' + self.key = 'innman' class WeaponShop(Shop):

@@ -329,6 +330,7 @@ """A place to buy weapons"""

def __init__(self): super(WeaponShop, self).__init__() self.name = 'Weapon Shop' + self.key = 'weaponman' class ArmorShop(Shop):

@@ -336,6 +338,7 @@ """A place to buy armor"""

def __init__(self): super(ArmorShop, self).__init__() self.name = 'Armor Shop' + self.key = 'armorman' class MagicShop(Shop):

@@ -343,10 +346,12 @@ """A place to buy magic"""

def __init__(self): super(MagicShop, self).__init__() self.name = 'Magic Shop' + self.key = 'magiclady' class PotionShop(Shop): """A place to buy potions""" def __init__(self): super(PotionShop, self).__init__() - self.name = 'Potion Shop'+ self.name = 'Potion Shop' + self.key = 'potionlady'