Commit 1c7adf8b authored by Momobako's avatar Momobako

Push by Appveyor

parent 7d74d3f1
No preview for this file type
......@@ -64,7 +64,7 @@ function c1110002.tfilter2(c)
return c:IsCode(1110001) and c:IsFaceup()
end
function c1110002.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1110002.tfilter2,tp,LOCATION_MZONE,0,1,nil) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp)>0 end
if chk==0 then return Duel.IsExistingMatchingCard(c1110002.tfilter2,tp,LOCATION_MZONE,0,1,nil) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,LOCATION_HAND)
if e:GetLabel() and e:GetLabel()==1 then
Duel.SetChainLimit(c1110002.limit2)
......
......@@ -43,7 +43,7 @@ function c1110003.filter1(c,e,tp)
return c1110003.IsLd(c) and c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function c1110003.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c1110003.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp)>0 end
if chk==0 then return Duel.IsExistingTarget(c1110003.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,LOCATION_HAND)
end
--
......
......@@ -38,7 +38,7 @@ function c1110005.con1(e,tp,eg,ep,ev,re,r,rp)
end
--
function c1110005.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1110005.cfilter,tp,LOCATION_FZONE,0,1,nil) and Duel.GetMZoneCount(tp)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return Duel.IsExistingMatchingCard(c1110005.cfilter,tp,LOCATION_FZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
--
......
......@@ -44,7 +44,7 @@ function c1110006.tfilter1(c,e,tp)
return c:IsCode(1110002) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1110006.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c1110006.tfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
end
......@@ -53,7 +53,7 @@ function c1110006.ofilter1(c)
return c:IsType(TYPE_CONTINUOUS) and c1110006.IsLd(c)
end
function c1110006.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1110006.tfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
......@@ -90,8 +90,9 @@ function c1110006.op2(e,tp,eg,ep,ev,re,r,rp,chk)
else
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1110006,0))
local g=Duel.SelectMatchingCard(tp,c1110006.tfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
end
\ No newline at end of file
--蛰居·风雪旖旎
function c1110010.initial_effect(c)
--
c:EnableReviveLimit()
--
aux.EnableSpiritReturn(c,EVENT_SPSUMMON_SUCCESS)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c1110010.con2)
e2:SetOperation(c1110010.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1110010,0))
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_COUNTER)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,1110010)
e3:SetTarget(c1110010.tg3)
e3:SetOperation(c1110010.op3)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TODECK)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c1110010.con4)
e4:SetTarget(c1110010.tg4)
e4:SetOperation(c1110010.op4)
c:RegisterEffect(e4)
end
--
function c1110010.IsLq(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Lq
end
--
function c1110010.cfilter2(c)
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and c1110011.IsLq(c) and c:IsAbleToDeckAsCost()
end
function c1110010.con2(e,c)
if c==nil then return true end
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c1110010.cfilter2,tp,LOCATION_GRAVE,0,1,nil)
end
--
function c1110010.op2(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c1110010.cfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
--
function c1110010.tfilter3(c)
return c1110010.IsLq(c) and c:IsAbleToGrave() and c:IsType(TYPE_SPELL)
end
function c1110010.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1110010.tfilter3,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
--
function c1110010.ofilter3(c)
return c:IsCanAddCounter(0x1111,1) and c:IsFaceup() and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS)
end
function c1110010.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1110010.tfilter3,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c1110010.ofilter3,tp,LOCATION_ONFIELD,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(1110010,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g2=Duel.SelectMatchingCard(tp,c1110010.ofilter3,tp,LOCATION_ONFIELD,0,1,1,nil)
if g2:GetCount()>0 then
local tc2=g2:GetFirst()
tc2:AddCounter(0x1111,1)
end
end
end
end
--
function c1110010.con4(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_EFFECT) and c::GetPreviousControler()==tp
end
--
function c1110010.tg4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
--
function c1110010.op4(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
end
--
\ No newline at end of file
--莉莉卡·普莉兹姆利巴
function c1110011.initial_effect(c)
--
c:EnableReviveLimit()
--
aux.EnableSpiritReturn(c,EVENT_SPSUMMON_SUCCESS)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c1110011.con2)
e2:SetOperation(c1110011.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1110011,0))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,1110011)
e3:SetTarget(c1110011.tg3)
e3:SetOperation(c1110011.op3)
c:RegisterEffect(e3)
--
end
--
c1110011.named_with_Prismriver=1
--
function c1110011.IsLq(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Lq
end
function c1110011.IsPrismriver(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Prismriver
end
--
function c1110011.cfilter2(c)
return ((c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and c1110011.IsLq(c)) or (c:IsType(TYPE_SPIRIT) and c:IsType(TYPE_MONSTER))) and c:IsAbleToRemoveAsCost()
end
function c1110011.con2(e,c)
if c==nil then return true end
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c1110011.cfilter2,tp,LOCATION_GRAVE,0,1,nil)
end
--
function c1110011.op2(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c1110011.cfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
--
function c1110011.tfilter3(c)
return c1110011.IsIsPrismriver(c) and c:IsAbleToHand() and c:IsType(TYPE_SPELL)
end
function c1110011.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1110011.tfilter3,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
--
function c1110011.ofilter3(c)
return c:IsCanAddCounter(0x1111,1) and c:IsFaceup() and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS)
end
function c1110011.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1110011.tfilter3,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c1110011.ofilter3,tp,LOCATION_ONFIELD,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(1110011,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g2=Duel.SelectMatchingCard(tp,c1110011.ofilter3,tp,LOCATION_ONFIELD,0,1,1,nil)
if g2:GetCount()>0 then
local tc2=g2:GetFirst()
tc2:AddCounter(0x1111,1)
end
end
end
end
--
\ No newline at end of file
--梅露兰·普莉兹姆利巴
function c1110012.initial_effect(c)
--
c:EnableReviveLimit()
--
aux.EnableSpiritReturn(c,EVENT_SPSUMMON_SUCCESS)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c1110012.con2)
e2:SetOperation(c1110012.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1110012,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,1110012)
e3:SetTarget(c1110012.tg3)
e3:SetOperation(c1110012.op3)
c:RegisterEffect(e3)
--
end
--
c1110012.named_with_Prismriver=1
--
function c1110012.IsLq(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Lq
end
function c1110012.IsPrismriver(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Prismriver
end
--
function c1110012.cfilter2(c)
return ((c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and c1110012.IsLq(c)) or (c:IsType(TYPE_SPIRIT) and c:IsType(TYPE_MONSTER))) and c:IsAbleToRemoveAsCost()
end
function c1110012.con2(e,c)
if c==nil then return true end
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c1110012.cfilter2,tp,LOCATION_GRAVE,0,1,nil)
end
--
function c1110012.op2(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c1110012.cfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
--
function c1110012.tfilter3(c,e,tp)
return c:IsType(TYPE_SPIRIT) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function c1110012.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1110012.tfilter3,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
--
function c1110012.ofilter3(c)
return c:IsCanAddCounter(0x1111,1) and c:IsFaceup() and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS)
end
function c1110012.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1110012.tfilter3,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
if Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)~=0 then
local e3_1=Effect.CreateEffect(c)
e3_1:SetType(EFFECT_TYPE_SINGLE)
e3_1:SetCode(EFFECT_DISABLE)
e3_1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e3_1,true)
local e3_2=Effect.CreateEffect(c)
e3_2:SetType(EFFECT_TYPE_SINGLE)
e3_2:SetCode(EFFECT_DISABLE_EFFECT)
e3_2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e3_2,true)
Duel.SpecialSummonComplete()
if Duel.IsExistingMatchingCard(c1110012.ofilter3,tp,LOCATION_ONFIELD,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(1110012,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g2=Duel.SelectMatchingCard(tp,c1110012.ofilter3,tp,LOCATION_ONFIELD,0,1,1,nil)
if g2:GetCount()>0 then
local tc2=g2:GetFirst()
tc2:AddCounter(0x1111,1)
end
end
end
end
end
--
--露娜萨·普莉兹姆利巴
function c1110013.initial_effect(c)
--
c:EnableReviveLimit()
--
aux.EnableSpiritReturn(c,EVENT_SPSUMMON_SUCCESS)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c1110013.con2)
e2:SetOperation(c1110013.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1110013,0))
e3:SetCategory(CATEGORY_FLIP+CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,1110013)
e3:SetTarget(c1110013.tg3)
e3:SetOperation(c1110013.op3)
c:RegisterEffect(e3)
--
end
--
c1110013.named_with_Prismriver=1
--
function c1110013.IsLq(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Lq
end
function c1110013.IsPrismriver(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Prismriver
end
--
function c1110013.cfilter2(c)
return ((c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and c1110013.IsLq(c)) or (c:IsType(TYPE_SPIRIT) and c:IsType(TYPE_MONSTER))) and c:IsAbleToRemoveAsCost()
end
function c1110013.con2(e,c)
if c==nil then return true end
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c1110013.cfilter2,tp,LOCATION_GRAVE,0,1,nil)
end
--
function c1110013.op2(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c1110013.cfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
--
function c1110013.tfilter3(c)
return c:IsCanTurnSet() and c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function c1110013.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1110013.tfilter3,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_FLIP,nil,1,tp,LOCATION_ONFIELD)
end
--
function c1110013.ofilter3(c)
return c:IsCanAddCounter(0x1111,1) and c:IsFaceup() and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS)
end
function c1110013.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g=Duel.SelectMatchingCard(tp,c1110013.tfilter3,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) then
local e3_1=Effect.CreateEffect(e:GetHandler())
e3_1:SetType(EFFECT_TYPE_SINGLE)
e3_1:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e3_1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e3_1)
if Duel.IsExistingMatchingCard(c1110013.ofilter3,tp,LOCATION_ONFIELD,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(1110013,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g2=Duel.SelectMatchingCard(tp,c1110013.ofilter3,tp,LOCATION_ONFIELD,0,1,1,nil)
if g2:GetCount()>0 then
local tc2=g2:GetFirst()
tc2:AddCounter(0x1111,1)
end
end
end
end
end
--
......@@ -50,7 +50,7 @@ function c1110111.vfilter3(c)
end
--
function c1110111.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_FUSION
end
--
function c1110111.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -122,6 +122,13 @@ function c1110111.op1(e,tp,eg,ep,ev,re,r,rp)
e1_9:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e1_9:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1_9)
local e1_10=Effect.CreateEffect(e:GetHandler())
e1_10:SetType(EFFECT_TYPE_SINGLE)
e1_10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1_10:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1_10:SetValue(1)
e1_10:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1_10)
end
end
--
......
......@@ -54,17 +54,17 @@ function c1110112.filter1(c,e,tp)
return c:IsCode(1110111) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceup()
end
function c1110112.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_FUSION
end
--
function c1110112.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c1110112.filter1,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
--
function c1110112.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1110112.filter1,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
......
......@@ -5,6 +5,7 @@ function c1110121.initial_effect(c)
aux.AddXyzProcedure(c,c1110121.xyzfilter,3,2,c1110121.ovfilter,aux.Stringid(1110121,0),2,c1110121.xyzop)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1110121,2))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
......
--
function c1110123.initial_effect(c)
--
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(c1110123.con1)
e1:SetOperation(c1110123.op1)
e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,1110123)
e2:SetCondition(c1110123.con2)
e2:SetTarget(c1110123.tg2)
e2:SetOperation(c1110123.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1110123,0))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,1110128)
e3:SetCost(c1110123.cost3)
e3:SetTarget(c1110123.tg3)
e3:SetOperation(c1110123.op3)
c:RegisterEffect(e3)
--
end
--
c1110123.xyz_count=2
--
function c1110123.IsLq(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Lq
end
--
function c1110123.mfilter(c,xyzc)
return c:IsXyzLevel(xyzc,3)
end
--
function c1110123.xyzcheck(g,xyzc,exg)
local ct=g:GetCount()
return g:CheckWithSumEqual(c1110123.val(exg),6,ct,ct)
end
function c1110123.val(exg)
return
function(c)
return exg:IsContains(c) and c:GetLevel() or 3
end
end
--
function c1110123.XyzProcedureCustomFilter(c,xyzcard,func,ext_params)
if c:IsLocation(LOCATION_ONFIELD+LOCATION_REMOVED) and c:IsFacedown() then return false end
return c:IsCanBeXyzMaterial(xyzcard) and (not func or func(c,xyzcard,table.unpack(ext_params)))
end
--
function c1110123.tokenfilter(c)
return c:IsType(TYPE_TOKEN) and c:IsReleasable() and c:IsLevelBelow(3)
end
--
function c1110123.CheckGroup(g,f,cg,min,max,...)
local min=min or 1
local max=max or g:GetCount()
if min>max then return false end
local ext_params={...}
local sg=Group.CreateGroup()
if cg then sg:Merge(cg) end
local ct=sg:GetCount()
if ct>=min and ct<max and f(sg,...) then return true end
return g:IsExists(c1110123.CheckGroupRecursive,1,nil,sg,g,f,min,max,ext_params)
end
function c1110123.CheckGroupRecursive(c,sg,g,f,min,max,ext_params)
if sg:IsContains(c) then return false end
sg:AddCard(c)
local ct=sg:GetCount()
local res=(ct>=min and f(sg,table.unpack(ext_params)))
or (ct<max and g:IsExists(c1110123.CheckGroupRecursive,1,nil,sg,g,f,min,max,ext_params))
sg:RemoveCard(c)
return res
end
--
function c1110123.CheckFieldFilter(g,tp,c,f,...)
return Duel.GetLocationCount(tp,LOCATION_MZONE)+g:FilterCount(aux.FConditionCheckF,nil,tp)>0 and (not f or f(g,...))
end
--
function c1110123.con1(e,c,og,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local func=c1110123.mfilter
local gf=c1110123.xyzcheck
local ext_params={}
local minc=2
local maxc=4
if min then
minc=math.max(minc,min)
maxc=math.min(maxc,max)
end
local mg=nil
local exg=Group.CreateGroup()
if og then
mg=og:Filter(c1110123.XyzProcedureCustomFilter,nil,c,func,ext_params)
exg=og:Filter(c1110123.tokenfilter,nil)
else
mg=Duel.GetMatchingGroup(c1110123.XyzProcedureCustomFilter,tp,LOCATION_MZONE,0,nil,c,func,ext_params)
exg=Duel.GetMatchingGroup(c1110123.tokenfilter,tp,LOCATION_MZONE,0,nil)
mg:Merge(exg)
end
return maxc>=minc and c1110123.CheckGroup(mg,c1110123.CheckFieldFilter,nil,minc,maxc,tp,c,gf,c,exg)
end
--
function c1110123.SelectGroup(tp,desc,g,f,cg,min,max,...)
local min=min or 1
local max=max or g:GetCount()
local ext_params={...}
local sg=Group.CreateGroup()
if cg then sg:Merge(cg) end
local ct=sg:GetCount()
while ct<max and not (ct>=min and f(sg,...) and not (g:IsExists(c1110123.CheckGroupRecursive,1,nil,sg,g,f,min,max,ext_params) and Duel.SelectYesNo(tp,210))) do
Duel.Hint(HINT_SELECTMSG,tp,desc)
local tg=g:FilterSelect(tp,c1110123.CheckGroupRecursive,1,1,nil,sg,g,f,min,max,ext_params)
sg:Merge(tg)
ct=sg:GetCount()
end
return sg
end
--
function c1110123.OverlayFilter(c,nchk)
return nchk or not c:IsType(TYPE_TOKEN)
end
function c1110123.OverlayGroup(c,g,xm,nchk)
if not nchk and (not c:IsLocation(LOCATION_MZONE) or c:IsFacedown() or g:GetCount()<=0 or not c:IsType(TYPE_XYZ)) then return end
local tg=g:Filter(c1110123.OverlayFilter,nil,nchk)
if tg:GetCount()==0 then return end
local og=Group.CreateGroup()
for tc in aux.Next(tg) do
if tc:IsStatus(STATUS_LEAVE_CONFIRMED) then
tc:CancelToGrave()
end
og:Merge(tc:GetOverlayGroup())
end
if og:GetCount()>0 then
if xm then
Duel.Overlay(c,og)
else
Duel.SendtoGrave(og,REASON_RULE)
end
end
Duel.Overlay(c,tg)
end
--
function c1110123.op1(e,tp,eg,ep,ev,re,r,rp,c)
local g=nil
local exg=Group.CreateGroup()
if og and not min then
g=og
else
local func=c1110123.mfilter
local gf=c1110123.xyzcheck
local ext_params={}
local mg=nil
if og then
mg=og:Filter(c1110123.XyzProcedureCustomFilter,nil,c,func,ext_params)
exg=og:Filter(c1110123.tokenfilter,nil)
else
mg=Duel.GetMatchingGroup(c1110123.XyzProcedureCustomFilter,tp,LOCATION_MZONE,0,nil,c,func,ext_params)
exg=Duel.GetMatchingGroup(c1110123.tokenfilter,tp,LOCATION_MZONE,0,nil)
mg:Merge(exg)
end
local minc=2
local maxc=4
if min then
minc=math.max(minc,min)
maxc=math.min(maxc,max)
end
g=c1110123.SelectGroup(tp,HINTMSG_XMATERIAL,mg,c1110123.CheckFieldFilter,nil,minc,maxc,tp,c,gf,c,exg)
end
c:SetMaterial(g)
local rg=g:Filter(function(c) return exg:IsContains(c) end,nil)
g:Sub(rg)
Duel.Release(rg,REASON_COST+REASON_MATERIAL)
c1110123.OverlayGroup(c,g,false,true)
end
--
function c1110123.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ
end
--
function c1110123.tfilter2(c)
return c1110123.IsLq(c)
end
function c1110123.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(c1110123.tfilter2,tp,LOCATION_DECK,0,1,nil) end
end
--
function c1110123.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g=Duel.SelectMatchingCard(tp,c1110123.tfilter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(c,Group.FromCards(tc))
end
end
--
function c1110123.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
--
function c1110123.tfilter3(c)
return c:IsAbleToGrave() and c:IsFaceup()
end
function c1110123.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) end
if chk==0 then return Duel.IsExistingTarget(c1110123.tfilter3,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c1110123.tfilter3,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,LOCATION_ONFIELD)
end
--
function c1110123.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_ONFIELD) then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
--
......@@ -79,7 +79,7 @@ function c1110151.filterx(c)
end
--
function c1110151.con3(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_RITUAL
end
function c1110151.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 end
......
......@@ -19,7 +19,7 @@ function c1111008.IsLd(c)
end
--
function c1111008.cfilter1(c)
return c:IsSummonType(SUMMON_TYPE_FUSION) and c:IsFaceup()
return c:GetSummonType()==SUMMON_TYPE_FUSION and c:IsFaceup()
end
function c1111008.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......@@ -30,14 +30,14 @@ function c1111008.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
end
--
function c1111008.cfilter1(c)
return c:IsFaceup() and c:GetLevel()<4 and c:IsSummonType(SUMMON_TYPE_NORMAL)
return c:IsFaceup() and c:GetLevel()<4 and c:GetSummonType()==SUMMON_TYPE_NORMAL
end
function c1111008.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c1111008.cfilter1,tp,LOCATION_ONFIELD,0,1,nil) and Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_MZONE,0,nil)==1
end
--
function c1111008.tfilter0(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsFaceup()
return c:GetSummonType()==SUMMON_TYPE_SPECIAL and c:IsFaceup()
end
function c1111008.tfilter1(c)
return c1111008.IsLd(c) and c:IsAbleToHand()
......
--秘谈·澄澈的空海
function c1111011.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c1111011.cost1)
e1:SetTarget(c1111011.tg1)
e1:SetOperation(c1111011.op1)
c:RegisterEffect(e1)
--
end
--
function c1111011.IsLd(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Ld
end
--
function c1111011.cfilter1(c)
return c1111011.IsLd(c)
end
function c1111011.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1111011.cfilter1,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c1111011.cfilter1,tp,LOCATION_HAND,0,1,1,e:GetHandler())
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
--
function c1111011.tfilter1(c)
return c:IsFacedown()
end
function c1111011.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1111011.tfilter1,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetChainLimit(aux.FALSE)
end
--
function c1111011.ofilter1(c)
return c:IsFacedown() and c:IsAbleToHand()
end
function c1111011.op1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c1111011.tfilter1,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.ConfirmCards(tp,g)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g2=g:FilterSelect(tp,c1111011.ofilter1,1,1,nil)
if g2:GetCount()>0 then
local tc2=g2:GetFirst()
Duel.SendtoHand(tc2,nil,REASON_EFFECT)
end
end
end
--
\ No newline at end of file
--秘谈·时令的欢舞
function c1111012.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c1111012.tg1)
e1:SetOperation(c1111012.op1)
c:RegisterEffect(e1)
--
end
--
function c1111012.IsLq(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Lq
end
--
function c1111012.tfilter1(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_SPIRIT) and c:GetLevel()<4 and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and not c:IsType(TYPE_XYZ) and not c:IsType(TYPE_LINK)
end
function c1111012.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local num=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if e:GetHandler():IsLocation(LOCATION_HAND) then
num=num-1
end
return num>0 and Duel.IsExistingMatchingCard(c1111012.tfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
--
function c1111012.ofilter1(c)
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and c:IsCanAddCounter(0x1111,1) and c:IsFaceup() and c1111012.IsLq(c)
end
function c1111012.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local num=Duel.SendtoGrave(g,REASON_EFFECT)
if num>0 then
local num2=Duel.GetLocationCount(tp,LOCATION_MZONE)
if num>num2 then
num=num2
end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then
num=1
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,c1111012.tfilter1,tp,LOCATION_GRAVE,0,1,num,nil,e,tp)
if g2:GetCount()>0 then
if Duel.SpecialSummon(g2,0,tp,tp,true,true,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(c1111012.ofilter1,tp,LOCATION_ONFIELD,0,1,nil) then
Duel.BreakEffect()
local g3=Duel.GetMatchingGroup(c1111012.ofilter1,tp,LOCATION_ONFIELD,0,nil)
if g3:GetCount()>0 then
local tc3=g3:GetFirst()
while tc3 do
tc3:AddCounter(0x1111,1)
tc3=g3:GetNext()
end
end
end
end
end
end
--
\ No newline at end of file
--灵曲·彼岸盛开之花
function c1111221.initial_effect(c)
--
c:EnableCounterPermit(0x1111)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1111221,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,1111221)
e1:SetCost(c1111221.cost1)
e1:SetTarget(c1111221.tg1)
e1:SetOperation(c1111221.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1111221,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,1111226)
e2:SetCost(c1111221.cost2)
e2:SetTarget(c1111221.tg2)
e2:SetOperation(c1111221.op2)
c:RegisterEffect(e2)
end
--
c1111221.named_with_Lq=1
function c1111221.IsLq(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Lq
end
--
function c1111221.cfilter1(c)
return c:IsAbleToHandAsCost() and c:IsType(TYPE_MONSTER)
end
function c1111221.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1111221.cfilter1,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c1111221.cfilter1,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_COST)
end
--
function c1111221.tfilter1(c)
return c:IsAbleToGrave()
end
function c1111221.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1111221.tfilter1,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_ONFIELD)
end
--
function c1111221.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1111221.tfilter1,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
Duel.BreakEffect()
e:GetHandler():AddCounter(0x1111,1)
end
end
end
end
--
function c1111221.cfilter2(c)
return c:IsAbleToGrave() and c1111221.IsLq(c) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS)
end
function c1111221.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1111,2,REASON_COST) and Duel.IsExistingMatchingCard(c1111221.cfilter2,tp,LOCATION_DECK,0,2,nil) end
local c=e:GetHandler()
local num=0
while c:IsCanRemoveCounter(tp,0x1111,1,REASON_COST) do
num=num+1
c:RemoveCounter(tp,0x1111,1,REASON_COST)
if num>=2 then
if c:IsCanRemoveCounter(tp,0x1111,1,REASON_COST) and Duel.IsExistingMatchingCard(c1111221.cfilter2,tp,LOCATION_DECK,0,num+1,nil) and Duel.SelectYesNo(tp,aux.Stringid(1111221,2)) then
else
break
end
end
end
e:SetLabel(num)
end
--
function c1111221.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1111221.cfilter2,tp,LOCATION_DECK,0,2,nil) end
if e:GetLabel() and e:GetLabel()>0 then
local num=e:GetLabel()
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,num,tp,LOCATION_DECK)
end
end
--
function c1111221.oftiler2(c)
return c:IsAbleToRemove()
end
function c1111221.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if e:GetLabel() and e:GetLabel()>0 then
local num=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1111221.cfilter2,tp,LOCATION_DECK,0,num,num,nil)
if g:GetCount()>0 then
local numtograve=Duel.SendtoGrave(g,REASON_EFFECT)
if numtograve>0 and Duel.IsExistingMatchingCard(c1111221.ofilter2,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(1111221,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectTarget(tp,c1111221.ofilter2,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,numtograve,nil)
if g2:GetCount()>0 then
Duel.Remove(g2,POS_FACEUP,REASON_EFFECT)
end
end
end
end
end
end
--
\ No newline at end of file
--灵曲·拂晓繁华之风
function c1111222.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1111222,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,1111222)
e1:SetTarget(c1111222.tg1)
e1:SetOperation(c1111222.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1111222,1))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,1111227)
e2:SetCost(c1111222.cost2)
e2:SetTarget(c1111222.tg2)
e2:SetOperation(c1111222.op2)
c:RegisterEffect(e2)
--
end
--
c1111222.named_with_Lq=1
function c1111222.IsLq(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Lq
end
--
function c1111222.tfilter1(c)
return c:IsAbleToHand()
end
function c1111222.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) end
if chk==0 then return Duel.IsExistingTarget(c1111222.tfilter1,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c1111222.tfilter1,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_RTOHAND,g,1,0,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,LOCATION_ONFIELD)
Duel.SetChainLimit(c1111222.limit1_1(g:GetFirst()))
end
function c1111222.limit1_1(c)
return
function (e,lp,tp)
return e:GetHandler() ~= c
end
end
--
function c1111222.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_ONFIELD) then
if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then
c:AddCounter(0x1111,1)
end
end
end
--
function c1111222.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1111,1,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x1111,1,REASON_COST)
end
--
function c1111222.tfilter2(c)
return c:IsFaceup() and c:IsCanAddCounter(0x1111,1) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and c1111222.IsLq(c)
end
function c1111222.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c1111222.tfilter2,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,LOCATION_ONFIELD)
end
--
function c1111222.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1111222.tfilter2,tp,0,LOCATION_DECK,1,2,e:GetHandler())
if g:GetCount()>0 then
local tc=g:GetFirst()
while tc do
tc:AddCounter(0x1111,1)
tc=g:GetNext()
end
end
end
end
--
\ No newline at end of file
--灵曲·年华静谧之月
function c1111223.initial_effect(c)
--
c:EnableCounterPermit(0x1111)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1111223,0))
e1:SetCategory(CATEGORY_FLIP+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,1111223)
e1:SetCost(c1111223.cost1)
e1:SetTarget(c1111223.tg1)
e1:SetOperation(c1111223.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1111223,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,1111228)
e2:SetCost(c1111223.cost2)
e2:SetTarget(c1111223.tg2)
e2:SetOperation(c1111223.op2)
c:RegisterEffect(e2)
--
end
--
c1111223.named_with_Lq=1
function c1111223.IsLq(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Lq
end
--
function c1111223.cfilter1(c)
return c:IsAbleToRemoveAsCost() and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and c1111223.IsLq(c)
end
function c1111223.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1111223.cfilter1,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c1111223.cfilter1,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
end
--
function c1111223.tfilter1(c)
return c:IsCanTurnSet()
end
function c1111223.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
c:SetTurnCounter(0)
local g=Duel.GetMatchingGroup(c1111223.tfilter1,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,LOCATION_ONFIELD)
end
--
function c1111223.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local g=Duel.GetMatchingGroup(c1111223.tfilter1,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
if Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)~=0 then
c:AddCounter(0x1111,1)
end
end
end
end
--
function c1111223.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1111,1,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x1111,1,REASON_COST)
end
--
function c1111223.tfilter2(c)
return c:IsFaceup()
end
function c1111223.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) end
if chk==0 then return Duel.IsExistingTarget(c1111223.tfilter2,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g=Duel.SelectTarget(tp,c1111223.tfilter2,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,LOCATION_ONFIELD)
end
--
function c1111223.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) then
local e2_1=Effect.CreateEffect(c)
e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2_1:SetRange(LOCATION_ONFIELD)
e2_1:SetCode(EFFECT_IMMUNE_EFFECT)
e2_1:SetValue(c1111223.val2_1)
e2_1:SetReset(RESET_EVENT+0x1fe0000+RESET_CHAIN)
c:RegisterEffect(e2_1)
end
end
function c1111223.val2_1(e,te)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
--灵曲·凌霜空幽之雪
function c1111224.initial_effect(c)
--
c:EnableCounterPermit(0x1111)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1111224,0))
e1:SetCategory(CATEGORY_RELEASE+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,1111224)
e1:SetCost(c1111224.cost1)
e1:SetTarget(c1111224.tg1)
e1:SetOperation(c1111224.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1111224,1))
e2:SetCategory(CATEGORY_RELEASE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,1111229)
e2:SetCost(c1111224.cost2)
e2:SetTarget(c1111224.tg2)
e2:SetOperation(c1111224.op2)
c:RegisterEffect(e2)
--
end
--
c1111224.named_with_Lq=1
function c1111224.IsLq(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Lq
end
--
function c1111224.cfilter1(c)
return c:IsReleasable() and c:IsHasEffect(EFFECT_IMMUNE_EFFECT)
end
function c1111224.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1111224.cfilter1,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c1111224.cfilter1,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.Release(g,REASON_COST)
end
end
--
function c1111224.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,LOCATION_ONFIELD)
end
--
function c1111224.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
c:AddCounter(0x1111,1)
local e1_1=Effect.CreateEffect(c)
e1_1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1_1:SetRange(LOCATION_SZONE)
e1_1:SetCountLimit(1)
e1_1:SetCode(EVENT_PHASE+PHASE_END)
e1_1:SetOperation(c1111224.op1_1)
e1_1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1_1)
end
end
function c1111224.op1_1(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
--
function c1111224.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1111,2,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x1111,2,REASON_COST)
end
--
function c1111224.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,LOCATION_ONFIELD)
Duel.SetChainLimit(aux.FALSE)
end
--
function c1111224.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) then
local e2_1=Effect.CreateEffect(e:GetHandler())
e2_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetCode(EFFECT_CANNOT_TRIGGER)
e2_1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2_1)
local e2_2=Effect.CreateEffect(e:GetHandler())
e2_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2_2:SetType(EFFECT_TYPE_SINGLE)
e2_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2_2:SetCode(EFFECT_DISABLE)
e2_2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2_2)
local e2_3=Effect.CreateEffect(e:GetHandler())
e2_3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2_3:SetType(EFFECT_TYPE_SINGLE)
e2_3:SetCode(EFFECT_DISABLE_EFFECT)
e2_3:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2_3)
local e2_4=Effect.CreateEffect(e:GetHandler())
e2_4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2_4:SetType(EFFECT_TYPE_SINGLE)
e2_4:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e2_4:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2_4)
local e2_5=Effect.CreateEffect(e:GetHandler())
e2_5:SetType(EFFECT_TYPE_SINGLE)
e2_5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2_5:SetCode(EFFECT_CANNOT_ATTACK)
e2_5:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2_5)
local e2_6=Effect.CreateEffect(e:GetHandler())
e2_6:SetType(EFFECT_TYPE_SINGLE)
e2_6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2_6:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e2_6:SetValue(1)
e2_6:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2_6)
local e2_7=Effect.CreateEffect(e:GetHandler())
e2_7:SetType(EFFECT_TYPE_SINGLE)
e2_7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2_7:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e2_7:SetValue(1)
e2_7:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2_7)
local e2_8=Effect.CreateEffect(e:GetHandler())
e2_8:SetType(EFFECT_TYPE_SINGLE)
e2_8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2_8:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e2_8:SetValue(1)
e2_8:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2_8)
local e2_9=Effect.CreateEffect(e:GetHandler())
e2_9:SetType(EFFECT_TYPE_SINGLE)
e2_9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2_9:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e2_9:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2_9)
local e2_10=Effect.CreateEffect(e:GetHandler())
e2_10:SetType(EFFECT_TYPE_SINGLE)
e2_10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2_10:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e2_10:SetValue(1)
e2_10:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2_10)
end
end
......@@ -45,7 +45,7 @@ function c1111301.matfilter(c)
end
function c1111301.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetMZoneCount(tp)<=0 then return false end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end
local mg=Duel.GetMatchingGroup(c1111301.matfilter,tp,LOCATION_GRAVE,0,nil)
return Duel.IsExistingMatchingCard(c1111301.filter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,nil,e,tp,mg)
end
......@@ -53,7 +53,7 @@ function c1111301.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
end
--
function c1111301.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local mg=Duel.GetMatchingGroup(c1111301.matfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c1111301.filter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,1,nil,e,tp,mg)
......
......@@ -60,7 +60,7 @@ function c1111501.limit1_1(e,c,sump,sumtype,sumpos,targetp,se)
end
--
function c1111501.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,1110199,0,0x4011,100,100,3,RACE_FAIRY,ATTRIBUTE_LIGHT) and Duel.SelectYesNo(tp,aux.Stringid(1111501,3)) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,1110199,0,0x4011,100,100,3,RACE_FAIRY,ATTRIBUTE_LIGHT) and Duel.SelectYesNo(tp,aux.Stringid(1111501,3)) then
local token=Duel.CreateToken(tp,1110199)
if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1_2=Effect.CreateEffect(e:GetHandler())
......@@ -118,12 +118,12 @@ function c1111501.tfilter3(c,e,tp)
return c:IsCode(1110003) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1111501.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(c1111501.tfilter3,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c1111501.tfilter3,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,LOCATION_DECK+LOCATION_GRAVE)
end
--
function c1111501.op3(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1111501.tfilter3,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
......
......@@ -43,13 +43,13 @@ function c1111502.filter2(c,e,tp)
return c:GetLevel()==3 and c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1111502.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c1111502.filter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c1111502.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetMZoneCount(tp)>0 and c:IsRelateToEffect(e) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1111502.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
......
--交界·废弃洋馆
function c1111511.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c1111511.tg1)
e1:SetOperation(c1111511.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_FZONE)
e2:SetValue(c1111511.val2)
e2:SetCondition(c1111511.con2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_FZONE)
e3:SetCode(EFFECT_SEND_REPLACE)
e3:SetTarget(c1111511.tg3)
e3:SetValue(c1111511.val3)
c:RegisterEffect(e3)
--
end
--
function c1111511.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
--
function c1111511.ofilter1(c)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_SPIRIT) and c:GetLevel()<4 and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function c1111511.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c1111511.ofilter1,tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(1111511,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1111511.tfilter1,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP)
end
end
end
--
function c1111511.val2(e,re)
return e:GetHandlerPlayer()~=re:GetHandlerPlayer()
end
--
function c1111511.con2(e,tp)
local num=Duel.GetCounter(tp,LOCATION_ONFIELD,0,0x1111)
return num>2
end
--
function c11111511.tfilter3(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:GetDestination()==LOCATION_DECK and c:IsAbleToHand()
end
function c1111511.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return bit.band(r,REASON_EFFECT)~=0 and re and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsType(TYPE_SPIRIT) and eg:IsExists(c1111511.tfilter3,1,nil,tp) end
if Duel.SelectYesNo(tp,aux.Stringid(1111511,1)) then
local g=eg:Filter(c1111511.tfilter3,nil,tp)
local ct=g:GetCount()
if ct>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
g=g:Select(tp,1,ct,nil)
end
local tc=g:GetFirst()
while tc do
local e3_1=Effect.CreateEffect(e:GetHandler())
e3_1:SetType(EFFECT_TYPE_SINGLE)
e3_1:SetCode(EFFECT_TO_DECK_REDIRECT)
e3_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3_1:SetValue(LOCATION_HAND)
e3_1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3_1)
tc:RegisterFlagEffect(1111511,RESET_EVENT+0x1de0000+RESET_PHASE+PHASE_END,0,1)
tc=g:GetNext()
end
local e3_2=Effect.CreateEffect(e:GetHandler())
e3_2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3_2:SetCode(EVENT_TO_HAND)
e3_2:SetCountLimit(1)
e3_2:SetCondition(c1111511.con3_2)
e3_2:SetOperation(c1111511.op3_2)
e3_2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3_2,tp)
return true
else return false
end
end
function c1111511.cfilter3_2(c)
return c:GetFlagEffect(1111511)~=0
end
function c1111511.con3_2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c1111511.cfilter3_2,1,nil)
end
function c1111511.op3_2(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c1111511.cfilter3_2,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
--
function c1111511.val3(e,c)
return false
end
--
--恶魔之妹·芙兰朵露
function c1152001.initial_effect(c)
--
aux.AddLinkProcedure(c,aux.FilterBoolFunction(c1152001.lfilter),4)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1152001,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetHintTiming(0,0x1e0)
e1:SetTarget(c1152001.tg1)
e1:SetOperation(c1152001.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c1152001.tg2)
e2:SetOperation(c1152001.op2)
c:RegisterEffect(e2)
--
end
--
c1152001.named_with_Fulan=1
function c1152001.IsFulan(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Fulan
end
c1152001.named_with_Fulsp=1
function c1152001.IsFulsp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Fulsp
end
--
function c1152001.lfilter(c)
return c:IsRace(RACE_FIEND)
end
--
function c1152001.tfilter1(c)
return c:IsFaceup() and not c:IsDisabled()
end
function c1152001.tfilter1_2(c)
return c1152001.IsFulsp(c) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToRemove() and bit.band(c:GetReason(),REASON_DESTROY)~=0
end
function c1152001.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c1152001.tfilter1(chkc) end
local c=e:GetHandler()
local lg=c:GetLinkedGroup()
local g=lg:Filter(Card.IsDestructable,nil)
if chk==0 then return Duel.IsExistingTarget(c1152001.tfilter1,tp,0,LOCATION_ONFIELD,1,nil) and (g:GetCount()>0 or Duel.IsExistingTarget(c1152001.tfilter1_2,tp,LOCATION_GRAVE,0,1,nil)) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c1152001.tfilter1,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
--
function c1152001.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lg=c:GetLinkedGroup()
local g=lg:Filter(Card.IsDestructable,nil)
local Destroy=0
if g:GetCount()>0 and Duel.IsExistingTarget(c1152001.tfilter1_2,tp,LOCATION_GRAVE,0,1,nil) then
local i=Duel.SelectOption(tp,aux.Stringid(1152001,1),aux.Stringid(1152001,2))
if i==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=g:Select(tp,1,1,nil)
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Destroy=1
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c1152001.tfilter1_2,tp,LOCATION_GRAVE,0,1,1,nil)
local tc2=g2:GetFirst()
if Duel.Remove(tc2,POS_FACEUP,REASON_EFFECT)~=0 then
Destroy=1
end
end
else
if g:GetCount()>0 and not Duel.IsExistingTarget(c1152001.tfilter1_2,tp,LOCATION_GRAVE,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=g:Select(tp,1,1,nil)
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Destroy=1
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c1152001.tfilter1_2,tp,LOCATION_GRAVE,0,1,1,nil)
local tc2=g2:GetFirst()
if Duel.Remove(tc2,POS_FACEUP,REASON_EFFECT)~=0 then
Destroy=1
end
end
end
if Destroy==1 then
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and not tc:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1_1=Effect.CreateEffect(e:GetHandler())
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_DISABLE)
e1_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1_1)
local e1_2=e1_1:Clone()
e1_2:SetCode(EFFECT_DISABLE_EFFECT)
e1_2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e1_2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e1_3=Effect.CreateEffect(e:GetHandler())
e1_3:SetType(EFFECT_TYPE_SINGLE)
e1_3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e1_3:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1_3)
end
Duel.AdjustInstantly()
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
--
function c1152001.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetControler()==Duel.GetTurnPlayer() and rp~=tp end
return Duel.SelectYesNo(tp,aux.Stringid(1152001,3))
end
--
function c1152001.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local e2_1=Effect.CreateEffect(e:GetHandler())
e2_1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2_1:SetCode(EVENT_PHASE+PHASE_END)
e2_1:SetReset(RESET_PHASE+PHASE_END)
e2_1:SetCountLimit(1)
e2_1:SetOperation(c1152001.op2_1)
Duel.RegisterEffect(e2_1,tp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,aux.NULL)
end
end
function c1152001.op2_1(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetOwner())
end
--
--幽禁之间·芙兰朵露
function c1152002.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c1152002.con1)
e1:SetTarget(c1152002.tg1)
e1:SetOperation(c1152002.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(c1152002.con2)
e2:SetTarget(c1152002.tg2)
e2:SetOperation(c1152002.op2)
c:RegisterEffect(e2)
--
end
--
c1152002.named_with_Fulan=1
function c1152002.IsFulan(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Fulan
end
c1152002.named_with_Fulsp=1
function c1152002.IsFulsp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Fulsp
end
--
function c1152002.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
--
function c1152002.tfilter1(c)
return ((c1152002.IsFulan(c) and c:IsType(TYPE_MONSTER)) or (c1152002.IsFulsp(c) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)))) and c:IsDestructable()
end
function c1152002.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c1152002.tfilter1,tp,LOCATION_ONFIELD,0,1,nil) and Duel.GetFlagEffect(tp,1152000)==0 end
Duel.RegisterFlagEffect(tp,1152000,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,LOCATION_ONFIELD)
end
--
function c1152002.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c1152002.tfilter1,tp,LOCATION_ONFIELD,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
if Duel.GetFlagEffect(tp,1152002)==0 and Duel.GetFlagEffect(1-tp,1152002)==0 then
Duel.RegisterFlagEffect(tp,1152002,RESET_PHASE+PHASE_END,0,1)
local e1_1=Effect.CreateEffect(tc)
e1_1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1_1:SetCode(EVENT_PHASE+PHASE_END)
e1_1:SetCountLimit(1)
e1_1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1_1:SetRange(LOCATION_GRAVE)
e1_1:SetOperation(c1152002.op1_1)
tc:RegisterEffect(e1_1,true)
end
if e:GetHandler():IsLocation(LOCATION_HAND) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(1152002,0)) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
function c1152002.op1_1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsHasEffect(EFFECT_NECRO_VALLEY) then
if Duel.SelectYesNo(tp,aux.Stringid(1152002,1)) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
end
--
function c1152002.con2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP)
end
--
function c1152002.tfilter2(c,e,tp)
return c1152002.IsFulan(c) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1152002.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c1152002.tfilter2,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,LOCATION_SZONE)
end
--
function c1152002.op2(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tg=Duel.GetMatchingGroup(c1152002.tfilter2,tp,LOCATION_SZONE,0,nil,e,tp)
if ft<=0 or tg:GetCount()==0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg:Select(tp,ft,ft,nil)
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
end
--破灭的波纹·芙兰朵露
function c1152003.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c1152003.con1)
e1:SetOperation(c1152003.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c1152003.cost2)
e2:SetTarget(c1152003.tg2)
e2:SetOperation(c1152003.op2)
c:RegisterEffect(e2)
--
end
--
c1152003.named_with_Fulan=1
function c1152003.IsFulan(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Fulan
end
c1152003.named_with_Fulsp=1
function c1152003.IsFulsp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Fulsp
end
--
function c1152003.cfilter1_1(c)
return c:IsType(TYPE_MONSTER)
end
function c1152003.cfilter1_2(c)
return (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c1152003.IsFulsp(c) and c:IsSSetable() and bit.band(c:GetReason(),REASON_DESTROY)~=0
end
function c1152003.con1(e,c)
if c==nil then return true end
return Duel.GetMatchingGroupCount(c1152003.cfilter1_1,tp,LOCATION_ONFIELD,0,nil)==0 and Duel.GetMatchingGroupCount(c1152003.cfilter1_2,tp,LOCATION_GRAVE,0,nil)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and not e:GetHandler():IsHasEffect(EFFECT_NECRO_VALLEY)
end
--
function c1152003.op1(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c1152003.cfilter1_2,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 and Duel.SSet(tp,g)~=0 then
Duel.ConfirmCards(1-tp,g)
end
end
--
function c1152003.cfilter2_1(c)
return c1152003.IsFulsp(c) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToRemoveAsCost()
end
function c1152003.cfilter2_2(c,code)
return c:GetCode()==code and c:IsAbleToHand()
end
function c1152003.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local gn=Group.CreateGroup()
local g=Duel.GetMatchingGroup(c1152003.cfilter2_1,tp,LOCATION_GRAVE,0,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
while tc do
local code=tc:GetCode()
local g2=Duel.GetMatchingGroup(c1152003.cfilter2_2,LOCATION_DECK,0,1,nil,code)
if g2:GetCount()>0 then
gn:AddCard(tc)
end
tc=g:GetNext()
end
end
if chk==0 then return gn:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g3=gn:FilterSelect(tp,c1152003.cfilter2_1,1,1,nil)
local tc3=g3:GetFirst()
e:SetLabelObject(tc3)
Duel.Remove(g3,POS_FACEUP,REASON_COST)
end
--
function c1152003.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
--
function c1152003.ofilter2(c,code)
return c:GetCode()==code and c1152003.IsFulsp(c) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToHand()
end
function c1152003.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1152003.ofilter2,tp,LOCATION_DECK,0,1,1,nil,tc:GetCode())
if g:GetCount()>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e2_1=Effect.CreateEffect(e:GetHandler())
e2_1:SetCode(EFFECT_CHANGE_TYPE)
e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2_1:SetReset(RESET_EVENT+0x1fc0000)
e2_1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
e:GetHandler():RegisterEffect(e2_1,true)
end
end
end
end
--
--高贵与罪恶的红月
function c1152004.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c1152004.matfilter,1)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(c1152004.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(c1152004.tg2)
e2:SetOperation(c1152004.op2)
c:RegisterEffect(e2)
--
end
--
c1152004.named_with_Fulan=1
function c1152004.IsFulan(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Fulan
end
function c1152004.IsFulsp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Fulsp
end
--
function c1152004.matfilter(c)
return c:IsRace(RACE_FIEND)
end
--
function c1152004.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lg=c:GetLinkedGroup()
local tc=lg:GetFirst()
while tc do
if not tc:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1_1=Effect.CreateEffect(tc)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_DISABLE)
e1_1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1_1)
local e2_1=Effect.CreateEffect(tc)
e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetCode(EFFECT_DISABLE_EFFECT)
e2_1:SetValue(RESET_TURN_SET)
e2_1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2_1)
Duel.BreakEffect()
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Draw(tc:GetOwner(),1,REASON_EFFECT)
end
end
tc=lg:GetNext()
end
end
--
function c1152004.tfilter2(c,e)
return c:IsType(TYPE_SPELL) and c:IsFaceup() and not c:IsImmuneToEffect(e) and not c:IsCode(1152999)
end
function c1152004.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1152004.tfilter2,tp,LOCATION_ONFIELD,0,2,nil,e) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
--
function c1152004.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c1152004.tfilter2,tp,LOCATION_ONFIELD,0,nil,e)
if g and g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--
\ No newline at end of file
--七色之翼·芙兰朵露
function c1152005.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e1:SetCondition(c1152005.con1)
e1:SetTarget(c1152005.tg1)
e1:SetOperation(c1152005.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetTarget(c1152005.tg2)
e2:SetOperation(c1152005.op2)
c:RegisterEffect(e2)
--
end
--
c1152005.named_with_Fulan=1
function c1152005.IsFulan(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Fulan
end
c1152005.named_with_Fulsp=1
function c1152005.IsFulsp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Fulsp
end
--
function c1152005.cfilter1(c)
return c:IsCode(1152999) and c:IsFaceup()
end
function c1152005.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c1152005.cfilter1,tp,LOCATION_ONFIELD,0,1,nil)
end
--
function c1152005.tfilter1_1(c,e)
return c:IsDestructable() and c:IsType(TYPE_SPELL) and c:IsFaceup() and not c:IsImmuneToEffect(e) and not c:IsCode(1152999)
end
function c1152005.tfilter1_2(c)
return c:IsDestructable()
end
function c1152005.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c1152005.tfilter1_1,tp,LOCATION_ONFIELD,0,1,nil,e) and Duel.IsExistingTarget(c1152005.tfilter1_2,tp,0,LOCATION_ONFIELD,1,nil) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g1=Duel.SelectTarget(tp,c1152005.tfilter1_1,tp,LOCATION_ONFIELD,0,1,1,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g2=Duel.SelectTarget(tp,c1152005.tfilter1_2,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2)
Duel.HintSelection(g1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,1,tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g2,1,1-tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_GRAVE+LOCATION_HAND)
end
--
function c1152005.op1(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
if Duel.Destroy(g,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_GRAVE) then
local e1_1=Effect.CreateEffect(e:GetHandler())
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_1:SetReset(RESET_EVENT+0x47e0000)
e1_1:SetValue(LOCATION_REMOVED)
e:GetHandler():RegisterEffect(e1_1,true)
end
end
end
end
end
--
function c1152005.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and not c:IsPreviousLocation(LOCATION_SZONE) end
end
--
function c1152005.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if Duel.SelectYesNo(tp,aux.Stringid(1152005,0)) then
local c=e:GetHandler()
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e2_1=Effect.CreateEffect(c)
e2_1:SetCode(EFFECT_CHANGE_TYPE)
e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2_1:SetReset(RESET_EVENT+0x1fc0000)
e2_1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
c:RegisterEffect(e2_1,true)
end
end
\ No newline at end of file
--魔法少女·芙兰朵露
function c1152007.initial_effect(c)
--
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_FIEND),4,2)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c1152007.con1)
e1:SetCost(c1152007.cost1)
e1:SetTarget(c1152007.tg1)
e1:SetOperation(c1152007.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetTarget(c1152007.tg2)
e2:SetOperation(c1152007.op2)
c:RegisterEffect(e2)
--
end
--
c1152007.named_with_Fulan=1
function c1152007.IsFulan(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Fulan
end
c1152007.named_with_Fulsp=1
function c1152007.IsFulsp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Fulsp
end
--
function c1152007.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ
end
--
function c1152007.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
--
function c1152007.tfilter1_1(c)
return (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToRemove() and bit.band(c:GetReason(),REASON_DESTROY)~=0
end
function c1152007.tfilter1_2(c)
return c:IsDestructable() and c:IsAbleToRemove()
end
function c1152007.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroupCount(c1152007.tfilter1_1,tp,LOCATION_GRAVE,0,nil)>0 and Duel.GetMatchingGroupCount(c1152007.tfilter1_2,tp,0,LOCATION_EXTRA,nil)>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
end
--
function c1152007.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c1152007.tfilter1_1,tp,LOCATION_GRAVE,0,1,1,nil)
if g and g:GetCount()>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then
local g2=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
if g2 and g2:GetCount()>0 then
local sg=g2:RandomSelect(tp,1)
if Duel.Destroy(sg,REASON_EFFECT)~=0 then
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
end
end
end
end
--
function c1152007.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and not c:IsPreviousLocation(LOCATION_SZONE) end
end
--
function c1152007.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if Duel.SelectYesNo(tp,aux.Stringid(1152007,0)) then
local c=e:GetHandler()
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fc0000)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--芙兰朵露·斯卡蕾特
function c1152101.initial_effect(c)
--
aux.AddSynchroProcedure(c,nil,aux.NonTuner(c1152101.matfilter),1)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ATTACK_COST)
e1:SetCost(c1152101.cost1)
e1:SetOperation(c1152101.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_DESTROYED)
e4:SetCondition(c1152101.con4)
e4:SetTarget(c1152101.tg4)
e4:SetOperation(c1152101.op4)
c:RegisterEffect(e4)
end
--
c1152101.named_with_Fulan=1
function c1152101.IsFulan(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Fulan
end
function c1152101.IsFulsp(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Fulsp
end
function c1152101.matfilter(c)
return c1152101.IsFulan(c) and c:IsType(TYPE_MONSTER)
end
--
function c1152101.cfilter1(c)
return c:IsAbleToGraveAsCost()
end
function c1152101.cost1(e,c,tp)
return Duel.IsExistingMatchingCard(c1152101.cfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
--
function c1152101.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1152101.cfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_COST)
end
end
--
function c1152101.con4(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
--
function c1152101.tg4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>3 and Duel.IsPlayerCanSpecialSummonMonster(tp,1152990,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,4,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,4,0,0)
end
--
function c1152101.op4(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>3
and Duel.IsPlayerCanSpecialSummonMonster(tp,1152990,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) then
for i=1,4 do
local token=Duel.CreateToken(tp,1152990)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
end
end
--
--禁忌『莱瓦汀』
function c1152201.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c1152201.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c1152201.con2)
e2:SetTarget(c1152201.tg2)
e2:SetOperation(c1152201.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_EQUIP)
e3:SetRange(LOCATION_SZONE)
e3:SetOperation(c1152201.op3)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EQUIP_LIMIT)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(c1152201.limit4)
c:RegisterEffect(e4)
--
end
--
function c1152201.IsFulan(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Fulan
end
c1152201.named_with_Fulsp=1
function c1152201.IsFulsp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Fulsp
end
--
function c1152201.ofilter1(c)
return c:IsType(TYPE_MONSTER) and c:IsFaceup() and c1152201.IsFulan(c)
end
function c1152201.op1(e,tp,eg,ep,ev,re,r,rp)
local num=0
local seq=0
local sg=Group.CreateGroup()
if (Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 or Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0) and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 then
num=Duel.SelectOption(tp,aux.Stringid(1152201,0),aux.Stringid(1152201,1))
if num==0 then
sg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
else
seq=Duel.SelectDisableField(tp,1,0,LOCATION_ONFIELD,0)
end
else
if (Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 or Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0) and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)==0 then
seq=Duel.SelectDisableField(tp,1,0,LOCATION_ONFIELD,0)
else
sg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
end
end
if sg:GetCount()>0 then
local tc=sg:GetFirst()
seq=tc:GetSequence()
seq=seq+16
if tc:IsLocation(LOCATION_SZONE) then
seq=bit.lshift(0x100,seq)
else
seq=bit.lshift(0x1,seq)
end
end
-- Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(1152201,))
local e1_1=Effect.CreateEffect(e:GetHandler())
e1_1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1_1:SetCode(EVENT_PHASE+PHASE_END)
e1_1:SetCountLimit(1)
e1_1:SetReset(RESET_PHASE+PHASE_END,2)
e1_1:SetLabel(seq)
e1_1:SetCondition(c1152201.con1_1)
e1_1:SetOperation(c1152201.op1_1)
Duel.RegisterEffect(e1_1,tp)
local g=Duel.GetMatchingGroupCount(c1152201.ofilter1,tp,LOCATION_ONFIELD,0,nil)
if g>0 then
e:GetHandler():CancelToGrave()
end
end
function c1152201.con1_1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c1152201.op1_1(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetLabel()
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if sg:GetCount()>0 then
local tc=sg:GetFirst()
while tc do
seq2=tc:GetSequence()
seq2=seq2+16
if tc:IsLocation(LOCATION_SZONE) then
seq2=bit.lshift(0x100,seq2)
else
seq2=bit.lshift(0x1,seq2)
end
if seq==seq2 then
Duel.Hint(HINT_CARD,0,1152201)
Duel.Destroy(tc,REASON_EFFECT)
end
tc=sg:GetNext()
end
end
end
--
function c1152201.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
end
--
function c1152201.tfilter2(c)
return c:IsFaceup() and c1152201.IsFulan(c)
end
function c1152201.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c1152201.tfilter2(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(c1152201.tfilter2,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c1152201.tfilter2,tp,LOCATION_MZONE,0,1,1,nil)
end
--
function c1152201.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e2_1=Effect.CreateEffect(c)
e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetCode(EFFECT_CHANGE_TYPE)
e2_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2_1:SetValue(TYPE_EQUIP+TYPE_SPELL)
e2_1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2_1,true)
Duel.Equip(tp,c,tc,true)
local e2_2=Effect.CreateEffect(c)
e2_2:SetType(EFFECT_TYPE_SINGLE)
e2_2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2_2:SetReset(RESET_EVENT+0x47e0000)
e2_2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2_2,true)
end
end
end
--
function c1152201.op3(e,tp,eg,ep,ev,re,r,rp)
if eg:GetFirst()~=e:GetHandler() then return end
local tc=e:GetHandler():GetEquipTarget()
if tc then
local e3_1=Effect.CreateEffect(e:GetHandler())
e3_1:SetCategory(CATEGORY_HANDES)
e3_1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3_1:SetCode(EVENT_BATTLE_DAMAGE)
e3_1:SetCountLimit(1)
e3_1:SetLabelObject(e:GetHandler())
e3_1:SetCondition(c1152201.con3_1)
e3_1:SetTarget(c1152201.tg3_1)
e3_1:SetOperation(c1152201.op3_1)
tc:RegisterEffect(e3_1)
if e3_1:GetHandler()==nil then return end
local e3_2=Effect.CreateEffect(e:GetHandler())
e3_2:SetType(EFFECT_TYPE_SINGLE)
e3_2:SetCode(EFFECT_UPDATE_ATTACK)
e3_2:SetValue(495)
e3_2:SetLabelObject(e:GetHandler())
e3_2:SetCondition(c1152201.con3_2)
tc:RegisterEffect(e3_2)
end
end
--
function c1152201.con3_1(e)
local g=e:GetHandler():GetEquipGroup()
if g:IsContains(e:GetLabelObject()) then
return not e:GetLabelObject():IsDisabled()
else return false
end
end
--
function c1152201.tg3_1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY+CATEGORY_REMOVE,nil,1,1-tp,LOCATION_EXTRA)
end
--
function c1152201.op3_1(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
local g=Duel.GetFieldGroup(ep,LOCATION_EXTRA,0,nil)
local sg=g:RandomSelect(ep,1)
if Duel.Destroy(sg,REASON_EFFECT)~=0 then
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
end
end
end
--
function c1152201.con3_2(e)
local g=e:GetHandler():GetEquipGroup()
if g:IsContains(e:GetLabelObject()) then
return not e:GetLabelObject():IsDisabled()
else return false
end
end
--
function c1152201.limit4(e,c)
return c1152201.IsFulan(c)
end
--
--禁弹『星弧破碎』
function c1152203.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c1152203.tg1)
e1:SetOperation(c1152203.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c1152203.con2)
e2:SetCost(c1152203.cost2)
e2:SetTarget(c1152203.tg2)
e2:SetOperation(c1152203.op2)
c:RegisterEffect(e2)
--
end
--
function c1152203.IsFulan(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Fulan
end
c1152203.named_with_Fulsp=1
function c1152203.IsFulsp(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Fulsp
end
--
function c1152203.tfilter1(c)
return c:IsDestructable()
end
function c1152203.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,LOCATION_DECK)
end
--
function c1152203.ofilter1(c,code)
return c:GetOriginalCode()==code and c:IsAbleToHand()
end
function c1152203.ofilter1_2(c)
return c:GetOriginalCode()==1152999
end
function c1152203.ofilter1_3(c)
return c1152203.IsFulan(c) and c:IsFaceup() and c:IsAttackPos() and c:IsType(TYPE_MONSTER)
end
function c1152203.ofilter1_4(c)
return c:IsDestructable() and c:IsType(TYPE_MONSTER)
end
function c1152203.op1(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if ct==0 then return end
local ac=1
if ct>1 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1152203,5))
if ct==2 then ac=Duel.AnnounceNumber(tp,1,2)
else
if ct==3 then ac=Duel.AnnounceNumber(tp,1,2,3)
else
ac=Duel.AnnounceNumber(tp,1,2,3,4)
end
end
end
Duel.ConfirmDecktop(tp,ac)
local g=Duel.GetDecktopGroup(tp,ac)
if g:IsExists(c1152203.ofilter1_2,1,nil) then
if Duel.IsExistingMatchingCard(c1152203.ofilter1_3,tp,LOCATION_ONFIELD,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(1152203,1)) then
local i=Duel.SelectOption(tp,aux.Stringid(1152212,2),aux.Stringid(1152212,3))
if i==0 then
if Duel.IsExistingMatchingCard(c1152003.ofilter1_4,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then
local g4=Duel.GetMatchingGroup(c1152003.ofilter1_4,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Destroy(g4,REASON_EFFECT)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g5=Duel.SelectMatchingCard(tp,c1152203.ofilter1_3,tp,LOCATION_ONFIELD,0,1,1,nil)
local tc5=g5:GetFirst()
local g6=Duel.GetMatchingGroup(c1152003.ofilter1_4,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,tc5)
if g6:GetCount()>0 then
Duel.Destroy(g6,REASON_EFFECT)
end
end
else
if Duel.SelectYesNo(tp,aux.Stringid(1152203,4)) then
local g7=Duel.GetMatchingGroup(c1152003.ofilter1_4,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g7:GetCount()>0 then
Duel.Destroy(g7,REASON_EFFECT)
end
end
end
end
if g:IsExists(c1152203.tfilter1,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:FilterSelect(tp,c1152203.tfilter1,1,1,nil)
if sg:GetCount()>0 then
local tc=sg:GetFirst()
if Duel.Destroy(tc,REASON_EFFECT)~=0 and c1152203.IsFulsp(tc)and (tc:IsType(TYPE_SPELL) or tc:IsType(TYPE_TRAP)) then
local code=tc:GetOriginalCode()
if Duel.IsExistingMatchingCard(c1152203.ofilter1,tp,LOCATION_DECK,0,1,nil,code) and Duel.SelectYesNo(tp,aux.Stringid(1152203,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,c1152203.ofilter1,tp,LOCATION_DECK,0,1,1,nil,code)
if g2:GetCount()>0 then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
end
end
end
end
end
end
--
function c1152203.con2(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and rp~=tp
end
--
function c1152203.cfilter2(c)
return c:IsAbleToRemoveAsCost() and c1152203.IsFulsp(c) and bit.band(c:GetReason(),REASON_DESTROY)~=0
end
function c1152203.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1152203.cfilter2,tp,LOCATION_GRAVE,0,1,e:GetHandler()) and e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c1152203.cfilter2,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
--
function c1152203.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
--
function c1152203.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(eg,REASON_EFFECT)
end
--
--禁弹『折反射』
function c1152205.initial_effect(c)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c1152205.con2)
e2:SetOperation(c1152205.op2)
c:RegisterEffect(e2)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TODECK)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_REMOVE)
e1:SetTarget(c1152205.tg1)
e1:SetOperation(c1152205.op1)
c:RegisterEffect(e1)
--
end
--
function c1152205.IsFulan(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Fulan
end
c1152205.named_with_Fulsp=1
function c1152205.IsFulsp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Fulsp
end
--
function c1152205.tfilter1_1(c)
return c1152205.IsFulsp(c) and c:IsDestructable() and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP))
end
function c1152205.tfilter1_2(c)
return c1152205.IsFulsp(c) and c:IsAbleToDeck() and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP))
end
function c1152205.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1152205.tfilter1_1,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(c1152212.tfilter1_2,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_ONFIELD+LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_REMOVED)
end
--
function c1152205.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c1152205.tfilter1_1,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil)
if g and g:GetCount()>0 then
local tc=g:GetFirst()
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
local e1_1=Effect.CreateEffect(tc)
e1_1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1_1SetCode(EVENT_PHASE+PHASE_END)
e1_1:SetCountLimit(1)
e1_1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1_1:SetRange(LOCATION_GRAVE)
e1_1:SetOperation(c1152205.op1_1)
tc:RegisterEffect(e1_1,true)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectMatchingCard(tp,c1152205.tfilter1_2,tp,LOCATION_REMOVED,0,1,3,nil)
if g2 and g2:GetCount()>0 then
Duel.SendtoDeck(g2,nil,2,REASON_EFFECT)
end
end
end
end
--
function c1152205.op1_1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsHasEffect(EFFECT_NECRO_VALLEY) then
if c:IsType(TYPE_MONSTER) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,c)
else
if (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) and c:IsSSetable() then
Duel.SSet(tp,c)
Duel.ConfirmCards(1-tp,c)
end
end
end
end
--
function c1152205.cfilter2(c)
return c:IsFaceup() and c1152205.IsFulan(c)
end
function c1152205.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c1152205.cfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
--
function c1152205.op2(e,tp,eg,ep,ev,re,r,rp)
local e2_1=Effect.CreateEffect(e:GetHandler())
e2_1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2_1:SetCode(EVENT_CHAINING)
e2_1:SetProperty(EFFECT_FLAG_DELAY)
e2_1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e2_1:SetOperation(c1152205.op2_1)
Duel.RegisterEffect(e2_1,tp)
end
function c1152205.ofilter2_1(c,tp)
return c:GetControler()~=tp
end
function c1152205.ofilter2_2(c)
return c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c1152205.ofilter2_3(c)
return c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:GetAttack()==0
end
function c1152205.op2_1(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c1152205.ofilter2_1,nil,tp)
if g:GetCount()~=0 then
local g2=Duel.GetMatchingGroup(c1152205.ofilter2_2,tp,0,LOCATION_ONFIELD,nil)
if g2:GetCount()>0 then
Duel.Hint(HINT_CARD,0,1152205)
local num=g2:GetCount()
local hert=num*200
if Duel.SelectYesNo(1-tp,aux.Stringid(1152205,0)) then
local tc=g2:GetFirst()
while tc do
local e2_1_1=Effect.CreateEffect(tc)
e2_1_1:SetType(EFFECT_TYPE_SINGLE)
e2_1_1:SetCode(EFFECT_UPDATE_ATTACK)
e2_1_1:SetReset(RESET_EVENT+0x1fe0000)
e2_1_1:SetValue(-hert)
tc:RegisterEffect(e2_1_1)
tc=g2:GetNext()
end
else
Duel.Damage(1-tp,hert,REASON_EFFECT)
end
local g3=Duel.GetMatchingGroup(c1152205.ofilter2_3,tp,0,LOCATION_ONFIELD,nil)
if g3:GetCount()>0 then
Duel.Destroy(g3,REASON_EFFECT)
end
end
end
end
--
--禁弹『刻着过去的钟表』
function c1152207.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c1152207.con1)
e1:SetCost(c1152207.cost1)
e1:SetTarget(c1152207.tg1)
e1:SetOperation(c1152207.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c1152207.con2)
e2:SetCost(c1152207.cost2)
e2:SetTarget(c1152207.tg2)
e2:SetOperation(c1152207.op2)
c:RegisterEffect(e2)
--
end
--
function c1152207.IsFulan(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Fulan
end
c1152207.named_with_Fulsp=1
function c1152207.IsFulsp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Fulsp
end
--
function c1152207.cfilter1(c)
return c:IsFaceup() and c1152207.IsFulan(c)
end
function c1152207.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c1152207.cfilter1,tp,LOCATION_MZONE,0,1,nil) and Duel.GetFlagEffect(tp,1152206)==0
end
--
function c1152207.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:GetHandler():GetOriginalCode()==1152207 then
Duel.RegisterFlagEffect(tp,1152207,RESET_PHASE+PHASE_END,0,1)
end
end
--
function c1152207.tfilter1(c)
return c1152207.IsFulsp(c) and not c:IsCode(1152207) and c:CheckActivateEffect(true,true,false)~=nil
end
function c1152207.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
local te=e:GetLabelObject()
local tg=te:GetTarget()
return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)
end
if chk==0 then return Duel.IsExistingTarget(c1152207.tfilter1,tp,LOCATION_GRAVE,0,1,nil) end
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
e:SetCategory(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c1152207.tfilter1,tp,LOCATION_GRAVE,0,1,1,nil)
local te=g:GetFirst():CheckActivateEffect(true,true,false)
Duel.ClearTargetCard()
e:SetCategory(te:GetCategory())
e:SetProperty(te:GetProperty())
e:SetLabel(te:GetLabel())
e:SetLabelObject(te:GetLabelObject())
local tg=te:GetTarget()
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
te:SetLabel(e:GetLabel())
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
end
--
function c1152207.op1(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if te:GetHandler():IsRelateToEffect(e) then
e:SetLabel(te:GetLabel())
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
te:SetLabel(e:GetLabel())
te:SetLabelObject(e:GetLabelObject())
end
e:GetHandler():CancelToGrave()
end
--
function c1152207.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY) and Duel.GetFlagEffect(tp,1152207)==0
end
--
function c1152207.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:GetHandler():GetOriginalCode()==1152207 then
Duel.RegisterFlagEffect(tp,1152206,RESET_PHASE+PHASE_END,0,1)
end
end
--
function c1152207.tfilter2(c)
return (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsSSetable() and bit.band(c:GetReason(),REASON_DESTROY)~=0
end
function c1152207.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c1152207.tfilter2(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetMatchingGroupCount(c1152207.tfilter2,tp,LOCATION_GRAVE,0,e:GetHandler())>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c1152207.tfilter2,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
--
function c1152207.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.SSet(tp,tc)
Duel.ConfirmCards(1-tp,tc)
end
end
--
\ No newline at end of file
--秘弹『之后就一个人都没有了吗?』
function c1152208.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c1152208.con1)
e1:SetTarget(c1152208.tg1)
e1:SetOperation(c1152208.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c1152208.con2)
e2:SetCost(c1152208.cost2)
e2:SetTarget(c1152208.tg2)
e2:SetOperation(c1152208.op2)
c:RegisterEffect(e2)
--
end
--
function c1152208.IsFulan(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Fulan
end
c1152208.named_with_Fulsp=1
function c1152208.IsFulsp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Fulsp
end
--
function c1152208.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_STANDBY
end
--
function c1152208.tfilter1(c)
return c1152208.IsFulan(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c1152208.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and c1152208.tfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1152208.tfilter1,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c1152208.tfilter1,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
--
function c1152208.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
tc:RegisterFlagEffect(1152208,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
local e1_1=Effect.CreateEffect(e:GetHandler())
e1_1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1_1:SetCode(EVENT_PHASE+PHASE_END)
e1_1:SetReset(RESET_PHASE+PHASE_END)
e1_1:SetLabelObject(tc)
e1_1:SetCountLimit(1)
e1_1:SetCondition(c1152208.con1_1)
e1_1:SetOperation(c1152208.op1_1)
Duel.RegisterEffect(e1_1,tp)
end
end
--
function c1152208.con1_1(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetFlagEffect(1152208)~=0
end
function c1152208.ofilter1_1(c)
return c:IsType(TYPE_MONSTER)
end
function c1152208.op1_1(e,tp,eg,ep,ev,re,r,rp)
local gn=Duel.GetMatchingGroup(c1152208.ofilter1_1,tp,LOCATION_ONFIELD,0,nil)
if gn:GetCount()==0 then
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c1152208.ofilter1_1,tp,0,LOCATION_ONFIELD,nil)
local num=0
if g:GetCount()>0 then
if Duel.Destroy(g,REASON_EFFECT)==g:GetCount() then
if Duel.ReturnToField(e:GetLabelObject()) then
num=1
end
end
else
if Duel.ReturnToField(e:GetLabelObject()) then
num=1
end
end
if num==1 then
local e1_1_1=Effect.CreateEffect(e:GetHandler())
e1_1_1:SetType(EFFECT_TYPE_FIELD)
e1_1_1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1_1_1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1_1_1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN)
e1_1_1:SetTargetRange(1,0)
e1_1_1:SetTarget(c1152208.limit1_1_1)
Duel.RegisterEffect(e1_1_1,tp)
end
end
end
function c1152208.limit1_1_1(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_LINK)
end
--
function c1152208.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
--
function c1152208.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
--
function c1152208.tfilter2(c)
return c:IsAbleToDeck() and c1152208.IsFulan(c) and c:IsType(TYPE_MONSTER)
end
function c1152208.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1152208.tfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,1152990,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
--
function c1152208.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c1152208.tfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 then
local token=Duel.CreateToken(tp,1152990)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
end
--QED『495年的波纹』
function c1152209.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c1152209.con1)
e1:SetTarget(c1152209.tg1)
e1:SetOperation(c1152209.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon)
e2:SetTarget(c1152209.tg2)
e2:SetOperation(c1152209.op2)
c:RegisterEffect(e2)
--
end
--
function c1152209.IsFulan(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Fulan
end
c1152209.named_with_Fulsp=1
function c1152209.IsFulsp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Fulsp
end
--
function c1152209.cfilter1(c)
return c:IsType(TYPE_MONSTER) and c:IsFaceup() and c1152209.IsFulan(c)
end
function c1152209.con1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c1152209.cfilter1,tp,LOCATION_ONFIELD,0,1,nil)
end
--
function c1152209.tfilter1(c)
return c:IsType(TYPE_MONSTER) and c1152209.IsFulan(c) and c:IsAbleToHand()
end
function c1152209.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1152209.tfilter1,tp,LOCATION_DECK,0,1,nil) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
--
function c1152209.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<1 then return end
local g=Duel.GetMatchingGroup(c1152209.tfilter1,tp,LOCATION_DECK,0,nil)
local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
local seq=-1
local tc=g:GetFirst()
local spcard=nil
while tc do
if tc:GetSequence()>seq then
seq=tc:GetSequence()
spcard=tc
end
tc=g:GetNext()
end
if seq==-1 then
Duel.ConfirmDecktop(tp,dcount)
Duel.ShuffleDeck(tp)
return
end
Duel.ConfirmDecktop(tp,dcount-seq)
if spcard:IsAbleToHand() then
Duel.DisableShuffleCheck()
if dcount-seq==1 then
Duel.SendtoHand(spcard,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,spcard)
Duel.ShuffleHand(tp)
else
local gn=Duel.GetDecktopGroup(tp,dcount-seq-1)
local gr=Group.CreateGroup()
Duel.SendtoHand(spcard,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,spcard)
if gn:GetCount()>0 then
local tc=gn:GetFirst()
while tc do
if tc:IsType(TYPE_MONSTER) then
gr:AddCard(tc)
end
tc=gn:GetNext()
end
if gr:GetCount()>0 then
Duel.Remove(gr,POS_FACEDOWN,REASON_EFFECT)
end
end
Duel.ShuffleDeck(tp)
Duel.ShuffleHand(tp)
end
else
local gn=Duel.GetDecktopGroup(tp,dcount-seq-1)
local gr=Group.CreateGroup()
if gn:GetCount()>0 then
local tc=gn:GetFirst()
while tc do
if tc:IsType(TYPE_MONSTER) then
gr:AddCard(tc)
end
tc=gn:GetNext()
end
if gr:GetCount()>0 then
Duel.Remove(gr,POS_FACEDOWN,REASON_EFFECT)
end
end
Duel.ShuffleDeck(tp)
Duel.ShuffleHand(tp)
end
end
--
function c1152209.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rc=re:GetHandler()
e:SetLabelObject(rc)
local loc,np=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_CONTROLER)
if chk==0 then return loc==LOCATION_MZONE and np==tp and re:IsActiveType(TYPE_MONSTER) and c1152209.IsFulan(rc) end
return Duel.SelectYesNo(tp,aux.Stringid(1152209,0))
end
--
function c1152209.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
local rc=e:GetLabelObject()
local e2_1=Effect.CreateEffect(rc)
e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2_1:SetRange(LOCATION_MZONE)
e2_1:SetCode(EFFECT_IMMUNE_EFFECT)
e2_1:SetValue(c1152209.efilter2_1)
e2_1:SetReset(RESET_EVENT+0x1fe0000+RESET_CHAIN)
rc:RegisterEffect(e2_1)
end
function c1152209.efilter2_1(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
--
\ No newline at end of file
--禁忌『禁忌的游戏』
function c1152210.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c1152210.tg1)
e1:SetOperation(c1152210.op1)
c:RegisterEffect(e1)
--
end
--
function c1152210.IsFulan(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Fulan
end
c1152210.named_with_Fulsp=1
function c1152210.IsFulsp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Fulsp
end
--
function c1152210.tfilter1(c)
return (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c1152210.IsFulsp(c)
end
function c1152210.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1152210.tfilter1,tp,LOCATION_DECK,0,1,nil) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
end
--
function c1152210.ofilter1(c)
return c1152210.IsFulan(c) and c:IsType(TYPE_MONSTER)
end
function c1152210.ofilter1_2(c)
return c:IsType(TYPE_SPELL) and c:IsDestructable() and c:IsFaceup()
end
function c1152210.ofilter1_3(c)
return c:IsDestructable()
end
function c1152210.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<1 then return end
local num=0
local g=Duel.GetMatchingGroup(c1152210.tfilter1,tp,LOCATION_DECK,0,nil)
local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
local seq=-1
local tc=g:GetFirst()
local spcard=nil
while tc do
if tc:GetSequence()>seq then
seq=tc:GetSequence()
spcard=tc
end
tc=g:GetNext()
end
if seq==-1 then
Duel.ConfirmDecktop(tp,dcount)
Duel.ShuffleDeck(tp)
return
end
Duel.ConfirmDecktop(tp,dcount-seq)
local gn=Duel.GetDecktopGroup(tp,dcount-seq)
if gn:GetCount()>0 then
num=gn:FilterCount(c1152210.ofilter1,nil)
end
if Duel.IsExistingMatchingCard(c1152210.ofilter1_2,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) and Duel.SelectYesNo(tp,aux.Stringid(1152210,0)) then
local i=Duel.GetMatchingGroupCount(c1152210.ofilter1_2,tp,LOCATION_ONFIELD,0,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectMatchingCard(tp,c1152210.ofilter1_2,tp,LOCATION_ONFIELD,0,1,i,e:GetHandler())
if g2:GetCount()>0 then
local num2=Duel.Destroy(g2,REASON_EFFECT)
num=num+num2
end
end
if num>0 and Duel.IsExistingMatchingCard(c1152210.ofilter1_3,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(1152210,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g3=Duel.SelectMatchingCard(tp,c1152210.ofilter1_3,tp,0,LOCATION_ONFIELD,1,num,nil)
if g3:GetCount()>0 then
Duel.Destroy(g3,REASON_EFFECT)
end
end
e:GetHandler():CancelToGrave()
if e:GetHandler():IsLocation(LOCATION_SZONE) then
local e1_4=Effect.CreateEffect(e:GetHandler())
e1_4:SetType(EFFECT_TYPE_SINGLE)
e1_4:SetCode(EFFECT_CHANGE_TYPE)
e1_4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_4:SetValue(TYPE_EQUIP+TYPE_SPELL)
e1_4:SetReset(RESET_EVENT+0x1fe0000)
e:GetHandler():RegisterEffect(e1_4,true)
local e1_5=Effect.CreateEffect(e:GetHandler())
e1_5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1_5:SetCode(EVENT_DESTROYED)
e1_5:SetReset(RESET_EVENT+0x01020000)
e1_5:SetCondition(c1152210.con1_5)
e1_5:SetTarget(c1152210.tg1_5)
e1_5:SetOperation(c1152210.op1_5)
e:GetHandler():RegisterEffect(e1_5,true)
end
end
function c1152210.con1_5(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP)
end
function c1152210.tg1_5(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return tp~=rp end
end
function c1152210.ofilter1_5(c)
return c:IsAbleToHand() and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c1152210.IsFulsp(c) and not c:IsCode(1152210)
end
function c1152210.op1_5(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetMatchingGroupCount(c1152210.ofilter1_5,tp,LOCATION_DECK,0,nil)>0 then
Duel.Hint(HINT_CARD,0,1152210)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1152210.ofilter1_5,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
--禁忌『禁果』
function c1152212.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_REMOVE)
e1:SetTarget(c1152212.tg1)
e1:SetOperation(c1152212.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(c1152212.con2)
e2:SetTarget(c1152212.tg2)
e2:SetOperation(c1152212.op2)
c:RegisterEffect(e2)
--
end
--
function c1152212.IsFulan(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Fulan
end
c1152212.named_with_Fulsp=1
function c1152212.IsFulsp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Fulsp
end
--
function c1152212.tfilter1_1(c)
return c1152212.IsFulsp(c) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsDestructable()
end
function c1152212.tfilter1_2(c)
return c1152212.IsFulsp(c) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToRemove() and bit.band(c:GetReason(),REASON_DESTROY)~=0
end
function c1152212.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() and e:GetHandler():IsLocation(LOCATION_REMOVED) and c:IsFaceup() and (Duel.IsExistingMatchingCard(c1152212.tfilter1_1,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) or Duel.IsExistingMatchingCard(c1152212.tfilter1_2,tp,LOCATION_GRAVE,0,1,nil)) end
end
--
function c1152212.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c1152212.tfilter1_1,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(c1152212.tfilter1_2,tp,LOCATION_GRAVE,0,1,nil)then
local i=Duel.SelectOption(tp,aux.Stringid(1152212,0),aux.Stringid(1152212,1))
if i==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c1152212.tfilter1_1,tp,0,LOCATION_ONFIELD+LOCATION_HAND,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c1152212.tfilter1_2,tp,0,LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
else
if Duel.IsExistingMatchingCard(c1152212.tfilter1_1,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) and not Duel.IsExistingMatchingCard(c1152212.tfilter1_2,tp,LOCATION_GRAVE,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c1152212.tfilter1_1,tp,0,LOCATION_ONFIELD+LOCATION_HAND,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c1152212.tfilter1_2,tp,0,LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
end
end
--
function c1152212.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_HAND and rp~=tp and re:IsActiveType(TYPE_MONSTER)
end
--
function c1152212.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
--
function c1152212.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,aux.NULL)
e:GetHandler():CancelToGrave()
if e:GetHandler():IsLocation(LOCATION_SZONE) then
local e2_1=Effect.CreateEffect(e:GetHandler())
e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetCode(EFFECT_CHANGE_TYPE)
e2_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2_1:SetValue(TYPE_EQUIP+TYPE_SPELL)
e2_1:SetReset(RESET_EVENT+0x1fe0000)
e:GetHandler():RegisterEffect(e2_1,true)
local e2_2=Effect.CreateEffect(e:GetHandler())
e2_2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2_2:SetType(EFFECT_TYPE_QUICK_O)
e2_2:SetCode(EVENT_CHAINING)
e2_2:SetRange(LOCATION_SZONE)
e2_2:SetReset(RESET_EVENT+0x1fe0000)
e2_2:SetCondition(c1152212.con2_2)
e2_2:SetTarget(c1152212.tg2_2)
e2_2:SetOperation(c1152212.op2_2)
e:GetHandler():RegisterEffect(e2_2,true)
end
end
function c1152212.con2_2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetControler()==Duel.GetTurnPlayer() and rp~=tp
end
function c1152212.tg2_2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c1152212.op2_2(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,aux.NULL)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end
--
--禁忌『红莓陷阱』
function c1152301.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c1152301.con1)
e1:SetTarget(c1152301.tg1)
e1:SetOperation(c1152301.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_REMOVED)
e2:SetCost(c1152301.cost2)
e2:SetTarget(c1152301.tg2)
e2:SetOperation(c1152301.op2)
c:RegisterEffect(e2)
--
end
--
function c1152301.IsFulan(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Fulan
end
function c1152301.IsFulsp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Fulsp
end
--
function c1152301.con1(e,tp,eg,ep,ev,re,r,rp)
return (re:IsActiveType(TYPE_SPELL) and re:GetHandler():IsType(TYPE_QUICKPLAY)) or re:IsActiveType(TYPE_TRAP)
end
--
function c1152301.tfilter1(c)
return c:IsDestructable()
end
function c1152301.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1152301.tfilter1,tp,LOCATION_ONFIELD,0,1,nil) end
end
--
function c1152301.op1(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c1152301.op1_1)
Duel.BreakEffect()
if Duel.Destroy(e:GetHandler(),REASON_EFFECT)~=0 then
local e1_2=Effect.CreateEffect(e:GetHandler())
e1_2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1_2:SetCode(EVENT_PHASE+PHASE_END)
e1_2:SetCountLimit(1)
e1_2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1_2:SetRange(LOCATION_GRAVE)
e1_2:SetOperation(c1152301.op1_2)
e:GetHandler():RegisterEffect(e1_2)
end
end
function c1152301.op1_1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(1-tp,c1152301.tfilter1,1-tp,LOCATION_ONFIELD,0,1,1,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
if c:IsType(TYPE_CONTINUOUS) then
c:CancelToGrave()
end
end
function c1152301.op1_2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and not e:GetHandler():IsHasEffect(EFFECT_NECRO_VALLEY) then
local e1_2_1=Effect.CreateEffect(e:GetHandler())
e1_2_1:SetType(EFFECT_TYPE_SINGLE)
e1_2_1:SetCode(EFFECT_CHANGE_TYPE)
e1_2_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_2_1:SetValue(TYPE_CONTINUOUS+TYPE_TRAP)
e1_2_1:SetReset(RESET_EVENT+0x1fe0000)
e:GetHandler():RegisterEffect(e1_2_1,true)
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1_2_2=Effect.CreateEffect(e:GetHandler())
e1_2_2:SetCategory(CATEGORY_DESTROY)
e1_2_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1_2_2:SetType(EFFECT_TYPE_IGNITION)
e1_2_2:SetRange(LOCATION_SZONE)
e1_2_2:SetCountLimit(1)
e1_2_2:SetReset(RESET_EVENT+0x1fe0000)
e1_2_2:SetCondition(c1152301.con1_2_2)
e1_2_2:SetTarget(c1152301.tg1_2_2)
e1_2_2:SetOperation(c1152301.op1_2_2)
e:GetHandler():RegisterEffect(e1_2_2,true)
end
end
function c1152301.con1_2_2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetControler()==Duel.GetTurnPlayer()
end
function c1152301.tfilter1_2_2(c)
return c:IsDestructable()
end
function c1152301.tg1_2_2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c1152301.tfilter1_2_2,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingTarget(c1152301.tfilter1_2_2,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g1=Duel.SelectTarget(tp,c1152301.tfilter1_2_2,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g2=Duel.SelectTarget(tp,c1152301.tfilter1_2_2,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2)
Duel.HintSelection(g1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,1,tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g2,1,1-tp,LOCATION_ONFIELD)
end
function c1152301.op1_2_2(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
end
--
function c1152301.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
--
function c1152301.tfilter2(c)
return true
end
function c1152301.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and c1152301.tfilter2(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c1152301.tfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c1152301.tfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
end
--
function c1152301.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e2_1=Effect.CreateEffect(tc)
e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2_1:SetRange(LOCATION_ONFIELD)
e2_1:SetCode(EFFECT_SELF_DESTROY)
e2_1:SetCondition(c1152301.con2_1)
if Duel.GetTurnPlayer()~=tc:GetControler() and Duel.GetCurrentPhase()==PHASE_END then
e2_1:SetLabel(Duel.GetTurnCount())
e2_1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2)
else
e2_1:SetLabel(0)
e2_1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
end
tc:RegisterEffect(e2_1)
end
end
function c1152301.con2(e)
return Duel.GetTurnPlayer()~=tc:GetControler() and Duel.GetTurnCount()~=e:GetLabel() and Duel.GetCurrentPhase()==PHASE_END
end
--
--禁忌『四重存在』
function c1152303.initial_effect(c)
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetTarget(c1152303.tg)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_SZONE)
e1:SetCost(c1152303.cost1)
e1:SetCondition(c1152303.con1)
e1:SetTarget(c1152303.tg1)
e1:SetOperation(c1152303.op1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_BE_BATTLE_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c1152303.con2)
e2:SetCost(c1152303.cost1)
e2:SetTarget(c1152303.tg1)
e2:SetOperation(c1152303.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c1152303.con3)
e3:SetTarget(c1152303.tg3)
e3:SetOperation(c1152303.op3)
c:RegisterEffect(e3)
--
end
--
function c1152303.IsFulan(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Fulan
end
c1152303.named_with_Fulsp=1
function c1152303.IsFulsp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Fulsp
end
--
function c1152303.tfilter(c,e,tp)
return c1152303.IsFulan(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1152303.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(EVENT_CHAINING,true)
if res and c1152303.con1(e,tp,teg,tep,tev,tre,tr,trp)
and Duel.IsExistingMatchingCard(c1152303.tfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,94) and Duel.GetFlagEffect(tp,1152206)<3 then
Duel.RegisterFlagEffect(tp,1152303,0,0,0)
e:SetOperation(c1152303.op1)
else
e:SetOperation(nil)
end
local res2,teg2,tep2,tev2,tre2,tr2,trp2=Duel.CheckEvent(EVENT_BE_BATTLE_TARGET,true)
if res2 and c1152303.con2(e,tp,teg,tep,tev,tre,tr,trp) and Duel.IsExistingMatchingCard(c1152303.tfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,94) and Duel.GetFlagEffect(tp,1152206)<3 then
Duel.RegisterFlagEffect(tp,1152303,0,0,0)
e:SetOperation(c1152303.op2)
else
e:SetOperation(nil)
end
end
--
function c1152303.cfilter1(c,tp)
return c:IsFaceup() and c1152303.IsFulan(c) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
end
function c1152303.con1(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c1152303.cfilter1,1,nil,tp)
end
--
function c1152303.con2(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttackTarget()
return at:IsControler(tp) and at:IsFaceup() and c1152303.IsFulan(at) and at:IsType(TYPE_MONSTER)
end
--
function c1152303.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:GetHandler():GetOriginalCode()==1152303 then
Duel.RegisterFlagEffect(tp,1152303,0,0,0)
end
end
--
function c1152303.tfilter1(c,e,tp)
return c1152303.IsFulan(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1152303.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1152303.tfilter1,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFlagEffect(tp,1152206)<3 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end
--
function c1152303.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1152303.tfilter1,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
local tf=re:GetTarget()
local res,ceg,cep,cev,cre,cr,crp=Duel.CheckEvent(re:GetCode(),true)
if tf(re,rp,ceg,cep,cev,cre,cr,crp,0,g:GetFirst()) and Duel.SelectYesNo(tp,aux.Stringid(1152303,0)) then
Duel.BreakEffect()
Duel.ChangeTargetCard(ev,Group.FromCards(g:GetFirst()))
end
end
end
end
--
function c1152303.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1152303.tfilter1,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
if not Duel.GetAttacker():IsImmuneToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(1152303,1)) then
Duel.BreakEffect()
Duel.ChangeAttackTarget(g:GetFirst())
end
end
end
end
--
function c1152303.con3(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
end
--
function c1152303.tfilter3(c)
return c1152303.IsFulan(c) and c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function c1152303.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and c1152303.tfilter3(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(c1152303.tfilter3,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g=Duel.SelectTarget(tp,c1152303.tfilter3,tp,LOCATION_ONFIELD,0,1,1,nil)
end
--
function c1152303.op3(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
local e3_1=Effect.CreateEffect(tc)
e3_1:SetDescription(aux.Stringid(1152303,2))
e3_1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e3_1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3_1:SetCode(EVENT_CHAINING)
e3_1:SetRange(LOCATION_MZONE)
e3_1:SetReset(RESET_EVENT+0x1fe0000)
e3_1:SetTarget(c1152303.tg3_1)
e3_1:SetOperation(c1152303.op3_1)
tc:RegisterEffect(e3_1)
end
end
function c1152303.tg3_1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rc=re:GetHandler()
local i=0
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if tg and tg:GetCount()>0 then
local tc=tg:GetFirst()
while tc do
if tc==e:GetHandler() then
i=1
end
tc=tg:GetNext()
end
end
if chk==0 then return i==0 end
end
function c1152303.op3_1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local r1,r2=Duel.TossCoin(tp,2)
if r1+r2~=0 then
local tc=re:GetHandler()
local num=tc:GetCode()
local e3_1_1=Effect.CreateEffect(c)
e3_1_1:SetType(EFFECT_TYPE_SINGLE)
e3_1_1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3_1_1:SetRange(LOCATION_MZONE)
e3_1_1:SetCode(EFFECT_IMMUNE_EFFECT)
e3_1_1:SetReset(RESET_EVENT+0x1fe0000+RESET_CHAIN)
e3_1_1:SetLabel(num)
e3_1_1:SetValue(c1152303.efilter3_1_1)
c:RegisterEffect(e3_1_1)
end
end
function c1152303.efilter3_1_1(e,re)
local num=e:GetLabel()
return re:GetHandler():GetCode()==num
end
--
\ No newline at end of file
--禁忌『笼女游戏』
function c1152304.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c1152304.con1)
e1:SetTarget(c1152304.tg1)
e1:SetOperation(c1152304.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,1152304)
e2:SetCondition(c1152304.con2)
e2:SetCost(c1152304.cost2)
e2:SetTarget(c1152304.tg2)
e2:SetOperation(c1152304.op2)
c:RegisterEffect(e2)
end
--
function c1152304.IsFulan(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Fulan
end
c1152304.named_with_Fulsp=1
function c1152304.IsFulsp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Fulsp
end
--
function c1152304.cfilter1(c)
return c1152304.IsFulan(c) and c:IsFaceup()
end
function c1152304.con1(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg:IsExists(c1152304.cfilter1,1,nil) and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
end
--
function c1152304.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
if Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)~=0 then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_HAND)
end
end
Duel.SetChainLimit(aux.FALSE)
end
--
function c1152304.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) then
local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
if g:GetCount()==0 then return end
local sg=g:RandomSelect(1-tp,1)
Duel.Destroy(sg,REASON_EFFECT)
end
end
--
function c1152304.cfilter2(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp and c:IsReason(REASON_EFFECT) and c1152304.IsFulan(c)
end
function c1152304.con2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c1152304.cfilter2,1,nil,tp)
end
--
function c1152304.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
--
function c1152304.tfilter2(c)
return c:IsAbleToDeckAsCost()
end
function c1152304.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c1152304.tfilter2,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,0,LOCATION_ONFIELD)
end
--
function c1152304.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c1152304.tfilter2,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
if tc:IsLocation(LOCATION_DECK) then
Duel.ShuffleDeck(tc:GetControler())
tc:ReverseInDeck()
local e2_1=Effect.CreateEffect(e:GetHandler())
e2_1:SetCategory(CATEGORY_DESTROY)
e2_1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2_1:SetCode(EVENT_TO_HAND)
e2_1:SetTarget(c1152304.tg2_1)
e2_1:SetOperation(c1152304.op2_1)
e2_1:SetReset(RESET_EVENT+0x1de0000)
tc:RegisterEffect(e2_1)
end
end
end
--
function c1152304.tg2_1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) end
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD+LOCATION_HAND,0)
if g:GetCount()>0 then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,LOCATION_ONFIELD)
end
end
--
function c1152304.ofilter2_1(c)
return c:IsDestructable()
end
function c1152304.op2_1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD+LOCATION_HAND,0)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DESTROY)
local g2=Duel.SelectMatchingCard(1-tp,c1152304.ofilter2_1,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil)
Duel.Destroy(g2,REASON_EFFECT)
end
end
--禁忌『恋之迷宫』
function c1152306.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c1152306.con2)
e2:SetTarget(c1152306.tg2)
e2:SetOperation(c1152306.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_SET_AVAILABLE)
e3:SetType(EFFECT_TYPE_QUICK_F)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c1152306.con3)
e3:SetOperation(c1152306.op3)
c:RegisterEffect(e3)
--
end
--
function c1152306.IsFulan(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Fulan
end
c1152306.named_with_Fulsp=1
function c1152306.IsFulsp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Fulsp
end
--
function c1152306.con2(e,tp,eg,ep,ev,re,r,rp)
local ec=eg:GetFirst()
while ec do
if ec:GetPreviousControler()==tp and ec:GetReasonPlayer()~=ec:GetPreviousControler() and ec:IsPreviousLocation(LOCATION_ONFIELD) then
return true
end
ec=eg:GetNext()
end
return false
end
--
function c1152306.tfilter2_1(c,e,tp)
return c1152306.IsFulsp(c) and c:IsAbleToRemove() and bit.band(c:GetReason(),REASON_DESTROY)~=0 and Duel.IsExistingMatchingCard(c1152306.tfilter2_2,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function c1152306.tfilter2_2(c,code)
return c:IsCode(code) and c:IsAbleToHand()
end
function c1152306.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1152306.tfilter2_1,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
--
function c1152306.op2(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c1152306.tfilter2_1,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(c1152306.tfilter2_2,tp,LOCATION_DECK,0,1,nil,g:GetFirst():GetCode()) then
local g1=Duel.SelectMatchingCard(tp,c1152306.tfilter2_2,tp,LOCATION_DECK,0,1,1,nil,g:GetFirst():GetCode())
if g1:GetCount()>0 then
Duel.SendtoHand(g1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g1)
end
end
end
end
end
--
function c1152306.con3(e,tp,eg,ep,ev,re,r,rp)
if re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
local tc=tg:GetFirst()
local i=0
while tc do
if tc==e:GetHandler() and e:GetHandler():IsFacedown() then
i=1
end
tc=tg:GetNext()
end
if i==1 then
return true
else
return false
end
else
return false
end
end
--
function c1152306.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
Duel.ChangePosition(e:GetHandler(),POS_FACEUP)
local c=e:GetHandler()
local e3_1=Effect.CreateEffect(c)
e3_1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3_1:SetCode(EVENT_PHASE+PHASE_END)
e3_1:SetCountLimit(1)
e3_1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e3_1:SetRange(LOCATION_SZONE)
e3_1:SetOperation(c1152306.op3_1)
c:RegisterEffect(e3_1,true)
end
function c1152306.ofilter3_1(c)
return c:IsFaceup() and bit.band(c:GetOriginalType(),TYPE_MONSTER)==0
end
function c1152306.ofilter3_2(c)
return c:IsFacedown()
end
function c1152306.op3_1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() then
local g=Duel.GetMatchingGroup(c1152306.ofilter3_1,tp,LOCATION_SZONE,0,nil)
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEDOWN)
end
end
end
--
--U.N.OWEN就是她吗?
function c1152999.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c1152999.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetTarget(c1152999.tg2)
e2:SetOperation(c1152999.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_REMOVE)
e3:SetRange(LOCATION_SZONE)
e3:SetTarget(c1152999.tg3)
e3:SetOperation(c1152999.op3)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_SZONE)
e4:SetTarget(c1152999.tg4)
e4:SetOperation(c1152999.op4)
c:RegisterEffect(e4)
--
end
--
function c1152999.IsFulan(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Fulan
end
c1152999.named_with_Fulsp=1
function c1152999.IsFulsp(c)
local m=_G["c"..c:GetCode()]
return c.named_with_Fulsp
end
--
function c1152999.ofilter1(c,e,tp)
return c1152999.IsFulan(c) and c:IsFaceup() and c:IsAbleToHand()
end
function c1152999.op1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c1152999.ofilter1,tp,LOCATION_ONFIELD,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(1152999,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=g:Select(tp,1,1,nil)
if Duel.SendtoHand(sg,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,sg)
local e1_1=Effect.CreateEffect(e:GetHandler())
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_IMMUNE_EFFECT)
e1_1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1_1:SetRange(LOCATION_SZONE)
e1_1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1_1:SetValue(c1152999.efilter1_1)
e:GetHandler():RegisterEffect(e1_1)
end
end
end
function c1152999.efilter1_1(e,te)
return te:GetOwner()~=e:GetOwner()
end
--
function c1152999.cfilter2(c)
return c:IsPreviousLocation(LOCATION_HAND)
end
function c1152999.tfilter2(c)
return (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c1152999.IsFulsp(c) and c:IsSSetable()
end
function c1152999.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c1152999.tfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():GetFlagEffect(1152997)==0 end
end
--
function c1152999.op2(e,tp,eg,ep,ev,re,r,rp,c)
if eg:IsExists(c1152999.cfilter2,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(1152999,1)) then
e:GetHandler():RegisterFlagEffect(1152997,RESET_PHASE+PHASE_END,0,1)
if not e:GetHandler():IsHasEffect(EFFECT_NECRO_VALLEY) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c1152999.tfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 and Duel.SSet(tp,g)~=0 then
Duel.ConfirmCards(1-tp,g)
end
end
end
end
--
function c1152999.cfilter3(c)
return (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c1152999.IsFulsp(c)
end
function c1152999.tfilter3(c)
return (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c1152999.IsFulsp(c) and c:IsDestructable()
end
function c1152999.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c1152999.tfilter3,tp,LOCATION_DECK,0,1,nil) and e:GetHandler():GetFlagEffect(1152997)~=0 and e:GetHandler():GetFlagEffect(1152998)==0 end
end
--
function c1152999.op3(e,tp,eg,ep,ev,re,r,rp,c)
if eg:IsExists(c1152999.cfilter3,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(1152999,2)) then
e:GetHandler():RegisterFlagEffect(1152998,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c1152999.tfilter3,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
end
--
function c1152999.tg4(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetHandler():IsAbleToDeck() and e:GetHandler():GetFlagEffect(1152997)~=0 and e:GetHandler():GetFlagEffect(1152998)~=0 end
end
--
function c1152999.ofilter4(c)
return c:IsFaceup() and c:GetOriginalRace()==RACE_FIEND and c:GetOriginalType()==TYPE_MONSTER and c:IsAbleToDeck()
end
function c1152999.op4(e,tp,eg,ep,ev,re,r,rp)
if Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)~=0 then
if Duel.IsExistingMatchingCard(c1152999.ofilter4,tp,LOCATION_ONFIELD,0,1,nil) then
local g=Duel.SelectMatchingCard(tp,c1152999.ofilter4,tp,LOCATION_ONFIELD,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
end
end
......@@ -54,7 +54,7 @@ function c1200016.tgop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c1200016.filter1(c)
return c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:Iscode(1200016)
return c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(1200016)
end
function c1200016.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c1200016.filter1(chkc) end
......
--水歌 原奏的senya
function c12003000.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12003000,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,12003000)
e2:SetTarget(c12003000.thgt)
e2:SetOperation(c12003000.thop)
c:RegisterEffect(e2)
local e4=e2:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12003000,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_HAND)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,12003100)
e1:SetCondition(c12003000.con2)
e1:SetTarget(c12003000.tg2)
e1:SetOperation(c12003000.op2)
c:RegisterEffect(e1)
end
function c12003000.tgfilter(c)
return c:IsRace(RACE_SEASERPENT) and c:IsAbleToGrave()
end
function c12003000.thgt(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12003000.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c12003000.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c12003000.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c12003000.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function c12003000.filter(c)
return c:IsRace(RACE_SEASERPENT) and c:IsAbleToHand()
end
function c12003000.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_DECK) and c12003000.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c12003000.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c12003000.filter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c12003000.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--水歌 重奏的senya
function c12003001.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12003001,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,12003001)
e1:SetTarget(c12003001.target)
e1:SetOperation(c12003001.operation)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12003001,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,12003101)
e3:SetCost(c12003001.cost)
e3:SetTarget(c12003001.tg)
e3:SetOperation(c12003001.op)
c:RegisterEffect(e3)
end
function c12003001.filter(c)
return c:IsFaceup() and c:IsRace(RACE_SEASERPENT) and not c:IsCode(12003001)
end
function c12003001.spfilter(c)
return c:IsRace(RACE_SEASERPENT)
end
function c12003001.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c12003001.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c12003001.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c12003001.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c12003001.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c12003001.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
end
function c12003001.costfilter(c)
return c:IsFaceup() and c:IsAbleToHandAsCost() and c:IsRace(RACE_SEASERPENT)
end
function c12003001.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then
if ft<0 then return false end
if ft==0 then
return Duel.IsExistingMatchingCard(c12003001.costfilter,tp,LOCATION_MZONE,0,1,nil)
else
return Duel.IsExistingMatchingCard(c12003001.costfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
if ft==0 then
local g=Duel.SelectMatchingCard(tp,c12003001.costfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_COST)
else
local g=Duel.SelectMatchingCard(tp,c12003001.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_COST)
end
end
function c12003001.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,700)
end
function c12003001.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--水歌 终奏的senya
function c12003002.initial_effect(c)
--extra summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12003002,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetCountLimit(1,12003102)
e1:SetTarget(c12003002.extg)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12003002,1))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,12003002)
e2:SetCondition(c12003002.spcon)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12003002,2))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(c12003002.target)
e3:SetOperation(c12003002.operation)
c:RegisterEffect(e3)
end
function c12003002.tfilter(c)
return c:IsFaceup() and c:IsRace(RACE_SEASERPENT)
end
function c12003002.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c12003002.tfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c12003002.tfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c12003002.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function c12003002.extg(e,c)
return c:IsLevelBelow(4) and c:IsRace(RACE_SEASERPENT)
end
function c12003002.filter(c)
return c:IsFaceup() and c:IsRace(RACE_SEASERPENT)
end
function c12003002.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c12003002.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
--水歌 永奏的senya
function c12003003.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c12003003.matfilter,2,2)
c:EnableReviveLimit()
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,12003003)
e5:SetCost(c12003003.cost)
e5:SetTarget(c12003003.target)
e5:SetOperation(c12003003.activate)
c:RegisterEffect(e5)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c12003003.damcon)
e3:SetOperation(c12003003.damop)
c:RegisterEffect(e3)
local e2=e3:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c12003003.cfilter(c,g)
return c:IsRace(RACE_SEASERPENT) and g:IsContains(c)
end
function c12003003.damcon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return lg and eg:IsExists(c12003003.cfilter,1,nil,lg)
end
function c12003003.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,12003003)
Duel.Damage(1-tp,200,REASON_EFFECT)
end
function c12003003.filter(c)
return c:IsRace(RACE_SEASERPENT) and c:IsAbleToGrave()
end
function c12003003.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12003003.filter,tp,LOCATION_HAND,0,1,nil) end
local tg=Duel.SelectTarget(tp,c12003003.filter,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(tg,REASON_EFFECT)
end
function c12003003.tgfilter(c)
return c:IsRace(RACE_SEASERPENT) and c:IsAbleToHand()
end
function c12003003.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c12003003.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c12003003.tgfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectTarget(tp,c12003003.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)
end
function c12003003.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
\ No newline at end of file
--水歌 幼奏的玛忒
function c12003004.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12003004,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,12003004)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c12003004.discost)
e1:SetTarget(c12003004.target)
e1:SetOperation(c12003004.operation)
c:RegisterEffect(e1)
local e4=Effect.CreateEffect(c)
e4:SetCategory(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCost(c12003004.thcost)
e4:SetTarget(c12003004.thtg)
e4:SetOperation(c12003004.thop)
c:RegisterEffect(e4)
end
function c12003004.costfilter(c)
return c:IsRace(RACE_SEASERPENT) and c:IsAbleToGraveAsCost()
end
function c12003004.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() and
Duel.IsExistingMatchingCard(c12003004.costfilter,tp,LOCATION_HAND,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c12003004.costfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST)
end
function c12003004.filter(c)
return c:IsRace(RACE_SEASERPENT) and c:IsAbleToHand()
end
function c12003004.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_DECK) and c12003004.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c12003004.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c12003004.filter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c12003004.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function c12003004.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c12003004.tgfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_XYZ)
end
function c12003004.mfilter(c)
return c:IsRace(RACE_SEASERPENT) and c:IsType(TYPE_MONSTER)
end
function c12003004.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c12003004.tgfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(c12003004.mfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g1=Duel.SelectTarget(tp,c12003004.tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g2=Duel.SelectTarget(tp,c12003004.mfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g2,1,0,0)
end
function c12003004.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,tc,e)
if g:GetCount()>0 then
Duel.Overlay(tc,g)
end
end
\ No newline at end of file
--水歌 幻奏的米歇尔
function c12003005.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xfb8),3,2)
c:EnableReviveLimit()
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12003005,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c12003005.cost)
e1:SetTarget(c12003005.target)
e1:SetOperation(c12003005.operation)
c:RegisterEffect(e1)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,12003005)
e4:SetCost(c12003005.thcost)
e4:SetTarget(c12003005.thtg)
e4:SetOperation(c12003005.thop)
c:RegisterEffect(e4)
end
function c12003005.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c12003005.filter(c)
return c:IsFaceup()
end
function c12003005.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c12003005.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c12003005.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c12003005.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c12003005.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetValue(c12003005.efilter)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
function c12003005.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c12003005.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,99,REASON_COST)
local ct=Duel.GetOperatedGroup():GetCount()
e:SetLabel(ct)
end
function c12003005.thfilter(c)
return c:IsRace(RACE_SEASERPENT)
end
function c12003005.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=e:GetLabel()
if chk==0 then return Duel.IsExistingTarget(c12003005.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c12003005.thfilter,tp,LOCATION_DECK,0,1,ct,nil)
end
function c12003005.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
Duel.Overlay(c,tc)
end
\ No newline at end of file
--Riviera 艾克塞尔
function c22250001.initial_effect(c)
--Activate(summon)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22250001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,222500011)
e1:SetCondition(c22250001.spcon)
e1:SetTarget(c22250001.sptg)
e1:SetOperation(c22250001.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22250001,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,222500012)
e3:SetCondition(c22250001.cecon)
e3:SetTarget(c22250001.cetg)
e3:SetOperation(c22250001.ceop)
c:RegisterEffect(e3)
end
c22250001.named_with_Riviera=1
function c22250001.IsRiviera(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Riviera
end
function c22250001.fspfilter(c,e,tp,mg,chkf)
return c22250001.IsRiviera(c) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c22250001.spcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return rp==tp and eg:GetCount()==1 and c22250001.IsRiviera(tc) and not tc:IsImmuneToEffect(e)
end
function c22250001.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=eg:GetFirst()
local c=e:GetHandler()
local mg=Group.FromCards(c,tc)
local chkf=tp
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCountFromEx(tp,tp,tc)>0 and Duel.IsExistingMatchingCard(c22250001.fspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,chkf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,0,1,0,LOCATION_EXTRA)
end
function c22250001.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=eg:GetFirst()
local mg=Group.FromCards(c,tc)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 or (not c:IsCanBeSpecialSummoned(e,0,tp,false,false)) or (not c:IsRelateToEffect(e)) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.IsExistingMatchingCard(c22250001.fspfilter,tp,LOCATION_EXTRA,0,1,nil,e,mg,tp,nil,chkf) and Duel.GetLocationCountFromEx(tp,tp,tc)>0 and tc:IsLocation(LOCATION_MZONE) and mg:IsExists(Card.IsRace,1,nil,RACE_FAIRY) then
Duel.BreakEffect()
local sg=Duel.SelectMatchingCard(tp,c22250001.fspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mg,nil,chkf)
local tc=sg:GetFirst()
tc:SetMaterial(mg)
Duel.SendtoGrave(mg,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
end
end
function c22250001.xfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c22250001.IsRiviera(c) and c:IsControler(tp)
end
function c22250001.cecon(e,tp,eg,ep,ev,re,r,rp)
if e==re or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g then return false end
local tp=e:GetHandler():GetControler()
return g:IsExists(c22250001.xfilter,1,nil,tp)
end
function c22250001.cefilter(c,re,rp,tf,ceg,cep,cev,cre,cr,crp,oc)
return oc~=c and tf(re,rp,ceg,cep,cev,cre,cr,crp,0,c)
end
function c22250001.cetg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tf=re:GetTarget()
local res,ceg,cep,cev,cre,cr,crp=Duel.CheckEvent(re:GetCode(),true)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c22250001.cefilter(chkc,re,rp,tf,ceg,cep,cev,cre,cr,crp) end
if chk==0 then return Duel.IsExistingTarget(c22250001.cefilter,tp,LOCATION_MZONE,0,1,nil,re,rp,tf,ceg,cep,cev,cre,cr,crp,e:GetHandler()) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c22250001.ceop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.ChangeTargetCard(ev,Group.FromCards(c))
if c:IsAbleToGrave() and Duel.SelectYesNo(tp,aux.Stringid(22250001,2)) then
Duel.BreakEffect()
Duel.SendtoGrave(c,REASON_EFFECT)
end
end
end
\ No newline at end of file
--Riviera 塞蕾妮
function c22250002.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22250002,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,22250002)
e1:SetCondition(c22250002.condition)
e1:SetTarget(c22250002.target)
e1:SetOperation(c22250002.operation)
c:RegisterEffect(e1)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_START)
e1:SetCondition(c22250002.descon)
e1:SetTarget(c22250002.destg)
e1:SetOperation(c22250002.desop)
c:RegisterEffect(e1)
end
c22250002.named_with_Riviera=1
function c22250002.IsRiviera(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Riviera
end
function c22250002.condition(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttackTarget()
return at:IsFaceup() and at:IsControler(tp) and c22250002.IsRiviera(at)
end
function c22250002.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c22250002.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(300)
e1:SetReset(RESET_EVENT+0xfe0000)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(300)
e1:SetReset(RESET_EVENT+0xfe0000)
c:RegisterEffect(e1)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local a=Duel.GetAttacker()
if a:IsAttackable() and not a:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
c:RegisterEffect(e1)
Duel.CalculateDamage(a,c)
end
end
end
function c22250002.cfilter(c)
return c:IsFaceup() and c22250002.IsRiviera(c)
end
function c22250002.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetBattleTarget()
return Duel.IsExistingMatchingCard(c22250002.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) and tc
end
function c22250002.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=c:GetBattleTarget()
if chk==0 then return tc end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,tc,1,0,0)
end
function c22250002.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetBattleTarget()
if not tc then return end
--if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE)
tc:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-300)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE)
tc:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(-300)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE)
tc:RegisterEffect(e1)
--end
end
\ No newline at end of file
--Riviera 希艾拉
function c22250003.initial_effect(c)
--SpecialSummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22250003,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetCode(EVENT_CHAINING)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetCountLimit(1,222500031)
e4:SetCondition(c22250003.spcon)
e4:SetTarget(c22250003.sptg)
e4:SetOperation(c22250003.spop)
c:RegisterEffect(e4)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22250003,1))
e4:SetCategory(CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,222500032)
e4:SetCondition(c22250003.setcon)
e4:SetTarget(c22250003.settg)
e4:SetOperation(c22250003.setop)
c:RegisterEffect(e4)
end
c22250003.named_with_Riviera=1
function c22250003.IsRiviera(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Riviera
end
function c22250003.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.GetTurnPlayer()~=rp
end
function c22250003.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c22250003.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0xfe0000)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetReset(RESET_EVENT+0xfe0000)
e2:SetTarget(c22250003.etarget)
e2:SetValue(c22250003.efilter)
c:RegisterEffect(e2)
if not c:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2,true)
end
end
function c22250003.etarget(e,c)
return c22250003.IsRiviera(c) and c:IsFaceup()
end
function c22250003.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
end
function c22250003.setcfilter(c,tp,rp)
return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c22250003.IsRiviera(c) and c:IsReason(REASON_EFFECT)
end
function c22250003.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c22250003.setcfilter,1,nil,tp,rp)
end
function c22250003.setfilter(c,ignore)
return c22250003.IsRiviera(c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(ignore)
end
function c22250003.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local sct=Duel.GetLocationCount(tp,LOCATION_SZONE)
if chk==0 then return c:IsAbleToGrave() and sct>0 and Duel.IsExistingMatchingCard(c22250003.setfilter,tp,LOCATION_DECK,0,1,nil,false) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,0,0)
end
function c22250003.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sct=Duel.GetLocationCount(tp,LOCATION_SZONE)
local lct=eg:FilterCount(c22250003.setcfilter,nil,tp,rp)
if lct<sct then sct=lct end
if not c:IsRelateToEffect(e) or not c:IsAbleToGrave() then return end
if Duel.SendtoGrave(c,REASON_EFFECT)>0 and sct>0 then
local sg=Duel.SelectMatchingCard(tp,c22250003.setfilter,tp,LOCATION_DECK,0,1,sct,nil,false)
if sg:GetCount()>0 then
Duel.SSet(tp,sg)
Duel.ConfirmCards(1-tp,sg)
end
end
end
\ No newline at end of file
--Riviera 菲尔
function c22250004.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22250004,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,222500041)
e1:SetCost(c22250004.spcost)
e1:SetTarget(c22250004.sptg)
e1:SetOperation(c22250004.spop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22250004,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,222500042)
e2:SetCost(c22250004.negcost)
e2:SetCondition(c22250004.negcon)
e2:SetTarget(c22250004.negtg)
e2:SetOperation(c22250004.negop)
c:RegisterEffect(e2)
end
c22250004.named_with_Riviera=1
function c22250004.IsRiviera(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Riviera
end
function c22250004.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c22250004.spfilter(c,code,e,tp)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c22250004.filter(c,e,tp)
local code=c:GetCode()
return c:IsFaceup() and c22250004.IsRiviera(c) and c:GetBattledGroupCount()>0 and Duel.IsExistingMatchingCard(c22250004.spfilter,tp,LOCATION_DECK,0,1,nil,code,e,tp)
end
function c22250004.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c22250004.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c22250004.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c22250004.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,nil,tp,LOCATION_DECK)
end
function c22250004.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local code=tc:GetCode()
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
local sg=Duel.GetMatchingGroup(c22250004.spfilter,tp,LOCATION_DECK,0,nil,code,e,tp)
local sc=sg:GetCount()
if sc<ct then ct=sc end
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local spc=sg:GetFirst()
local i=0
while i<ct and spc do
Duel.SpecialSummon(spc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
i=i+1
spc=sg:GetNext()
end
end
end
function c22250004.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c22250004.negcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) and c22250004.IsRiviera(re:GetHandler())
end
function c22250004.negfilter(c,code)
return c:IsCode(code) and c:IsAbleToHand()
end
function c22250004.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
local code=re:GetHandler():GetCode()
if chk==0 then return Duel.IsExistingMatchingCard(c22250004.negfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,code) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,nil,0,LOCATION_GRAVE+LOCATION_DECK)
end
function c22250004.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and Duel.IsExistingMatchingCard(c22250004.negfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,re:GetHandler():GetCode()) then
local g=Duel.GetMatchingGroup(c22250004.negfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,re:GetHandler():GetCode())
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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