cards: forgot to call save

This commit is contained in:
JerryXiao 2019-10-15 20:37:34 +08:00
parent 9719d52230
commit c6e8c18128
Signed by: Jerry
GPG key ID: 9D9CE43650FF2BAA

View file

@ -222,6 +222,7 @@ def cards_lottery(update, context):
cards = int(cards) if cards > 1 else 1 cards = int(cards) if cards > 1 else 1
cards *= randrange(-1, 2, 2) cards *= randrange(-1, 2, 2)
fplayer.immunity_cards += cards fplayer.immunity_cards += cards
fplayer.save()
update.message.reply_text(f'{"获得" if cards >= 0 else "血亏"}{abs(cards)}张卡') update.message.reply_text(f'{"获得" if cards >= 0 else "血亏"}{abs(cards)}张卡')
@run_async @run_async