add card manager
refine the scripts
add trigger for lua api