Commit 949fa409 authored by Nemo Ma's avatar Nemo Ma

fix

parent 6e0eee33
......@@ -59,24 +59,24 @@ function c65130315.splimit(e,c)
return not (c:IsAttack(878) and c:IsDefense(1157))
end
function c65130315.desfilter(c)
return c:IsFaceup() and c:IsLinkType(TYPE_MONSTER)
return c:IsFaceup() and c:GetOriginalType()&TYPE_MONSTER>0
end
function c65130315.spfilter(c,e,tp)
return c:IsAttack(878) and c:IsDefense(1157) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c65130315.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(c65130315.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c65130315.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c65130315.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c65130315.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c65130315.spfilter(c,e,tp)
return c:IsAttack(878) and c:IsDefense(1157) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c65130315.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.Destroy(tc,REASON_EFFECT) then
if Duel.Destroy(tc,REASON_EFFECT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local g=Duel.SelectMatchingCard(tp,c65130315.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local sc=g:GetFirst()
if not sc then return end
......
......@@ -26,9 +26,36 @@ function c65130331.initial_effect(c)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EVENT_CHAIN_END)
e5:SetOperation(c65130331.sumsuc2)
c:RegisterEffect(e5)
end
function c65130331.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.SetChainLimitTillChainEnd(aux.FALSE)
if Duel.GetCurrentChain()==0 then
Duel.SetChainLimitTillChainEnd(aux.FALSE)
elseif Duel.GetCurrentChain()==1 then
e:GetHandler():RegisterFlagEffect(65130331,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(c65130331.resetop)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_BREAK_EFFECT)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
end
function c65130331.sumsuc2(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetFlagEffect(65130331)~=0 then
Duel.SetChainLimitTillChainEnd(aux.FALSE)
end
e:GetHandler():ResetFlagEffect(65130331)
end
function c65130331.resetop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():ResetFlagEffect(65130331)
e:Reset()
end
function c65130331.spfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsAttack(878) and c:IsDefense(1157)
......
......@@ -6,7 +6,9 @@ function c65130339.initial_effect(c)
--material
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65130339,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,65130339)
e1:SetTarget(c65130339.mttg)
......@@ -44,10 +46,10 @@ function c65130339.mtop(e,tp,eg,ep,ev,re,r,rp)
Duel.Overlay(c,g)
Duel.BreakEffect()
local og=c:GetOverlayGroup():Filter(c65130339.spfilter,nil,e,tp)
if og:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(65130339,2))then
if og:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(65130339,2))then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=og:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
\ No newline at end of file
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