add a max_hp data field for army_list
implement resource reduction on the server side
correct invalid array declaration
last_result_index should be the current length of result_list, not length - 1
(int) rather than int()
use intval() function
debugging resource reduction
add more debugging message
wrongly assign type id to different army