fix removecard
This commit is contained in:
parent
effdca0c98
commit
b204943539
@ -248,10 +248,10 @@ def chat_message(sid, msg):
|
||||
sio.emit('chat_message', room=ses.game.name, data={'color': f'red','text':f'🚨 {ses.name} is in debug mode and removed a card'})
|
||||
cmd = msg.split()
|
||||
if len(cmd) == 2:
|
||||
if len(ses.hand) > int(cmd[1]):
|
||||
if int(cmd[1]) < len(ses.hand):
|
||||
ses.hand.pop(int(cmd[1]))
|
||||
else:
|
||||
ses.hand.pop(int(cmd[1])-len(ses.hand))
|
||||
ses.equipment.pop(int(cmd[1])-len(ses.hand))
|
||||
ses.notify_self()
|
||||
elif '/getcard' in msg:
|
||||
sio.emit('chat_message', room=ses.game.name, data={'color': f'red','text':f'🚨 {ses.name} is in debug mode and got a card'})
|
||||
|
Loading…
Reference in New Issue
Block a user