Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --游戏循环1.2——抽卡
- function PrepareARound(teamid)
- Draw5ChessAndShow(teamid, false)
- end
- --游戏循环1.2.x——抽卡用到的方法(第二个参数可以指定下一个棋子)
- function Draw5ChessAndShow(team_id, unlock)
- --(略)
- --把上次剩的洗回棋库
- h.ban_chess_list = {}
- if h.curr_chess_table ~= nil then
- for _,chess in pairs(h.curr_chess_table) do
- if chess ~= nil then
- table.insert(h.ban_chess_list,chess)
- AddAChessToChessPool(chess)
- end
- end
- end
- h.curr_chess_table = {}
- --抽!
- local cards,curr_chess_table = RandomNDrawChessNew(team_id,5)
- h.curr_chess_table = curr_chess_table
- --(略)
- end
- function RandomNDrawChessNew(team_id,n)
- --(略)
- while chess_count < n do
- local new_chess = RandomDrawChessNew(team_id)
- --(略)
- end
- return new_chess_list_str,new_chess_list_table
- end
- function RandomDrawChessNew(team_id)
- --(略)
- this_chess = DrawAChessFromChessPool(chess_level, table_11chess, h.ban_chess_list)
- return this_chess
- end
- function DrawAChessFromChessPool(cost, table_11chess, table_ban_chess)
- --(略)
- if FindValueInTable(table_ban_chess,chess_name) == true then
- return nil
- end
- --(略)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement