Commit 55a6d4f6 authored by tsubaki's avatar tsubaki

1.999zz3

parent c06fa6f5
Pipeline #16442 passed with stage
in 1 minute and 5 seconds
No preview for this file type
......@@ -309,6 +309,10 @@
!setname 0x3e15 戎璎花
!setname 0x5e15 石符
!setname 0x3e1f 飘零之城
!setname 0x5e1f 蝶翼幻想
!setname 0x6e1f 飘零之音
!setname 0x9e1f 飘零之秘
!setname 0x1141 天恸
......
No preview for this file type
pics/66919016.jpg

60.7 KB | W: | H:

pics/66919016.jpg

59.9 KB | W: | H:

pics/66919016.jpg
pics/66919016.jpg
pics/66919016.jpg
pics/66919016.jpg
  • 2-up
  • Swipe
  • Onion skin
--暗✿之拜访
function c10072.initial_effect(c)
aux.AddCodeList(c,10072)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
......
--砂冢明音
function c1102000.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c1102000.spcon)
e1:SetOperation(c1102000.spop)
c:RegisterEffect(e1)
--
end
function c1102000.spfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost() and c:IsFaceup()
end
function c1102000.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c1102000.spfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c1102000.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1102000.spfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
--
\ No newline at end of file
--砂冢明音·流源
function c1102006.initial_effect(c)
--
aux.AddCodeList(c,1102000)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_CODE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1102000)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,1102006)
e2:SetTarget(c1102006.thtg)
e2:SetOperation(c1102006.thop)
c:RegisterEffect(e2)
--
end
--
function c1102006.cfilter(c)
return c:IsSetCard(0x3e1f,0x5e1f) and c:IsType(TYPE_SPELL) and c:IsFaceup()
end
function c1102006.thfilter(c)
return c:GetType()==TYPE_SPELL and c:IsAbleToHand()
end
function c1102006.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c1102006.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
local ct=Duel.GetMatchingGroupCount(c1102006.cfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectTarget(tp,c1102006.thfilter,tp,LOCATION_GRAVE,0,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)
end
function c1102006.thop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
--砂冢明音·回溯源流
function c1102008.initial_effect(c)
--
aux.AddCodeList(c,1102000)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_CODE)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetValue(1102000)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,1102008)
e2:SetTarget(c1102008.tftg)
e2:SetOperation(c1102008.tfop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--
end
--
function c1102008.tffilter(c,tp)
return c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsSetCard(0x3e1f,0x6e1f) and not c:IsForbidden()
end
function c1102008.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c1102008.tffilter,tp,LOCATION_DECK,0,1,nil,tp) end
end
function c1102008.tfop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c1102008.tffilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
--
\ No newline at end of file
--蝶舞·海音
function c1102084.initial_effect(c)
--
aux.AddCodeList(c,1102000)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1102084+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c1102084.thtg)
e1:SetOperation(c1102084.thop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(c1102084.condition)
e2:SetCost(c1102084.cost)
e2:SetTarget(c1102084.target)
e2:SetOperation(c1102084.operation)
c:RegisterEffect(e2)
--
end
--
function c1102084.cfilter(c)
return c:IsFaceup() and c:IsCode(1102000)
end
function c1102084.thfilter(c,thchk)
return (c:IsSetCard(0x5e1f) or (thchk and c:IsSetCard(0x3e1f))) and c:IsAbleToHand()
end
function c1102084.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local thchk=Duel.IsExistingMatchingCard(c1102084.cfilter,tp,LOCATION_MZONE,0,1,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c1102084.thfilter,tp,LOCATION_DECK,0,1,nil,thchk) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1102084.thop(e,tp,eg,ep,ev,re,r,rp)
local thchk=Duel.IsExistingMatchingCard(c1102084.cfilter,tp,LOCATION_MZONE,0,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1102084.thfilter,tp,LOCATION_DECK,0,1,1,nil,thchk)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--
function c1102084.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and ep~=tp and re:IsActiveType(TYPE_MONSTER)
and bit.band(re:GetActivateLocation(),LOCATION_MZONE)~=0
end
function c1102084.cost(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 c1102084.filter(c,e,tp)
return aux.IsCodeListed(c,1102000) and c:IsType(TYPE_MONSTER)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1102084.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c1102084.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetTargetCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c1102084.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c1102084.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
--
\ No newline at end of file
--灵都·粉梦初心
function c1110001.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,1110001)
e1:SetCost(c1110001.cost1)
e1:SetTarget(c1110001.tg1)
e1:SetOperation(c1110001.op1)
c:RegisterEffect(e1)
--
end
--
function c1110001.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if not Duel.CheckLPCost(tp,1200) then return end
if not Duel.SelectYesNo(tp,aux.Stringid(1110001,0)) then return end
Duel.PayLPCost(tp,1200)
e:SetLabel(1)
end
function c1110001.tfilter1(c)
return c:IsCode(1110002) and c:IsFaceup() and c:IsAbleToHand()
end
function c1110001.ofilter1(c)
return c:IsCode(1111001) and c:IsSSetable()
end
function c1110001.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c1110001.tfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1110001.tfilter1,tp,LOCATION_MZONE,0,1,nil) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(c1110001.ofilter1,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g=Duel.SelectTarget(tp,c1110001.tfilter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,LOCATION_HAND)
if not e:GetLabel() then return end
if e:GetLabel()~=1 then return end
Duel.SetChainLimit(aux.FALSE)
end
function c1110001.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)<1 then return end
if not tc:IsRelateToEffect(e) then return end
if Duel.SendtoHand(tc,nil,REASON_EFFECT)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectMatchingCard(tp,c1110001.ofilter1,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()>0 then
Duel.BreakEffect()
Duel.SSet(tp,sg)
Duel.ConfirmCards(1-tp,sg)
end
end
--
\ No newline at end of file
--灵都·稠蜜幻景
function c1110002.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,1110002)
e1:SetCost(c1110002.cost1)
e1:SetTarget(c1110002.tg1)
e1:SetOperation(c1110002.op1)
c:RegisterEffect(e1)
--
end
--
function c1110002.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if not Duel.CheckLPCost(tp,1200) then return end
if not Duel.SelectYesNo(tp,aux.Stringid(1110002,0)) then return end
Duel.PayLPCost(tp,1200)
e:SetLabel(1)
end
function c1110002.tfilter1(c)
return c:IsCode(1110001) and c:IsFaceup()
end
function c1110002.ofilter1(c)
return c:IsSetCard(0x3e1f) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_FIELD) and c:IsSSetable()
end
function c1110002.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c1110002.tfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1110002.tfilter1,tp,LOCATION_MZONE,0,1,nil) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(c1110002.ofilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g=Duel.SelectTarget(tp,c1110002.tfilter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,LOCATION_HAND)
if not e:GetLabel() then return end
if e:GetLabel()~=1 then return end
Duel.SetChainLimit(aux.FALSE)
end
function c1110002.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectMatchingCard(tp,c1110002.ofilter1,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()>0 then
Duel.BreakEffect()
Duel.SSet(tp,sg)
Duel.ConfirmCards(1-tp,sg)
end
end
--
\ No newline at end of file
--纯白心灵·莉珂莉莉
function c1110003.initial_effect(c)
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(c1110003.synlimit)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,1110003)
e1:SetCondition(c1110003.con1)
e1:SetCost(c1110003.cost1)
e1:SetTarget(c1110003.tg1)
e1:SetOperation(c1110003.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e2:SetValue(1)
c:RegisterEffect(e2)
--
end
--
function c1110003.synlimit(e,c)
if not c then return false end
return not c:IsSetCard(0x3e1f)
end
--
function c1110003.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c1110003.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SetTargetCard(e:GetHandler())
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c1110003.tfilter1(c)
return c:IsSetCard(0x5e1f) and c:GetType()==TYPE_SPELL and c:IsSSetable()
end
function c1110003.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c1110003.tfilter1,tp,LOCATION_DECK,0,1,nil) end
end
function c1110003.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectMatchingCard(tp,c1110003.tfilter1,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()>0 then
Duel.SSet(tp,sg)
Duel.ConfirmCards(1-tp,sg)
end
end
--
--夜月魂魄·安珀安安
function c1110004.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1110004,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,1110004)
e1:SetCondition(c1110004.con1)
e1:SetTarget(c1110004.tg1)
e1:SetOperation(c1110004.op1)
c:RegisterEffect(e1)
--
end
--
function c1110004.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c1110004.tfilter1(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x3e1f)
and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:CheckFusionMaterial(m,gc,chkf)
end
function c1110004.FusFilter(c)
return c:IsAbleToDeck() and c:IsLocation(LOCATION_HAND)
end
function c1110004.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetFusionMaterial(tp):Filter(c1110004.FusFilter,nil)
return Duel.IsExistingMatchingCard(c1110004.tfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,nil,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c1110004.fselect(mg,sg,tp)
local selectcheck=false
for tc in aux.Next(sg) do
if tc:CheckFusionMaterial(mg,nil,tp) then
selectcheck=true
end
end
return selectcheck
end
function c1110004.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local mg=Duel.GetFusionMaterial(tp):Filter(c1110004.FusFilter,nil)
local sg=Duel.GetMatchingGroup(c1110004.tfilter1,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,nil,tp)
if sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local lg=mg:SelectSubGroup(tp,c1110004.fselect,false,1,mg:GetCount(),sg,tp)
local ft=Duel.GetMZoneCount(tp,lg)
local max=math.min(sg:GetCount(),ft)
local ag=sg:Filter(c1110004.tfilter1,nil,e,tp,lg,nil,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=ag:SelectSubGroup(tp,aux.dncheck,false,1,max,e,tp)
Duel.ConfirmCards(1-tp,lg)
Duel.SendtoDeck(lg,nil,2,REASON_EFFECT)
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
Duel.ShuffleDeck(tp)
end
end
--
--命运·时计
function c1110005.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c1110005.cost1)
e1:SetTarget(c1110005.tg1)
e1:SetOperation(c1110005.op1)
c:RegisterEffect(e1)
--
end
--
function c1110005.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_DISCARD+REASON_COST)
end
--
function c1110005.tfilter1_1(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3e1f) and c:IsAbleToHand()
end
function c1110005.tfilter1_2(c)
return c:IsType(TYPE_SPELL) and c:IsSetCard(0x9e1f) and c:IsSSetable()
end
function c1110005.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c1110005.tfilter1_1,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.IsExistingMatchingCard(c1110005.tfilter1_2,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(1110005,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(1110005,1)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
if sel==1 then
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
end
--
function c1110005.op1(e,tp,eg,ep,ev,re,r,rp)
local sel=e:GetLabel()
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c1110005.tfilter1_1,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
if sel==2 then
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectMatchingCard(tp,c1110005.tfilter1_2,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()>0 then Duel.SSet(tp,sg) end
end
end
--
\ No newline at end of file
--灵都·静寂彼岸
function c1110111.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,1110004,c1110111.filter,1,true,true)
--
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c1110111.tg1)
e1:SetOperation(c1110111.op1)
c:RegisterEffect(e1)
--
end
--
function c1110111.filter(c)
return c:IsCode(1110001)
end
--
function c1110111.tfilter1_1(c)
return c:IsFaceup() and not c:IsDisabled()
end
function c1110111.tfilter1_2(c)
return c:IsPreviousLocation(LOCATION_EXTRA) and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c1110111.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c1110111.tfilter1_1,tp,0,LOCATION_MZONE,1,nil)
local b2=Duel.IsExistingMatchingCard(c1110111.tfilter1_2,tp,0,LOCATION_MZONE,1,nil)
if chk==0 then return (b1 or b2) end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(1110111,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(1110111,1)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
if sel==1 then
e:SetCategory(CATEGORY_DISABLE)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,tp,LOCATION_MZONE)
end
end
function c1110111.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sel=e:GetLabel()
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg=Duel.SelectMatchingCard(tp,c1110111.tfilter1_1,tp,0,LOCATION_MZONE,1,1,nil)
if sg:GetCount()<1 then return end
Duel.NegateRelatedChain(sg:GetFirst(),RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
sg:GetFirst():RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
sg:GetFirst():RegisterEffect(e2)
else
local sg=Duel.GetMatchingGroup(c1110111.tfilter1_2,tp,0,LOCATION_MZONE,nil,e,tp)
if sg:GetCount()<1 then return end
for tc in aux.Next(sg) do
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
tc:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e5)
local e6=e3:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
tc:RegisterEffect(e6)
end
end
end
--
\ No newline at end of file
--灵都·安宁时序的轮转
function c1110152.initial_effect(c)
--
c:EnableReviveLimit()
-- aux.AddCodeList(c,1110196)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1110152,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c1110152.con1)
e1:SetOperation(c1110152.op1)
e1:SetValue(SUMMON_TYPE_RITUAL)
c:RegisterEffect(e1)
--
end
--
function c1110152.con1(e,c)
if c==nil then return true end
return Duel.GetMZoneCount(c:GetControler())>0
end
--
function c1110152.op1(e,tp,eg,ep,ev,re,r,rp,c)
local e1_1=Effect.CreateEffect(c)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1_1:SetRange(LOCATION_MZONE)
e1_1:SetCode(EFFECT_IMMUNE_EFFECT)
e1_1:SetReset(RESET_EVENT+0xfe0000)
e1_1:SetValue(c1110152.val1_1)
c:RegisterEffect(e1_1,true)
--
local e1_2=Effect.CreateEffect(c)
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1_2:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e1_2:SetValue(1)
e1_2:SetReset(RESET_EVENT+0xfe0000)
c:RegisterEffect(e1_2,true)
local e1_3=e1_2:Clone()
e1_3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e1_3,true)
local e1_4=e1_2:Clone()
e1_4:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e1_4,true)
local e1_5=e1_2:Clone()
e1_5:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e1_5,true)
--
end
--
function c1110152.val1_1(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
--
--三叶草 or 四叶草
--
function c1111001.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_COIN+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c1111001.tg1)
e1:SetOperation(c1111001.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c1111001.cost2)
e2:SetOperation(c1111001.op2)
c:RegisterEffect(e2)
--
end
--
c1111001.toss_coin=true
function c1111001.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local num=Duel.GetFlagEffect(tp,1111001)
if num>0 then
e:SetLabel(num)
Duel.ResetFlagEffect(tp,1111001)
end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,3)
end
function c1111001.ofilter1(c)
return c:IsSetCard(0x3e1f) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c1111001.op1(e,tp,eg,ep,ev,re,r,rp)
local r1,r2,r3=Duel.TossCoin(tp,3)
local num=r1+r2+r3
if e:GetLabel() and e:GetLabel()>0 then
num=num+e:GetLabel()
end
if num>0 then Duel.Recover(tp,800,REASON_EFFECT) end
if num>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RESOLVECARD)
local sg=Duel.SelectMatchingCard(tp,c1111001.ofilter1,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
if num>2 then Duel.Draw(tp,1,REASON_EFFECT) end
end
--
function c1111001.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SetTargetCard(e:GetHandler())
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c1111001.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,1111001,0,0,0)
end
--
--蝶舞·莲梦
function c1111002.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1111002,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c1111002.tg1)
e1:SetOperation(c1111002.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1111002,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(c1111002.tg2)
e2:SetOperation(c1111002.op2)
c:RegisterEffect(e2)
--
end
--
function c1111002.tfilter1_1(c,e,tp)
return c:IsSetCard(0x3e1f) and c:IsType(TYPE_MONSTER)
and c:IsFaceup() and c:IsAbleToHand()
and Duel.IsExistingMatchingCard(c1111002.tfilter1_2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end
function c1111002.tfilter1_2(c,e,tp,tc)
return c:IsSetCard(0x3e1f) and c:IsType(TYPE_MONSTER)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end
function c1111002.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsControler(tp) and c1111002.tfilter1_1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c1111002.tfilter1_1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local mg=Duel.SelectTarget(tp,c1111002.tfilter1_1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,mg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c1111002.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
if Duel.SendtoHand(tc,nil,REASON_EFFECT)<1 then return end
if Duel.GetLocationCountFromEx(tp)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c1111002.tfilter1_2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
local e1_2=Effect.CreateEffect(c)
e1_2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1_2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1_2:SetCountLimit(1)
e1_2:SetOperation(c1111002.op1_2)
e1_2:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_OPPO_TURN)
Duel.RegisterEffect(e1_2,tp)
end
function c1111002.op1_2(e,tp,eg,ep,ev,re,r,rp)
local lg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,63,nil)
if lg:GetCount()<1 then return end
if Duel.SendtoDeck(lg,nil,2,REASON_EFFECT)>0 then
Duel.ShuffleDeck(tp)
local num1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local num2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
if num1>=num2 then return end
Duel.Draw(tp,num2-num1,REASON_EFFECT)
end
end
--
function c1111002.tfilter2(c,tp)
return c:GetPreviousControler()==tp
and c:IsPreviousPosition(POS_FACEUP)
and c:IsSetCard(0x3e1f) and c:IsType(TYPE_MONSTER)
and c:IsAbleToHand()
end
function c1111002.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return r and r==REASON_EFFECT
and e:GetHandler():IsAbleToHand()
and eg:IsExists(c1111002.tfilter2,1,nil,tp)
and not eg:IsContains(e:GetHandler()) end
local sg=eg:Filter(c1111002.tfilter2,nil,tp)
sg:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)
end
function c1111002.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rg=eg:Filter(c1111002.tfilter2,nil,tp)
if c:IsRelateToEffect(e) then rg:AddCard(c) end
if rg:GetCount()<1 then return end
Duel.SendtoHand(rg,nil,REASON_EFFECT)
end
--
\ No newline at end of file
--蝶舞·祝祈
function c1111003.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1111003,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c1111003.tg1)
e1:SetOperation(c1111003.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(c1111003.tg2)
e2:SetOperation(c1111003.op2)
c:RegisterEffect(e2)
--
end
--
function c1111003.tfilter1_1(c,e,tp)
return c:IsSetCard(0x3e1f) and c:IsType(TYPE_MONSTER)
and c:IsFaceup() and c:IsAbleToHand()
and Duel.IsExistingMatchingCard(c1111003.tfilter1_2,tp,LOCATION_DECK,0,1,nil,e,tp,c)
end
function c1111003.tfilter1_2(c,e,tp,tc)
return c:IsSetCard(0x3e1f) and c:IsType(TYPE_MONSTER)
and c:IsLevel(tc:GetLevel()) and not c:IsCode(tc:GetCode())
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetMZoneCount(tp,tc)>0
end
function c1111003.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsControler(tp) and c1111003.tfilter1_1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c1111003.tfilter1_1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local mg=Duel.SelectTarget(tp,c1111003.tfilter1_1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,mg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c1111003.ofilter1(c)
return c:IsSetCard(0x3e1f) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and not c:IsForbidden()
end
function c1111003.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
if Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local lc=Duel.SelectMatchingCard(tp,c1111003.tfilter1_2,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc):GetFirst()
if lc and Duel.SpecialSummon(lc,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.IsExistingMatchingCard(c1111003.ofilter1,tp,LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(1111003,2)) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1111003,3))
local mg=Duel.SelectMatchingCard(tp,c1111003.ofilter1,tp,LOCATION_DECK,0,1,1,nil)
if mg:GetCount()<1 then return end
local mc=mg:GetFirst()
Duel.MoveToField(mc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
end
--
function c1111003.tfilter2(c,tp)
return c:GetPreviousControler()==tp
and c:IsPreviousPosition(POS_FACEUP)
and c:IsSetCard(0x3e1f) and c:IsType(TYPE_SPELL)
and c:IsAbleToDeck()
end
function c1111003.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return r and r==REASON_EFFECT
and e:GetHandler():IsAbleToDeck()
and eg:IsExists(c1111003.tfilter2,1,nil,tp)
and not eg:IsContains(e:GetHandler()) end
local sg=eg:Filter(c1111003.tfilter2,nil,tp)
sg:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,sg:GetCount(),0,0)
end
function c1111003.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rg=eg:Filter(c1111003.tfilter2,nil,tp)
if c:IsRelateToEffect(e) then rg:AddCard(c) end
if rg:GetCount()<1 then return end
Duel.SendtoDeck(rg,nil,2,REASON_EFFECT)
end
--
\ No newline at end of file
--蝶舞·返魂
function c1111005.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c1111005.tg1)
e1:SetOperation(c1111005.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c1111005.con2)
e2:SetCost(c1111005.cost2)
e2:SetTarget(c1111005.tg2)
e2:SetOperation(c1111005.op2)
c:RegisterEffect(e2)
--
end
--
function c1111005.tfilter1(c)
return c:IsSetCard(0x3e1f) and c:IsAbleToRemove()
end
function c1111005.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1111005.tfilter1,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,1-tp,LOCATION_ONFIELD)
end
--
function c1111005.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg1=Duel.SelectMatchingCard(tp,c1111005.tfilter1,tp,LOCATION_GRAVE,0,1,1,nil)
if sg1:GetCount()<1 then return end
if Duel.Remove(sg1,POS_FACEUP,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg2=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
if sg2:GetCount()<1 then return end
if Duel.SendtoHand(sg2,nil,REASON_EFFECT)<1 then return end
local lg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_GRAVE,0,nil)
if lg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(1111005,0)) then
local rg=lg:Select(tp,1,lg:GetCount(),nil)
Duel.SendtoDeck(rg,nil,2,REASON_EFFECT)
end
end
end
--
function c1111005.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c1111005.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
Duel.HintSelection(Group.FromCards(c))
Duel.SendtoDeck(c,nil,2,REASON_COST)
end
function c1111005.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD)
end
function c1111005.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,0,1,1,nil)
if tg:GetCount()<1 then return end
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
--
--蝶舞·恋心
function c1111025.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c1111025.tg1)
e1:SetOperation(c1111025.op1)
c:RegisterEffect(e1)
end
--
function c1111025.tfilter1(c)
return c:IsSetCard(0x5e1f) and c:IsType(TYPE_SPELL) and c:IsAbleToGrave()
end
function c1111025.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1111025.tfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c1111025.ofilter1(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FAIRY) and c:IsType(TYPE_TUNER) and c:IsLevel(3)
and (c:IsAbleToHand() or (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp)>0))
end
function c1111025.tgcheck1(g)
return g:GetClassCount(Card.GetCode)==#g
end
function c1111025.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(c1111025.tfilter1,tp,LOCATION_DECK,0,nil)
if mg:GetCount()<1 then return end
local ct=mg:GetClassCount(Card.GetCode)
local b1=Duel.GetMatchingGroupCount(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil)<1
local b2=Duel.GetMatchingGroupCount(c1111025.ofilter1,tp,LOCATION_DECK,0,nil,e,tp)<1
if b1 then ct=math.min(ct,1) end
if b2 then ct=math.min(ct,3) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=mg:SelectSubGroup(tp,c1111025.tgcheck1,false,1,ct)
if Duel.SendtoGrave(sg,REASON_EFFECT)>0 then
local num=Duel.GetOperatedGroup():GetCount()
if num>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local lg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(lg,nil,2,REASON_EFFECT)
end
if num>3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local lc=Duel.SelectMatchingCard(tp,c1111025.ofilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
local b1=lc:IsAbleToHand()
local b2=Duel.GetMZoneCount(tp)>0 and lc:IsCanBeSpecialSummoned(e,0,tp,false,false)
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(1111025,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(1111025,1)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
if sel==1 then
Duel.SendtoHand(lc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,lc)
end
if sel==2 then
Duel.SpecialSummon(lc,0,tp,tp,false,false,POS_FACEUP)
end
end
if num>5 and Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)>0 and Duel.SelectYesNo(tp,aux.Stringid(1111025,2)) then
local lg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
for lc in aux.Next(lg) do
local e1_1=Effect.CreateEffect(c)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_IMMUNE_EFFECT)
e1_1:SetValue(c1111025.efilter1_1)
e1_1:SetOwnerPlayer(tp)
e1_1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
lc:RegisterEffect(e1_1)
end
end
end
end
function c1111025.efilter1_1(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
--
\ No newline at end of file
--灵都·流莹水榭
--
function c1111201.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_TOHAND+CATEGORY_SEARCH)
e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCost(c1111201.cost2)
e2:SetTarget(c1111201.tg2)
e2:SetOperation(c1111201.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1111201,3))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c1111201.con3)
e3:SetOperation(c1111201.op3)
c:RegisterEffect(e3)
--
end
--
function c1111201.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(sg,nil,2,REASON_COST)
end
function c1111201.tfilter2(c)
return c:IsSetCard(0x3e1f) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c1111201.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1111201.tfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1111201.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,c1111201.tfilter2,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()<1 then return end
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
--
function c1111201.con3(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
local bc=Duel.GetAttackTarget()
if not bc then return false end
if bc:IsControler(1-tp) then
e:SetLabelObject(bc)
bc=tc
else
e:SetLabelObject(tc)
end
return bc:IsFaceup() and bc:IsSetCard(0x3e1f)
end
function c1111201.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
if tc:IsRelateToBattle() and tc:IsFaceup() and tc:IsControler(1-tp) then
local e3_1=Effect.CreateEffect(c)
e3_1:SetType(EFFECT_TYPE_SINGLE)
e3_1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e3_1:SetRange(LOCATION_MZONE)
e3_1:SetCode(EFFECT_SET_ATTACK_FINAL)
e3_1:SetValue(0)
e3_1:SetReset(RESET_PHASE+PHASE_DAMAGE)
tc:RegisterEffect(e3_1,true)
local e3_2=Effect.CreateEffect(c)
e3_2:SetType(EFFECT_TYPE_SINGLE)
e3_2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e3_2:SetRange(LOCATION_MZONE)
e3_2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e3_2:SetValue(0)
e3_2:SetReset(RESET_PHASE+PHASE_DAMAGE)
tc:RegisterEffect(e3_2,true)
end
end
--
--飘零之城·奈河奈何
function c1111202.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:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c1111202.con2)
e2:SetTarget(c1111202.tg2)
e2:SetOperation(c1111202.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c1111202.tg3)
e3:SetValue(c1111202.val3)
c:RegisterEffect(e3)
--
end
--
function c1111202.con2(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and rp~=tp
end
function c1111202.tfilter2_1(c)
return c:IsAbleToGrave() and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS)
end
function c1111202.tfilter2_2(c)
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x6e1f) and not c:IsForbidden()
end
function c1111202.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
local b2=Duel.IsExistingMatchingCard(c1111202.tfilter2_1,tp,LOCATION_SZONE,0,1,nil) and Duel.IsExistingMatchingCard(c1111202.tfilter2_2,tp,LOCATION_GRAVE,0,1,nil)
if chk==0 then return (b1 or b2)
and e:GetHandler():GetFlagEffect(1111202)<1 end
e:GetHandler():RegisterFlagEffect(1111202,RESET_CHAIN,0,1)
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(1111202,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(1111202,3)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
if sel==1 then
e:SetCategory(CATEGORY_REMOVE)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_GRAVE)
end
if sel==2 then
e:SetCategory(CATEGORY_TOGRAVE)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_SZONE)
end
end
function c1111202.op2(e,tp,eg,ep,ev,re,r,rp)
local sel=e:GetLabel()
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if sg:GetCount()<1 then return end
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
if sel==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=Duel.SelectMatchingCard(tp,c1111202.tfilter2_1,tp,LOCATION_SZONE,0,1,1,nil)
if sg:GetCount()<1 then return end
if Duel.SendtoGrave(g,REASON_EFFECT)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1111202,4))
local tc=Duel.SelectMatchingCard(tp,c1111202.tfilter2_2,tp,LOCATION_GRAVE,0,1,1,nil):GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
end
--
function c1111202.tg3(e,c)
return c:IsSetCard(0x3e1f) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c1111202.val3(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_MONSTER)
end
--
\ No newline at end of file
--灵曲·彼岸盛开之花
function c1111221.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetTargetRange(LOCATION_GRAVE,LOCATION_GRAVE)
e1:SetTarget(c1111221.tg1)
e1:SetRange(LOCATION_SZONE)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1111221,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,1111221)
e2:SetCondition(c1111221.con2)
e2:SetTarget(c1111221.tg2)
e2:SetOperation(c1111221.op2)
c:RegisterEffect(e2)
--
if c1111221.muxu_check_tGrE==nil then
c1111221.muxu_check_tGrE=true
local ge0=Effect.GlobalEffect()
ge0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge0:SetCode(EVENT_TO_GRAVE)
ge0:SetOperation(c1111221.op0)
Duel.RegisterEffect(ge0,0)
end
--
end
--
function c1111221.op0(e,tp,eg,ep,ev,re,r,rp)
if not eg then return end
if eg:GetCount()<1 then return end
for ec in aux.Next(eg) do
ec:RegisterFlagEffect(1111221,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
end
function c1111221.tg1(e,c)
return c:GetFlagEffect(1111221)>0
and c:GetReasonPlayer()==Duel.GetTurnPlayer()
and c:IsControler(Duel.GetTurnPlayer())
end
--
function c1111221.cfilter2(c,tp)
return c:IsControler(1-tp) and c:IsType(TYPE_MONSTER)
end
function c1111221.con2(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and r and r==REASON_EFFECT
and eg:IsExists(c1111221.cfilter2,1,nil,tp)
end
function c1111221.tfitler2(c,e,tp)
local b1=c:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
local b2=c:IsType(TYPE_SPELL+TYPE_TRAP) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) and c:IsSSetable()
return b1 or b2
end
function c1111221.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.IsExistingMatchingCard(c1111221.tfilter2,tp,LOCATION_DECK,0,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil)
if chk==0 then return b1 or b2 end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(1111221,2)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(1111221,3)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
if sel==2 then
e:SetCategory(CATEGORY_REMOVE)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,0,LOCATION_GRAVE)
end
end
function c1111221.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sel=e:GetLabel()
if sel==1 then
Duel.ConfirmDecktop(tp,1)
local tg=Duel.GetDecktopGroup(tp,1)
if tg:GetCount()<1 then return end
local tc=tg:GetFirst()
if tc:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
elseif (tc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) and tc:IsSSetable() then
Duel.SSet(tp,tc)
end
end
if sel==2 then
local num1=Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,nil)
local num2=Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil)
local num=math.min(num1,num2)
if num<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local lg1=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,num,nil)
local lg2=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,lg1:GetCount(),lg1:GetCount(),nil)
lg1:Merge(lg2)
Duel.Remove(lg1,POS_FACEUP,REASON_EFFECT)
end
end
--
--灵曲·凌霜空幽之雪
function c1111224.initial_effect(c)
--
if not c1111224.global_check then
c1111224.global_check=true
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(c1111224.op1)
Duel.RegisterEffect(e1,0)
end
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1111224,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_CUSTOM+1111224)
e2:SetCondition(c1111224.con2)
e2:SetOperation(c1111224.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1111224,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetTarget(c1111224.tg3)
e3:SetOperation(c1111224.op3)
c:RegisterEffect(e3)
--
end
--
function c1111224.ofilter1(c)
return c:IsType(TYPE_EFFECT) and not c:IsPreviousLocation(LOCATION_HAND)
end
function c1111224.op1(e,tp,eg,ep,ev,re,r,rp)
if eg:FilterCount(c1111224.ofilter1,nil,rp)<1 then return end
Duel.RegisterFlagEffect(rp,1111224,RESET_PHASE+PHASE_END,0,1)
if Duel.GetFlagEffect(Duel.GetTurnPlayer(),1111224)==3 then
Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+1111224,nil,0,2,0,0)
end
end
--
function c1111224.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1
end
function c1111224.op2(e,tp,eg,ep,ev,re,r,rp)
local turnp=Duel.GetTurnPlayer()
Duel.SkipPhase(turnp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(turnp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1)
Duel.SkipPhase(turnp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
local e2_1=Effect.CreateEffect(e:GetHandler())
e2_1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2_1:SetType(EFFECT_TYPE_FIELD)
e2_1:SetCode(EFFECT_CANNOT_BP)
e2_1:SetTargetRange(1,0)
e2_1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2_1,turnp)
end
--
function c1111224.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local off=1
local ops={}
local opval={}
ops[off]=aux.Stringid(1111221,2)
opval[off-1]=1
off=off+1
ops[off]=aux.Stringid(1111221,3)
opval[off-1]=2
off=off+1
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
if sel==2 then
e:SetCategory(CATEGORY_DISABLE)
end
end
function c1111224.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local sel=e:GetLabel()
for tc in aux.Next(sg) do
if sel==1 then
local e3_1=Effect.CreateEffect(c)
e3_1:SetType(EFFECT_TYPE_SINGLE)
e3_1:SetCode(EFFECT_CANNOT_TRIGGER)
e3_1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3_1,true)
end
if sel==2 then
local e3_2=Effect.CreateEffect(c)
e3_2:SetType(EFFECT_TYPE_SINGLE)
e3_2:SetCode(EFFECT_DISABLE)
e3_2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3_2)
local e3_3=Effect.CreateEffect(c)
e3_3:SetType(EFFECT_TYPE_FIELD)
e3_3:SetCode(EFFECT_CANNOT_DISEFFECT)
e3_3:SetValue(c1111224.effectfilter)
e3_3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3_3,tp)
local e3_4=e3_3:Clone()
e3_4:SetCode(EFFECT_CANNOT_INACTIVATE)
Duel.RegisterEffect(e3_4,tp)
tc:RegisterFlagEffect(1111224,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
end
end
function c1111224.effectfilter(e,ct)
local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT)
local tc=te:GetHandler()
return tc:GetFlagEffect(11113040)~=0
end
--
\ No newline at end of file
--避世的飘零之城
--
function c1111501.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:SetDescription(aux.Stringid(1111501,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,1111501)
e2:SetTarget(c1111501.tg2)
e2:SetOperation(c1111501.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1111501,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,1111502)
e3:SetCost(c1111501.cost3)
e3:SetTarget(c1111501.tg3)
e3:SetOperation(c1111501.op3)
c:RegisterEffect(e3)
--
end
--
function c1111501.tfilter2(c)
return c:IsCode(1110004) and c:IsAbleToHand()
end
function c1111501.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1111501.tfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1111501.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,c1111501.tfilter2,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--
function c1111501.cost3(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 c1111501.tfilter3(c,e,tp)
return c:IsCode(1110003) and c:IsType(TYPE_MONSTER) 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,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
end
function c1111501.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetMZoneCount(tp)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c1111501.tfilter3,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if sg:GetCount()<1 then return end
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.SelectYesNo(tp,aux.Stringid(1111501,2)) then
local e3_1=Effect.CreateEffect(c)
e3_1:SetType(EFFECT_TYPE_SINGLE)
e3_1:SetCode(EFFECT_UPDATE_LEVEL)
e3_1:SetValue(2)
e3_1:SetReset(RESET_EVENT+0x1fe0000)
sg:GetFirst():RegisterEffect(e3_1,true)
end
end
--
\ No newline at end of file
--幻想天地
function c1111502.initial_effect(c)
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1111502,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_FZONE)
e1:SetCondition(c1111502.con1)
e1:SetCost(c1111502.cost1)
e1:SetTarget(c1111502.tg1)
e1:SetOperation(c1111502.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1111502,2))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c1111502.con2)
e2:SetTarget(c1111502.tg2)
e2:SetOperation(c1111502.op2)
c:RegisterEffect(e2)
--
end
--
function c1111502.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<1
end
function c1111502.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(sg,nil,2,REASON_COST)
end
function c1111502.tfilter1(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3e1f) and c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function c1111502.ofilter1(c)
return c:IsSetCard(0x3e1f) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and not c:IsForbidden()
end
function c1111502.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1111502.tfilter1,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_SZONE,0)>0 and Duel.IsExistingMatchingCard(c1111502.ofilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
end
function c1111502.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c1111502.tfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if sg:GetCount()<1 then return end
if Duel.SpecialSummon(sg,0,tp,tp,true,true,POS_FACEUP)>0 then
if Duel.GetLocationCount(tp,LOCATION_SZONE,0)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1111502,1))
local mg=Duel.SelectMatchingCard(tp,c1111502.ofilter1,tp,LOCATION_DECK,0,1,1,nil)
if mg:GetCount()<1 then return end
Duel.BreakEffect()
Duel.MoveToField(mg:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
--
function c1111502.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetPreviousControler()==tp and rp==1-tp
end
function c1111502.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1)
end
function c1111502.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
Duel.Draw(1-tp,1,REASON_EFFECT)
end
--
\ No newline at end of file
--暗符『月的阴暗面』
function c1153201.initial_effect(c)
aux.AddCodeList(c,10072)
--
c:SetUniqueOnField(1,1,1153201)
--
......
......@@ -45,7 +45,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e5)
end
function cm.filter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0x7f6)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0x37f6)
and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -62,7 +62,7 @@ function cm.repop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return tc:IsControler(tp) and tc:IsFaceup() and tc:IsSetCard(0x7f6)
return tc:IsControler(tp) and tc:IsFaceup() and tc:IsSetCard(0x37f6)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......@@ -78,7 +78,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.tfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x7f6) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
return c:IsFaceup() and c:IsSetCard(0x37f6) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
......
......@@ -27,9 +27,17 @@ function cm.initial_effect(c)
e3:SetTarget(cm.drtg)
e3:SetOperation(cm.drop)
c:RegisterEffect(e3)
--Banish
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetValue(LOCATION_REMOVED)
e4:SetCondition(cm.rmcon)
c:RegisterEffect(e4)
end
function cm.cfilter(c,tp)
return c:IsFaceup() and c:GetSummonPlayer()==tp and c:IsSetCard(0x7f6)
return c:IsFaceup() and c:GetSummonPlayer()==tp and c:IsSetCard(0x37f6)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
......@@ -45,7 +53,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0x7f6)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0x37f6)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
......@@ -64,3 +72,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function cm.rmcon(e)
local c=e:GetHandler()
return c:IsSummonLocation(LOCATION_EXTRA)
and bit.band(c:GetReason(),REASON_MATERIAL+REASON_SYNCHRO)==REASON_MATERIAL+REASON_SYNCHRO
end
\ No newline at end of file
......@@ -26,7 +26,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0x7f6) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
return c:IsFaceup() and c:IsSetCard(0x37f6) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_EXTRA,0,1,nil) end
......@@ -55,7 +55,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e3:SetValue(tc:GetLeftScale()*200)
c:RegisterEffect(e3)
end
......
......@@ -53,7 +53,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.cfilter(c,tp)
return c:IsFaceup() and c:GetSummonPlayer()==tp and c:IsSetCard(0x7f6)
return c:IsFaceup() and c:GetSummonPlayer()==tp and c:IsSetCard(0x37f6)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
......@@ -66,7 +66,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(eg,nil,REASON_EFFECT)~=0 then
if c:IsRelateToEffect(e) and Duel.SendtoHand(eg:Filter(Card.IsSetCard,nil,0x37f6),nil,REASON_EFFECT)~=0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--苍空的迷途者·阿凡达
local m=17061060
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c17035101") end,function() require("script/c17035101") end)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c,false)
--xyz summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(function(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 zone=Duel.GetFieldGroup(tp,LOCATION_MZONE+LOCATION_PZONE,0)
local minc=2
local maxc=114
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
return Duel.CheckXyzMaterial(c,cm.xyzfilter,8,minc,maxc,zone)
end)
e0:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max)
if og and not min then
return true
end
local zone=Duel.GetFieldGroup(tp,LOCATION_MZONE+LOCATION_PZONE,0)
local minc=2
local maxc=114
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local g=Duel.SelectXyzMaterial(tp,c,cm.xyzfilter,8,minc,maxc,zone)
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end)
e0:SetOperation(function(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
if og and not min then
local sg=Group.CreateGroup()
local tc=og:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=og:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
c:SetMaterial(og)
Duel.Overlay(c,og)
else
local mg=e:GetLabelObject()
local sg=Group.CreateGroup()
local tc=mg:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=mg:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
c:SetMaterial(mg)
Duel.Overlay(c,mg)
mg:DeleteGroup()
end
end)
e0:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e0)
chiki.AddXyzProcedure(c,cm.xyzfilter,8,2,LOCATION_PZONE,nil)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_XYZ_LEVEL)
......@@ -122,7 +58,7 @@ end
cm.pendulum_level=8
function cm.xyzfilter(c)
return c:IsType(TYPE_PENDULUM) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE))
and (c:IsSetCard(0x7f6) or not c:IsLocation(LOCATION_PZONE))
and (c:IsSetCard(0x37f6) or not c:IsLocation(LOCATION_PZONE))
end
function cm.xyzlv(e,c,rc)
local lv=c:GetLevel()
......@@ -142,8 +78,10 @@ end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
if Duel.NegateEffect(ev) and c:IsRelateToEffect(e) and rc:IsRelateToEffect(re) and c:IsType(TYPE_XYZ) and rc:IsCanOverlay(tp) then
if Duel.NegateEffect(ev) and c:IsRelateToEffect(e) and rc:IsRelateToEffect(re) and c:IsType(TYPE_XYZ) then
if re:IsActiveType(TYPE_SPELL) then
rc:CancelToGrave()
end
local og=rc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
......
......@@ -4,13 +4,24 @@ local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(15543940,0))
e1:SetDescription(aux.Stringid(17061220,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,17061220+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--pendulum set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(17061220,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(cm.pccost)
e2:SetCondition(cm.pccon)
e2:SetTarget(cm.pctg)
e2:SetOperation(cm.pcop)
c:RegisterEffect(e2)
end
function cm.mffilter0(c,e)
return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
......@@ -19,13 +30,13 @@ function cm.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function cm.filter2(c,e,tp,m,f,chkf)
return c:IsSetCard(0x7f6) and c:IsType(TYPE_FUSION) and (not f or f(c))
return c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil)
local mg1=Duel.GetFusionMaterial(tp)
mg1:Merge(Duel.GetMatchingGroup(cm.mffilter0,tp,LOCATION_PZONE,0,nil,e))
local res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
......@@ -43,7 +54,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil):Filter(cm.filter1,nil,e)
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.filter1,nil,e)
mg1:Merge(Duel.GetMatchingGroup(cm.mffilter0,tp,LOCATION_PZONE,0,nil,e))
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
......@@ -75,3 +86,27 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
tc:CompleteProcedure()
end
end
function cm.pccost(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 cm.pccon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.GetFieldCard(tp,LOCATION_PZONE,0) and not Duel.GetFieldCard(tp,LOCATION_PZONE,1)
end
function cm.psfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x37f6) and not c:IsForbidden()
end
function cm.pctg(e,tp,eg,ep,ev,re,r,rp,chk)
local seq=e:GetHandler():GetSequence()
if chk==0 then return Duel.IsExistingMatchingCard(cm.psfilter,tp,LOCATION_DECK,0,1,nil) end
end
function cm.pcop(e,tp,eg,ep,ev,re,r,rp)
if chkc then return chkc:IsLocation(LOCATION_DECK) and chkc:IsControler(tp) and cm.psfilter(chkc) end
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local seq=e:GetHandler():GetSequence()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.psfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
......@@ -41,7 +41,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e4)
end
function cm.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x5da) and c:IsControler(tp)
return c:IsFaceup() and c:IsSetCard(0x57f6) and c:IsControler(tp)
end
function cm.sccon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
......@@ -95,7 +95,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.pcfilter(c)
return c:IsSetCard(0x5da) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
return c:IsSetCard(0x57f6) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function cm.pctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
......
......@@ -81,7 +81,7 @@ function cm.val(e,re,dam,r,rp,rc)
else return dam end
end
function cm.penfilter(c)
return c:IsSetCard(0x7f6) or c:IsSetCard(0x7f5)
return c:IsSetCard(0x37f6) or c:IsSetCard(0x7f5)
end
function cm.pencon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.penfilter,tp,LOCATION_PZONE,0,1,nil)
......
--宵暗的妖怪✿芙兰朵露
require "expansions/script/nef/nef"
function c19025.initial_effect(c)
aux.AddCodeList(c,10072)
Duel.EnableGlobalFlag(GLOBALFLAG_SPSUMMON_COUNT)
--fusion material
c:EnableReviveLimit()
......
--Lost·露米娅
function c22035.initial_effect(c)
aux.AddCodeList(c,10072)
c:EnableReviveLimit()
--Cannot special summon
local e1=Effect.CreateEffect(c)
......
--月之暗面-lv1.4
function c22087.initial_effect(c)
aux.AddCodeList(c,10072)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
......
--月符「月光放射」
function c22093.initial_effect(c)
aux.AddCodeList(c,10072)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......
--EX-露米娅
function c22094.initial_effect(c)
aux.AddCodeList(c,10072)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsCode,22001),1)
c:EnableReviveLimit()
......
--令旗的伴随者
function c22290002.initial_effect(c)
--recycle
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22290002,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,22290002)
e1:SetCost(c22290002.cost)
e1:SetTarget(c22290002.target)
e1:SetOperation(c22290002.operation)
c:RegisterEffect(e1)
end
c22290002.named_with_Saihai=1
function c22290002.IsSaihai(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Saihai
end
function c22290002.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c22290002.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc~=e:GetHandler() and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_SZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_SZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c22290002.setfilter(c,code)
return c22290002.IsSaihai(c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsCode(code) and c:IsSSetable()
end
function c22290002.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local code=tc:GetCode()
if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
local ct=Duel.GetCurrentChain()
if ct>2 and Duel.SelectYesNo(tp,aux.Stringid(22290002,2)) then
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1)
e1:SetTarget(c22290002.sptg)
e1:SetOperation(c22290002.spop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
if Duel.SelectYesNo(tp,aux.Stringid(22290002,1)) and Duel.IsExistingMatchingCard(c22290002.setfilter,tp,LOCATION_DECK,0,1,1,nil,code) then
Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,c22290002.setfilter,tp,LOCATION_DECK,0,1,1,nil,code)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
end
end
end
end
function c22290002.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,tp,LOCATION_GRAVE)
end
function c22290002.spop(e,tp,eg,ep,ev,re,r,rp)
e:Reset()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
--纷乱中的令旗
function c22291101.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22291101,0))
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,22291101+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c22291101.target)
e1:SetOperation(c22291101.activate)
c:RegisterEffect(e1)
--act in set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22291101,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c22291101.tdcon)
e2:SetTarget(c22291101.tdtg)
e2:SetOperation(c22291101.tdop)
c:RegisterEffect(e2)
end
c22291101.named_with_Saihai=1
function c22291101.IsSaihai(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Saihai
end
function c22291101.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 end
local ct=0
for i=1,ev do
local tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_PLAYER)
if tgp==tp then
ct=ct+1
end
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,0,ct,1-tp,LOCATION_ONFIELD)
end
function c22291101.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=0
for i=1,ev do
local tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_PLAYER)
if tgp==tp then
ct=ct+1
end
end
if not (ct>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0) then return end
while (ct>=0 and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0) do
local dc=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD):RandomSelect(tp,1):GetFirst()
ct=ct-1
if Duel.Destroy(dc,REASON_EFFECT)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x17a0000)
dc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x17a0000)
dc:RegisterEffect(e2)
end
end
end
function c22291101.tdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c22291101.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c22291101.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetTargetRange(LOCATION_SZONE,0)
e1:SetCondition(c22291101.sacon)
e1:SetTarget(c22291101.satg)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c22291101.sacon(e)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c22291101.satg(e,c)
return c22291101.IsSaihai(c) and c:IsType(TYPE_TRAP)
end
\ No newline at end of file
......@@ -18,7 +18,7 @@ function c60151327.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,60151328)
e2:SetCondition(aux.exccon)
--e2:SetCondition(aux.exccon)
e2:SetCost(c60151327.negcost)
e2:SetTarget(c60151327.target2)
e2:SetOperation(c60151327.activate2)
......@@ -28,18 +28,24 @@ function c60151327.atkfilter1(c)
return c:IsFacedown()
end
function c60151327.atkfilter2(c)
return c:IsFaceup() and c:IsType(TYPE_EQUIP)
return c:GetEquipCount()>0
end
function c60151327.condition(e,tp,eg,ep,ev,re,r,rp)
local ct1=Duel.GetMatchingGroupCount(c60151327.atkfilter1,tp,0,LOCATION_ONFIELD,nil)
local ct2=Duel.GetMatchingGroupCount(c60151327.atkfilter2,tp,LOCATION_ONFIELD,0,nil)
local cg=Duel.GetMatchingGroup(c60151327.atkfilter2,tp,LOCATION_MZONE,0,nil)
local ct2=0
local gt1=cg:GetFirst()
while gt1 do
local gt2=gt1:GetEquipCount()
ct2=ct2+gt2
gt1=cg:GetNext()
end
return ct2>=ct1
end
function c60151327.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60151327.atkfilter1,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c60151327.atkfilter1,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetChainLimit(aux.FALSE)
end
function c60151327.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c60151327.atkfilter1,tp,0,LOCATION_ONFIELD,nil)
......@@ -47,20 +53,38 @@ function c60151327.operation(e,tp,eg,ep,ev,re,r,rp)
end
--
function c60151327.cfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsAbleToGraveAsCost()
return c:IsDestructable()
end
function c60151327.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c60151327.cfilter,tp,LOCATION_ONFIELD,0,2,nil) end
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c60151327.cfilter,tp,LOCATION_ONFIELD,0,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c60151327.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
local cg=Duel.GetMatchingGroup(c60151327.atkfilter2,tp,LOCATION_MZONE,0,nil)
local rg=Group.CreateGroup()
local gt1=cg:GetFirst()
while gt1 do
local tg=gt1:GetEquipGroup()
rg:Merge(tg)
gt1=cg:GetNext()
end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and rg:GetCount()>1 end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c60151327.activate2(e,tp,eg,ep,ev,re,r,rp)
local cg=Duel.GetMatchingGroup(c60151327.atkfilter2,tp,LOCATION_MZONE,0,nil)
local rg=Group.CreateGroup()
local gt1=cg:GetFirst()
while gt1 do
local tg=gt1:GetEquipGroup()
rg:Merge(tg)
gt1=cg:GetNext()
end
if rg:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=rg:Select(tp,2,2,nil)
if Duel.Destroy(g,REASON_EFFECT)==2 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
......@@ -16,10 +16,10 @@ function c66919016.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c66919016.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
end
function c66919016.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,c66919016.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
local g=Duel.GetMatchingGroup(c66919016.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
while tc do
e:SetLabel(tc.dfc_front_side)
local c=e:GetHandler()
local mcode=tc:GetOriginalCode()
......@@ -42,6 +42,8 @@ function c66919016.spop(e,tp,eg,ep,ev,re,r,rp)
end)
tc:RegisterEffect(e2)
end
tc=g:GetNext()
end
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -51,7 +53,7 @@ function c66919016.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTarget(c66919016.indtg)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetTargetRange(LOCATION_MZONE,0)
......
--捕食者 米斯蒂娅✿萝蕾拉
require "expansions/script/nef/darksyn"
local Cardno=74561061
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
DS.DarkTunerLimit(c)
--discard
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(Cardno,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE+CATEGORY_ATKCHANGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCost(cCardno.discost)
e1:SetTarget(cCardno.distg)
e1:SetOperation(cCardno.disop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(Cardno,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,Cardno)
e2:SetCost(cCardno.spcost)
e2:SetTarget(cCardno.sptg)
e2:SetOperation(cCardno.spop)
c:RegisterEffect(e2)
end
--SpecialSummon
function cCardno.rfilter(c)
return c:IsLevel(2) and c:IsSetCard(0x208)
end
function cCardno.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,cCardno.rfilter,1,nil) end
local g=Duel.SelectReleaseGroupEx(tp,cCardno.rfilter,1,1,nil)
local rc=g:GetFirst()
Duel.SetTargetCard(rc)
Duel.Release(rc,REASON_COST)
end
function cCardno.spfilter(c,e,tp)
return c:IsSetCard(0x208) and c:IsType(TYPE_MONSTER) and c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cCardno.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(cCardno.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cCardno.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=Duel.GetFirstTarget()
if Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(cCardno.spfilter,tp,LOCATION_GRAVE,0,1,rc,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local spc=Duel.SelectMatchingCard(tp,cCardno.spfilter,tp,LOCATION_GRAVE,0,1,1,rc,e,tp)
if spc then Duel.SpecialSummon(spc,0,tp,tp,false,false,POS_FACEUP) end
end
end
--defence
function cCardno.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function cCardno.disfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
end
function cCardno.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cCardno.disfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp) and Duel.GetMZoneCount(1-tp)>0 end
local g=Duel.SelectTarget(tp,cCardno.disfilter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,1-tp,LOCATION_GRAVE)
end
function cCardno.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetMZoneCount(1-tp)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) then
Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
local atk=tc:GetAttack()
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK)
e3:SetValue(atk*2)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3,true)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MUST_ATTACK)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e4,true)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e5:SetValue(1)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e5,true)
end
end
\ No newline at end of file
......@@ -7,7 +7,7 @@ function c74563019.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c74563019.addcc)
--e2:SetCondition(c74563019.addcc)
e2:SetTarget(c74563019.addct)
e2:SetOperation(c74563019.addc)
c:RegisterEffect(e2)
......
--正体不明『恐怖的虹色UFO袭来』
function c77002009.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c77002009.target)
e1:SetOperation(c77002009.activate)
c:RegisterEffect(e1)
--attribute
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetCode(EFFECT_ADD_ATTRIBUTE)
e2:SetCondition(c77002009.condition)
e2:SetTarget(c77002009.eftg)
e2:SetValue(0xff-ATTRIBUTE_DIVINE)
c:RegisterEffect(e2)
end
function c77002009.eftg(e,c)
local seq=c:GetSequence()
return seq<5
end
function c77002009.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(77002009)>0
end
function c77002009.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,77002009,0,TYPE_NORMAL+TYPE_MONSTER,0,0,7,RACE_MACHINE,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c77002009.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,77002009,0,TYPE_NORMAL+TYPE_MONSTER,0,0,7,RACE_MACHINE,ATTRIBUTE_LIGHT) or not c:IsRelateToEffect(e) then return end
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP)
c:RegisterFlagEffect(77002009,RESETS_STANDARD+RESET_EVENT,0,1)
end
\ No newline at end of file
--梦符『绀色的狂梦』
require "expansions/script/nef/Gds"
function c86379011.initial_effect(c)
--
Gds.Adjustdreamsequence(c)
--Gds.Checkdeckpublic(c)
--reverse
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379011,0))
......@@ -97,6 +101,13 @@ function c86379011.op2(e,tp,eg,ep,ev,re,r,rp)
e9:SetValue(0)
e9:SetReset(RESET_EVENT+0x47c0000)
tc:RegisterEffect(e9,true)
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_UPDATE_LEVEL)
e10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e10:SetValue(1)
e10:SetReset(RESET_EVENT+0x47c0000)
tc:RegisterEffect(e10,true)
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
......@@ -120,5 +131,6 @@ function c86379011.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummonComplete()
end
function c86379011.efilter(e,c)
if not c then return false end
return not c:IsSetCard(0x273)
end
......@@ -3,6 +3,7 @@ require "expansions/script/nef/Gds"
function c86379015.initial_effect(c)
--
Gds.Adjustdreamsequence(c)
--Gds.Checkdeckpublic(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
......@@ -29,77 +30,57 @@ function c86379015.filter2(c)
return c:IsFaceup() and not c:IsType(TYPE_LINK) and (c:GetDefense()~=0 or not c:IsPosition(POS_FACEUP_DEFENSE))
end
function c86379015.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst()==e:GetHandler() and e:GetHandler():GetFlagEffect(86379015)==0
return eg:GetFirst()==e:GetHandler()
end
function c86379015.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return
((ev==Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-1) and Duel.IsExistingMatchingCard(c86379015.filter1,tp,LOCATION_MZONE,0,1,nil))
or ((ev==0) and Duel.IsExistingMatchingCard(c86379015.filter2,tp,0,LOCATION_MZONE,1,nil))
end
local ti=0
if e:GetHandler():IsFaceup() or Duel.IsPlayerAffectedByEffect(tp,31027) then
ti=10
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
else
e:GetHandler():ReverseInDeck()
e:GetHandler():GetFlagEffect(86379015)==0
and
(Duel.IsExistingMatchingCard(c86379015.filter1,tp,LOCATION_MZONE,0,1,nil)
or Duel.IsExistingMatchingCard(c86379015.filter2,tp,0,LOCATION_MZONE,1,nil)
or (Duel.IsPlayerCanSpecialSummonMonster(tp,86379015,0x279,TYPES_NORMAL_TRAP_MONSTER,0,3000,1,RACE_PSYCHO,ATTRIBUTE_DARK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0))
end
e:GetHandler():RegisterFlagEffect(86379015,RESET_CHAIN,0,1)
if ((ev==Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-1) and Duel.IsExistingMatchingCard(c86379015.filter1,tp,LOCATION_MZONE,0,1,nil)) then
e:SetLabel(1+ti)
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,tp,LOCATION_MZONE)
else
e:SetLabel(0+ti)
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,LOCATION_MZONE)
end
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c86379015.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabel()
local flag=0
local face=0
if ct>=10 then
face=1
ct=ct-10
end
if ct==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,c86379015.filter1,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
--flag=1
Duel.HintSelection(g)
local tc=g:GetFirst()
--defupdown
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(86379015,3))
local g1=Duel.SelectMatchingCard(tp,c86379015.filter1,tp,LOCATION_MZONE,0,1,1,nil)
if g1:GetCount()>0 then
Duel.HintSelection(g1)
local tc1=g1:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_DEFENSE_FINAL)
e1:SetValue(3000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if not tc:IsPosition(POS_DEFENSE) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
tc1:RegisterEffect(e1)
if not tc1:IsPosition(POS_DEFENSE) then
Duel.ChangePosition(tc1,POS_FACEUP_DEFENSE)
end
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,c86379015.filter2,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
--flag=1
Duel.HintSelection(g)
local tc=g:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(86379015,3))
local g2=Duel.SelectMatchingCard(tp,c86379015.filter2,tp,0,LOCATION_MZONE,1,1,nil)
if g2:GetCount()>0 then
Duel.HintSelection(g2)
local tc2=g2:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_DEFENSE_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if not tc:IsPosition(POS_DEFENSE) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
end
tc2:RegisterEffect(e1)
if not tc2:IsPosition(POS_DEFENSE) then
Duel.ChangePosition(tc2,POS_FACEUP_DEFENSE)
end
end
--SpecialSummon
if not c:IsRelateToEffect(e) then return end
--if flag==0 then return end
if face==1
and Duel.IsPlayerCanSpecialSummonMonster(tp,86379015,0x279,TYPES_NORMAL_TRAP_MONSTER,0,3000,1,RACE_PSYCHO,ATTRIBUTE_DARK)
if Duel.IsPlayerCanSpecialSummonMonster(tp,86379015,0x279,TYPES_NORMAL_TRAP_MONSTER,0,3000,1,RACE_PSYCHO,ATTRIBUTE_DARK)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
......@@ -136,18 +117,79 @@ function c86379015.operation(e,tp,eg,ep,ev,re,r,rp)
e9:SetValue(3000)
e9:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e9,true)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
c:RegisterFlagEffect(86379016,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_IMMUNE_EFFECT)
e10:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e10:SetRange(LOCATION_MZONE)
e10:SetCondition(c86379015.flagcon)
e10:SetValue(c86379015.efilter)
e10:SetReset(RESET_EVENT+RESETS_STANDARD)
e10:SetCode(EFFECT_UPDATE_LEVEL)
e10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e10:SetValue(1)
e10:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e10,true)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
c:RegisterFlagEffect(86379016,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_IMMUNE_EFFECT)
e11:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e11:SetRange(LOCATION_MZONE)
e11:SetCondition(c86379015.flagcon)
e11:SetValue(c86379015.efilter)
e11:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e11,true)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e1:SetValue(c86379015.efilter4)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
c:RegisterEffect(e3,true)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e4,true)
Duel.SpecialSummonComplete()
--if e:GetHandler():GetTurnCounter()==0 then
c:RegisterFlagEffect(86379011,RESET_EVENT+RESETS_STANDARD,0,1)
if Duel.GetFlagEffect(tp,86379011)<=0 then
Duel.RegisterFlagEffect(tp,86379011,0,0,1)
local e222=Effect.CreateEffect(c)
e222:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e222:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e222:SetCode(EVENT_PHASE+PHASE_END)
e222:SetCountLimit(1)
e222:SetCondition(c86379015.countercon)
e222:SetOperation(c86379015.counterop)
Duel.RegisterEffect(e222,tp)
end
--end
end
end
function c86379015.counterfilter(c)
return c:IsOriginalCodeRule(86379013,86379015,86379017,86379019,86379023)
end
function c86379015.countercon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(c86379015.counterfilter,tp,LOCATION_MZONE,0,nil)>0
end
function c86379015.counterop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c86379015.counterfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local ft=tc:GetFlagEffect(86379011)
local ct=0
if ft>0 then
ct=ft
tc:ResetFlagEffect(86379011)
else
ct=tc:GetTurnCounter()
ct=ct+1
end
tc:SetTurnCounter(ct)
tc=g:GetNext()
end
end
function c86379015.flagcon(e)
......@@ -157,3 +199,7 @@ function c86379015.efilter(e,te)
return te:IsActiveType(TYPE_SPELL)
and not te:GetHandler():IsSetCard(0x279)
end
function c86379015.efilter4(e,c)
if not c then return false end
return not c:IsSetCard(0x273)
end
......@@ -3,6 +3,7 @@ require "expansions/script/nef/Gds"
function c86379017.initial_effect(c)
--
Gds.Adjustdreamsequence(c)
--Gds.Checkdeckpublic(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
......@@ -29,77 +30,57 @@ function c86379017.filter2(c)
return c:GetAttack()~=0 or not c:IsPosition(POS_FACEUP_ATTACK)
end
function c86379017.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst()==e:GetHandler() and e:GetHandler():GetFlagEffect(86379017)==0
return eg:GetFirst()==e:GetHandler()
end
function c86379017.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return
((ev==Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-1) and Duel.IsExistingMatchingCard(c86379017.filter1,tp,LOCATION_MZONE,0,1,nil))
or ((ev==0) and Duel.IsExistingMatchingCard(c86379017.filter2,tp,0,LOCATION_MZONE,1,nil))
end
local ti=0
if e:GetHandler():IsFaceup() or Duel.IsPlayerAffectedByEffect(tp,31027) then
ti=10
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
else
e:GetHandler():ReverseInDeck()
e:GetHandler():GetFlagEffect(86379017)==0
and
(Duel.IsExistingMatchingCard(c86379017.filter1,tp,LOCATION_MZONE,0,1,nil)
or Duel.IsExistingMatchingCard(c86379017.filter2,tp,0,LOCATION_MZONE,1,nil)
or (Duel.IsPlayerCanSpecialSummonMonster(tp,86379017,0x279,TYPES_NORMAL_TRAP_MONSTER,3000,0,1,RACE_PSYCHO,ATTRIBUTE_DARK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0))
end
e:GetHandler():RegisterFlagEffect(86379017,RESET_CHAIN,0,1)
if ((ev==Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-1) and Duel.IsExistingMatchingCard(c86379017.filter1,tp,LOCATION_MZONE,0,1,nil)) then
e:SetLabel(1+ti)
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,tp,LOCATION_MZONE)
else
e:SetLabel(0+ti)
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,LOCATION_MZONE)
end
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c86379017.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabel()
local flag=0
local face=0
if ct>=10 then
face=1
ct=ct-10
end
if ct==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,c86379017.filter1,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
--flag=1
Duel.HintSelection(g)
local tc=g:GetFirst()
--atkupdown
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(86379017,3))
local g1=Duel.SelectMatchingCard(tp,c86379017.filter1,tp,LOCATION_MZONE,0,1,1,nil)
if g1:GetCount()>0 then
Duel.HintSelection(g1)
local tc1=g1:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(3000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if not tc:IsPosition(POS_ATTACK) then
Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
tc1:RegisterEffect(e1)
if not tc1:IsPosition(POS_ATTACK) then
Duel.ChangePosition(tc1,POS_FACEUP_ATTACK)
end
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,c86379017.filter2,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
--flag=1
Duel.HintSelection(g)
local tc=g:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(86379017,3))
local g2=Duel.SelectMatchingCard(tp,c86379017.filter2,tp,0,LOCATION_MZONE,1,1,nil)
if g2:GetCount()>0 then
Duel.HintSelection(g2)
local tc2=g2:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if not tc:IsPosition(POS_ATTACK) then
Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
end
tc2:RegisterEffect(e1)
if not tc2:IsPosition(POS_ATTACK) then
Duel.ChangePosition(tc2,POS_FACEUP_ATTACK)
end
end
--SpecialSummon
if not c:IsRelateToEffect(e) then return end
--if flag==0 then return end
if face==1
and Duel.IsPlayerCanSpecialSummonMonster(tp,86379017,0x279,TYPES_NORMAL_TRAP_MONSTER,3000,0,1,RACE_PSYCHO,ATTRIBUTE_DARK)
if Duel.IsPlayerCanSpecialSummonMonster(tp,86379017,0x279,TYPES_NORMAL_TRAP_MONSTER,3000,0,1,RACE_PSYCHO,ATTRIBUTE_DARK)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
......@@ -136,18 +117,79 @@ function c86379017.operation(e,tp,eg,ep,ev,re,r,rp)
e9:SetValue(0)
e9:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e9,true)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
c:RegisterFlagEffect(86379018,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_IMMUNE_EFFECT)
e10:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e10:SetRange(LOCATION_MZONE)
e10:SetCondition(c86379017.flagcon)
e10:SetValue(c86379017.efilter)
e10:SetReset(RESET_EVENT+RESETS_STANDARD)
e10:SetCode(EFFECT_UPDATE_LEVEL)
e10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e10:SetValue(1)
e10:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e10,true)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
c:RegisterFlagEffect(86379018,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_IMMUNE_EFFECT)
e11:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e11:SetRange(LOCATION_MZONE)
e11:SetCondition(c86379017.flagcon)
e11:SetValue(c86379017.efilter)
e11:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e11,true)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e1:SetValue(c86379017.efilter4)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
c:RegisterEffect(e3,true)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e4,true)
Duel.SpecialSummonComplete()
--if e:GetHandler():GetTurnCounter()==0 then
c:RegisterFlagEffect(86379011,RESET_EVENT+RESETS_STANDARD,0,1)
if Duel.GetFlagEffect(tp,86379011)<=0 then
Duel.RegisterFlagEffect(tp,86379011,0,0,1)
local e222=Effect.CreateEffect(c)
e222:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e222:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e222:SetCode(EVENT_PHASE+PHASE_END)
e222:SetCountLimit(1)
e222:SetCondition(c86379017.countercon)
e222:SetOperation(c86379017.counterop)
Duel.RegisterEffect(e222,tp)
end
--end
end
end
function c86379017.counterfilter(c)
return c:IsOriginalCodeRule(86379013,86379015,86379017,86379019,86379023)
end
function c86379017.countercon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(c86379017.counterfilter,tp,LOCATION_MZONE,0,nil)>0
end
function c86379017.counterop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c86379017.counterfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local ft=tc:GetFlagEffect(86379011)
local ct=0
if ft>0 then
ct=ft
tc:ResetFlagEffect(86379011)
else
ct=tc:GetTurnCounter()
ct=ct+1
end
tc:SetTurnCounter(ct)
tc=g:GetNext()
end
end
function c86379017.flagcon(e)
......@@ -157,3 +199,7 @@ function c86379017.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
and not te:GetHandler():IsSetCard(0x279)
end
function c86379017.efilter4(e,c)
if not c then return false end
return not c:IsSetCard(0x273)
end
\ No newline at end of file
......@@ -3,6 +3,7 @@ require "expansions/script/nef/Gds"
function c86379019.initial_effect(c)
--
Gds.Adjustdreamsequence(c)
--Gds.Checkdeckpublic(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
......@@ -38,27 +39,25 @@ function c86379019.filter1(c)
return c:IsSetCard(0x279) and c:IsAbleToDeck()
end
function c86379019.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
return eg:GetFirst()==e:GetHandler()
end
function c86379019.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c86379019.filter1,tp,LOCATION_HAND,0,1,nil) and c:GetFlagEffect(86379019)==0 end
c:RegisterFlagEffect(86379019,RESET_CHAIN,0,1)
if e:GetHandler():IsFaceup() or Duel.IsPlayerAffectedByEffect(tp,31027) then
e:SetLabel(1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
else
e:SetLabel(0)
e:GetHandler():ReverseInDeck()
if chk==0 then return
e:GetHandler():GetFlagEffect(86379019)==0
and
(Duel.IsExistingMatchingCard(c86379019.filter1,tp,LOCATION_HAND,0,1,nil)
or (Duel.IsPlayerCanSpecialSummonMonster(tp,86379019,0x279,0x1121,0,0,1,RACE_PSYCHO,ATTRIBUTE_DARK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0))
end
e:GetHandler():RegisterFlagEffect(86379019,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c86379019.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local flag=0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.GetMatchingGroup(c86379019.filter1,tp,LOCATION_HAND,0,nil)
if g:GetCount()>0 then
--flag=1
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
Duel.ShuffleDeck(tp)
......@@ -66,9 +65,7 @@ function c86379019.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,dg,REASON_EFFECT)
end
if not c:IsRelateToEffect(e) then return end
--if flag==0 then return end
if e:GetLabel()==1
and Duel.IsPlayerCanSpecialSummonMonster(tp,86379019,0x279,0x1121,0,0,1,RACE_PSYCHO,ATTRIBUTE_DARK)
if Duel.IsPlayerCanSpecialSummonMonster(tp,86379019,0x279,0x1121,0,0,1,RACE_PSYCHO,ATTRIBUTE_DARK)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
......@@ -105,7 +102,24 @@ function c86379019.operation(e,tp,eg,ep,ev,re,r,rp)
e9:SetValue(0)
e9:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e9,true)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_UPDATE_LEVEL)
e10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e10:SetValue(1)
e10:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e10,true)
Duel.SpecialSummonStep(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP)
c:RegisterFlagEffect(86379020,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e11:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e11:SetRange(LOCATION_MZONE)
e11:SetCondition(c86379019.flagcon)
e11:SetValue(1)
e11:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e11,true)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -123,12 +137,53 @@ function c86379019.operation(e,tp,eg,ep,ev,re,r,rp)
e4:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e4,true)
Duel.SpecialSummonComplete()
--if e:GetHandler():GetTurnCounter()==0 then
c:RegisterFlagEffect(86379011,RESET_EVENT+RESETS_STANDARD,0,1)
if Duel.GetFlagEffect(tp,86379011)<=0 then
Duel.RegisterFlagEffect(tp,86379011,0,0,1)
local e222=Effect.CreateEffect(c)
e222:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e222:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e222:SetCode(EVENT_PHASE+PHASE_END)
e222:SetCountLimit(1)
e222:SetCondition(c86379019.countercon)
e222:SetOperation(c86379019.counterop)
Duel.RegisterEffect(e222,tp)
end
--end
end
end
function c86379019.counterfilter(c)
return c:IsOriginalCodeRule(86379013,86379015,86379017,86379019,86379023)
end
function c86379019.countercon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(c86379019.counterfilter,tp,LOCATION_MZONE,0,nil)>0
end
function c86379019.counterop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c86379019.counterfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local ft=tc:GetFlagEffect(86379011)
local ct=0
if ft>0 then
ct=ft
tc:ResetFlagEffect(86379011)
else
ct=tc:GetTurnCounter()
ct=ct+1
end
tc:SetTurnCounter(ct)
tc=g:GetNext()
end
end
function c86379019.efilter4(e,c)
if not c then return false end
return not c:IsSetCard(0x273)
end
function c86379019.flagcon(e)
return e:GetHandler():GetFlagEffect(86379020)>0 or Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),86379025)
end
--
function c86379019.dccon(e)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
......
--梦符『梦我梦中』
require "expansions/script/nef/Gds"
function c86379021.initial_effect(c)
--
Gds.Adjustdreamsequence(c)
--Gds.Checkdeckpublic(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
......@@ -23,7 +26,7 @@ function c86379021.initial_effect(c)
e2:SetCode(EFFECT_UPDATE_LEVEL)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c86379021.lvtg)
e2:SetTarget(c86379021.eftg)
e2:SetValue(1)
c:RegisterEffect(e2)
--add code
......@@ -37,15 +40,22 @@ function c86379021.initial_effect(c)
c:RegisterEffect(e3)
--change tune
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(86379021,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_CUSTOM+86379010)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c86379021.ctcon)
e4:SetTarget(c86379021.cttg)
e4:SetOperation(c86379021.ctop)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetCode(EFFECT_ADD_TYPE)
e4:SetTarget(c86379021.eftg)
e4:SetValue(TYPE_TUNER)
c:RegisterEffect(e4)
--change tune
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetCode(EFFECT_NONTUNER)
e5:SetTarget(c86379021.eftg)
e5:SetValue(1)
c:RegisterEffect(e5)
end
--
function c86379021.tsfilter(c,tp)
......
--食梦的妖怪✿哆来咪·苏伊特
require "expansions/script/nef/Gds"
function c86379023.initial_effect(c)
--
Gds.Adjustdreamsequence(c)
--Gds.Checkdeckpublic(c)
--link summon
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
......@@ -99,6 +102,20 @@ function c86379023.cpop(e,tp,eg,ep,ev,re,r,rp)
local g=c:GetMaterial()
if g:GetCount()<=0 then return end
c:RegisterFlagEffect(86379023,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
--if e:GetHandler():GetTurnCounter()==0 then
c:RegisterFlagEffect(86379011,RESET_EVENT+RESETS_STANDARD,0,1)
if Duel.GetFlagEffect(tp,86379011)<=0 then
Duel.RegisterFlagEffect(tp,86379011,0,0,1)
local e222=Effect.CreateEffect(c)
e222:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e222:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e222:SetCode(EVENT_PHASE+PHASE_END)
e222:SetCountLimit(1)
e222:SetCondition(c86379023.countercon)
e222:SetOperation(c86379023.counterop)
Duel.RegisterEffect(e222,tp)
end
--end
if g:IsExists(c86379023.cpfilter,1,nil) then
if g:IsExists(Card.IsCode,1,nil,86379013) then
local e0=Effect.CreateEffect(c)
......@@ -119,6 +136,23 @@ function c86379023.cpop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(c86379023.efilter1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e11=Effect.CreateEffect(c)
--e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
--e1:SetCondition(c86379023.flagcon)
e11:SetValue(c86379023.efilter4)
e11:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e11)
local e22=e11:Clone()
e22:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e22)
local e33=e11:Clone()
e33:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
c:RegisterEffect(e33)
local e44=e11:Clone()
e44:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e44)
end
if g:IsExists(Card.IsCode,1,nil,86379015) then
local e0=Effect.CreateEffect(c)
......@@ -139,6 +173,23 @@ function c86379023.cpop(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(c86379023.efilter2)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
local e11=Effect.CreateEffect(c)
--e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
--e1:SetCondition(c86379023.flagcon)
e11:SetValue(c86379023.efilter4)
e11:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e11)
local e22=e11:Clone()
e22:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e22)
local e33=e11:Clone()
e33:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
c:RegisterEffect(e33)
local e44=e11:Clone()
e44:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e44)
end
if g:IsExists(Card.IsCode,1,nil,86379017) then
local e0=Effect.CreateEffect(c)
......@@ -159,6 +210,23 @@ function c86379023.cpop(e,tp,eg,ep,ev,re,r,rp)
e3:SetValue(c86379023.efilter3)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
local e11=Effect.CreateEffect(c)
--e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
--e1:SetCondition(c86379023.flagcon)
e11:SetValue(c86379023.efilter4)
e11:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e11)
local e22=e11:Clone()
e22:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e22)
local e33=e11:Clone()
e33:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
c:RegisterEffect(e33)
local e44=e11:Clone()
e44:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e44)
end
if g:IsExists(Card.IsCode,1,nil,86379019) then
local e0=Effect.CreateEffect(c)
......@@ -170,30 +238,39 @@ function c86379023.cpop(e,tp,eg,ep,ev,re,r,rp)
e0:SetValue(86379019)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
--e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetDescription(aux.Stringid(86379023,7))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
--e1:SetCondition(c86379023.flagcon)
e1:SetValue(c86379023.efilter4)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c86379023.flagcon)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
c:RegisterEffect(e3)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e4)
local e11=Effect.CreateEffect(c)
--e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
--e1:SetCondition(c86379023.flagcon)
e11:SetValue(c86379023.efilter4)
e11:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e11)
local e22=e11:Clone()
e22:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e22)
local e33=e11:Clone()
e33:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
c:RegisterEffect(e33)
local e44=e11:Clone()
e44:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e44)
local ct=g:FilterCount(Card.IsCode,nil,86379019)
for i=1,ct do
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(86379023,7))
e5:SetDescription(aux.Stringid(86379019,1))
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e5:SetCountLimit(1)
e5:SetTarget(c86379023.dctg2)
e5:SetOperation(c86379023.dcop2)
......@@ -219,7 +296,7 @@ function c86379023.cpop(e,tp,eg,ep,ev,re,r,rp)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
--e5:SetCondition(c86379023.flagcon)
e5:SetTarget(c86379023.lvtg2)
e5:SetTarget(c86379023.eftg2)
e5:SetValue(ct)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e5)
......@@ -235,6 +312,15 @@ function c86379023.cpop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e6)
--change tune
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetRange(LOCATION_MZONE)
e7:SetTargetRange(LOCATION_MZONE,0)
e7:SetCode(EFFECT_ADD_TYPE)
e7:SetTarget(c86379023.eftg2)
e7:SetValue(TYPE_TUNER)
e7:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e7)
--[[local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(86379023,8))
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e7:SetCode(EVENT_CUSTOM+86379010)
......@@ -244,7 +330,19 @@ function c86379023.cpop(e,tp,eg,ep,ev,re,r,rp)
e7:SetTarget(c86379023.cttg)
e7:SetOperation(c86379023.ctop)
e7:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e7)
c:RegisterEffect(e7)]]--
--synnontune
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(86379023,8))
e8:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetRange(LOCATION_MZONE)
e8:SetTargetRange(LOCATION_MZONE,0)
e8:SetCode(EFFECT_NONTUNER)
e8:SetTarget(c86379023.eftg2)
e8:SetValue(1)
e8:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e8)
end
--[[ if g:IsExists(Card.IsCode,1,nil,10282) then
......@@ -275,10 +373,34 @@ function c86379023.cpop(e,tp,eg,ep,ev,re,r,rp)
e9:SetOperation(c86379023.aop)
e9:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e9,true)
end]]
end]]--
end
end
function c86379023.counterfilter(c)
return c:IsOriginalCodeRule(86379013,86379015,86379017,86379019,86379023)
end
function c86379023.countercon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(c86379023.counterfilter,tp,LOCATION_MZONE,0,nil)>0
end
function c86379023.counterop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c86379023.counterfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local ft=tc:GetFlagEffect(86379011)
local ct=0
if ft>0 then
ct=ft
tc:ResetFlagEffect(86379011)
else
ct=tc:GetTurnCounter()
ct=ct+1
end
tc:SetTurnCounter(ct)
tc=g:GetNext()
end
end
function c86379023.efilter1(e,te)
return te:IsActiveType(TYPE_MONSTER)
and not te:GetHandler():IsSetCard(0x279)
......
......@@ -3,7 +3,7 @@ require "expansions/script/nef/Gds"
function c86379025.initial_effect(c)
--
Gds.Adjustdreamsequence(c)
Gds.Checkdeckpublic(c)
--Gds.Checkdeckpublic(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
......
......@@ -3,7 +3,7 @@ require "expansions/script/nef/Gds"
function c86379027.initial_effect(c)
--
Gds.Adjustdreamsequence(c)
Gds.Checkdeckpublic(c)
--Gds.Checkdeckpublic(c)
--dream
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
......
......@@ -3,7 +3,7 @@ require "expansions/script/nef/Gds"
function c86379029.initial_effect(c)
--
Gds.Adjustdreamsequence(c)
Gds.Checkdeckpublic(c)
--Gds.Checkdeckpublic(c)
--dream1
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379029,0))
......
......@@ -22,7 +22,7 @@ function c86379037.tg(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetTarget(c86379037.etg)
e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e1:SetReset(RESET_CHAIN)
e1:SetValue(1)
e1:SetValue(c86379037.efilter)
Duel.RegisterEffect(e1,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_COUNTER,nil,1,tp,LOCATION_DECK)
end
......@@ -128,6 +128,9 @@ end
function c86379037.etg(e,c)
return c:GetCounter(0x123a)>0
end
function c86379037.efilter(e,te)
return e~=te
end
--
function c86379037.filter1(c,tp)
return c:IsCode(86379035) and c:GetActivateEffect():IsActivatable(tp)
......
--空观剑『六根清净斩』
function c86379050.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetTarget(c86379050.target)
e1:SetOperation(c86379050.activate)
c:RegisterEffect(e1)
end
--
function c86379050.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c86379050.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MESSAGE,tp,aux.Stringid(86379050,0))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(86379050,0))
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
--秘夜『永远与须臾的狭间』
function c86379052.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c86379052.target)
e1:SetOperation(c86379052.activate)
c:RegisterEffect(e1)
end
function c86379052.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c86379052.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFlagEffect(tp,86379052)~=0 then return end
Duel.RegisterFlagEffect(tp,86379052,RESET_PHASE+PHASE_END,0,20)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetOperation(c86379052.checkop)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_END,20)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e2:SetOperation(c86379052.geop)
e2:SetReset(RESET_PHASE+PHASE_END,20)
Duel.RegisterEffect(e2,tp)
c:RegisterFlagEffect(86379053,RESET_PHASE+PHASE_END,0,20)
c86379052[c]=e1
Duel.ResetTimeLimit(tp,10000)
end
function c86379052.checkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetFlagEffect(tp,86379052)
c:SetHint(CHINT_TURN,ct)
Duel.RegisterFlagEffect(tp,86379052,RESET_PHASE+PHASE_END,0,21-ct)
if ct==20 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e2:SetOperation(c86379052.geop2)
Duel.RegisterEffect(e2,tp)
c:ResetFlagEffect(86379053)
end
end
function c86379052.geop(e,tp)
Duel.ResetTimeLimit(tp,10000)
end
function c86379052.geop2(e,tp)
Duel.ResetTimeLimit(tp,1)
end
\ No newline at end of file
......@@ -27,16 +27,12 @@ function c86379160.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(86379160,2))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,86379160+EFFECT_COUNT_CODE_DUEL)
e3:SetCondition(c86379160.skcon)
e3:SetCost(c86379160.skcost)
e3:SetTarget(c86379160.sktg)
e3:SetOperation(c86379160.skop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetRange(LOCATION_MZONE)
c:RegisterEffect(e4)
end
--
function c86379160.matfilter(c)
......@@ -97,39 +93,22 @@ function c86379160.drop(e,tp,eg,ep,ev,re,r,rp)
end
end
--
function c86379160.skcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
function c86379160.skfilter(c)
return c:IsSetCard(0x186) and c:IsRace(RACE_MACHINE)
end
function c86379160.skcost(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
function c86379160.skcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c86379160.skfilter,tp,LOCATION_GRAVE,0,nil)
local gc=g:GetClassCount(Card.GetCode)
return gc>=7
end
function c86379160.sktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c86379160.skop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_EP)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_SKIP_SP)
Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_SKIP_BP)
Duel.RegisterEffect(e3,tp)
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_SKIP_TURN)
e4:SetTargetRange(0,1)
e4:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
Duel.RegisterEffect(e4,tp)
local e5=e4:Clone()
e5:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,3)
Duel.RegisterEffect(e5,1-tp)
local gc=Duel.GetMatchingGroupCount(c86379160.skfilter,tp,LOCATION_GRAVE,0,nil)
if gc>0 then
for i=1,gc do
Duel.MoveTurnCount()
end
end
end
......@@ -38,16 +38,18 @@ function c86379333.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c86379333.hcfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end]]
function c86379333.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,600) and Duel.GetCustomActivityCount(86379333,tp,ACTIVITY_SPSUMMON)==0 end
if chk==0 then return Duel.CheckLPCost(tp,600) end
Duel.PayLPCost(tp,600)
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c86379333.splimit)
Duel.RegisterEffect(e1,tp)
end
end
function c86379333.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......@@ -59,16 +61,6 @@ function c86379333.operation(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)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e1:SetValue(c86379333.valtoken)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e2,true)
end
end
function c86379333.splimit(e,c,sump,sumtype,sumpos,targetp,se)
......
......@@ -5,21 +5,29 @@ function c86379378.initial_effect(c)
c:EnableCounterPermit(0x245)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c86379378.tg)
e1:SetOperation(c86379378.op)
c:RegisterEffect(e1)
--change damage
--Activate
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CHANGE_DAMAGE)
e2:SetDescription(aux.Stringid(86379378,0))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(1,0)
e2:SetValue(c86379378.damval)
e2:SetCountLimit(1)
e2:SetTarget(c86379378.tg)
e2:SetOperation(c86379378.op)
c:RegisterEffect(e2)
--change damage
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CHANGE_DAMAGE)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(1,0)
e3:SetValue(c86379378.damval)
c:RegisterEffect(e3)
--cannot target
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
......@@ -41,12 +49,12 @@ function c86379378.initial_effect(c)
end
--
function c86379378.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x245,1,REASON_EFFECT) end
end
function c86379378.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.IsCanRemoveCounter(tp,1,0,0x245,1,REASON_EFFECT) and Duel.SelectYesNo(tp,aux.Stringid(86379378,0)) then
if Duel.IsCanRemoveCounter(tp,1,0,0x245,1,REASON_EFFECT) then
local counternum=0
local sg=Duel.GetMatchingGroup(c86379378.tfilter,tp,LOCATION_ONFIELD,0,nil)
local tc=sg:GetFirst()
......
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