Commit acb1c040 authored by TanakaKotoha's avatar TanakaKotoha

lua fix

parent c669afb2
No preview for this file type
......@@ -85,7 +85,7 @@ function s.countop(e, tp, eg, ep, ev, re, r, rp)
end
function s.drcon2(e, tp, eg, ep, ev, re, r, rp)
return e:GetHandler():GetFlagEffect(id) == 0
return e:GetHandler():GetFlagEffect(id) == 0 and (tp == Duel.GetTurnPlayer())
end
function s.drtg2(e, tp, eg, ep, ev, re, r, rp, chk)
......@@ -96,7 +96,7 @@ function s.drtg2(e, tp, eg, ep, ev, re, r, rp, chk)
Duel.SetTargetParam(3)
Duel.SetOperationInfo(0, CATEGORY_DRAW, nil, 0, tp, 3)
end
function s.setfilter(c, tp)
function s.setfilter(c, e, tp)
if c:IsType(TYPE_MONSTER) then
return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and
c:IsCanBeSpecialSummoned(e, 0, tp, false, false, POS_FACEDOWN_DEFENSE)
......@@ -108,7 +108,7 @@ end
function s.drop2(e, tp, eg, ep, ev, re, r, rp)
local p, d = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER, CHAININFO_TARGET_PARAM)
Duel.Draw(p, d, REASON_EFFECT)
local og = Duel.GetOperatedGroup():Filter(s.setfilter, nil, tp)
local og = Duel.GetOperatedGroup():Filter(s.setfilter, nil, e, tp)
local c = e:GetHandler()
if not Duel.IsExistingMatchingCard(Card.IsFaceup, tp, LOCATION_ONFIELD, 0, 1, c) and og then
local cg = Group.CreateGroup()
......@@ -122,7 +122,7 @@ function s.drop2(e, tp, eg, ep, ev, re, r, rp)
end
cg:AddCard(tc)
og:RemoveCard(tc)
og = og:Filter(s.setfilter, nil, tp)
og = og:Filter(s.setfilter, nil, e, tp)
end
Duel.SpecialSummonComplete()
Duel.ConfirmCards(1 - tp, cg)
......
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