Commit 265f5b78 authored by nanahira's avatar nanahira

fix

parent 5d41fdfd
......@@ -43,9 +43,9 @@ function Auxiliary.LoadDB()
if (cat & TYPE_MONSTER)>0 then
table.insert(main_monster,code)
if lv>5 then
table.insert(main_plain,code)
else
table.insert(main_adv,code)
else
table.insert(main_plain,code)
end
elseif (cat & TYPE_SPELL)>0 then
table.insert(main_spell,code)
......@@ -63,7 +63,7 @@ function Auxiliary.SaveDeck()
Duel.SavePickDeck(p,g)
end
end
function Auxiliary.SinglePick(p,list,count)
function Auxiliary.SinglePick(p,list,count,ex_list,ex_count)
if not Duel.IsPlayerNeedToPickDeck(p) then return end
local g1=Group.CreateGroup()
local g2=Group.CreateGroup()
......@@ -72,6 +72,12 @@ function Auxiliary.SinglePick(p,list,count)
local code=list[math.random(#list)]
g:AddCard(Duel.CreateToken(p,code))
end
if ex_list and ex_count then
for i=1,ex_count do
local code=ex_list[math.random(#ex_list)]
g:AddCard(Duel.CreateToken(p,code))
end
end
Duel.SendtoDeck(g,nil,0,REASON_RULE)
end
local sg=g1:Clone()
......@@ -83,7 +89,7 @@ function Auxiliary.SinglePick(p,list,count)
Duel.Exile(rg,REASON_RULE)
end
function Auxiliary.SinglePickForMain(p,list,count)
function Auxiliary.SinglePickForMain(p,list,count,ex_list,ex_count)
if not Duel.IsPlayerNeedToPickDeck(p) then return end
local g1=Group.CreateGroup()
local g2=Group.CreateGroup()
......@@ -92,6 +98,12 @@ function Auxiliary.SinglePickForMain(p,list,count)
local code=list[math.random(#list)]
g:AddCard(Duel.CreateToken(p,code))
end
if ex_list and ex_count then
for i=1,ex_count do
local code=ex_list[math.random(#ex_list)]
g:AddCard(Duel.CreateToken(p,code))
end
end
Duel.SendtoDeck(g,nil,0,REASON_RULE)
end
local sg=g1:Clone()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment