Commit 265f5b78 authored by nanahira's avatar nanahira

fix

parent 5d41fdfd
...@@ -43,9 +43,9 @@ function Auxiliary.LoadDB() ...@@ -43,9 +43,9 @@ function Auxiliary.LoadDB()
if (cat & TYPE_MONSTER)>0 then if (cat & TYPE_MONSTER)>0 then
table.insert(main_monster,code) table.insert(main_monster,code)
if lv>5 then if lv>5 then
table.insert(main_plain,code) table.insert(main_adv,code)
else else
table.insert(main_adv,code) table.insert(main_plain,code)
end end
elseif (cat & TYPE_SPELL)>0 then elseif (cat & TYPE_SPELL)>0 then
table.insert(main_spell,code) table.insert(main_spell,code)
...@@ -63,7 +63,7 @@ function Auxiliary.SaveDeck() ...@@ -63,7 +63,7 @@ function Auxiliary.SaveDeck()
Duel.SavePickDeck(p,g) Duel.SavePickDeck(p,g)
end end
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 if not Duel.IsPlayerNeedToPickDeck(p) then return end
local g1=Group.CreateGroup() local g1=Group.CreateGroup()
local g2=Group.CreateGroup() local g2=Group.CreateGroup()
...@@ -72,6 +72,12 @@ function Auxiliary.SinglePick(p,list,count) ...@@ -72,6 +72,12 @@ function Auxiliary.SinglePick(p,list,count)
local code=list[math.random(#list)] local code=list[math.random(#list)]
g:AddCard(Duel.CreateToken(p,code)) g:AddCard(Duel.CreateToken(p,code))
end 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) Duel.SendtoDeck(g,nil,0,REASON_RULE)
end end
local sg=g1:Clone() local sg=g1:Clone()
...@@ -83,7 +89,7 @@ function Auxiliary.SinglePick(p,list,count) ...@@ -83,7 +89,7 @@ function Auxiliary.SinglePick(p,list,count)
Duel.Exile(rg,REASON_RULE) Duel.Exile(rg,REASON_RULE)
end 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 if not Duel.IsPlayerNeedToPickDeck(p) then return end
local g1=Group.CreateGroup() local g1=Group.CreateGroup()
local g2=Group.CreateGroup() local g2=Group.CreateGroup()
...@@ -92,6 +98,12 @@ function Auxiliary.SinglePickForMain(p,list,count) ...@@ -92,6 +98,12 @@ function Auxiliary.SinglePickForMain(p,list,count)
local code=list[math.random(#list)] local code=list[math.random(#list)]
g:AddCard(Duel.CreateToken(p,code)) g:AddCard(Duel.CreateToken(p,code))
end 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) Duel.SendtoDeck(g,nil,0,REASON_RULE)
end end
local sg=g1:Clone() 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