Commit c78b0b7d authored by VanillaSalt's avatar VanillaSalt

fix

parent dc3d2edc
...@@ -31,10 +31,22 @@ function c56562619.initial_effect(c) ...@@ -31,10 +31,22 @@ function c56562619.initial_effect(c)
e3:SetTarget(c56562619.sptg) e3:SetTarget(c56562619.sptg)
e3:SetOperation(c56562619.spop) e3:SetOperation(c56562619.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--clear
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetOperation(c56562619.clearop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
local ng=Group.CreateGroup() local ng=Group.CreateGroup()
ng:KeepAlive() ng:KeepAlive()
e2:SetLabelObject(ng)
e3:SetLabelObject(ng) e3:SetLabelObject(ng)
e2:SetLabelObject(e3) e4:SetLabelObject(ng)
e5:SetLabelObject(ng)
end end
function c56562619.splimit(e,se,sp,st) function c56562619.splimit(e,se,sp,st)
return (se:IsActiveType(TYPE_MONSTER) and se:GetHandler():IsSetCard(0x2b)) or se:GetHandler():IsSetCard(0x61) return (se:IsActiveType(TYPE_MONSTER) and se:GetHandler():IsSetCard(0x2b)) or se:GetHandler():IsSetCard(0x61)
...@@ -69,25 +81,14 @@ function c56562619.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -69,25 +81,14 @@ function c56562619.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c56562619.rmop(e,tp,eg,ep,ev,re,r,rp) function c56562619.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local c=e:GetHandler() if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED) then
if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED) and c:IsRelateToEffect(e) then
tc:RegisterFlagEffect(56562619,RESET_EVENT+0x1fe0000,0,0) tc:RegisterFlagEffect(56562619,RESET_EVENT+0x1fe0000,0,0)
e:GetLabelObject():SetLabel(1) e:GetLabelObject():AddCard(tc)
if c:GetFlagEffect(56562619)==0 then
c:RegisterFlagEffect(56562619,RESET_EVENT+0x1680000,0,0)
e:GetLabelObject():GetLabelObject():Clear()
end
e:GetLabelObject():GetLabelObject():AddCard(tc)
end end
end end
function c56562619.spcon(e,tp,eg,ep,ev,re,r,rp) function c56562619.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rg=e:GetLabelObject() return c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK)
local act=e:GetLabel()
e:SetLabel(0)
if act==1 and c:IsPreviousPosition(POS_FACEUP) and c:GetLocation()~=LOCATION_DECK
and c:GetFlagEffect(56562619)~=0 then return true
else rg:Clear() return false end
end end
function c56562619.spfilter(c,e,tp) function c56562619.spfilter(c,e,tp)
return c:GetFlagEffect(56562619)~=0 return c:GetFlagEffect(56562619)~=0
...@@ -100,12 +101,9 @@ function c56562619.spfilter2(c,e,tp) ...@@ -100,12 +101,9 @@ function c56562619.spfilter2(c,e,tp)
return c:GetFlagEffect(56562619)~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,1-tp) and c:GetOwner()==1-tp return c:GetFlagEffect(56562619)~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,1-tp) and c:GetOwner()==1-tp
end end
function c56562619.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c56562619.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=e:GetLabelObject() if chk==0 then return true end
if chk==0 then local g=e:GetLabelObject():Filter(c56562619.spfilter,nil,e,tp)
if rg:IsExists(c56562619.spfilter,1,nil,e,tp) then return true Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
else rg:Clear() return false end
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,rg,rg:GetCount(),0,0)
end end
function c56562619.spop(e,tp,eg,ep,ev,re,r,rp) function c56562619.spop(e,tp,eg,ep,ev,re,r,rp)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
...@@ -140,10 +138,10 @@ function c56562619.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -140,10 +138,10 @@ function c56562619.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg1=sg1:Select(tp,ft1,ft1,nil) sg1=sg1:Select(tp,ft1,ft1,nil)
end end
local sg=sg1:GetFirst() local sc=sg1:GetFirst()
while sg do while sc do
Duel.SpecialSummonStep(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP)
sg=sg1:GetNext() sc=sg1:GetNext()
end end
end end
if gc2>0 and ft2>0 then if gc2>0 and ft2>0 then
...@@ -151,12 +149,15 @@ function c56562619.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -151,12 +149,15 @@ function c56562619.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg2=sg2:Select(tp,ft2,ft2,nil) sg2=sg2:Select(tp,ft2,ft2,nil)
end end
local sg=sg2:GetFirst() local sc=sg2:GetFirst()
while sg do while sc do
Duel.SpecialSummonStep(sg,0,tp,1-tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(sc,0,tp,1-tp,false,false,POS_FACEUP)
sg=sg2:GetNext() sc=sg2:GetNext()
end end
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
rg:Clear() rg:Clear()
end end
function c56562619.clearop(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():Clear()
end
...@@ -59,7 +59,7 @@ end ...@@ -59,7 +59,7 @@ end
function c66698383.thfilter(c) function c66698383.thfilter(c)
return c:IsFaceup() and c:IsType(TYPE_TUNER) and c:IsAbleToHand() return c:IsFaceup() and c:IsType(TYPE_TUNER) and c:IsAbleToHand()
end end
function c66698383.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c66698383.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c66698383.thfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c66698383.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c66698383.thfilter,tp,LOCATION_REMOVED,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c66698383.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
...@@ -15,6 +15,7 @@ function c73271204.initial_effect(c) ...@@ -15,6 +15,7 @@ function c73271204.initial_effect(c)
e2:SetDescription(aux.Stringid(73271204,1)) e2:SetDescription(aux.Stringid(73271204,1))
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c73271204.milcon) e2:SetCondition(c73271204.milcon)
e2:SetTarget(c73271204.miltg) e2:SetTarget(c73271204.miltg)
......
...@@ -47,7 +47,8 @@ function c77133792.spfilter(c,e,tp) ...@@ -47,7 +47,8 @@ function c77133792.spfilter(c,e,tp)
end end
function c77133792.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c77133792.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c77133792.spfilter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c77133792.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c77133792.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c77133792.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c77133792.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c77133792.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
......
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