Commit 1748cffb authored by DailyShana's avatar DailyShana

fix

parent 5cae3cb7
...@@ -22,7 +22,7 @@ end ...@@ -22,7 +22,7 @@ end
function c18993198.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c18993198.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c18993198.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c18993198.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c18993198.spop(e,tp,eg,ep,ev,re,r,rp,chk) function c18993198.spop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
--花札衛-紅葉に鹿- --花札衛-紅葉に鹿-
function c21772453.initial_effect(c) function c21772453.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--spsummon from hand --special summon rule
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
......
--光波双顎機 --光波双顎機
function c21999001.initial_effect(c) function c21999001.initial_effect(c)
--special summon from hand --special summon rule
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
......
...@@ -59,7 +59,7 @@ function c22011689.eqlimit(e,c) ...@@ -59,7 +59,7 @@ function c22011689.eqlimit(e,c)
return e:GetOwner()==c return e:GetOwner()==c
end end
function c22011689.desfilter(c,ec) function c22011689.desfilter(c,ec)
return c:IsDestructable() and c:GetFlagEffect(22011689)~=0 and c:GetEquipTarget()==ec return c:IsDestructable() and c:GetFlagEffect(22011689)~=0 and c:GetEquipTarget()==ec and bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0
end end
function c22011689.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c22011689.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -69,7 +69,9 @@ function c22011689.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -69,7 +69,9 @@ function c22011689.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,c22011689.desfilter,tp,LOCATION_SZONE,0,1,1,nil,c) local g=Duel.SelectTarget(tp,c22011689.desfilter,tp,LOCATION_SZONE,0,1,1,nil,c)
local atk=g:GetFirst():GetTextAttack() local atk=g:GetFirst():GetTextAttack()
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,atk) if atk>0 then
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,atk)
end
end end
function c22011689.operation(e,tp,eg,ep,ev,re,r,rp) function c22011689.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -14,14 +14,6 @@ function c27581098.initial_effect(c) ...@@ -14,14 +14,6 @@ function c27581098.initial_effect(c)
e2:SetTargetRange(1,1) e2:SetTargetRange(1,1)
e2:SetTarget(c27581098.splimit) e2:SetTarget(c27581098.splimit)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(27581098)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,1)
c:RegisterEffect(e3)
end end
function c27581098.splimit(e,c,tp,sumtp,sumpos) function c27581098.splimit(e,c,tp,sumtp,sumpos)
return bit.band(sumtp,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION return bit.band(sumtp,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
......
...@@ -47,7 +47,7 @@ function c28016193.fscon(e,g,gc,chkfnf) ...@@ -47,7 +47,7 @@ function c28016193.fscon(e,g,gc,chkfnf)
local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536) local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536)
local fc=fg:GetFirst() local fc=fg:GetFirst()
while fc do while fc do
g:Merge(fc:GetEquipGroup()) g:Merge(fc:GetEquipGroup():Filter(Card.IsControler,nil,tp))
fc=fg:GetNext() fc=fg:GetNext()
end end
local mg=g:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true) local mg=g:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true)
...@@ -66,7 +66,7 @@ function c28016193.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf) ...@@ -66,7 +66,7 @@ function c28016193.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf)
local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536) local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536)
local fc=fg:GetFirst() local fc=fg:GetFirst()
while fc do while fc do
eg:Merge(fc:GetEquipGroup()) eg:Merge(fc:GetEquipGroup():Filter(Card.IsControler,nil,tp))
fc=fg:GetNext() fc=fg:GetNext()
end end
local g=eg:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true) local g=eg:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true)
......
...@@ -6,7 +6,7 @@ function c30086349.initial_effect(c) ...@@ -6,7 +6,7 @@ function c30086349.initial_effect(c)
--damage --damage
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30086349,0)) e1:SetDescription(aux.Stringid(30086349,0))
e1:SetCategory(CATEGORY_DAMAGE) e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
......
...@@ -63,7 +63,7 @@ function c30786387.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -63,7 +63,7 @@ function c30786387.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c30786387.thfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c30786387.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectTarget(tp,c30786387.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) local sg=Duel.SelectTarget(tp,c30786387.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,1,0,0)
end end
function c30786387.thop(e,tp,eg,ep,ev,re,r,rp) function c30786387.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -39,7 +39,7 @@ function c38148100.negcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function c38148100.negcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c38148100.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c38148100.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.disfilter1(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.disfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
...@@ -47,7 +47,7 @@ end ...@@ -47,7 +47,7 @@ end
function c38148100.negop(e,tp,eg,ep,ev,re,r,rp) function c38148100.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then if tc and ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -42,7 +42,7 @@ function c43266605.repval(e,c) ...@@ -42,7 +42,7 @@ function c43266605.repval(e,c)
return c43266605.repfilter(c,e:GetHandlerPlayer()) return c43266605.repfilter(c,e:GetHandlerPlayer())
end end
function c43266605.repop(e,tp,eg,ep,ev,re,r,rp) function c43266605.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_DISCARD) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_DISCARD+REASON_REPLACE)
end end
function c43266605.cfilter(c,tp) function c43266605.cfilter(c,tp)
return c:IsSetCard(0xc1) and c:IsType(TYPE_TUNER) and c:IsControler(tp) return c:IsSetCard(0xc1) and c:IsType(TYPE_TUNER) and c:IsControler(tp)
......
...@@ -45,7 +45,7 @@ function c4688231.fscon(e,g,gc,chkfnf) ...@@ -45,7 +45,7 @@ function c4688231.fscon(e,g,gc,chkfnf)
local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536) local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536)
local fc=fg:GetFirst() local fc=fg:GetFirst()
while fc do while fc do
g:Merge(fc:GetEquipGroup()) g:Merge(fc:GetEquipGroup():Filter(Card.IsControler,nil,tp))
fc=fg:GetNext() fc=fg:GetNext()
end end
local mg=g:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true) local mg=g:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true)
...@@ -71,7 +71,7 @@ function c4688231.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf) ...@@ -71,7 +71,7 @@ function c4688231.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf)
local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536) local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536)
local fc=fg:GetFirst() local fc=fg:GetFirst()
while fc do while fc do
eg:Merge(fc:GetEquipGroup()) eg:Merge(fc:GetEquipGroup():Filter(Card.IsControler,nil,tp))
fc=fg:GetNext() fc=fg:GetNext()
end end
local g=eg:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true) local g=eg:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true)
......
...@@ -26,7 +26,7 @@ function c54401832.fscon(e,g,gc,chkfnf) ...@@ -26,7 +26,7 @@ function c54401832.fscon(e,g,gc,chkfnf)
local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536) local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536)
local fc=fg:GetFirst() local fc=fg:GetFirst()
while fc do while fc do
g:Merge(fc:GetEquipGroup()) g:Merge(fc:GetEquipGroup():Filter(Card.IsControler,nil,tp))
fc=fg:GetNext() fc=fg:GetNext()
end end
local mg=g:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true) local mg=g:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true)
...@@ -49,7 +49,7 @@ function c54401832.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf) ...@@ -49,7 +49,7 @@ function c54401832.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf)
local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536) local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536)
local fc=fg:GetFirst() local fc=fg:GetFirst()
while fc do while fc do
eg:Merge(fc:GetEquipGroup()) eg:Merge(fc:GetEquipGroup():Filter(Card.IsControler,nil,tp))
fc=fg:GetNext() fc=fg:GetNext()
end end
local g=eg:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true) local g=eg:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true)
......
--花札衛-牡丹に蝶- --花札衛-牡丹に蝶-
function c57261568.initial_effect(c) function c57261568.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--spsummon from hand --special summon rule
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
......
...@@ -38,7 +38,7 @@ end ...@@ -38,7 +38,7 @@ end
function c58383100.cfilter(c,e,tp) function c58383100.cfilter(c,e,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE)
and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousSetCard(0xe5) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousSetCard(0xe5)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c58383100.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c58383100.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......
...@@ -35,10 +35,10 @@ end ...@@ -35,10 +35,10 @@ end
function c63992027.operation(e,tp,eg,ep,ev,re,r,rp) function c63992027.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) then return end
local og=tc:GetOverlayGroup() local og=tc:GetOverlayGroup()
if og:GetCount()==0 then return end if og:GetCount()==0 then return end
if Duel.SendtoGrave(og,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if Duel.SendtoGrave(og,REASON_EFFECT)~=0 and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c63992027.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc) local g=Duel.SelectMatchingCard(tp,c63992027.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
if g:GetCount()>0 then if g:GetCount()>0 then
......
--源竜星-ボウテンコウ --源竜星-ボウテンコウ
function c65536818.initial_effect(c) function c65536818.initial_effect(c)
c:SetSPSummonOnce(65536818)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit() c:EnableReviveLimit()
c:SetSPSummonOnce(65536818)
--search --search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65536818,0)) e1:SetDescription(aux.Stringid(65536818,0))
......
...@@ -83,9 +83,5 @@ function c65959844.retcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,9 +83,5 @@ function c65959844.retcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c65959844.retop(e,tp,eg,ep,ev,re,r,rp) function c65959844.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
if tc:IsForbidden() then Duel.ReturnToField(tc)
Duel.SendtoGrave(tc,REASON_RULE)
else
Duel.ReturnToField(tc)
end
end end
...@@ -31,7 +31,7 @@ function c69105797.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -31,7 +31,7 @@ function c69105797.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c69105797.operation(e,tp,eg,ep,ev,re,r,rp) function c69105797.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -26,19 +26,6 @@ function c69228245.initial_effect(c) ...@@ -26,19 +26,6 @@ function c69228245.initial_effect(c)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--disable
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DISABLE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetTarget(c69228245.distg)
c:RegisterEffect(e4)
--cannot attack
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_ATTACK)
c:RegisterEffect(e5)
end end
function c69228245.cfilter(c,tp) function c69228245.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp return c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
...@@ -52,7 +39,7 @@ function c69228245.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -52,7 +39,7 @@ function c69228245.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and tc and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) end and tc and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,tp,tc:GetLocation()) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,0,0)
end end
function c69228245.spop(e,tp,eg,ep,ev,re,r,rp) function c69228245.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -60,7 +47,7 @@ function c69228245.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +47,7 @@ function c69228245.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) if c:IsRelateToEffect(e)
and Duel.Destroy(c,REASON_EFFECT)~=0 and Duel.Destroy(c,REASON_EFFECT)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)~=0 then and tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)~=0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
...@@ -79,10 +66,21 @@ end ...@@ -79,10 +66,21 @@ end
function c69228245.operation(e,tp,eg,ep,ev,re,r,rp) function c69228245.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
c:SetCardTarget(tc) c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetCondition(c69228245.rcon)
tc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_ATTACK)
tc:RegisterEffect(e2,true)
end end
end end
function c69228245.distg(e,c) function c69228245.rcon(e)
return e:GetHandler():IsHasCardTarget(c) return e:GetOwner():IsHasCardTarget(e:GetHandler())
end end
...@@ -53,7 +53,7 @@ function c77693536.fscon(e,g,gc,chkfnf) ...@@ -53,7 +53,7 @@ function c77693536.fscon(e,g,gc,chkfnf)
local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536) local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536)
local fc=fg:GetFirst() local fc=fg:GetFirst()
while fc do while fc do
g:Merge(fc:GetEquipGroup()) g:Merge(fc:GetEquipGroup():Filter(Card.IsControler,nil,tp))
fc=fg:GetNext() fc=fg:GetNext()
end end
local mg=g:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true) local mg=g:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true)
...@@ -79,7 +79,7 @@ function c77693536.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf) ...@@ -79,7 +79,7 @@ function c77693536.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf)
local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536) local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536)
local fc=fg:GetFirst() local fc=fg:GetFirst()
while fc do while fc do
eg:Merge(fc:GetEquipGroup()) eg:Merge(fc:GetEquipGroup():Filter(Card.IsControler,nil,tp))
fc=fg:GetNext() fc=fg:GetNext()
end end
local g=eg:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true) local g=eg:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true)
......
...@@ -25,7 +25,7 @@ function c81612598.fscon(e,g,gc,chkfnf) ...@@ -25,7 +25,7 @@ function c81612598.fscon(e,g,gc,chkfnf)
local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536) local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536)
local fc=fg:GetFirst() local fc=fg:GetFirst()
while fc do while fc do
g:Merge(fc:GetEquipGroup()) g:Merge(fc:GetEquipGroup():Filter(Card.IsControler,nil,tp))
fc=fg:GetNext() fc=fg:GetNext()
end end
local mg=g:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true) local mg=g:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true)
...@@ -51,7 +51,7 @@ function c81612598.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf) ...@@ -51,7 +51,7 @@ function c81612598.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf)
local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536) local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536)
local fc=fg:GetFirst() local fc=fg:GetFirst()
while fc do while fc do
eg:Merge(fc:GetEquipGroup()) eg:Merge(fc:GetEquipGroup():Filter(Card.IsControler,nil,tp))
fc=fg:GetNext() fc=fg:GetNext()
end end
local g=eg:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true) local g=eg:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true)
......
...@@ -9,56 +9,59 @@ function c82321037.initial_effect(c) ...@@ -9,56 +9,59 @@ function c82321037.initial_effect(c)
e1:SetTarget(c82321037.sptg) e1:SetTarget(c82321037.sptg)
e1:SetOperation(c82321037.spop) e1:SetOperation(c82321037.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--tohand --spsummon2
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,82321037+1) e2:SetCountLimit(1,82321038)
e2:SetCondition(c82321037.thcon) e2:SetCondition(c82321037.spcon2)
e2:SetTarget(c82321037.thtg) e2:SetTarget(c82321037.sptg2)
e2:SetOperation(c82321037.thop) e2:SetOperation(c82321037.spop2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c82321037.desfilter(c,tc) function c96746083.desfilter(c)
return c~=tc and c:IsType(TYPE_MONSTER) and ((c:IsLocation(LOCATION_MZONE) and c:IsFaceup()) or c:IsLocation(LOCATION_HAND)) and c:IsDestructable() return c:IsType(TYPE_MONSTER) and ((c:IsLocation(LOCATION_MZONE) and c:IsFaceup()) or c:IsLocation(LOCATION_HAND)) and c:IsDestructable()
end
function c82321037.desfilter2(c,tc)
return c82321037.desfilter(c,tc) and c:IsAttribute(ATTRIBUTE_WATER)
end
function c82321037.rmfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove()
end end
function c82321037.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c82321037.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(c82321037.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,nil,c)
local g2=Duel.GetMatchingGroup(c82321037.desfilter2,tp,LOCATION_MZONE+LOCATION_HAND,0,nil,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local loc=LOCATION_MZONE+LOCATION_HAND
if ft<0 then loc=LOCATION_MZONE end
local g=Duel.GetMatchingGroup(c96746083.desfilter,tp,loc,0,c)
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and g1:GetCount()>=2 and g2:GetCount()>=1 and g:GetCount()>=2 and g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WATER)
and (ft>0 or Duel.IsExistingMatchingCard(c82321037.desfilter,tp,LOCATION_MZONE,0,1,nil,c)) end and (ft>0 or g:IsExists(Card.IsLocation,-ft+1,nil,LOCATION_MZONE)) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,2,tp,loc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function c82321037.rmfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove()
end
function c82321037.spop(e,tp,eg,ep,ev,re,r,rp) function c82321037.spop(e,tp,eg,ep,ev,re,r,rp)
if not c82321037.sptg(e,tp,eg,ep,ev,re,r,rp,0) then return end
local c=e:GetHandler() local c=e:GetHandler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local loc=LOCATION_MZONE+LOCATION_HAND
if ft<0 then loc=LOCATION_MZONE end
local g=Duel.GetMatchingGroup(c96746083.desfilter,tp,loc,0,c)
if g:GetCount()<2 or not g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WATER) then return end
local g1=nil local g2=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
if ft<1 then
g1=g:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE)
else
g1=g:Select(tp,1,1,nil)
end
g:RemoveCard(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectMatchingCard(tp,c82321037.desfilter2,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,c) if g1:GetFirst():IsAttribute(ATTRIBUTE_WATER) then
if g1:GetCount()<=0 then return end g2=g:Select(tp,1,1,nil)
local tc1=g1:GetFirst()
local g2
if tc1:IsLocation(LOCATION_HAND) and ft<1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
g2=Duel.SelectMatchingCard(tp,c82321037.desfilter,tp,LOCATION_MZONE,0,1,1,tc1,c)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) g2=g:FilterSelect(tp,Card.IsAttribute,1,1,nil,ATTRIBUTE_WATER)
g2=Duel.SelectMatchingCard(tp,c82321037.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,tc1,c)
end end
if g2:GetCount()<=0 then return end
g1:Merge(g2) g1:Merge(g2)
local rm=g1:IsExists(Card.IsAttribute,2,nil,ATTRIBUTE_WATER)
if Duel.Destroy(g1,REASON_EFFECT)==2 then if Duel.Destroy(g1,REASON_EFFECT)==2 then
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
...@@ -66,29 +69,28 @@ function c82321037.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,29 +69,28 @@ function c82321037.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_RULE) Duel.SendtoGrave(c,REASON_RULE)
return return
end end
local g=Duel.GetMatchingGroup(c82321037.rmfilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil) local rg=Duel.GetMatchingGroup(c96746083.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil,tp)
if g1:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_WATER)==2 and g:GetCount()>0 if rm and rg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(96746083,0)) then
and Duel.SelectYesNo(tp,aux.Stringid(82321037,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c82321037.rmfilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,2,nil) local tg=rg:Select(tp,1,2,nil)
Duel.HintSelection(g) Duel.HintSelection(tg)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end end
end end
end end
function c82321037.thcon(e,tp,eg,ep,ev,re,r,rp) function c82321037.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT) return e:GetHandler():IsReason(REASON_EFFECT)
end end
function c82321037.thfilter(c,e,tp) function c82321037.thfilter(c,e,tp)
return not c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_WYRM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return not c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_WYRM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c82321037.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c82321037.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c82321037.thfilter,tp,LOCATION_DECK,0,nil,e,tp) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:GetCount()>0 end and Duel.IsExistingMatchingCard(c82321037.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end end
function c82321037.thop(e,tp,eg,ep,ev,re,r,rp) function c82321037.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c82321037.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c82321037.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -21,19 +21,10 @@ function c83326048.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -21,19 +21,10 @@ function c83326048.operation(e,tp,eg,ep,ev,re,r,rp)
local opt=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) local opt=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local ct=nil local ct=nil
if opt==0 then ct=TYPE_RITUAL end if opt==0 then ct=TYPE_RITUAL end
if opt==1 then if opt==1 then ct=TYPE_FUSION end
ct=TYPE_FUSION
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(27581098)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetTargetRange(1,1)
e0:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e0,tp)
end
if opt==2 then ct=TYPE_SYNCHRO end if opt==2 then ct=TYPE_SYNCHRO end
if opt==3 then ct=TYPE_XYZ end if opt==3 then ct=TYPE_XYZ end
if opt==4 then ct=TYPE_PENDULUM end if opt==4 then ct=TYPE_PENDULUM end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
...@@ -51,13 +42,6 @@ function c83326048.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,13 +42,6 @@ function c83326048.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetLabel(ct) e2:SetLabel(ct)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetOperation(c83326048.disop)
e3:SetLabel(ct)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end end
function c83326048.sumlimit(e,c,sump,sumtype,sumpos,targetp) function c83326048.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsType(e:GetLabel()) return c:IsType(e:GetLabel())
...@@ -65,9 +49,3 @@ end ...@@ -65,9 +49,3 @@ end
function c83326048.distg(e,c) function c83326048.distg(e,c)
return c:IsType(e:GetLabel()) return c:IsType(e:GetLabel())
end end
function c83326048.disop(e,tp,eg,ep,ev,re,r,rp)
local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if tl==LOCATION_MZONE and re:IsActiveType(e:GetLabel()) then
Duel.NegateEffect(ev)
end
end
...@@ -26,7 +26,7 @@ end ...@@ -26,7 +26,7 @@ end
function c91449532.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c91449532.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c91449532.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c91449532.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c91449532.spop(e,tp,eg,ep,ev,re,r,rp) function c91449532.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
...@@ -50,6 +50,8 @@ function c91449532.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,6 +50,8 @@ function c91449532.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function c91449532.postg(e,tp,eg,ep,ev,re,r,rp,chk) function c91449532.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAttackPos,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end end
function c91449532.posop(e,tp,eg,ep,ev,re,r,rp) function c91449532.posop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAttackPos,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(Card.IsAttackPos,tp,LOCATION_MZONE,0,nil)
......
--花札衛-萩に猪- --花札衛-萩に猪-
function c94388754.initial_effect(c) function c94388754.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--spsummon from hand --special summon rule
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
......
...@@ -14,7 +14,7 @@ function c95500396.eqfilter(c) ...@@ -14,7 +14,7 @@ function c95500396.eqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x9a) return c:IsFaceup() and c:IsSetCard(0x9a)
end end
function c95500396.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c95500396.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c95500396.eqfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c95500396.eqfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c95500396.eqfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end and Duel.IsExistingTarget(c95500396.eqfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
......
...@@ -25,22 +25,18 @@ function c96622984.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -25,22 +25,18 @@ function c96622984.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsCanAddCounter(0x1041,1) end if chkc then return chkc:IsControler(1-tp) and chkc:IsCanAddCounter(0x1041,1) end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x1041,1) end if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x1041,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x1041,1) Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x1041,1)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0)
end end
function c96622984.operation(e,tp,eg,ep,ev,re,r,rp) function c96622984.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsCanAddCounter(0x1041,1) then if tc:IsRelateToEffect(e) and tc:AddCounter(0x1041,1) and tc:GetLevel()>1 then
tc:AddCounter(0x1041,1) local e1=Effect.CreateEffect(e:GetHandler())
if tc:GetLevel()>1 then e1:SetType(EFFECT_TYPE_SINGLE)
local e1=Effect.CreateEffect(e:GetHandler()) e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetCondition(c96622984.lvcon)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetValue(1)
e1:SetCondition(c96622984.lvcon) tc:RegisterEffect(e1)
e1:SetValue(1)
tc:RegisterEffect(e1)
end
end end
end end
function c96622984.lvcon(e) function c96622984.lvcon(e)
...@@ -57,7 +53,6 @@ function c96622984.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +53,6 @@ function c96622984.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=c:GetBattleTarget() local tc=c:GetBattleTarget()
if tc:IsRelateToBattle() and Duel.Destroy(tc,REASON_EFFECT)>0 then if tc:IsRelateToBattle() and Duel.Destroy(tc,REASON_EFFECT)>0 then
Duel.BreakEffect() Duel.BreakEffect()
tc=Duel.GetOperatedGroup():GetFirst()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
......
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