Commit 1748cffb authored by DailyShana's avatar DailyShana

fix

parent 5cae3cb7
......@@ -22,7 +22,7 @@ end
function c18993198.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
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
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c18993198.spop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
--花札衛-紅葉に鹿-
function c21772453.initial_effect(c)
c:EnableReviveLimit()
--spsummon from hand
--special summon rule
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:SetRange(LOCATION_HAND)
e1:SetCode(EFFECT_SPSUMMON_PROC)
......
--光波双顎機
function c21999001.initial_effect(c)
--special summon from hand
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
......
......@@ -59,7 +59,7 @@ function c22011689.eqlimit(e,c)
return e:GetOwner()==c
end
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
function c22011689.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
......@@ -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 atk=g:GetFirst():GetTextAttack()
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
function c22011689.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -14,14 +14,6 @@ function c27581098.initial_effect(c)
e2:SetTargetRange(1,1)
e2:SetTarget(c27581098.splimit)
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
function c27581098.splimit(e,c,tp,sumtp,sumpos)
return bit.band(sumtp,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
......
......@@ -47,7 +47,7 @@ function c28016193.fscon(e,g,gc,chkfnf)
local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536)
local fc=fg:GetFirst()
while fc do
g:Merge(fc:GetEquipGroup())
g:Merge(fc:GetEquipGroup():Filter(Card.IsControler,nil,tp))
fc=fg:GetNext()
end
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)
local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536)
local fc=fg:GetFirst()
while fc do
eg:Merge(fc:GetEquipGroup())
eg:Merge(fc:GetEquipGroup():Filter(Card.IsControler,nil,tp))
fc=fg:GetNext()
end
local g=eg:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true)
......
......@@ -6,7 +6,7 @@ function c30086349.initial_effect(c)
--damage
local e1=Effect.CreateEffect(c)
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:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
......
......@@ -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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
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
function c30786387.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -39,7 +39,7 @@ function c38148100.negcon(e,tp,eg,ep,ev,re,r,rp)
end
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 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)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
......@@ -47,7 +47,7 @@ end
function c38148100.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -42,7 +42,7 @@ function c43266605.repval(e,c)
return c43266605.repfilter(c,e:GetHandlerPlayer())
end
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
function c43266605.cfilter(c,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)
local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536)
local fc=fg:GetFirst()
while fc do
g:Merge(fc:GetEquipGroup())
g:Merge(fc:GetEquipGroup():Filter(Card.IsControler,nil,tp))
fc=fg:GetNext()
end
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)
local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536)
local fc=fg:GetFirst()
while fc do
eg:Merge(fc:GetEquipGroup())
eg:Merge(fc:GetEquipGroup():Filter(Card.IsControler,nil,tp))
fc=fg:GetNext()
end
local g=eg:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true)
......
......@@ -26,7 +26,7 @@ function c54401832.fscon(e,g,gc,chkfnf)
local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536)
local fc=fg:GetFirst()
while fc do
g:Merge(fc:GetEquipGroup())
g:Merge(fc:GetEquipGroup():Filter(Card.IsControler,nil,tp))
fc=fg:GetNext()
end
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)
local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536)
local fc=fg:GetFirst()
while fc do
eg:Merge(fc:GetEquipGroup())
eg:Merge(fc:GetEquipGroup():Filter(Card.IsControler,nil,tp))
fc=fg:GetNext()
end
local g=eg:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true)
......
--花札衛-牡丹に蝶-
function c57261568.initial_effect(c)
c:EnableReviveLimit()
--spsummon from hand
--special summon rule
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:SetRange(LOCATION_HAND)
e1:SetCode(EFFECT_SPSUMMON_PROC)
......
......@@ -38,7 +38,7 @@ end
function c58383100.cfilter(c,e,tp)
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:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c58383100.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......
......@@ -35,10 +35,10 @@ end
function c63992027.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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()
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)
local g=Duel.SelectMatchingCard(tp,c63992027.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
if g:GetCount()>0 then
......
--源竜星-ボウテンコウ
function c65536818.initial_effect(c)
c:SetSPSummonOnce(65536818)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
c:SetSPSummonOnce(65536818)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65536818,0))
......
......@@ -83,9 +83,5 @@ function c65959844.retcon(e,tp,eg,ep,ev,re,r,rp)
end
function c65959844.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:IsForbidden() then
Duel.SendtoGrave(tc,REASON_RULE)
else
Duel.ReturnToField(tc)
end
Duel.ReturnToField(tc)
end
......@@ -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 chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
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
function c69105797.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -26,19 +26,6 @@ function c69228245.initial_effect(c)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
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
function c69228245.cfilter(c,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)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
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_SPECIAL_SUMMON,tc,1,tp,tc:GetLocation())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,0,0)
end
function c69228245.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -60,7 +47,7 @@ function c69228245.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e)
and Duel.Destroy(c,REASON_EFFECT)~=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)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
......@@ -79,10 +66,21 @@ end
function c69228245.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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)
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
function c69228245.distg(e,c)
return e:GetHandler():IsHasCardTarget(c)
function c69228245.rcon(e)
return e:GetOwner():IsHasCardTarget(e:GetHandler())
end
......@@ -53,7 +53,7 @@ function c77693536.fscon(e,g,gc,chkfnf)
local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536)
local fc=fg:GetFirst()
while fc do
g:Merge(fc:GetEquipGroup())
g:Merge(fc:GetEquipGroup():Filter(Card.IsControler,nil,tp))
fc=fg:GetNext()
end
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)
local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536)
local fc=fg:GetFirst()
while fc do
eg:Merge(fc:GetEquipGroup())
eg:Merge(fc:GetEquipGroup():Filter(Card.IsControler,nil,tp))
fc=fg:GetNext()
end
local g=eg:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true)
......
......@@ -25,7 +25,7 @@ function c81612598.fscon(e,g,gc,chkfnf)
local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536)
local fc=fg:GetFirst()
while fc do
g:Merge(fc:GetEquipGroup())
g:Merge(fc:GetEquipGroup():Filter(Card.IsControler,nil,tp))
fc=fg:GetNext()
end
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)
local fg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,77693536)
local fc=fg:GetFirst()
while fc do
eg:Merge(fc:GetEquipGroup())
eg:Merge(fc:GetEquipGroup():Filter(Card.IsControler,nil,tp))
fc=fg:GetNext()
end
local g=eg:Filter(Card.IsCanBeFusionMaterial,nil,e:GetHandler(),true)
......
......@@ -9,56 +9,59 @@ function c82321037.initial_effect(c)
e1:SetTarget(c82321037.sptg)
e1:SetOperation(c82321037.spop)
c:RegisterEffect(e1)
--tohand
--spsummon2
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
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:SetCountLimit(1,82321037+1)
e2:SetCondition(c82321037.thcon)
e2:SetTarget(c82321037.thtg)
e2:SetOperation(c82321037.thop)
e2:SetCountLimit(1,82321038)
e2:SetCondition(c82321037.spcon2)
e2:SetTarget(c82321037.sptg2)
e2:SetOperation(c82321037.spop2)
c:RegisterEffect(e2)
end
function c82321037.desfilter(c,tc)
return c~=tc and 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()
function c96746083.desfilter(c)
return c:IsType(TYPE_MONSTER) and ((c:IsLocation(LOCATION_MZONE) and c:IsFaceup()) or c:IsLocation(LOCATION_HAND)) and c:IsDestructable()
end
function c82321037.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
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 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)
and g1:GetCount()>=2 and g2:GetCount()>=1
and (ft>0 or Duel.IsExistingMatchingCard(c82321037.desfilter,tp,LOCATION_MZONE,0,1,nil,c)) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
and g:GetCount()>=2 and g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WATER)
and (ft>0 or g:IsExists(Card.IsLocation,-ft+1,nil,LOCATION_MZONE)) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,2,tp,loc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
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)
if not c82321037.sptg(e,tp,eg,ep,ev,re,r,rp,0) then return end
local c=e:GetHandler()
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)
local g1=Duel.SelectMatchingCard(tp,c82321037.desfilter2,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,c)
if g1:GetCount()<=0 then return end
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)
if g1:GetFirst():IsAttribute(ATTRIBUTE_WATER) then
g2=g:Select(tp,1,1,nil)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
g2=Duel.SelectMatchingCard(tp,c82321037.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,tc1,c)
g2=g:FilterSelect(tp,Card.IsAttribute,1,1,nil,ATTRIBUTE_WATER)
end
if g2:GetCount()<=0 then return end
g1:Merge(g2)
local rm=g1:IsExists(Card.IsAttribute,2,nil,ATTRIBUTE_WATER)
if Duel.Destroy(g1,REASON_EFFECT)==2 then
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
......@@ -66,29 +69,28 @@ function c82321037.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_RULE)
return
end
local g=Duel.GetMatchingGroup(c82321037.rmfilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
if g1:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_WATER)==2 and g:GetCount()>0
and Duel.SelectYesNo(tp,aux.Stringid(82321037,1)) then
local rg=Duel.GetMatchingGroup(c96746083.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil,tp)
if rm and rg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(96746083,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c82321037.rmfilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,2,nil)
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local tg=rg:Select(tp,1,2,nil)
Duel.HintSelection(tg)
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
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)
end
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
function c82321037.thtg(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 and g:GetCount()>0 end
function c82321037.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c82321037.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c82321037.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
function c82321037.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c82321037.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
......
......@@ -21,19 +21,10 @@ function c83326048.operation(e,tp,eg,ep,ev,re,r,rp)
local opt=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local ct=nil
if opt==0 then ct=TYPE_RITUAL end
if opt==1 then
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==1 then ct=TYPE_FUSION end
if opt==2 then ct=TYPE_SYNCHRO 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)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......@@ -51,13 +42,6 @@ function c83326048.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetLabel(ct)
e2:SetReset(RESET_PHASE+PHASE_END)
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
function c83326048.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsType(e:GetLabel())
......@@ -65,9 +49,3 @@ end
function c83326048.distg(e,c)
return c:IsType(e:GetLabel())
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
function c91449532.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
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
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c91449532.spop(e,tp,eg,ep,ev,re,r,rp)
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)
end
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
local g=Duel.GetMatchingGroup(Card.IsAttackPos,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c91449532.posop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAttackPos,tp,LOCATION_MZONE,0,nil)
......
--花札衛-萩に猪-
function c94388754.initial_effect(c)
c:EnableReviveLimit()
--spsummon from hand
--special summon rule
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:SetRange(LOCATION_HAND)
e1:SetCode(EFFECT_SPSUMMON_PROC)
......
......@@ -14,7 +14,7 @@ function c95500396.eqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x9a)
end
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
and Duel.IsExistingTarget(c95500396.eqfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
......
......@@ -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 chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x1041,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x1041,1)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0)
Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x1041,1)
end
function c96622984.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsCanAddCounter(0x1041,1) then
tc:AddCounter(0x1041,1)
if tc:GetLevel()>1 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetCondition(c96622984.lvcon)
e1:SetValue(1)
tc:RegisterEffect(e1)
end
if tc:IsRelateToEffect(e) and tc:AddCounter(0x1041,1) and tc:GetLevel()>1 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetCondition(c96622984.lvcon)
e1:SetValue(1)
tc:RegisterEffect(e1)
end
end
function c96622984.lvcon(e)
......@@ -57,7 +53,6 @@ function c96622984.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=c:GetBattleTarget()
if tc:IsRelateToBattle() and Duel.Destroy(tc,REASON_EFFECT)>0 then
Duel.BreakEffect()
tc=Duel.GetOperatedGroup():GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
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