@@ -47,8 +47,8 @@ def __init__(self, ip, port, sock = None):
47
47
('set ready' , { 'action' : 'wargame_lobby_set_self_ready' , 'fields' : [ ('ready' , str , True ) ] }),
48
48
('start game' , { 'action' : 'wargame_lobby_start_game' , 'fields' : [] } )]
49
49
50
- in_game_actions = [ ('remove a piece' , {'action' : 'wargame_remove_piece' , 'fields' : [ ('from' , str , True ) ] } ),
51
- ('add a piece' , {'action' : 'wargame_add_piece' , 'fields' : [ ('to' , str , True ) ] } ),
50
+ in_game_actions = [ ('remove a piece' , {'action' : 'wargame_remove_piece' , 'fields' : [ ('from' , str , True ) , ( 'quantity' , int , True ) ] } ),
51
+ ('add a piece' , {'action' : 'wargame_add_piece' , 'fields' : [ ('to' , str , True ) , ( 'quantity' , int , True ) ] } ),
52
52
('say something' , { 'action' : 'wargame_chat' , 'fields' : [ ('message' , str , True ) ] } ),
53
53
('attack a land' , {'action' : 'wargame_attack_land' , 'fields' : [ ('quantity' , str , True ), ('from' , str , True ), ('to' , str , True ) ] } ),
54
54
('end turn' , { 'action' : 'wargame_end_turn' , 'fields' : [] } ) ]
@@ -94,6 +94,7 @@ def respawn():
94
94
return
95
95
96
96
reqd = { True : ' (required) ' , False : ' (enter to proceed) ' }
97
+
97
98
for param in self .menu [self .current_state ][value ][1 ]['fields' ]:
98
99
item_value = raw_input ('{0}{1}: ' .format (param [0 ], reqd [param [2 ]]))
99
100
params [param [0 ]] = param [1 ](item_value )
0 commit comments