Commit 155e3aa2 authored by Tachibana's avatar Tachibana

eme

parent b4c70c05
Pipeline #9288 passed with stage
in 29 minutes and 25 seconds
#created by ...
#main
4210107
4210110
4210111
4210112
4210113
4210114
4210115
4210151
4210152
4210153
4210154
4210155
4210156
4210159
4210160
4210161
4210162
4210163
4210164
4210165
4210169
9300014
9310000
9310010
9310019
9310027
9310029
9310040
9310050
9330019
9330021
9330503
9330507
9330511
10050005
10050101
10050111
16114248
16120013
#extra
4210101
4210102
4210103
4210104
4210105
4210106
4210157
4210158
4210167
4210168
4212334
!side
10050011
10050061
10050071
15000187
16114217
16114246
16114247
16114249
#created by ...
#main
26800001
26800006
26801019
26801020
26807021
28300014
30005065
30700051
31300001
31300003
31300004
31300006
31300009
31300011
31300015
31300017
33330170
33330172
60002009
60002010
60002011
60002012
60002013
60002014
60002015
60002016
60002017
60002018
60002019
60002020
60002021
60002022
60002023
60002024
66915036
81000006
81015058
81016051
81016052
81022026
81049014
81060073
#extra
23000101
23000102
23000103
23000104
26826012
31300000
31300007
31300014
33200528
33330169
64837008
!side
81001007
81022025
81056004
81060018
99850027
99850028
99850029
99850030
99850031
#created by ...
#main
9910216
9910217
9910234
9910237
9910268
9910334
9910345
9910362
9910391
9910520
9910521
12301002
12899005
12899008
12899013
16107121
16107122
16107123
16107124
16110029
16110030
16110031
16110032
16110035
16110036
16110050
16110051
16114250
16400096
16499990
17032110
17032120
17032130
17032140
17032150
17032160
26812018
26818042
26818043
26819029
26819030
26821001
26821019
26821026
28315007
28316020
#extra
16400101
1184052
9910204
9910207
9910208
9910211
9910226
9910518
12899012
16110033
16110034
23003017
!side
26809999
26821028
28315005
28316018
28316019
#created by ...
#main
30005055
30005080
30553300
30553301
30553302
30553303
30553305
30553306
33200429
33200431
33200435
33200436
33200437
33200439
33200442
33200445
33503300
33503301
35100151
35100153
35100154
35100199
35700101
35700103
35700105
35700107
35700111
35700113
35700117
36910000
36910001
36910002
36910003
36910004
36910005
36910006
36910008
52520020
#extra
30005070
30005075
30553304
30553307
35100149
35100156
33200259
35700121
!side
#created by ...
#main
33701354
33701380
33701381
33720045
33720046
33720047
33720048
33720050
33720051
33720052
33720053
33720054
33720055
33720058
33720059
33720060
33720061
33730001
33730003
33730004
33730005
33730006
33730007
33730020
33730021
33730022
33730023
33730024
33730025
33730026
33730027
33730028
33730029
33730040
33730041
33730043
33730044
33730045
33730060
33730061
33730062
33730064
33730066
33730069
33730073
33730075
33730077
33730079
#extra
33720049
33720056
33720057
33730002
33730008
33730030
33730031
33730071
!side
#created by ...
#main
53703001
53703002
53703003
53703004
53703005
53703006
53703007
53703008
53703013
53705006
53705008
53707001
53707002
53707003
53707004
53707005
53707007
53707008
53707009
53707012
53707013
53707014
53707015
53707020
53711016
53711017
53713001
53713003
53713005
53713007
53713010
53713011
53713013
53716002
53716003
53716006
53716007
53716008
53716009
53716012
53716014
53716015
53716016
#extra
53703009
53703010
53703011
53703012
53705003
53705005
53705007
53705022
53707006
53707010
53707011
!side
53713002
53713004
53713006
53713008
53713009
53713012
53715009
53715010
53716001
53716004
53716005
53716010
53716011
53716013
#created by ...
#main
53718001
53718002
53718003
53718004
53718005
53718006
53718007
53718011
53718012
53718013
53718014
53718015
53718016
53718018
53718019
53718022
53719006
53721002
53721003
53721004
53721005
53721006
53721007
53721008
53721009
53721011
53721012
53721013
53722001
53722002
53722003
53722004
53722005
53722006
53722007
53722009
53724001
53724002
53724003
53724005
53725001
53725002
53725003
53725004
53725005
53725006
53725008
53725009
#extra
53718008
53718009
53718010
53718020
53718021
53721001
53721010
53722008
53724004
53726006
53726007
53726008
!side
53726001
53726002
53726003
53726004
53726005
53726009
53726010
53726011
53726012
53726013
53726014
53726015
53726016
53726017
#created by ...
#main
53728002
53728003
53728006
53728008
53728009
53728010
53728012
53728015
53728016
53728019
53728020
53799002
53799018
53799019
53799020
53799021
53799023
53799045
53799085
53799099
53799112
53799135
53799136
53799137
53799138
53799139
53799140
53799141
53799143
53799144
53799145
53799146
53799147
53799148
53799149
53799150
53799151
53799152
53799153
53799154
53799155
53799156
53799157
53799158
53799159
53799160
53799161
53799162
53799163
53799166
53799167
53799169
53799172
53799174
53799179
53799182
53799187
53799189
53799190
53799195
#extra
53728001
53728004
53728005
53728007
53728011
53728013
53728014
53728017
53728018
53799017
53799124
53799128
53799130
!side
53799142
53799165
53799168
53799170
53799173
53799181
53799188
53799192
53799193
#created by ...
#main
64831503
66915081
66915082
66915083
66915084
81022004
81026073
81028019
81028021
81040060
81044017
81044031
81045015
81048034
81048035
81053004
81060004
81060014
81060071
81060072
81060074
81081995
81901005
81901006
81901007
81901010
81901012
81901013
81901015
81901016
81901019
81901020
81901021
81901023
81901024
81901027
81901028
#extra
64800096
64800113
66915075
81011130
81023027
81028020
81028022
81028023
81046024
81060007
81060012
81060013
81062022
!side
81901014
81901017
81901018
81901022
81901033
81901036
81902063
No preview for this file type
......@@ -87,7 +87,7 @@
09300004 0 --对折相叠
09300010 1 --降阶魔法-牝堕之力
09300011 0 --增殖的鸦
09310010 1 --水晶单调士 枫
09310010 0 --水晶单调士 枫
09310011 0 --深土之物 人身单调鸥
09310023 1 --单调万圣 白石唯
09310024 1 --相对性单调逻辑
......@@ -1626,6 +1626,8 @@
81007007 0 --白雪安娜·塔牌
81008001 1 --花烂漫·露卡希娅
81008002 1 --暑假·露卡希娅
81009000 1 --黛冬优子
81009006 1 --暴露无遗·黛冬优子
81011102 1 --橘花音·午后之音
81011104 2 --橘花音·约会之音
81011116 1 --双色之音
......
expansions/pics/81902063.jpg

88.8 KB | W: | H:

expansions/pics/81902063.jpg

91.7 KB | W: | H:

expansions/pics/81902063.jpg
expansions/pics/81902063.jpg
expansions/pics/81902063.jpg
expansions/pics/81902063.jpg
  • 2-up
  • Swipe
  • Onion skin
--
local m=26807009
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--actlimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_FZONE)
e1:SetOperation(cm.chainop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
end
function cm.chfilter(c)
return c:IsType(TYPE_CONTINUOUS)
end
function cm.chainop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and loc==LOCATION_SZONE and cm.chfilter(rc) then
Duel.SetChainLimit(cm.chainlm)
end
end
function cm.chainlm(e,rp,tp)
return tp==rp
end
function cm.tdfilter(c)
return c:IsType(TYPE_CONTINUOUS) and c:IsAbleToDeck()
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.tdfilter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_GRAVE,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_GRAVE,0,3,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()<=0 then return end
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
--苍之回响
local m=26807011
local cm=_G["c"..m]
Duel.LoadScript("c26800000.lua")
function cm.initial_effect(c)
aux.AddRitualProcGreater2(c,cm.ritual_filter)
end
function cm.ritual_filter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end
\ No newline at end of file
--Defiance
local m=26807029
local cm=_G["c"..m]
Duel.LoadScript("c26800000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetValue(cm.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.actlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
--假装是圣诞老人
function c26807040.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,26807040)
e1:SetCost(c26807040.cost)
e1:SetTarget(c26807040.target)
e1:SetOperation(c26807040.operation)
c:RegisterEffect(e1)
end
function c26807040.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c26807040.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c26807040.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
if e:GetOwner():IsRelateToChain(ev) then
e:GetOwner():CancelToGrave(false)
end
end
function c26807040.filter(c)
return c:IsFaceup()
end
function c26807040.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c26807040.filter(chkc) end
if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c26807040.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c26807040.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c26807040.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(26807040,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetCountLimit(1)
e2:SetTarget(c26807040.indtg)
e2:SetOperation(c26807040.indop)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c26807040.eftg)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCountLimit(1,26809933)
e4:SetCondition(c26807040.spcon)
e4:SetCost(c26807040.spcost)
e4:SetTarget(c26807040.sptg)
e4:SetOperation(c26807040.spop)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e4)
else
c:CancelToGrave(false)
end
end
function c26807040.eftg(e,c)
return e:GetHandler():GetEquipTarget()==c
end
function c26807040.nmfilter(c,cd)
return c:IsFaceup() and not c:IsCode(cd)
end
function c26807040.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local cd=e:GetHandler():GetCode()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c26807040.nmfilter(chkc,cd) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c26807040.nmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,cd)
end
function c26807040.indop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(tc:GetCode())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
function c26807040.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget()
end
function c26807040.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
e:SetLabelObject(e:GetHandler():GetEquipTarget())
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c26807040.filter0(c)
return c:IsFaceup() and c:IsCanBeFusionMaterial()
end
function c26807040.filter1(c,e)
return c:IsFaceup() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function c26807040.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_PLANT) and c:IsAttribute(ATTRIBUTE_EARTH) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c26807040.filter3(c,e)
return not c:IsImmuneToEffect(e)
end
function c26807040.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local mg2=Duel.GetMatchingGroup(c26807040.filter0,tp,0,LOCATION_MZONE,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c26807040.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c26807040.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c26807040.spop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c26807040.filter3,nil,e)
local mg2=Duel.GetMatchingGroup(c26807040.filter1,tp,0,LOCATION_MZONE,nil,e)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(c26807040.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c26807040.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--橘里橘气
local m=28303007
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.filter(c)
return c:IsFaceup() and c:IsSetCard(0x19)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
if ep==tp or not Duel.IsChainNegatable(ev) then return false end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if g:GetCount()==0 or not re:IsActiveType(TYPE_MONSTER) then return false end
local tc=g:GetFirst()
local attr=0
while tc do
attr=attr|tc:GetAttribute()
tc=g:GetNext()
end
local rattr=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_ATTRIBUTE)
return rattr&attr~=0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
---静谧之音-
local m=81002086
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--Negate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--to deck and draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+900)
e2:SetCost(cm.tdcost)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsCode(81002000)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and Duel.IsChainDisablable(ev)
and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if not tc:IsDisabled() and Duel.NegateEffect(ev) and tc:IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function cm.costfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsDiscardable()
end
function cm.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,cm.costfilter,1,1,REASON_COST+REASON_DISCARD,nil)
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,1,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
......@@ -25,7 +25,7 @@ function cm.filter(c)
return c:IsRace(RACE_SPELLCASTER)
end
function cm.cfilter(c)
return c:IsFaceup() c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_PENDULUM) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToGraveAsCost()
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_PENDULUM) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToGraveAsCost()
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
......
--magical new world
local m=81042015
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
cm.Senya_desc_with_nanahira=true
function cm.initial_effect(c)
--activate
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
Senya.NanahiraTrap(c,e1)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsCode(37564765) and c:IsType(TYPE_MONSTER)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,eg,1,0,0)
end
end
function cm.sgfilter(c)
return c:IsLocation(LOCATION_HAND)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ec=re:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
ec:CancelToGrave()
Duel.SendtoHand(ec,nil,REASON_EFFECT)
end
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(cm.sgfilter,nil,1-tp)
if ct==0 then
local tg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if #tg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=tg:Select(tp,1,1,nil)
Duel.BreakEffect()
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
end
--空之标本
function c81044003.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,81044003+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c81044003.cost)
e1:SetTarget(c81044003.target)
e1:SetOperation(c81044003.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(81044003,ACTIVITY_SPSUMMON,c81044003.counterfilter)
end
function c81044003.counterfilter(c)
return c:IsSummonType(SUMMON_TYPE_RITUAL)
end
function c81044003.costfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsAbleToGraveAsCost()
end
function c81044003.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81044003.costfilter,tp,LOCATION_EXTRA+LOCATION_MZONE,0,1,nil) and Duel.GetCustomActivityCount(81044003,tp,ACTIVITY_SPSUMMON)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c81044003.costfilter,tp,LOCATION_EXTRA+LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
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(c81044003.splimit)
Duel.RegisterEffect(e1,tp)
end
function c81044003.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return bit.band(sumtype,SUMMON_TYPE_RITUAL)~=SUMMON_TYPE_RITUAL
end
function c81044003.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c81044003.activate(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
--边界地带的冒险少女
local m=81044004
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(cm.efilter)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(cm.indval)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DEFENSE_ATTACK)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(cm.atktg)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function cm.spfilter(c)
return c:GetBaseAttack()==0 and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.efilter(e,te)
return te:IsActiveType(TYPE_MONSTER) and te:GetOwner():GetBaseAttack()~=0
end
function cm.indval(e,c)
return c:GetBaseAttack()~=0 and c:IsType(TYPE_MONSTER)
end
function cm.atktg(e,c)
return c:GetBaseAttack()==0 and c:IsType(TYPE_MONSTER)
end
--摇曳冬日
local m=81044013
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--Activate
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)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_FZONE)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(nil,1,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.filter(c,tp)
return c:GetSummonPlayer()==tp
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if eg:IsExists(cm.filter,1,nil,tp) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,1-tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) and Duel.SelectYesNo(1-tp,aux.Stringid(m,1)) then
local g=Duel.SelectMatchingCard(1-tp,Card.IsAbleToHand,1-tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
if eg:IsExists(cm.filter,1,nil,1-tp) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
end
--
local m=81046013
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--special summon
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_HAND)
e0:SetProperty(EFFECT_FLAG_CARD_TARGET)
e0:SetCountLimit(1,m)
e0:SetTarget(cm.sptg)
e0:SetOperation(cm.spop)
c:RegisterEffect(e0)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m+900)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-800)
tc:RegisterEffect(e1)
end
end
end
function cm.desfilter(c,e,tp)
return c:IsControler(1-tp) and c:IsCanBeEffectTarget(e) and c:IsDestructable()
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return eg:IsExists(cm.desfilter,1,nil,e,tp) and e:GetHandler():IsAbleToHand() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=eg:FilterSelect(tp,cm.desfilter,1,1,nil,e,tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
--一月·一月·一月
local m=81059001
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
c:EnableReviveLimit()
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.tgcon)
e1:SetTarget(cm.tgtg)
e1:SetOperation(cm.tgop)
c:RegisterEffect(e1)
--to deck
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.tdtg)
e3:SetOperation(cm.tdop)
c:RegisterEffect(e3)
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)>=15
and Duel.GetFieldGroupCount(tp,0,LOCATION_REMOVED)>=15
end
function cm.tgfilter(c,tp)
return c:IsAbleToRemove()
and not Duel.IsExistingMatchingCard(cm.bfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,c)
end
function cm.bfilter(c,tc)
return tc:IsCode(c:GetCode()) and c:IsFaceup()
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local tc=g:GetFirst()
if tc:IsLocation(LOCATION_REMOVED) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetCondition(cm.actcon)
e1:SetValue(cm.aclimit)
e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_CHAINING)
e2:SetLabel(tc:GetCode())
e2:SetOperation(cm.adlimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
end
function cm.actcon(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),m)~=0
end
function cm.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
function cm.adlimit(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
if ep~=tp or not re:GetHandler():IsCode(e:GetLabel()) then return end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and chkc:IsAbleToDeck() and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_REMOVED,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_REMOVED,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
......@@ -6,70 +6,91 @@ function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
c:EnableReviveLimit()
--recover conversion
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_REVERSE_RECOVER)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,1)
e1:SetValue(1)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.tgcon)
e1:SetTarget(cm.tgtg)
e1:SetOperation(cm.tgop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.descon)
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
--spsummon
--to deck
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,m+900)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.tdtg)
e3:SetOperation(cm.tdop)
c:RegisterEffect(e3)
end
function cm.cfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetPreviousControler()==1-tp and c:IsPreviousLocation(LOCATION_ONFIELD)
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)>=15
and Duel.GetFieldGroupCount(tp,0,LOCATION_REMOVED)>=15
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
function cm.tgfilter(c,tp)
return c:IsAbleToRemove()
and not Duel.IsExistingMatchingCard(cm.bfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,c)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
function cm.bfilter(c,tc)
return tc:IsCode(c:GetCode()) and c:IsFaceup()
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local tc=g:GetFirst()
if tc:IsLocation(LOCATION_REMOVED) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetCondition(cm.actcon)
e1:SetValue(cm.aclimit)
e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_CHAINING)
e2:SetLabel(tc:GetCode())
e2:SetOperation(cm.adlimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
function cm.actcon(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),m)~=0
end
function cm.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,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
function cm.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
function cm.adlimit(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
if ep~=tp or not re:GetHandler():IsCode(e:GetLabel()) then return end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and chkc:IsAbleToDeck() and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_REMOVED,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_REMOVED,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
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