Disallow buying negative mana

master
Kevin Zheng 2022-05-17 23:11:40 -07:00
parent 1a735b7050
commit a41717b8dc
1 changed files with 3 additions and 0 deletions

View File

@ -62,6 +62,9 @@ def buy_mana():
if mana_stock() == 0:
me.Say("Sorry, we are out of stock right now. Come back later.")
return
if amount <= 0:
me.Say("If you want to sell mana, transfer it into the power broker.")
return
if amount > max_buy:
me.Say("I can only sell you up to %d mana right now." % max_buy)
amount = max_buy