Commit 65f1d0d3 authored by Nemo Ma's avatar Nemo Ma

upd lst

parent a6c9364a
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
9981625 0 9981625 0
9990228 0 9990228 0
9990233 0 9990233 0
#10080420 0 10080420 0
10736541 0 10736541 0
11163044 0 11163044 0
11450000 0 11450000 0
...@@ -567,8 +567,26 @@ ...@@ -567,8 +567,26 @@
79029185 0 79029185 0
79200001 0 79200001 0
79200002 0 79200002 0
79200003 0 79200005 0
79200004 0 79200006 0
79200007 0
79200008 0
79200009 0
79200010 0
79200011 0
79200012 0
79200014 0
79200015 0
79200016 0
79200017 0
79200018 0
79200019 0
79200020 0
79200021 0
79200022 0
79200023 0
79200024 0
79200025 0
79783881 0 79783881 0
80002333 0 80002333 0
80250315 0 80250315 0
...@@ -843,6 +861,7 @@ ...@@ -843,6 +861,7 @@
89390005 0 89390005 0
89390006 0 89390006 0
89390007 0 89390007 0
89390008 0
90351999 0 90351999 0
90700001 0 90700001 0
90700002 0 90700002 0
...@@ -1003,9 +1022,16 @@ ...@@ -1003,9 +1022,16 @@
98730417 0 98730417 0
98730419 0 98730419 0
98731001 0 98731001 0
98920042 0
98920114 0
98920183 0 98920183 0
98920188 0
98920245 0
98920313 0
98920339 0 98920339 0
98920377 0 98920377 0
98920404 0
98920415 0
98920488 0 98920488 0
98920489 0 98920489 0
98920490 0 98920490 0
...@@ -1015,6 +1041,8 @@ ...@@ -1015,6 +1041,8 @@
98940007 0 98940007 0
98940009 0 98940009 0
98940010 0 98940010 0
98940011 0
98940012 0
99550610 0 99550610 0
99700125 0 99700125 0
99700135 0 99700135 0
...@@ -1175,10 +1203,10 @@ ...@@ -1175,10 +1203,10 @@
130006021 0 130006021 0
130006022 0 130006022 0
130006023 0 130006023 0
130006024 0 130006024 0
151194046 0 151194046 0
192746535 0 192746535 0
460524290 0
#Semi-Wild 1003 #Semi-Wild 1003
31409200 0 31409200 0
31409201 0 31409201 0
...@@ -1369,6 +1397,60 @@ ...@@ -1369,6 +1397,60 @@
14001218 0 14001218 0
14001219 0 14001219 0
14001220 0 14001220 0
#230409
3066 0
19198113 0
20619950 0
22348005 0
22348027 0
22348122 0
31400065 0
31400069 0
31400070 0
33711008 0
40009221 0
43990010 0
63790405 0
82228528 0
98920482 0
9910179 1
11451804 1
22348141 1
22348143 1
22348144 1
22348145 1
22348170 1
31000009 1
31000017 1
31400063 1
53799184 1
60002100 1
72411740 1
82204201 1
9910186 2
9990219 2
9990226 2
22348004 2
31000011 2
31000013 2
98920032 0
98920003 0
98920046 0
98920289 0
98920342 1
98920352 1
98920405 1
98920254 1
98920325 1
98850000 1
98920433 1
98920011 2
98920386 2
98920212 2
98950004 2
98920006 2
98920091 2
98920185 2
#230402 #230402
98921018 0 98921018 0
10150028 0 10150028 0
...@@ -1561,7 +1643,6 @@ ...@@ -1561,7 +1643,6 @@
14010120 2 14010120 2
25800018 2 25800018 2
#230108 #230108
53796027 0
60000101 0 60000101 0
60000103 0 60000103 0
60000104 0 60000104 0
...@@ -2155,7 +2236,6 @@ ...@@ -2155,7 +2236,6 @@
82224039 0 82224039 0
89388000 0 89388000 0
188853 1 188853 1
31400070 1
31400079 1 31400079 1
40009278 1 40009278 1
53796032 1 53796032 1
...@@ -2338,7 +2418,6 @@ ...@@ -2338,7 +2418,6 @@
89389005 0 89389005 0
#220313 #220313
22060110 0 22060110 0
63790405 1
79029171 1 79029171 1
#220227 #220227
10105505 0 10105505 0
...@@ -2905,7 +2984,6 @@ ...@@ -2905,7 +2984,6 @@
40008312 0 40008312 0
65010023 0 65010023 0
82224035 0 82224035 0
40009221 1
40009599 1 40009599 1
40009671 1 40009671 1
#211010 #211010
...@@ -3142,7 +3220,6 @@ ...@@ -3142,7 +3220,6 @@
14090001 1 14090001 1
14090002 0 14090002 0
14090003 1 14090003 1
14090005 2
14090007 1 14090007 1
14090008 0 14090008 0
14090009 0 14090009 0
...@@ -3347,7 +3424,6 @@ ...@@ -3347,7 +3424,6 @@
30020000 0 30020000 0
79029329 0 79029329 0
79029368 0 79029368 0
33711008 1
#210113 #210113
98704001 0 98704001 0
98704002 0 98704002 0
...@@ -3865,7 +3941,6 @@ ...@@ -3865,7 +3941,6 @@
14001051 0 14001051 0
79029514 0 79029514 0
82221016 0 82221016 0
77770002 0
77770015 0 77770015 0
77777001 0 77777001 0
978210006 0 978210006 0
...@@ -6696,7 +6771,6 @@ ...@@ -6696,7 +6771,6 @@
14090001 1 14090001 1
14090002 0 14090002 0
14090003 1 14090003 1
14090005 2
14090007 1 14090007 1
14090008 0 14090008 0
14090009 0 14090009 0
...@@ -7072,7 +7146,6 @@ ...@@ -7072,7 +7146,6 @@
31400065 1 31400065 1
31400067 0 31400067 0
31400068 0 31400068 0
31400070 1
31400076 0 31400076 0
31400077 0 31400077 0
31400079 1 31400079 1
...@@ -8083,7 +8156,6 @@ ...@@ -8083,7 +8156,6 @@
53752014 0 53752014 0
53752019 0 53752019 0
53796022 0 53796022 0
53796027 0
53796028 0 53796028 0
53796032 1 53796032 1
53796033 0 53796033 0
...@@ -8633,7 +8705,6 @@ ...@@ -8633,7 +8705,6 @@
77029101 0 77029101 0
77103950 1 77103950 1
77693530 0 77693530 0
77770002 0
77770004 0 77770004 0
77770010 0 77770010 0
77770015 0 77770015 0
......
No preview for this file type
No preview for this file type
--闪刀姬 洛菈米亚
function c11513049.initial_effect(c)
c:SetSPSummonOnce(11513049)
--link summon
aux.AddLinkProcedure(c,nil,2,99,c11513049.lcheck)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.linklimit)
c:RegisterEffect(e1)
--spsummon proc
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCountLimit(1,11513049+EFFECT_COUNT_CODE_OATH)
e0:SetCondition(c11513049.hspcon)
e0:SetOperation(c11513049.hspop)
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
--equip
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(function(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) end)
e1:SetTarget(c11513049.eqtg)
e1:SetOperation(c11513049.eqop)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11513049,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c11513049.rmcost1)
e2:SetTarget(c11513049.rmtg)
e2:SetOperation(c11513049.rmop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(11513049,2))
e3:SetCondition(c11513049.xrmcon)
e3:SetCost(c11513049.rmcost2)
c:RegisterEffect(e3)
end
function c11513049.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x1115)
end
function c11513049.rlfil(c)
return c:IsAttackAbove(1500) and c:IsReleasable() and c:IsSetCard(0x1115)
end
function c11513049.rlgck(g,tp)
return Duel.GetMZoneCount(tp,g)>0
end
function c11513049.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c11513049.rlfil,tp,LOCATION_MZONE,0,nil)
return g:CheckSubGroup(c11513049.rlgck,2,2,tp)
end
function c11513049.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c11513049.rlfil,tp,LOCATION_MZONE,0,nil)
local sg=g:SelectSubGroup(tp,c11513049.rlgck,false,2,2,tp)
Duel.Release(sg,REASON_COST)
end
function c11513049.eqfil(c)
return c:IsType(TYPE_LINK) and c:IsSetCard(0x1115) and not c:IsForbidden()
end
function c11513049.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11513049.eqfil,tp,LOCATION_GRAVE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE)
end
function c11513049.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c11513049.eqfil,tp,LOCATION_GRAVE,0,nil)
if c:IsRelateToEffect(e) and g:GetCount()>0 then
local tc=g:Select(tp,1,1,nil):GetFirst()
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(function(e,c)
return e:GetOwner()==c end)
tc:RegisterEffect(e1)
local lk=tc:GetLink()
if lk>0 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(lk*1500)
tc:RegisterEffect(e2)
tc:RegisterFlagEffect(13430900,RESET_EVENT+RESETS_STANDARD,0,1,lk)
end
end
end
function c11513049.xrmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)>=3
end
function c11513049.rctfil1(c)
return c:IsAbleToGraveAsCost() and c:IsSetCard(0x1115)
end
function c11513049.rmcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11513049.rctfil1,tp,LOCATION_ONFIELD,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c11513049.rctfil1,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c11513049.rctfil2(c)
return c:IsAbleToRemoveAsCost() and c:IsSetCard(0x115) and c:IsType(TYPE_SPELL)
end
function c11513049.rmcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11513049.rctfil2,tp,LOCATION_GRAVE,0,1,nil) end
local tc=Duel.SelectMatchingCard(tp,c11513049.rctfil2,tp,LOCATION_GRAVE,0,1,1,nil):GetFirst()
Duel.Remove(tc,POS_FACEUP,REASON_COST)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_REMOVE)
e1:SetTargetRange(1,0)
e1:SetTarget(c11513049.rmlimit)
e1:SetLabelObject(e)
e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c11513049.rmlimit(e,c,tp,r,re)
return c:IsCode(e:GetLabel()) and re and re==e and r==REASON_COST
end
function c11513049.eqckfil(c)
return c:GetFlagEffectLabel(13430900)~=nil
end
function c11513049.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local fck=0
local eqg=c:GetEquipGroup():Filter(c11513049.eqckfil,nil)
local ec=eqg:GetFirst()
while ec do
fck=fck+ec:GetFlagEffectLabel(13430900)
ec=eqg:GetNext()
end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) and fck and c:GetFlagEffect(11513049)<fck end
c:RegisterFlagEffect(11513049,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD)
end
function c11513049.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
local dg=g:Select(tp,1,1,nil)
Duel.Remove(dg,POS_FACEUP,REASON_EFFECT)
end
end
--闪刀姬 械音
function c11513050.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x1115),4,2,c11513050.ovfilter,aux.Stringid(11513050,0))
c:EnableReviveLimit()
--to grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,11513050)
e1:SetCost(c11513050.tgcost)
e1:SetTarget(c11513050.tgtg)
e1:SetOperation(c11513050.tgop)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(11513050,ACTIVITY_SPSUMMON,c11513050.counterfilter)
end
function c11513050.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsSetCard(0x1115)
end
function c11513050.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x1115) and c:GetSequence()>4
end
function c11513050.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(11513050,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c11513050.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c11513050.splimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x1115)
end
function c11513050.tgfil(c)
return c:IsAbleToGrave() and c:IsSetCard(0x115)
end
function c11513050.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11513050.tgfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c11513050.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c11513050.tgfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.SendtoGrave(tc,REASON_EFFECT)
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:SetValue(c11513050.aclimit)
e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if tc:IsType(TYPE_SPELL+TYPE_TRAP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1)
e1:SetCondition(c11513050.setcon)
e1:SetOperation(c11513050.setop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
end
function c11513050.aclimit(e,re,tp)
local tc=e:GetLabelObject()
return re:GetHandler():IsCode(e:GetLabel())
end
function c11513050.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSSetable()
end
function c11513050.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_CARD,0,11513050)
if Duel.SSet(tp,c)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
end
end
--闪刀术士 音速突破
function c11513051.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c11513051.condition)
e1:SetTarget(c11513051.target)
e1:SetOperation(c11513051.operation)
c:RegisterEffect(e1)
end
function c11513051.cfilter(c)
return c:GetSequence()<5
end
function c11513051.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c11513051.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c11513051.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c11513051.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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:SetRange(LOCATION_MZONE)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,3,nil,TYPE_SPELL) and g:GetCount()>0 then
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(-1500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
end
end
--闪刀术式-银河跳跃
function c11513052.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c11513052.condition)
e1:SetTarget(c11513052.target)
e1:SetOperation(c11513052.operation)
c:RegisterEffect(e1)
end
function c11513052.cfilter(c)
return c:GetSequence()<5
end
function c11513052.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c11513052.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c11513052.rmgck(g,tp)
local b1=g:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,2,nil)
local b2=g:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,2,nil)
local b3=g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,2,nil)
local b4=g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,2,nil)
local b5=g:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,2,nil)
return b1 or b2 or b3 or b4 or b5
end
function c11513052.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_EXTRA,nil)
if chk==0 then return g:CheckSubGroup(c11513052.rmgck,1,1,tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_EXTRA)
end
function c11513052.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_EXTRA,nil)
local b1=g:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,2,nil)
local b2=g:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,2,nil)
local b3=g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,2,nil)
local b4=g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,2,nil)
local b5=g:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,2,nil)
local sg=Group.CreateGroup()
if b1 then
sg:Merge(g:Filter(Card.IsLocation,nil,LOCATION_ONFIELD))
end
if b2 then
sg:AddCard(g:Filter(Card.IsLocation,nil,LOCATION_HAND):GetFirst())
end
if b3 then
sg:Merge(g:Filter(Card.IsLocation,nil,LOCATION_GRAVE))
end
if b4 then
sg:AddCard(g:Filter(Card.IsLocation,nil,LOCATION_DECK):GetFirst())
end
if b5 then
sg:AddCard(g:Filter(Card.IsLocation,nil,LOCATION_EXTRA):GetFirst())
end
if sg:GetCount()>0 then
local tc=sg:Select(tp,1,1,nil):GetFirst()
local loc=tc:GetLocation()
if bit.band(loc,LOCATION_MZONE+LOCATION_SZONE)~=0 then loc=LOCATION_ONFIELD end
if tc:IsLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA) then
local rdg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,loc,nil)
tc=rdg:RandomSelect(tp,1,REASON_EFFECT):GetFirst()
end
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,loc,0,2,nil) then
local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,loc,0,2,2,nil)
if Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,3,nil,TYPE_SPELL) and tc:IsAbleToHand() and Duel.SelectYesNo(tp,aux.Stringid(11513052,0)) then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
end
--闪刀姬 宙翼
function c11513053.initial_effect(c)
c:SetSPSummonOnce(11513053)
--link summon
aux.AddLinkProcedure(c,nil,2,99,c11513053.lcheck)
c:EnableReviveLimit()
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.linklimit)
c:RegisterEffect(e0)
--attribute
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EFFECT_ADD_ATTRIBUTE)
e0:SetRange(0xff)
e0:SetValue(ATTRIBUTE_DARK)
c:RegisterEffect(e0)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c11513053.atkval)
e1:SetCondition(c11513053.atkcon)
c:RegisterEffect(e1)
--cannot target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetValue(aux.tgoval)
e2:SetCondition(c11513053.idcon)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(aux.indoval)
e3:SetCondition(c11513053.idcon)
c:RegisterEffect(e3)
if not c11513053.global_check then
c11513053.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetLabelObject(e1)
ge1:SetOperation(c11513053.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(ge2,0)
local g=Group.CreateGroup()
g:KeepAlive()
ge1:GetLabelObject():SetLabelObject(g)
end
end
function c11513053.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
local te=e:GetLabelObject()
local xg=te:GetLabelObject()
if tc:IsSetCard(0x1115) and not xg:IsExists(Card.IsCode,1,nil,tc:GetCode()) then
xg:AddCard(tc)
end
tc=eg:GetNext()
end
end
function c11513053.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x1115)
end
function c11513053.atkval(e)
local g=e:GetLabelObject()
return g and g:GetClassCount(Card.GetCode)*600
end
function c11513053.atkcon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroup(function(c) return c:IsSetCard(0x1115) and c:IsType(TYPE_MONSTER) end,tp,LOCATION_GRAVE,0,nil):GetClassCount(Card.GetCode)>=3
end
function c11513053.idcon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)>=3
end
--闪术兵器 — 澪矢
function c11513054.initial_effect(c)
--attribute
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EFFECT_ADD_ATTRIBUTE)
e0:SetRange(0xff)
e0:SetValue(ATTRIBUTE_DARK)
c:RegisterEffect(e0)
--to deck
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOEXTRA)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,11513054)
e1:SetCondition(function(e)
return e:GetHandler():IsReason(REASON_MATERIAL) and e:GetHandler():IsReason(REASON_LINK) end)
e1:SetTarget(c11513054.tdtg)
e1:SetOperation(c11513054.tdop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAIN_NEGATED)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,21513054)
e2:SetCondition(c11513054.spcon)
e2:SetTarget(c11513054.sptg)
e2:SetOperation(c11513054.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_CHAIN_DISABLED)
c:RegisterEffect(e3)
end
function c11513054.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(function(c) return c:IsType(TYPE_SPELL) and c:IsDiscardable() end,tp,LOCATION_HAND,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,function(c) return c:IsType(TYPE_SPELL) and c:IsDiscardable() end,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_DISCARD+REASON_COST)
end
function c11513054.tdfil(c)
return c:IsAbleToDeck() and c:IsSetCard(0x1115) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c11513054.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c11513054.tdfil,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if chk==0 then return g:CheckSubGroup(aux.dabcheck,5,5) and Duel.IsPlayerCanDraw(tp) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,5,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c11513054.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c11513054.tdfil,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if g:CheckSubGroup(aux.dabcheck,5,5) then
local sg=g:SelectSubGroup(tp,aux.dabcheck,false,5,5)
local x=Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
if x==sg:GetCount() and Duel.IsPlayerCanDraw(tp,1) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
if sg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)==sg:FilterCount(Card.IsType,nil,TYPE_LINK) and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(11513054,0)) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
end
function c11513054.spcon(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
return tc:IsControler(tp) and tc:IsSetCard(0x1115)
end
function c11513054.sctfil(c)
return c:IsAbleToRemoveAsCost() and c:IsType(TYPE_SPELL)
end
function c11513054.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11513054.sctfil,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c11513054.sctfil,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c11513054.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11513054.espfil(c,e,tp)
return c:IsLinkSummonable(nil,e:GetHandler()) and c:IsSetCard(0x1115)
end
function c11513054.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(c11513054.espfil,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(11513054,1)) then
Duel.BreakEffect()
local sc=Duel.SelectMatchingCard(tp,c11513054.espfil,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
Duel.LinkSummon(tp,sc,nil,c)
end
end
--闪刀启动 着装
function c11513056.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_ACTION+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c11513056.condition)
e1:SetTarget(c11513056.target)
e1:SetOperation(c11513056.activate)
c:RegisterEffect(e1)
end
function c11513056.cfilter(c)
return c:GetSequence()<5
end
function c11513056.thfilter(c,e,tp,spchk)
return c:IsSetCard(0x1115) and (c:IsAbleToHand() or (spchk and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function c11513056.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c11513056.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c11513056.target(e,tp,eg,ep,ev,re,r,rp,chk)
local spchk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)>=3
if chk==0 then return Duel.IsExistingMatchingCard(c11513056.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp,spchk) end
end
function c11513056.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local spchk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)>=3
local tc=Duel.SelectMatchingCard(tp,c11513056.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,spchk):GetFirst()
if tc then
if Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)>=3
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.SelectOption(tp,1190,1152)==1 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c11513056.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c11513056.splimit(e,c)
return not c:IsSetCard(0x1115) and c:IsLocation(LOCATION_EXTRA)
end
--闪刀术式-轮舞
function c11513057.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_ACTION+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c11513057.condition)
e1:SetTarget(c11513057.target)
e1:SetOperation(c11513057.activate)
c:RegisterEffect(e1)
end
function c11513057.cfilter(c)
return c:GetSequence()<5
end
function c11513057.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c11513057.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c11513057.xxfil(c)
return c:IsFaceup() and c:IsSetCard(0x1115)
end
function c11513057.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local spchk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)>=3
if chk==0 then return Duel.IsExistingTarget(c11513057.xxfil,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.SelectTarget(tp,c11513057.xxfil,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end
function c11513057.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local x=1
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)>=3 then x=x+1 end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
local dg=g:Select(tp,1,x,nil)
if Duel.Destroy(dg,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
--闪刀姬 堕翼
function c11513058.initial_effect(c)
c:SetSPSummonOnce(11513058)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,2,c11513058.lcheck)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.linklimit)
c:RegisterEffect(e1)
--to hand and tg
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,11513058)
e2:SetCost(c11513058.thtcost)
e2:SetTarget(c11513058.thttg)
e2:SetOperation(c11513058.thtop)
c:RegisterEffect(e2)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e2:SetCondition(c11513058.indcon)
e2:SetOperation(c11513058.indop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(11513058,ACTIVITY_SPSUMMON,c11513058.counterfilter)
end
function c11513058.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsSetCard(0x1115)
end
function c11513058.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x1115)
end
function c11513058.thtcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(11513058,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c11513058.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c11513058.splimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x1115)
end
function c11513058.tgfil(c,e,tp)
return c:IsAbleToGrave() and Duel.IsExistingMatchingCard(c11513058.thfil,tp,LOCATION_DECK,0,1,nil,c)
end
function c11513058.thfil(c,sc)
return c:IsAbleToHand() and c:IsSetCard(0x115) and not c:IsCode(sc:GetCode())
end
function c11513058.thttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11513058.tgfil,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11513058.thtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.SelectMatchingCard(tp,c11513058.tgfil,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler(),e,tp):GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 then
local g=Duel.GetMatchingGroup(c11513058.thfil,tp,LOCATION_DECK,0,nil,tc)
if g:GetCount()>0 then
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
function c11513058.indcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_LINK
end
function c11513058.indop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
--心意海仙女之影灵衣
function c11533700.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.ritlimit)
c:RegisterEffect(e1)
--rl rm td
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RELEASE+CATEGORY_REMOVE+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11533700)
e1:SetCost(c11533700.rrtcost)
e1:SetTarget(c11533700.rrttg)
e1:SetOperation(c11533700.rrtop)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
c:RegisterEffect(e2)
--rl and disable
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_RELEASE+CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,21533700)
e3:SetTarget(c11533700.rdistg)
e3:SetOperation(c11533700.rdisop)
c:RegisterEffect(e3)
end
function c11533700.mat_filter(c)
return not c:IsCode(11533700)
end
function c11533700.rrtcost(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 c11533700.rrfil(c)
if not c:IsSetCard(0xb4) then return false end
if c:IsLocation(LOCATION_HAND) then
return c:IsReleasable() or c:IsAbleToGrave()
elseif c:IsLocation(LOCATION_GRAVE) then
return c:IsAbleToRemove()
else return false end
end
function c11533700.rrttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11533700.rrfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
end
function c11533700.rrtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c11533700.rrfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil)
if g:GetCount()>0 then
local tc=g:Select(tp,1,1,nil):GetFirst()
local x=0
if tc:IsLocation(LOCATION_HAND) then
local b1=tc:IsReleasable()
local b2=tc:IsAbleToGrave()
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(11533700,2),aux.Stringid(11533700,3))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(11533700,2))
elseif b2 then
op=Duel.SelectOption(tp,aux.Stringid(11533700,3))+1
end
if op==0 then
x=Duel.Release(tc,REASON_EFFECT)
elseif op==1 then
x=Duel.SendtoGrave(tc,REASON_EFFECT)
end
elseif tc:IsLocation(LOCATION_GRAVE) then
x=Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
if x>0 and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(11533700,0)) then
Duel.BreakEffect()
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,5,nil)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
end
function c11533700.rlfil(c)
return c:IsSetCard(0xb4) and (c:IsReleasable() or c:IsAbleToGrave())
end
function c11533700.rdistg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11533700.rlfil,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_HAND)
end
function c11533700.rdisop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c11533700.rlfil,tp,LOCATION_HAND,0,nil)
if g:GetCount()>0 then
local rc=g:Select(tp,1,1,nil):GetFirst()
local x=0
local b1=rc:IsReleasable()
local b2=rc:IsAbleToGrave()
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(11533700,2),aux.Stringid(11533700,3))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(11533700,2))
elseif b2 then
op=Duel.SelectOption(tp,aux.Stringid(11533700,3))+1
end
if op==0 then
x=Duel.Release(rc,REASON_EFFECT)
elseif op==1 then
x=Duel.SendtoGrave(rc,REASON_EFFECT)
end
if x>0 and Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(11533700,1)) then
Duel.BreakEffect()
local tc=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil):GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc: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)
tc:RegisterEffect(e2)
end
end
end
--还零龙之影灵衣
function c11533701.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.ritlimit)
c:RegisterEffect(e1)
--rl rm td
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_RELEASE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11533701)
e1:SetCost(c11533701.rrtcost)
e1:SetTarget(c11533701.rrttg)
e1:SetOperation(c11533701.rrtop)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,21533701)
e2:SetCondition(c11533701.rmcon)
e2:SetTarget(c11533701.rmtg)
e2:SetOperation(c11533701.rmop)
c:RegisterEffect(e2)
--sp
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,31533701)
e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return c11533701.rmcon(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():GetReasonPlayer()==1-e:GetHandlerPlayer() end)
e3:SetTarget(c11533701.spdtg)
e3:SetOperation(c11533701.spdop)
c:RegisterEffect(e3)
end
function c11533701.mat_filter(c)
return not c:IsLevel(11)
end
function c11533701.rrtcost(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 c11533701.srfil(c)
return c:IsAbleToHand() and c:IsSetCard(0xb4)
end
function c11533701.rrfil(c)
if not c:IsSetCard(0xb4) then return false end
return c:IsAbleToRemove() or c:IsReleasable() or c:IsAbleToGrave()
end
function c11533701.rrttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11533701.srfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11533701.rrtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c11533701.srfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
if Duel.IsExistingMatchingCard(c11533701.rrfil,tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(11533701,4)) then
Duel.BreakEffect()
local tc=Duel.SelectMatchingCard(tp,c11533701.rrfil,tp,LOCATION_HAND,0,1,1,nil):GetFirst()
local b1=tc:IsReleasable()
local b2=tc:IsAbleToRemove()
local b3=tc:IsAbleToGrave()
local op=0
if b1 and b2 and b3 then
op=Duel.SelectOption(tp,aux.Stringid(11533701,1),aux.Stringid(11533701,2),aux.Stringid(11533701,3))
elseif b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(11533701,1),aux.Stringid(11533701,2))
elseif b2 and b3 then
op=Duel.SelectOption(tp,aux.Stringid(11533701,2),aux.Stringid(11533701,3))+1
elseif b1 and b3 then
op=Duel.SelectOption(tp,aux.Stringid(11533701,2),aux.Stringid(11533701,3))
if op==1 then op=op+1 end
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(11533701,1))
elseif b2 then
op=Duel.SelectOption(tp,aux.Stringid(11533701,2))+1
elseif b3 then
op=Duel.SelectOption(tp,aux.Stringid(11533701,3))+2
end
if op==0 then
Duel.Release(tc,REASON_EFFECT)
elseif op==1 then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
elseif op==2 then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
end
end
function c11533701.rmcon(e,tp,eg,ep,ev,re,r,rp)
local mg=e:GetHandler():GetMaterial()
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and mg and mg:FilterCount(Card.IsSetCard,nil,0xb4)==mg:GetCount()
end
function c11533701.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK+LOCATION_GRAVE,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_ONFIELD)
end
function c11533701.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g1=Duel.GetDecktopGroup(tp,1)
if g1:GetCount()>0 then
Duel.ConfirmCards(1-tp,g1)
if Duel.SelectYesNo(tp,aux.Stringid(11533701,0)) then
Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)
end
end
local g2=Duel.GetDecktopGroup(1-tp,1)
if g2:GetCount()>0 then
Duel.ConfirmCards(tp,g2)
if Duel.SelectYesNo(tp,aux.Stringid(11533701,0)) then
Duel.Remove(g2,POS_FACEUP,REASON_EFFECT)
end
end
local g3=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
if g3:GetCount()>0 then
Duel.ConfirmCards(tp,g3)
if Duel.SelectYesNo(tp,aux.Stringid(11533701,0)) then
local rg=g3:Select(tp,1,1,nil)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
end
local g4=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g4:GetCount()>0 then
Duel.HintSelection(g4)
if Duel.SelectYesNo(tp,aux.Stringid(11533701,0)) then
local rg=g4:RandomSelect(tp,1)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
end
local g5=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
if g5:GetCount()>0 then
Duel.ConfirmCards(tp,g5)
if Duel.SelectYesNo(tp,aux.Stringid(11533701,0)) then
local rg=g5:Select(tp,1,1,nil)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
end
local g6=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
if g6:GetCount()>0 then
Duel.HintSelection(g6)
if Duel.SelectYesNo(tp,aux.Stringid(11533701,0)) then
local rg=g6:Select(tp,1,1,nil)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
end
local g7=Duel.GetFieldGroup(tp,0,LOCATION_GRAVE)
if g7:GetCount()>0 then
if Duel.SelectYesNo(tp,aux.Stringid(11533701,0)) then
local rg=g7:Select(tp,1,1,nil)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
end
end
function c11533701.spfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) and c:IsCode(52068432)
end
function c11533701.spdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11533701.spfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c11533701.spdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c11533701.spfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
local dg=Duel.GetMatchingGroup(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,nil)
if dg:GetCount()>0 then
local tc=dg:GetFirst()
while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc: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)
tc:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_ATTACK_FINAL)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(tc:GetAttack()/2)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc=dg:GetNext()
end
end
end
end
--影灵衣的追忆
function c11533702.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11533702+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c11533702.target)
e1:SetOperation(c11533702.activate)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(function(e,c)
return c:IsSetCard(0xb4) end)
e2:SetValue(function(e,c)
return c:GetLevel()*100 end)
c:RegisterEffect(e2)
--inactivatable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_INACTIVATE)
e2:SetRange(LOCATION_FZONE)
e2:SetValue(c11533702.efilter)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_DISEFFECT)
e2:SetRange(LOCATION_FZONE)
e2:SetValue(c11533702.efilter)
c:RegisterEffect(e2)
--immuse
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(function(e,c)
return c:IsSetCard(0xb4) and c:IsType(TYPE_RITUAL) end)
e3:SetValue(function(e,te)
return e:GetOwnerPlayer()~=te:GetOwnerPlayer() and te:IsActiveType(TYPE_MONSTER) and te:GetHandler():IsSummonLocation(LOCATION_EXTRA) and te:IsActivated() end)
e3:SetCondition(function(e)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroupCount(function(c) return c:IsFaceup() and c:IsSetCard(0xb4) and c:IsType(TYPE_RITUAL) end,tp,LOCATION_MZONE,0,nil)>=2 end)
c:RegisterEffect(e3)
end
function c11533702.filter(c)
return c:IsSetCard(0xb4) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c11533702.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11533702.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11533702.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11533702.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c11533702.efilter(e,ct)
local p=e:GetHandlerPlayer()
local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return te:GetHandler():IsSetCard(0xb4) and te:GetHandler():IsType(TYPE_RITUAL) and te:IsActiveType(TYPE_SPELL)
end
--影灵衣归魂 艾丽娅儿
function c11533703.initial_effect(c)
--spirit return
aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,11533703)
e2:SetTarget(c11533703.thtg)
e2:SetOperation(c11533703.thop)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_RELEASE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,21533703)
e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0 end)
e3:SetTarget(c11533703.settg)
e3:SetOperation(c11533703.setop)
c:RegisterEffect(e3)
end
function c11533703.thfilter(c)
return c:IsSetCard(0xb4) and c:IsAbleToHand()
end
function c11533703.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11533703.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11533703.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,c11533703.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
if tc:IsType(TYPE_MONSTER) then
--ritual level
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_RITUAL_LEVEL)
e2:SetValue(c11533703.rlevel)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
end
end
function c11533703.rlevel(e,c)
local lv=aux.GetCappedLevel(e:GetHandler())
local clv=c:GetLevel()
return (lv<<16)+clv
end
function c11533703.setfilter(c)
return c:IsSetCard(0xb4) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c11533703.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11533703.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c11533703.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c11533703.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
end
end
--影灵衣的轮转天
function c11533704.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,11533704)
e1:SetCondition(c11533704.condition)
e1:SetTarget(c11533704.target)
e1:SetOperation(c11533704.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_RELEASE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,21533704)
e2:SetCondition(aux.exccon)
e2:SetTarget(c11533704.thtg)
e2:SetOperation(c11533704.thop)
c:RegisterEffect(e2)
end
function c11533704.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xb4) and c:IsType(TYPE_RITUAL)
end
function c11533704.condition(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c11533704.cfilter,tp,LOCATION_MZONE,0,1,nil) then return false end
if not Duel.IsChainNegatable(ev) then return false end
return re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp==1-tp
end
function c11533704.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)
end
function c11533704.spfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) and c:IsSetCard(0xb4)
end
function c11533704.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsReleasable() and Duel.IsExistingMatchingCard(c11533704.spfil,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(11533704,0)) then
Duel.Release(re:GetHandler(),REASON_EFFECT)
local sc=Duel.SelectMatchingCard(tp,c11533704.spfil,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst()
Duel.SpecialSummon(sc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
sc:CompleteProcedure()
end
end
function c11533704.ctfil(c,e,tp)
return c:IsSetCard(0xb4) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c11533704.thfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,c)
end
function c11533704.thfil(c)
return c:IsAbleToHand() and c:IsSetCard(0xb4)
end
function c11533704.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c11533704.ctfil,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) and Duel.IsExistingMatchingCard(function(c) return c:IsSetCard(0xb4) and c:IsType(TYPE_MONSTER) and c:IsReleasable() end,tp,LOCATION_HAND,0,1,nil) end
local rg=Duel.SelectMatchingCard(tp,c11533704.ctfil,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
rg:AddCard(e:GetHandler())
Duel.Remove(rg,POS_FACEUP,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_HAND)
end
function c11533704.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c11533704.thfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if g:GetCount()>0 then
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
if Duel.IsExistingMatchingCard(function(c) return c:IsSetCard(0xb4) and c:IsType(TYPE_MONSTER) and c:IsReleasable() end,tp,LOCATION_HAND,0,1,nil) then
Duel.BreakEffect()
local rg=Duel.SelectMatchingCard(tp,function(c) return c:IsSetCard(0xb4) and c:IsType(TYPE_MONSTER) and c:IsReleasable() end,tp,LOCATION_HAND,0,1,1,nil)
Duel.Release(rg,REASON_EFFECT)
end
end
end
--影灵衣的神归镜
function c11533706.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11533706+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c11533706.cost)
e1:SetTarget(c11533706.target)
e1:SetOperation(c11533706.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(11533706,ACTIVITY_SPSUMMON,c11533706.counterfilter)
end
function c11533706.counterfilter(c)
return c:IsSetCard(0xb4)
end
function c11533706.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(11533706,tp,ACTIVITY_SPSUMMON)==0 end
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(c11533706.splimit)
Duel.RegisterEffect(e1,tp)
end
function c11533706.splimit(e,c)
return not c:IsSetCard(0xb4)
end
function c11533706.filter(c)
return c:IsSetCard(0xb4) and not c:IsCode(11533706) and c:IsAbleToHand()
end
function c11533706.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c11533706.filter,tp,LOCATION_DECK,0,1,nil) end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetCondition(c11533706.xthcon)
e1:SetOperation(c11533706.xthop)
e1:SetLabelObject(e)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_NEGATED)
e2:SetCountLimit(1)
e2:SetLabelObject(e1)
e2:SetCondition(c11533706.negcon)
e2:SetOperation(c11533706.negop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetLabelObject(e)
e3:SetCondition(c11533706.xckcon)
e3:SetOperation(c11533706.xckop)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11533706.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11533706.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c11533706.xthfil(c)
return c:IsAbleToHand() and not c:IsCode(11533706) and c:IsSetCard(0xb4)
end
function c11533706.xthcon(e,tp,eg,ep,ev,re,r,rp)
local flag=Duel.GetFlagEffectLabel(tp,11533706)
return flag and flag>0 and Duel.IsExistingMatchingCard(c11533706.xthfil,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)
end
function c11533706.xrlfil(c)
return c:IsReleasable() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xb4)
end
function c11533706.xrlgck(g,tp,sc)
return g:GetSum(Card.GetRitualLevel,sc)==sc:GetLevel() and Duel.GetMZoneCount(tp,g)>0
end
function c11533706.xrmfil(c)
return c:IsAbleToGrave() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xb4)
end
function c11533706.xspfil(c,e,tp)
if not c:IsSetCard(0xb4) then return false end
if not c:IsType(TYPE_RITUAL) then return false end
if not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local g=Duel.GetMatchingGroup(c11533706.xrlfil,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
local b1=g:CheckSubGroup(c11533706.xrlgck,1,99,tp,c)
local b2=Duel.IsExistingMatchingCard(c11533706.xrmfil,tp,LOCATION_DECK,0,1,c)
return b1 or b2
end
function c11533706.xthop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local flag=Duel.GetFlagEffectLabel(tp,11533706)
if flag and flag>0 and Duel.IsExistingMatchingCard(c11533706.xthfil,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) then
Duel.Hint(HINT_CARD,0,11533706)
local sg=Duel.SelectMatchingCard(tp,c11533706.xthfil,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,flag,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
if Duel.IsExistingMatchingCard(c11533706.xspfil,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(11533706,0)) then
Duel.BreakEffect()
local tc=Duel.SelectMatchingCard(tp,c11533706.xspfil,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
local g=Duel.GetMatchingGroup(c11533706.xrlfil,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
local b1=g:CheckSubGroup(c11533706.xrlgck,1,99,tp,tc)
local b2=Duel.IsExistingMatchingCard(c11533706.xrmfil,tp,LOCATION_DECK,0,1,tc)
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(11533706,1),aux.Stringid(11533706,2))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(11533706,1))
elseif b2 then
op=Duel.SelectOption(tp,aux.Stringid(11533706,2))+1
end
local mat=Group.CreateGroup()
if op==0 then
mat=g:SelectSubGroup(tp,c11533706.xrlgck,false,1,99,tp,tc)
Duel.ReleaseRitualMaterial(mat)
elseif op==1 then
mat=Duel.SelectMatchingCard(tp,c11533706.xrmfil,tp,LOCATION_DECK,0,1,1,tc)
Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
end
tc:SetMaterial(mat)
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
end
end
end
function c11533706.negcon(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject():GetLabelObject()
return re==te
end
function c11533706.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local te=e:GetLabelObject()
te:Reset()
end
function c11533706.xckcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsType(TYPE_RITUAL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re~=e:GetLabelObject()
end
function c11533706.xckop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local flag=Duel.GetFlagEffectLabel(tp,11533706)
if flag==nil then
Duel.RegisterFlagEffect(tp,11533706,RESET_PHASE+PHASE_END,0,1,1)
else
Duel.SetFlagEffectLabel(tp,11533706,flag+1)
end
end
--影灵衣的仪水返生
function c11533708.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(c11533708.target)
e1:SetOperation(c11533708.activate)
c:RegisterEffect(e1)
--recycle
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11533708,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e2:SetCost(c11533708.rycost)
e2:SetTarget(c11533708.rytg1)
e2:SetOperation(c11533708.ryop1)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11533708,2))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e2:SetCost(c11533708.rycost)
e2:SetTarget(c11533708.rytg2)
e2:SetOperation(c11533708.ryop2)
c:RegisterEffect(e2)
end
function c11533708.filter(c,e,tp)
return c:IsSetCard(0xb4,0x3a)
end
function c11533708.mfilter1(c)
return c:IsSetCard(0xb4,0x3a)
end
function c11533708.mfilter2(c)
return c:IsFaceup()
end
function c11533708.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsOnField,nil)
local mg2=Duel.GetMatchingGroup(aux.RitualExtraFilter,tp,LOCATION_GRAVE,0,nil,c11533708.mfilter1)
local mg3=Duel.GetMatchingGroup(aux.RitualExtraFilter,tp,0,LOCATION_MZONE,nil,c11533708.mfilter2)
mg2:Merge(mg3)
return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,c11533708.filter,e,tp,mg,mg2,Card.GetLevel,"Equal") and Duel.GetFlagEffect(tp,11533708)==0
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_GRAVE)
end
function c11533708.activate(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsOnField,nil)
local mg2=Duel.GetMatchingGroup(aux.RitualExtraFilter,tp,LOCATION_GRAVE,0,nil,c11533708.mfilter1)
local mg3=Duel.GetMatchingGroup(aux.RitualExtraFilter,tp,0,LOCATION_MZONE,nil,c11533708.mfilter2)
mg2:Merge(mg3)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,c11533708.filter,e,tp,mg,mg2,Card.GetLevel,"Equal")
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if mg2 then
mg:Merge(mg2)
end
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Equal")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
if tc:IsLevelAbove(1) and Duel.SelectYesNo(tp,aux.Stringid(11533708,0)) then
Duel.SetLP(tp,Duel.GetLP(tp)-tc:GetLevel()*300)
else
Duel.RegisterFlagEffect(tp,11533708,RESET_PHASE+PHASE_END,0,1)
end
end
end
function c11533708.rycost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() and Duel.IsExistingMatchingCard(function(c) return c:IsAbleToDeckAsCost() and c:IsSetCard(0xb4,0x3a) and c:IsType(TYPE_MONSTER) end,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,function(c) return c:IsAbleToDeckAsCost() and c:IsSetCard(0xb4,0x3a) and c:IsType(TYPE_MONSTER) end,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
g:AddCard(e:GetHandler())
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c11533708.rytg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(function(c) return c:IsAbleToHand() and not c:IsCode(11533708) and c:IsSetCard(0x18e) end,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c11533708.ryop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(function(c) return c:IsAbleToHand() and not c:IsCode(11533708) and c:IsSetCard(0x18e) end,tp,LOCATION_GRAVE,0,nil)
if g:GetCount()>0 then
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c11533708.rytg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(function(c) return c:IsAbleToGrave() and not c:IsCode(11533708) and c:IsSetCard(0xb4) end,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_REMOVED)
end
function c11533708.ryop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(function(c) return c:IsAbleToGrave() and not c:IsCode(11533708) and c:IsSetCard(0xb4) end,tp,LOCATION_REMOVED,0,nil)
if g:GetCount()>0 then
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
--刻神编年史-时刻次代龙
function c40009491.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,11,2)
c:EnableReviveLimit()
--damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40009491,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c40009491.contition1)
e1:SetCost(c40009491.cost)
e1:SetTarget(c40009491.target)
e1:SetOperation(c40009491.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c40009491.contition2)
c:RegisterEffect(e2)
--chain attack
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(40009491,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DAMAGE_STEP_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c40009491.spxcon)
e3:SetTarget(c40009491.spxtg)
e3:SetOperation(c40009491.spxop)
c:RegisterEffect(e3)
end
function c40009491.contition1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c40009491.contition2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return re and re:GetHandler():IsType(TYPE_PENDULUM) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and c:IsControler(tp)
end
function c40009491.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c40009491.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tp=e:GetHandler():GetControler()
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_ONFIELD)
end
function c40009491.operation(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler()
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
end
function c40009491.spxcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetAttacker()==c and c:IsChainAttackable(0,true)
end
function c40009491.spxfilter(c,e,tp,mc)
return c:IsRankBelow(10) and c:IsType(TYPE_PENDULUM) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c40009491.spxtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c40009491.spxfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c40009491.spxop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c40009491.spxfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c)
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
end
\ No newline at end of file
--刻神编年史-時空巨兵
c40009538.named_with_Chrono=1
function c40009538.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--set p
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40009538,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,40009538)
e1:SetCondition(c40009538.setcon1)
e1:SetTarget(c40009538.thtg)
e1:SetOperation(c40009538.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(c40009538.nnegcost)
e2:SetCondition(c40009538.setcon2)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(40009538,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,40009539)
e3:SetCondition(c40009538.spcon1)
e3:SetTarget(c40009538.sptg)
e3:SetOperation(c40009538.spop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMING_END_PHASE)
e4:SetCost(c40009538.nnegcost)
e4:SetCondition(c40009538.spcon2)
c:RegisterEffect(e4)
--to deck
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(40009538,2))
e5:SetCategory(CATEGORY_TODECK+CATEGORY_COUNTER)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_REMOVED)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetCountLimit(1,40009539)
e5:SetCondition(c40009538.tdcon1)
e5:SetTarget(c40009538.tdtg)
e5:SetOperation(c40009538.tdop)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetHintTiming(0,TIMING_END_PHASE)
e6:SetCost(c40009538.nnegcost)
e6:SetCondition(c40009538.tdcon2)
c:RegisterEffect(e6)
end
function c40009538.nnegcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0xf1c,3,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0xf1c,3,REASON_COST)
end
function c40009538.setcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xf1c) and (not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208)))
end
function c40009538.setcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xf1c) and Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end
function c40009538.sppfilter1(c,e,tp)
return c:IsSetCard(0xf1c) and c:IsType(TYPE_MONSTER)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
and Duel.IsExistingMatchingCard(c40009538.sppfilter2,tp,LOCATION_DECK,0,1,c,e,tp,c:GetLevel()) and not c:IsCode(40009538)
end
function c40009538.sppfilter2(c,e,tp,lv)
return c:IsSetCard(0xf1c) and c:IsType(TYPE_MONSTER) and not c:IsLevel(lv) and c:IsLevelAbove(1)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c40009538.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingMatchingCard(c40009538.sppfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end
function c40009538.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local dg=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if dg:GetCount()<2 then return end
if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,c40009538.sppfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g1:GetCount()>0 then
local tc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c40009538.sppfilter2),tp,LOCATION_DECK,0,1,1,tc,e,tp,tc:GetLevel())
g1:Merge(g2)
Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c40009538.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c40009538.splimit(e,c)
return not (c:IsType(TYPE_XYZ) or c:IsSetCard(0xf1c)) and c:IsLocation(LOCATION_EXTRA)
end
function c40009538.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208))
end
function c40009538.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end
function c40009538.filter1(c,e,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c40009538.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end
function c40009538.filter2(c,e,tp,mc,rk)
local rk=0
if mc:IsType(TYPE_XYZ) then
rk=mc:GetRank()
else
rk=mc:GetLevel()
end
return c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:GetRank()==rk+1
end
function c40009538.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c40009538.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c40009538.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c40009538.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c40009538.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c40009538.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1)
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
end
sc:CompleteProcedure()
end
function c40009538.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() and (not Duel.IsPlayerAffectedByEffect(tp,40009208) or (Duel.GetCurrentChain()<1 and Duel.IsPlayerAffectedByEffect(tp,40009208)))
end
function c40009538.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() and Duel.GetCurrentChain()>0 and Duel.IsPlayerAffectedByEffect(tp,40009208)
end
function c40009538.tdfilter(c)
return c:IsSetCard(0xf1c) and c:IsAbleToDeck() and c:IsFaceup()
end
function c40009538.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsAbleToDeck() and chkc~=e:GetHandler() end
if chk==0 then return e:GetHandler():IsAbleToDeck()
and Duel.IsExistingTarget(c40009538.tdfilter,tp,LOCATION_REMOVED,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c40009538.tdfilter,tp,LOCATION_REMOVED,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,5,0,0xf1c)
end
function c40009538.ctfilter1(c)
return c:IsFaceup() and c:IsSetCard(0xf1c) and c:IsType(TYPE_CONTINUOUS) and c:IsCanAddCounter(0xf1c,5)
end
function c40009538.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
local g=Group.FromCards(c,tc)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) then
Duel.ShuffleDeck(tp)
local g=Duel.SelectMatchingCard(tp,c40009538.ctfilter1,tp,LOCATION_SZONE,0,1,1,nil)
if g:GetCount()==0 then return end
Duel.BreakEffect()
local pc=g:GetFirst()
if pc then
pc:AddCounter(0xf1c,5)
end
end
end
end
--混沌NO.142857 百万航行者 超大变形
function c77770002.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c77770002.mfilter,7,6,c77770002.ovfilter,aux.Stringid(77770002,0),7,c77770002.xyzop)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c77770002.atkval)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(77770002,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCountLimit(1,77770002)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c77770002.cost)
e2:SetTarget(c77770002.target)
e2:SetOperation(c77770002.operation)
c:RegisterEffect(e2)
--spsummon limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
e3:SetValue(c77770002.splimit)
c:RegisterEffect(e3)
--immune
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(c77770002.efilter)
c:RegisterEffect(e4)
end
aux.xyz_number[77770002]=142857
function c77770002.splimit(e,se,sp,st)
return not se or not se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c77770002.ovfilter(c)
return c:IsFaceup() and c:IsCode(89990016) and c:GetOverlayCount()==7
end
function c77770002.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,77770002)==0 end
Duel.RegisterFlagEffect(tp,77770002,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c77770002.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c77770002.atkval(e,c)
return c:GetOverlayCount()*1500
end
function c77770002.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c77770002.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c77770002.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and tc:GetBaseAttack()>=0 and tc:IsPreviousLocation(LOCATION_MZONE) and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e1:SetValue(tc:GetBaseAttack())
c:RegisterEffect(e1)
end
end
--字界眼天照
function c79200003.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetCode(EVENT_PHASE+PHASE_DRAW)
e1:SetRange(LOCATION_DECK)
e1:SetCountLimit(1,89200003+EFFECT_COUNT_CODE_DUEL)
e1:SetTarget(c79200003.target)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(79200003,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,79200003)
e2:SetTarget(c79200003.thtg)
e2:SetOperation(c79200003.thop)
c:RegisterEffect(e2)
end
function c79200003.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
local c=e:GetHandler()
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
if e:IsHasType(EFFECT_TYPE_QUICK_O) then
Duel.SetChainLimit(c79200003.chainlm)
end
end
function c79200003.chainlm(e,rp,tp)
return not e:GetHandler():IsCode()
end
function c79200003.filter(c)
return c:IsSetCard(0x681) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c79200003.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79200003.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c79200003.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c79200003.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--字界眼小樱
function c79200004.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetCode(EVENT_PHASE+PHASE_DRAW)
e1:SetRange(LOCATION_DECK)
e1:SetCountLimit(1,79200004+EFFECT_COUNT_CODE_DUEL)
e1:SetTarget(c79200004.target)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x682))
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_REMOVE)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_ONFIELD,0)
e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x682))
c:RegisterEffect(e4)
end
function c79200004.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
local c=e:GetHandler()
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
if e:IsHasType(EFFECT_TYPE_QUICK_O) then
Duel.SetChainLimit(c79200004.chainlm)
end
end
function c79200004.chainlm(e,rp,tp)
return not e:GetHandler():IsCode()
end
\ No newline at end of file
--天底的神影
function c98921015.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,98921015+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c98921015.target)
e1:SetOperation(c98921015.activate)
c:RegisterEffect(e1)
end
function c98921015.tgfilter(c,tp)
return c:IsAbleToGrave() and Duel.IsExistingMatchingCard(c98921015.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetLevel())
end
function c98921015.thfilter(c,lv)
return (c:IsSetCard(0xb4) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_RITUAL)) and c:IsLevel(lv) and c:IsAbleToHand()
end
function c98921015.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98921015.tgfilter,tp,LOCATION_EXTRA,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c98921015.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c98921015.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
local lv=tc:GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local hg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c98921015.thfilter),tp,LOCATION_DECK,0,1,1,nil,lv)
local hc=hg:GetFirst()
if hc then
Duel.BreakEffect()
Duel.SendtoHand(hc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,hc)
end
end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c98921015.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c98921015.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
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