Commit b764dabe authored by Nemo Ma's avatar Nemo Ma

fix

parent f9477506
......@@ -44,7 +44,8 @@ function c22348061.tgfilter(c)
return c:IsAbleToGrave() and c:IsFacedown()
end
function c22348061.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c22348061.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c22348061.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
......@@ -53,11 +54,11 @@ function c22348061.spfilter(c,e,tp)
end
function c22348061.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c22348061.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c22348061.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:GetControler()==tp and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(22348061,2)) then
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsPreviousControler(tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(22348061,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,c22348061.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc2=g2:GetFirst()
......
......@@ -52,9 +52,9 @@ function c22348064.eqlimit(e,c)
end
function c22348064.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(c22348064.tgfilter,tp,0,LOCATION_MZONE,1,nil) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(c22348064.tgfilter,tp,0,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c22348064.tgfilter,tp,0,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectTarget(tp,c22348064.tgfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0)
end
......
......@@ -44,7 +44,7 @@ end
function c22348093.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:GetControler()==tp and Duel.IsExistingMatchingCard(c22348093.thfilter,tp,LOCATION_DECK,0,1,nil) and tc:IsLocation(LOCATION_GRAVE) and Duel.SelectYesNo(tp,aux.Stringid(22348093,2)) then
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsPreviousControler(tp) and Duel.IsExistingMatchingCard(c22348093.thfilter,tp,LOCATION_DECK,0,1,nil) and tc:IsLocation(LOCATION_GRAVE) and Duel.SelectYesNo(tp,aux.Stringid(22348093,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c22348093.thfilter,tp,LOCATION_DECK,0,1,1,nil)
......
......@@ -57,7 +57,7 @@ function c67200299.linkcon(e,c,og,lmat,min,max)
if not c67200299.link_mat_filter(lmat,c) then return false end
mg:AddCard(lmat)
end
local fg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(Auxiliary.LCheckGoal,minc,maxc,tp,c,gf,lmat)
......@@ -80,7 +80,7 @@ function c67200299.linktg(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
if not c67200299.link_mat_filter(lmat,c) then return false end
mg:AddCard(lmat)
end
local fg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
......
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