shop
This commit is contained in:
@@ -52,3 +52,11 @@ def feed(cat, amount=100):
|
||||
def excite(cat, amount=100):
|
||||
cat.happiness += amount
|
||||
cat.happiness = _clamp(cat.happiness)
|
||||
|
||||
|
||||
def buy(player, item, price):
|
||||
if price > player.money:
|
||||
return False
|
||||
player.money -= price
|
||||
player.inventory[item] += 1
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user