Commit 53695650 authored by POLYMER's avatar POLYMER

fix

parent 54561730
......@@ -116,7 +116,7 @@ function c112538374.retop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
local tc=g:GetFirst()
local gg=Group.FromCards(c,tc)
Duel.SetTargetCard(g)
Duel.HintSelection(g)
Duel.SendtoDeck(gg,nil,2,REASON_EFFECT)
end
end
......
......@@ -68,12 +68,12 @@ function s.spfilter(c,e,tp)
return c:IsSetCard(0x5a7d) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.desfilter(c,p)
return c:IsSetCard(0x5a7d) and not c:IsCode(id) and not s.MujicaDestroyedRecords[p][c:GetCode()]
return c:IsSetCard(0x5a7d) and not c:IsCode(id) and not s.MujicaDestroyedRecords[p][c:GetCode()] and c:IsFaceupEx()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp) end
and Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND+LOCATION_MZONE)
end
......@@ -84,7 +84,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
if #sg==0 then return end
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp)
local dg=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp)
if #dg>0 then
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
......
......@@ -21,7 +21,7 @@ function s.initial_effect(c)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
end
function s.repfilter(c,tp)
function s.repfilter(c)
return c:IsOnField() and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -29,7 +29,8 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and eg:IsExists(s.repfilter,1,nil,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
local g=eg:Filter(s.repfilter,nil,tp)
local g=eg:Filter(s.repfilter,nil)
Duel.HintSelection(g)
if g:GetCount()==1 then
e:SetLabelObject(g:GetFirst())
else
......
......@@ -77,7 +77,6 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1)
e1:SetCondition(s.repcon)
e1:SetOperation(s.repop2)
e1:SetReset(RESET_PHASE+PHASE_END)
......@@ -94,7 +93,7 @@ end
function s.repcon(e,tp,eg,ep,ev,re,r,rp)
local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY)
local rc=re:GetHandler()
return ex and re:IsActiveType(TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP) and rc:IsRelateToEffect(re) and Duel.IsExistingMatchingCard(aux.TRUE,rp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,rc) and rp==tp and rc:IsDestructable()
return ex and re:IsActiveType(TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP) and rc:IsRelateToEffect(re) and Duel.IsExistingMatchingCard(aux.TRUE,rp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,rc) and rp==tp and rc:IsDestructable() and Duel.GetFlagEffect(tp,id)==0
end
function s.repop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
......@@ -102,7 +101,7 @@ function s.repop2(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,s.repop)
e:Reset()
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
end
end
function s.tdfilter(c)
......
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