Commit c8f269ad authored by POLYMER's avatar POLYMER

update 250526 wd

parent bf98144e
......@@ -6619,6 +6619,40 @@
47310019 0
60159953 0
95101024 0
11605001 0
11605003 0
11605005 0
11605007 0
11605009 0
11605011 0
11605013 0
11605015 0
11605017 0
11605030 0
11605033 0
11605036 0
11605039 0
11605043 0
11605046 0
11605049 0
11605052 0
11605055 0
11605058 0
11605061 0
67200833 0
67200835 0
75739001 0
75739002 0
75739003 0
75739004 0
75739005 0
75739006 0
75739007 0
75739008 0
75739009 0
75739011 0
75739012 0
75739013 0
#limit
33403513 1
82204250 0
......
No preview for this file type
local m=11605001
local cm=_G["c"..m]
cm.name="裂界残章-幻缝隼"
function cm.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--SearchCard
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_DECK)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+1)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
cm.todeck_effect=e2
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
Duel.Remove(c,POS_FACEUP,REASON_COST)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xa224) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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 Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP)
and e:GetHandler():IsPreviousLocation(LOCATION_REMOVED)
end
function cm.thfilter(c)
return c:IsSetCard(0xa224) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(m)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,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
local m=11605003
local cm=_G["c"..m]
cm.name="裂界残章-断界碎翼"
function cm.initial_effect(c)
--Toremove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.rmtg)
e1:SetOperation(cm.rmop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--Remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_DECK)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+1)
e3:SetCondition(cm.rm2con)
e3:SetTarget(cm.rm2tg)
e3:SetOperation(cm.rm2op)
c:RegisterEffect(e3)
cm.todeck_effect=e3
end
function cm.rmfilter(c)
return c:IsSetCard(0xa224) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.rmfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function cm.rm2con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP)
and e:GetHandler():IsPreviousLocation(LOCATION_REMOVED)
end
function cm.rm2filter(c)
return c:IsSetCard(0xa224) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and not c:IsCode(m)
end
function cm.rm2tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rm2filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function cm.rm2op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.rm2filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
local m=11605005
local cm=_G["c"..m]
cm.name="裂界残章-反帷幕"
function cm.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--Return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_DECK)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+1)
e3:SetCondition(cm.tdcon)
e3:SetTarget(cm.tdtg)
e3:SetOperation(cm.tdop)
c:RegisterEffect(e3)
cm.todeck_effect=e3
end
function cm.thfilter(c)
return c:IsSetCard(0xa224) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,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 cm.tdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP)
and e:GetHandler():IsPreviousLocation(LOCATION_REMOVED)
end
function cm.tdfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_REMOVED)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
\ No newline at end of file
local m=11605007
local cm=_G["c"..m]
cm.name="裂界龙-虚空幼体"
function cm.initial_effect(c)
--atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_REMOVED)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.tdcon)
e1:SetTarget(cm.tdtg)
e1:SetOperation(cm.tdop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--Return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_DECK)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+1)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
cm.todeck_effect=e3
end
function cm.confilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xa224) and c:IsControler(tp)
end
function cm.tdcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.confilter,1,nil,tp)
end
function cm.tdfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() and c:IsAttackAbove(1) and not c:IsCode(m)
end
function cm.atkfilter(c,g)
return g:IsContains(c)
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=eg:Filter(cm.confilter,nil,tp)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.atkfilter(chkc,g) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(cm.atkfilter,tp,LOCATION_MZONE,0,1,nil,g) and Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
Duel.SelectTarget(tp,cm.atkfilter,tp,LOCATION_MZONE,0,1,1,nil,g)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_REMOVED)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tdc=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_REMOVED,0,1,1,nil):GetFirst()
if tdc then
Duel.HintSelection(Group.FromCards(tdc))
if Duel.SendtoDeck(tdc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and (tdc:IsLocation(LOCATION_DECK) or tdc:IsLocation(LOCATION_EXTRA)) and tc and tc:IsRelateToEffect(e) then
local atk=tdc:GetBaseAttack()
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(atk)
tc:RegisterEffect(e1)
end
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP)
and e:GetHandler():IsPreviousLocation(LOCATION_REMOVED)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xa224) and c:IsType(TYPE_MONSTER) and c:IsFaceupEx() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m)
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 Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_REMOVED)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
local m=11605009
local cm=_G["c"..m]
cm.name="裂界渊龙-幻层分形者"
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,cm.m1filter,cm.m2filter,true)
--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)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(aux.ContactFusionCondition(cm.mcfilter,LOCATION_MZONE+LOCATION_REMOVED,0))
e2:SetTarget(aux.ContactFusionTarget(cm.mcfilter,LOCATION_MZONE+LOCATION_REMOVED,0))
e2:SetOperation(cm.ContactFusionOperation(1,1))
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
--atk/def
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(cm.atkval)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UPDATE_DEFENSE)
e5:SetValue(cm.defval)
c:RegisterEffect(e5)
--Return
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,1))
e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_TO_DECK)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCountLimit(1,m+1)
e6:SetCondition(cm.spcon)
e6:SetTarget(cm.sptg)
e6:SetOperation(cm.spop)
c:RegisterEffect(e6)
end
function cm.ContactFusionOperation(mat_operation,operation_params)
return function(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
c:SetMaterial(g)
local g1=g:Filter(cm.m1filter,nil,1)
local g2=g:Filter(cm.m2filter,nil,1)
Duel.HintSelection(g2)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
Duel.SendtoDeck(g2,nil,SEQ_DECKSHUFFLE,REASON_COST)
g:DeleteGroup()
end
end
function cm.m1filter(c,chk)
return c:IsFusionSetCard(0xa224) and c:IsLocation(LOCATION_MZONE) and ((not chk) or c:IsAbleToRemoveAsCost())
end
function cm.m2filter(c,chk)
return c:IsFusionSetCard(0xa224) and c:IsLocation(LOCATION_REMOVED) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and ((not chk) or c:IsAbleToDeckOrExtraAsCost())
end
function cm.mcfilter(c)
return cm.m1filter(c,1) or cm.m2filter(c,1)
end
function cm.filter(c)
return c:IsSetCard(0xa224) and (c:IsAbleToHand() or c:IsAbleToRemove())
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()<=0 then return end
local tc=g:GetFirst()
if tc:IsAbleToHand() and (not tc:IsAbleToRemove() or Duel.SelectOption(tp,1190,1192)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function cm.atkval(e,c)
local g=Duel.GetFieldGroup(c:GetControler(),0,LOCATION_MZONE)
local atk=g:GetSum(Card.GetBaseAttack)
return atk/2
end
function cm.defval(e,c)
local g=Duel.GetFieldGroup(c:GetControler(),0,LOCATION_MZONE)
local def=g:GetSum(Card.GetBaseDefense)
return def/2
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP)
and e:GetHandler():IsPreviousLocation(LOCATION_REMOVED)
end
function cm.spfilter(c,e,tp)
return c:IsCode(m) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
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 Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
g:GetFirst():RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
g:GetFirst():RegisterEffect(e2)
end
end
\ No newline at end of file
local m=11605011
local cm=_G["c"..m]
cm.name="裂界断痕"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e2:SetTargetRange(0xff,0xfe)
e2:SetRange(LOCATION_FZONE)
e2:SetTarget(cm.rmtg)
e2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2)
--destroy equip
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,m+1)
e3:SetTarget(cm.reptg)
e3:SetOperation(cm.repop)
e3:SetValue(cm.repval)
c:RegisterEffect(e3)
end
function cm.rmfilter(c)
return c:IsSetCard(0xa224) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.rmfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function cm.rmtg(e,c)
local tp=e:GetHandlerPlayer()
return c:GetOwner()==tp
end
function cm.filter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xa224) and c:IsControler(tp) and c:IsOnField()
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function cm.dfilter(c)
return c:IsSetCard(0xa224) and c:IsAbleToDeck() and c:IsFaceup()
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.dfilter,tp,LOCATION_REMOVED,0,nil)
if chk==0 then return eg:IsExists(cm.filter,1,nil,tp)
and #g>0 end
local c=e:GetHandler()
if Duel.SelectEffectYesNo(tp,c,96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.SetTargetCard(tc)
return true
else return false end
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Duel.HintSelection(Group.FromCards(tc))
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_REPLACE)
end
function cm.repval(e,c)
return cm.filter(c,e:GetHandlerPlayer())
end
\ No newline at end of file
--裂界信使-光鹭
function c11605013.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetDescription(aux.Stringid(11605013,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11605013)
e1:SetCost(c11605013.rmcost)
e1:SetTarget(c11605013.rmtg)
e1:SetOperation(c11605013.rmop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetOperation(c11605013.regop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11605013,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_REMOVED)
e3:SetCountLimit(1,11605013+1)
e3:SetCondition(c11605013.thcon)
e3:SetTarget(c11605013.thtg)
e3:SetOperation(c11605013.thop)
c:RegisterEffect(e3)
end
function c11605013.costfilter(c)
return c:IsSetCard(0xa224) and c:IsAbleToRemove()
end
function c11605013.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c11605013.costfilter(c) and
Duel.IsExistingMatchingCard(c11605013.costfilter,tp,LOCATION_HAND,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c11605013.costfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c11605013.tfilter(c)
return c:IsFaceup() and c:IsAbleToRemove()
end
function c11605013.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c11605013.tfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c11605013.tfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c11605013.tfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c11605013.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetOperation(c11605013.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c11605013.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function c11605013.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(11605013,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c11605013.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(11605013)>0
end
function c11605013.cfilter(c)
return c:IsAbleToHand() or c:IsAbleToDeck()
end
function c11605013.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11605013.cfilter,tp,LOCATION_REMOVED,0,1,nil) end
end
function c11605013.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.SelectMatchingCard(tp,c11605013.cfilter,tp,LOCATION_REMOVED,0,1,1,nil):GetFirst()
if not tc then return end
Duel.HintSelection(Group.FromCards(tc))
if tc:IsAbleToDeck() and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1193)==1) then
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
else
tc:SetStatus(STATUS_TO_HAND_WITHOUT_CONFIRM,true)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--反裂界机兵·辉光翼
function c11605015.initial_effect(c)
c:SetSPSummonOnce(11605015)
--spsummon itself
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11605015,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_REMOVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetCondition(c11605015.condition)
e1:SetTarget(c11605015.spstg)
e1:SetOperation(c11605015.spsop)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(1193)
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e2:SetCondition(c11605015.condition)
e2:SetTarget(c11605015.tdtg)
e2:SetOperation(c11605015.tdop)
c:RegisterEffect(e2)
--spsummon other
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11605015,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,11605015)
e3:SetTarget(c11605015.sptg)
e3:SetOperation(c11605015.spop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(11605015,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_DECK)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,11605015)
e4:SetCondition(c11605015.spcon)
e4:SetTarget(c11605015.sptg)
e4:SetOperation(c11605015.spop)
c:RegisterEffect(e4)
c11605015.todeck_effect=e4
end
function c11605015.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c11605015.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11605015.cfilter,1,nil)
end
function c11605015.spstg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c11605015.spsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c11605015.tdfilter(c)
return c:IsAbleToDeck() and c:IsFaceup()
end
function c11605015.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11605015.tdfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
end
function c11605015.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c11605015.tdfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
function c11605015.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP)
and e:GetHandler():IsPreviousLocation(LOCATION_REMOVED)
end
function c11605015.spfilter(c)
return c:IsSetCard(0xa224) and c:IsLevelBelow(4)
end
function c11605015.sfilter1(c,e,tp,g)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp)>0
and g:IsExists(c11605015.sfilter2,1,c,e,tp)
end
function c11605015.sfilter2(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) and Duel.GetMZoneCount(1-tp)>0
end
function c11605015.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c11605015.spfilter,tp,LOCATION_DECK,0,nil)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and g:IsExists(c11605015.sfilter1,1,nil,e,tp,g) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,PLAYER_ALL,LOCATION_DECK)
end
function c11605015.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c11605015.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA+LOCATION_HAND,0,nil)
if not Duel.IsPlayerAffectedByEffect(tp,59822133) and g:IsExists(c11605015.sfilter1,1,nil,e,tp,g) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11605015,2))
local sc=g:FilterSelect(tp,c11605015.sfilter1,1,1,nil,e,tp,g):GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11605015,3))
local oc=g:FilterSelect(tp,c11605015.sfilter2,1,1,sc,e,tp):GetFirst()
Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e2)
Duel.SpecialSummonStep(oc,0,tp,1-tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
oc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
oc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end
end
--裂界狂犬-迪蒙魔
function c11605017.initial_effect(c)
c:SetSPSummonOnce(11605017)
--fusion summon
c:EnableReviveLimit()
aux.AddFusionProcFunFun(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xa224),c11605017.mfilter,1,true)
aux.AddContactFusionProcedure(c,c11605017.cfilter,LOCATION_HAND+LOCATION_MZONE+LOCATION_REMOVED,0,aux.tdcfop(c))
--copy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11605017,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c11605017.cpcost)
--e1:SetTarget(c11605017.cptg)
e1:SetOperation(c11605017.cpop)
c:RegisterEffect(e1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11605017,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CUSTOM+11605017)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_REMOVED)
e2:SetCountLimit(1,11605017)
e2:SetCondition(c11605017.eqcon)
e2:SetTarget(c11605017.eqtg)
e2:SetOperation(c11605017.eqop)
c:RegisterEffect(e2)
aux.RegisterMergedDelayedEvent(c,11605017,EVENT_SPSUMMON_SUCCESS)
--Atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(2000)
e3:SetCondition(c11605017.atkcon)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetTarget(c11605017.eftg)
e4:SetLabelObject(e1)
c:RegisterEffect(e4)
end
c11605017.material_setcode=0xa224
function c11605017.mfilter(c)
return c:IsLocation(LOCATION_REMOVED) and c:IsFaceup()
end
function c11605017.cfilter(c)
return (c:IsFusionSetCard(0xa224) and c:IsType(TYPE_MONSTER) and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup()) or c:IsLocation(LOCATION_REMOVED) and c:IsType(TYPE_MONSTER) and c:IsFaceup()) and c:IsAbleToDeckOrExtraAsCost()
end
function c11605017.cpfilter(c,e,tp,eg,ep,ev,re,r,rp)
if not (c:IsSetCard(0xa224) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()) then return false end
local te=c.todeck_effect
if not te then return false end
local tg=te:GetTarget()
return not tg or tg and tg(e,tp,eg,ep,ev,re,r,rp,0)
end
function c11605017.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11605017.cpfilter,tp,LOCATION_DECK,0,1,nil,e,tp,eg,ep,ev,re,r,rp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(tp,c11605017.cpfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp):GetFirst()
Duel.Remove(tc,POS_FACEUP,REASON_COST)
Duel.ClearTargetCard()
tc:CreateEffectRelation(e)
e:SetLabelObject(tc)
local te=tc.todeck_effect
local tg=te:GetTarget()
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
end
function c11605017.cpop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:IsRelateToEffect(e) then
local te=tc.todeck_effect
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
end
function c11605017.eqfilter(c,tp)
return c:IsControler(tp) and c:IsSetCard(0xa224) and c:IsFaceup()
end
function c11605017.eqcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11605017.eqfilter,1,nil,tp)
end
function c11605017.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=eg:Filter(c11605017.eqfilter,nil,tp)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and aux.IsInGroup(chkc,g) end
if chk==0 then return Duel.IsExistingTarget(aux.IsInGroup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,g) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
local sg
if g:GetCount()==1 then
sg=g:Clone()
Duel.SetTargetCard(sg)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
sg=Duel.SelectTarget(tp,aux.IsInGroup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,g)
end
end
function c11605017.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c11605017.eqlimit)
c:RegisterEffect(e1)
end
end
function c11605017.eqlimit(e,c)
return c:IsSetCard(0xa224)
end
function c11605017.atkcon(e)
local ec=e:GetHandler():GetEquipTarget()
return ec and ec:IsSetCard(0xa224)
end
function c11605017.eftg(e,c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xa224) and c:GetEquipGroup():IsContains(e:GetHandler())
end
--裂界!侵入!
function c11605030.initial_effect(c)
--act in set turn
local se0=Effect.CreateEffect(c)
se0:SetDescription(aux.Stringid(11605030,3))
se0:SetType(EFFECT_TYPE_SINGLE)
se0:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
se0:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
se0:SetCost(c11605030.actcost)
c:RegisterEffect(se0)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11605030,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_REMOVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,11605030)
e1:SetCondition(c11605030.rmcon)
e1:SetTarget(c11605030.rmtg)
e1:SetOperation(c11605030.rmop)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11605030,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,11605030+1)
e2:SetCost(c11605030.cost)
e2:SetTarget(c11605030.rmtg2)
e2:SetOperation(c11605030.rmop2)
c:RegisterEffect(e2)
end
function c11605030.costfilter(c)
return c:IsSetCard(0xa224) and c:IsAbleToRemoveAsCost()
end
function c11605030.actcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11605030.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c11605030.costfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c11605030.chkfilter(c,tp)
return c:IsPreviousControler(tp) and (c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) or c:IsPreviousLocation(LOCATION_GRAVE)) and c:IsPreviousSetCard(0xa224) and c:IsFaceup()
end
function c11605030.rmcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11605030.chkfilter,1,nil,tp)
end
function c11605030.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c11605030.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst()
if tc then
Duel.HintSelection(Group.FromCards(tc))
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
if tc:IsLocation(LOCATION_REMOVED) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(11605030,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil)
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
end
function c11605030.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,nil):GetFirst()
if tc and Duel.Remove(tc,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
tc:RegisterFlagEffect(11605030,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetCondition(c11605030.retcon)
e1:SetOperation(c11605030.retop)
Duel.RegisterEffect(e1,tp)
e1:SetReset(RESET_PHASE+PHASE_END)
end
end
function c11605030.retcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(11605030)==0 then
e:Reset()
return false
else
return true
end
end
function c11605030.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.SendtoHand(tc,tp,REASON_EFFECT)
end
function c11605030.rmtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0
and Duel.IsPlayerCanRemove(1-tp) end
end
function c11605030.rmfilter(c)
return c:IsSetCard(0xa224) and c:IsAbleToRemove() and aux.NecroValleyFilter()(c)
end
function c11605030.rmop2(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanRemove(1-tp) then return end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,1-tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,3)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_REMOVED)
if ct>0 and Duel.IsExistingMatchingCard(c11605030.rmfilter,tp,LOCATION_DECK+LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(11605030,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,c11605030.rmfilter,tp,LOCATION_DECK+LOCATION_EXTRA+LOCATION_GRAVE,0,1,ct,nil)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
end
end
--裂界异临
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCost(s.sccost)
e1:SetTarget(s.sctarg)
e1:SetOperation(s.scop)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(s.handcon)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter)
end
function s.chainfilter(re,tp,cid)
return not re:GetActivateLocation()==LOCATION_HAND
end
function s.handcon(e)
local tp=e:GetOwnerPlayer()
return Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)~=0
end
function s.sccost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.scfilter(c)
return c:IsSpecialSummonable()
end
function s.sctarg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.scfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.scfilter,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=g:Select(tp,1,1,nil):GetFirst()
Duel.SpecialSummonRule(tp,sc)
end
end
\ No newline at end of file
--裂界重构
function c11605036.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,11605036)
e1:SetCost(c11605036.thcost)
e1:SetTarget(c11605036.thtg)
e1:SetOperation(c11605036.thop)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11605036,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c11605036.rmtg)
e2:SetOperation(c11605036.rmop)
c:RegisterEffect(e2)
--to deck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11605036,0))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_REMOVED)
e3:SetCountLimit(1,11605036)
e3:SetCost(c11605036.tdcost)
e3:SetTarget(c11605036.tdtg)
e3:SetOperation(c11605036.tdop)
c:RegisterEffect(e3)
end
function c11605036.costfilter(c)
return not c:IsCode(11605036) and c:IsSetCard(0xa224) and c:IsFaceup() and c:IsAbleToRemoveAsCost()
end
function c11605036.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11605036.costfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c11605036.costfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c11605036.thfilter(c)
return c:IsSetCard(0xa224) and c:IsAbleToHand()
end
function c11605036.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11605036.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11605036.spfilter(c,e,tp)
return c:IsSetCard(0xa224) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11605036.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,c11605036.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
local g=Duel.GetMatchingGroup(c11605036.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if #g>0 and Duel.GetMZoneCount(tp)>0 and Duel.SelectYesNo(tp,aux.Stringid(11605036,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c11605036.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end
function c11605036.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Remove(c,POS_FACEUP,REASON_EFFECT)
end
end
function c11605036.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c11605036.tdfilter(c)
return c:IsSetCard(0xa224) and c:IsType(TYPE_FUSION) and c:IsFaceupEx() and c:IsAbleToDeck()
end
function c11605036.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11605036.tdfilter,tp,0x30,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c11605036.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c11605036.tdfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,3,nil)
if g:GetCount()==0 then return end
Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT)
--Duel.ShuffleDeck(tp)
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
--裂界侵蚀
function c11605039.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11605039,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11605039)
e1:SetCost(c11605039.cost)
e1:SetTarget(c11605039.target)
e1:SetOperation(c11605039.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11605039,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_REMOVED)
e2:SetCountLimit(1,11605039)
e2:SetCost(c11605039.spcost)
e2:SetTarget(c11605039.sptg)
e2:SetOperation(c11605039.spop)
c:RegisterEffect(e2)
end
function c11605039.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(11605039,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:SetLabel(1)
else e:SetLabel(0) end
end
function c11605039.rmfilter(c)
return c:IsSetCard(0xa224) and c:IsAbleToRemove()
end
function c11605039.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11605039.rmfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c11605039.cfilter(c)
return c:IsAbleToHand() or c:IsAbleToDeck()
end
function c11605039.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(0xff,0xff)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,c11605039.rmfilter,tp,LOCATION_DECK,0,1,1,nil)
if #rg>0 and Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)~=0 and e:GetLabel()==1 and Duel.IsExistingMatchingCard(c11605039.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(11605039,3)) then
local tg=Duel.GetMatchingGroup(c11605039.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
local tc=tg:GetFirst()
if #tg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
tc=tg:Select(tp,1,1,nil):GetFirst()
end
Duel.BreakEffect()
if tc:IsAbleToDeck() and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1193)==1) then
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
else
tc:SetStatus(STATUS_TO_HAND_WITHOUT_CONFIRM,true)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
end
function c11605039.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c11605039.spfilter(c,e,tp)
return c:IsSetCard(0xa224) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11605039.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c11605039.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
function c11605039.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,c11605039.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst()
if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
--裂界狭影—碎界剑姬
function c11605043.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11605043,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_HAND)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,11605043)
e1:SetCondition(c11605043.spcon)
e1:SetTarget(c11605043.sptg)
e1:SetOperation(c11605043.spop)
c:RegisterEffect(e1)
--fusion
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,11605043+1)
e2:SetCost(c11605043.fscost)
e2:SetTarget(c11605043.fstg)
e2:SetOperation(c11605043.fsop)
c:RegisterEffect(e2)
end
function c11605043.spcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_DRAW)
end
function c11605043.rmfilter(c)
return c:IsSetCard(0xa224) and c:IsAbleToRemove()
end
function c11605043.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(c11605043.rmfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c11605043.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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,c11605043.rmfilter,tp,LOCATION_DECK,0,1,1,nil)
if #rg>0 then
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
end
end
function c11605043.fscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c11605043.filter0(c)
return (c:IsOnField() or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end
function c11605043.filter1(c,e)
return (c:IsOnField() or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end
function c11605043.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and aux.IsMaterialListSetCard(c,0xa224) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c11605043.fstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg=Duel.GetMatchingGroup(c11605043.filter0,tp,LOCATION_ONFIELD+LOCATION_REMOVED,0,nil)
local res=Duel.IsExistingMatchingCard(c11605043.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,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(c11605043.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)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_ONFIELD+LOCATION_REMOVED)
end
function c11605043.fsop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c11605043.filter1),tp,LOCATION_ONFIELD+LOCATION_REMOVED,0,nil,e)
local sg1=Duel.GetMatchingGroup(c11605043.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,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(c11605043.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 mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf)
tc:SetMaterial(mat)
if mat:IsExists(Card.IsFacedown,1,nil) then
local cg=mat:Filter(Card.IsFacedown,nil)
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(mat,nil,SEQ_DECKSHUFFLE,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
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(c11605043.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c11605043.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION)
end
--裂界狭影—毁界剑姬
function c11605046.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11605046,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11605046)
e1:SetCost(c11605046.thcost)
e1:SetTarget(c11605046.thtg)
e1:SetOperation(c11605046.thop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11605046,1))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_DECK)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,11605046+1)
e2:SetCondition(c11605046.tgcon)
e2:SetTarget(c11605046.tgtg)
e2:SetOperation(c11605046.tgop)
c:RegisterEffect(e2)
c11605046.todeck_effect=e2
end
function c11605046.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c11605046.thfilter(c)
return c:IsSetCard(0xa224) and c:IsAbleToHand()
end
function c11605046.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11605046.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsPlayerCanRemove(tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
end
function c11605046.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11605046.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
--Duel.ShuffleDeck(tp)
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil)
if sg:GetCount()>0 then
Duel.BreakEffect()
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
end
function c11605046.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP)
and e:GetHandler():IsPreviousLocation(LOCATION_REMOVED)
end
function c11605046.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(1-tp,3) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=4 and Duel.IsPlayerCanRemove(tp) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,3)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,4,tp,LOCATION_DECK)
end
function c11605046.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardDeck(1-tp,3,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
if og:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)==0 or Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<4 then return end
Duel.BreakEffect()
local g=Duel.GetDecktopGroup(tp,4)
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
--裂界影王—毁碎魔剑皇
function c11605049.initial_effect(c)
--fusion material
aux.AddFusionProcFunFun(c,c11605049.mfilter,aux.FilterBoolFunction(Card.IsLevelAbove,6),3,true)
c:EnableReviveLimit()
--dis serach
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11605049,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,11605049)
e1:SetCondition(c11605049.dscon)
e1:SetOperation(c11605049.dsop)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11605049,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,11605049+1)
e2:SetCondition(c11605049.discon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c11605049.distg)
e2:SetOperation(c11605049.disop)
c:RegisterEffect(e2)
--to deck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11605049,2))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_REMOVED)
e3:SetCountLimit(1,11605049+2)
e3:SetCondition(c11605049.tdcon)
e3:SetTarget(c11605049.tdtg)
e3:SetOperation(c11605049.tdop)
c:RegisterEffect(e3)
end
c11605049.material_setcode=0xa224
function c11605049.mfilter(c)
return c:IsFusionSetCard(0xa224) and c:IsFusionType(TYPE_FUSION)
end
function c11605049.dscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c11605049.dsop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TO_HAND)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_GRAVE))
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function c11605049.discon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and Duel.IsChainNegatable(ev) and re:IsActiveType(TYPE_MONSTER)
end
function c11605049.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chck:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c11605049.disop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if Duel.NegateActivation(ev) and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c11605049.tdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c11605049.tdfilter(c)
return not c:IsCode(11605049) or c:IsFacedown()
end
function c11605049.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and c11605049.tdfilter(chkc) and chkc~=e:GetHandler() and chkc:IsControler(tp) end
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp)>0 and Duel.IsExistingTarget(c11605049.tdfilter,tp,LOCATION_REMOVED,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c11605049.tdfilter,tp,LOCATION_REMOVED,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11605049.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--裂界双切
local s,id,o=GetID()
function c11605052.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCondition(s.con)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--material
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.mattg)
e2:SetOperation(s.matop)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xa224)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.filter(c)
return c:IsAbleToDeck()
end
function s.sfilter(c,tp)
return c:IsLocation(LOCATION_DECK) and c:IsControler(tp)
end
function s.rfilter(c)
return c:IsSetCard(0xa224)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED+LOCATION_GRAVE) and s.filter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(s.filter,tp,LOCATION_REMOVED+LOCATION_GRAVE,LOCATION_REMOVED+LOCATION_GRAVE,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_REMOVED+LOCATION_GRAVE,LOCATION_REMOVED+LOCATION_GRAVE,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,1)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=2 then return end
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(s.sfilter,1,nil,tp) then Duel.ShuffleDeck(tp) end
if g:IsExists(s.sfilter,1,nil,1-tp) then Duel.ShuffleDeck(1-tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct==2 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_DECK,2,2,2,nil)
if rg:GetCount()>0 then
Duel.BreakEffect()
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
end
end
function s.xyzfilter(c)
return c:IsFaceup() and c:IsSetCard(0xa224) and c:IsType(TYPE_XYZ)
end
function s.matfilter(c)
return c:IsSetCard(0xa224) and c:IsFaceup() and c:IsCanOverlay()
end
function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.xyzfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_GRAVE,1,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function s.matop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.matfilter),tp,LOCATION_GRAVE,1,1,1,nil)
if g:GetCount()>0 then
Duel.Overlay(tc,g)
end
end
end
--裂界共鸣者—同频魔神
local s,id,o=GetID()
function c11605055.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xa224),aux.NonTuner(Card.IsSetCard,0xa224),1)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--Remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,id)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(s.cost)
e2:SetTarget(s.target)
e2:SetOperation(s.operation)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_REMOVED)
e3:SetCountLimit(1,id)
e3:SetCost(s.cost1)
e3:SetTarget(s.sptg1)
e3:SetOperation(s.spop1)
c:RegisterEffect(e3)
end
function s.filter(c,e,tp)
return c:IsSetCard(0xa224) and c:IsType(TYPE_MONSTER)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED+LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
function s.rfilter(c)
return c:IsSetCard(0xa224) and c:IsAbleToRemove()
end
function s.rfilter1(c)
return c:IsSetCard(0xa224) and c:IsAbleToRemoveAsCost()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.rfilter1,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.rfilter1,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function s.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToExtraAsCost() end
Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_COST)
end
function s.filter1(c,e,tp)
return c:IsSetCard(0xa224) and c:IsType(TYPE_TUNER)
end
function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED+LOCATION_GRAVE)
end
function s.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter1),tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
--裂界超越者—重叠杀影
local s,id,o=GetID()
function c11605058.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xa224),6,2,s.ovfilter,aux.Stringid(id,2),99)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e1:SetRange(LOCATION_REMOVED)
e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(s.rmcon)
e2:SetOperation(s.rmop)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetTarget(s.reptg)
c:RegisterEffect(e3)
--must attack
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MUST_ATTACK)
c:RegisterEffect(e4)
--reflect battle dam
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE)
e5:SetValue(1)
c:RegisterEffect(e5)
--indestructable
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_IMMUNE_EFFECT)
e6:SetCondition(s.incon)
e6:SetValue(s.efilter)
c:RegisterEffect(e6)
end
function s.ovfilter(c)
return c:IsFaceup() and (c:IsType(TYPE_FUSION) or c:IsType(TYPE_SYNCHRO))
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetBattledGroupCount()>0
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
end
function s.repfilter(c)
return c:IsSetCard(0xa224) and c:IsAbleToRemove()
end
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
and Duel.IsExistingMatchingCard(s.repfilter,tp,LOCATION_GRAVE,0,1,nil) end
if Duel.SelectEffectYesNo(tp,c,96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectMatchingCard(tp,s.repfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
return true
else return false end
end
function s.incon(e)
local ph=Duel.GetCurrentPhase()
return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) and e:GetHandler():GetOverlayCount()>0
end
function s.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
\ No newline at end of file
--裂界连结者—纯白祈祷
local s,id,o=GetID()
function c11605061.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0xa224),1,1)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetTarget(s.retg)
e1:SetOperation(s.reop)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetTarget(s.tdtg)
e2:SetOperation(s.tdop)
c:RegisterEffect(e2)
end
function s.matfilter(c)
return c:IsLinkSetCard(0xa224)
end
function s.refilter(c)
return c:IsSetCard(0xa224) and c:IsAbleToRemove()
end
function s.retg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.refilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.refilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,s.refilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function s.reop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,nil,REASON_EFFECT)
end
end
function s.tdfilter(c)
return c:IsSetCard(0xa224)
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and chkc:IsAbleToDeck() and s.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,1,0,0)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if tc:IsExtraDeckMonster()
or Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3))==0 then
Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)
else
Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
end
end
end
\ No newline at end of file
--枢机卿 布雷亚提斯
function c67200833.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--destory
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200833,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,67200833)
e1:SetCost(c67200833.thcon)
e1:SetTarget(c67200833.target)
e1:SetOperation(c67200833.activate)
c:RegisterEffect(e1)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200833,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_NEGATE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_HAND+LOCATION_EXTRA)
e3:SetCountLimit(1,67200834)
e3:SetCondition(c67200833.condition)
e3:SetTarget(c67200833.sptg)
e3:SetOperation(c67200833.spop)
c:RegisterEffect(e3)
c67200833.fusion_effect=true
end
function c67200833.cfilter1(c,tp)
return c:IsType(TYPE_PENDULUM) and c:IsSummonPlayer(tp)
end
function c67200833.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200833.cfilter1,1,nil,tp)
end
function c67200833.filter0(c,e)
return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function c67200833.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c67200833.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c67200833.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
if Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0)>=0 then
mg1:Merge(Duel.GetMatchingGroup(c67200833.filter0,tp,LOCATION_PZONE,0,nil,e))
end
local res=Duel.IsExistingMatchingCard(c67200833.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 mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c67200833.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c67200833.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c67200833.filter1,nil,e)
if Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0)>=0 then
mg1:Merge(Duel.GetMatchingGroup(c67200833.filter0,tp,LOCATION_PZONE,0,nil,e))
end
local sg1=Duel.GetMatchingGroup(c67200833.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c67200833.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,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,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--
function c67200833.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c67200833.setfilter1(c,tp)
return c:IsType(TYPE_PENDULUM) and not c:IsForbidden() and (c:IsLocation(LOCATION_HAND) or (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()))
end
function c67200833.spfilter(c,e,tp)
return c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c67200833.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsForbidden() and (Duel.CheckLocation(tp,LOCATION_PZONE,0) and Duel.CheckLocation(tp,LOCATION_PZONE,1)) and Duel.IsExistingMatchingCard(c67200833.setfilter1,tp,LOCATION_HAND+LOCATION_EXTRA+LOCATION_MZONE,0,1,c,tp) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c67200833.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g1=Duel.SelectMatchingCard(tp,c67200833.setfilter1,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,1,c,tp)
local tc1=g1:GetFirst()
if Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) then
if Duel.MoveToField(tc1,tp,tp,LOCATION_PZONE,POS_FACEUP,false) then
Duel.NegateActivation(ev)
tc1:SetStatus(STATUS_EFFECT_ENABLED,true)
end
c:SetStatus(STATUS_EFFECT_ENABLED,true)
end
if c:IsLocation(LOCATION_PZONE) and Duel.IsExistingMatchingCard(c67200833.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(67200833,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c67200833.spfilter,tp,LOCATION_HAND,0,1,2,nil,e,tp)
if #tg>0 then
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--迷宫的魔法师 布雷亚多·卡沙雷
function c67200835.initial_effect(c)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
aux.AddXyzProcedureLevelFree(c,c67200835.mfilter,c67200835.xyzcheck,2,99)
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e0:SetCode(EFFECT_CANNOT_ACTIVATE)
e0:SetRange(LOCATION_PZONE)
e0:SetTargetRange(0,1)
e0:SetValue(c67200835.aclimit)
c:RegisterEffect(e0)
--Search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200835,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c67200835.thcost)
e1:SetTarget(c67200835.thtg)
e1:SetOperation(c67200835.thop)
c:RegisterEffect(e1)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200835,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_EXTRA)
e3:SetCountLimit(1,67200835)
e3:SetCondition(c67200835.spcon)
e3:SetTarget(c67200835.sptg)
e3:SetOperation(c67200835.spop)
c:RegisterEffect(e3)
end
function c67200835.mfilter(c,xyzc)
return c:IsXyzType(TYPE_PENDULUM)
end
function c67200835.xyzcheck(g)
return g:GetClassCount(c67200835.getlvrklk)==1
end
function c67200835.getlvrklk(c)
if c:IsLevelAbove(0) then return c:GetLevel() end
--return c:GetLink()
end
function c67200835.aclimit(e,re,tp)
local rc=re:GetHandler()
return rc:IsLocation(LOCATION_HAND) and re:IsActiveType(TYPE_MONSTER)
end
--
function c67200835.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c67200835.thfilter(c)
return c:IsSetCard(0x6678) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsFaceupEx()
end
function c67200835.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200835.thfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE)
end
function c67200835.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c67200835.thfilter),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--
function c67200835.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup()
end
function c67200835.setfilter1(c,tp)
return c:IsType(TYPE_PENDULUM) and not c:IsForbidden() and (c:IsLocation(LOCATION_HAND) or c:IsLocation(LOCATION_MZONE) or (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()))
end
function c67200835.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsForbidden() and (Duel.CheckLocation(tp,LOCATION_PZONE,0) and Duel.CheckLocation(tp,LOCATION_PZONE,1)) and Duel.IsExistingMatchingCard(c67200835.setfilter1,tp,LOCATION_HAND+LOCATION_EXTRA+LOCATION_MZONE,0,1,c,tp) end
end
function c67200835.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g1=Duel.SelectMatchingCard(tp,c67200835.setfilter1,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_EXTRA,0,1,1,c,tp)
local tc1=g1:GetFirst()
if Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) then
if Duel.MoveToField(tc1,tp,tp,LOCATION_PZONE,POS_FACEUP,false) then
tc1:SetStatus(STATUS_EFFECT_ENABLED,true)
end
c:SetStatus(STATUS_EFFECT_ENABLED,true)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_PENDULUM_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(aux.TRUE)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local eset={e1}
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
local lscale=lpz:GetLeftScale()
local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end
local loc=0
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)
local ft=Duel.GetUsableMZoneCount(tp)
local ect=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]
if ect and ect<ft2 then ft2=ect end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then
if ft1>0 then ft1=1 end
if ft2>0 then ft2=1 end
ft=1
end
if ft1>0 then loc=loc|LOCATION_HAND end
if ft2>0 then loc=loc|LOCATION_EXTRA end
local g2=Duel.GetFieldGroup(tp,loc,0)
local res=g2:IsExists(aux.PConditionFilter,1,nil,e,tp,lscale,rscale,eset)
e1:Reset()
if res and Duel.SelectYesNo(tp,aux.Stringid(67200835,2)) then
local tg=Duel.GetMatchingGroup(aux.PConditionFilter,tp,loc,0,nil,e,tp,lscale,rscale,eset)
tg=tg:Filter(aux.PConditionExtraFilterSpecific,nil,e,tp,lscale,rscale,e1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
aux.GCheckAdditional=aux.PendOperationCheck(ft1,ft2,ft)
local g=tg:SelectSubGroup(tp,aux.TRUE,false,1,math.min(#tg,ft))
aux.GCheckAdditional=nil
if not g then
e1:Reset()
return
end
local sg=Group.CreateGroup()
sg:Merge(g)
Duel.HintSelection(Group.FromCards(lpz))
Duel.HintSelection(Group.FromCards(rpz))
Duel.SpecialSummon(sg,SUMMON_TYPE_PENDULUM,tp,tp,true,true,POS_FACEUP)
e1:Reset()
end
end
--幻灵调和
local s,id,o=GetID()
function s.initial_effect(c)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetDescription(aux.Stringid(id,5))
e0:SetCondition(s.handcon)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target1)
e1:SetOperation(s.activate1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetTarget(s.target2)
e2:SetOperation(s.activate2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(id,2))
e3:SetTarget(s.target3)
e3:SetOperation(s.activate3)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetDescription(aux.Stringid(id,3))
e4:SetTarget(s.target4)
e4:SetOperation(s.activate4)
c:RegisterEffect(e4)
--to hand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,4))
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_GRAVE)
e5:SetCost(s.thcost)
e5:SetTarget(s.thtg)
e5:SetOperation(s.thop)
c:RegisterEffect(e5)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc31)
end
function s.handcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)==0
or Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
function s.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function s.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function s.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(s.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 mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.activate1(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,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,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function s.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.activate2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil)
end
end
function s.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,1,nil,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.activate3(e,tp,eg,ep,ev,re,r,rp)
local xyzg=Duel.GetMatchingGroup(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,nil,nil)
if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,nil,1,99)
end
end
function s.target4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.activate4(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.LinkSummon(tp,sg:GetFirst(),nil)
end
end
function s.costfilter(c)
return c:IsSetCard(0x23f) and c:IsAbleToRemoveAsCost()
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_GRAVE,0,1,1,c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--红幻灵
local s,id,o=GetID()
function s.initial_effect(c)
--sp
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
--e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetCost(s.cost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--to Grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
--e2:SetCountLimit(1,id+o)
e2:SetCode(EVENT_REMOVE)
e2:SetTarget(s.rmtg)
e2:SetOperation(s.rmop)
c:RegisterEffect(e2)
end
function s.cfilter(c,tp)
return c:IsSetCard(0xc31) and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler(),tp)
Duel.SendtoGrave(g,REASON_COST)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spfilter(c)
return c:IsSetCard(0xc31) and c:IsAbleToHand()
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil)
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function s.rmfilter(c)
return c:IsSetCard(0xc31) and c:IsAbleToGrave()
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--蓝幻灵
local s,id,o=GetID()
function s.initial_effect(c)
--sp
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
--e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetCost(s.cost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--move
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
--e2:SetCountLimit(1,id+o)
e2:SetCode(EVENT_REMOVE)
e2:SetTarget(s.rmtg)
e2:SetOperation(s.rmop)
c:RegisterEffect(e2)
end
function s.cfilter(c,tp)
return c:IsSetCard(0xc31) and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler(),tp)
Duel.SendtoGrave(g,REASON_COST)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0xc31) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.rmfilter(c,e,tp)
return c:IsSetCard(0xc31) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>1
and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_GRAVE,0,2,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,2,tp,LOCATION_GRAVE)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<2 or Duel.GetMatchingGroupCount(aux.NecroValleyFilter(s.rmfilter),tp,LOCATION_GRAVE,0,nil,e,tp)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.rmfilter),tp,LOCATION_GRAVE,0,2,2,nil,e,tp)
if not sg then return end
local ac=sg:GetFirst()
local bc=sg:GetNext()
if Duel.MoveToField(ac,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
and Duel.MoveToField(bc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
ac:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCode(EFFECT_CHANGE_TYPE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e2:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
bc:RegisterEffect(e2)
end
end
--绿幻灵
local s,id,o=GetID()
function s.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
--e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--to Grave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
--e3:SetCountLimit(1,id+o)
e3:SetCode(EVENT_REMOVE)
e3:SetTarget(s.rmtg)
e3:SetOperation(s.rmop)
c:RegisterEffect(e3)
end
function s.thfilter(c,e,tp)
return c:IsSetCard(0xc31) and c:IsAbleToHand()
end
function s.cfilter(c,tp)
return c:IsSetCard(0xc31) and c:IsAbleToGrave()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
if #tg>0 and Duel.SendtoGrave(tg,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local hg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #hg>0 then
Duel.BreakEffect()
Duel.SendtoHand(hg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,hg)
end
end
end
function s.rmfilter(c,e,tp)
return c:IsSetCard(0xc31)
end
function s.fselect(g)
return g:IsExists(Card.IsSetCard,1,nil,0xc31)
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tg=Duel.GetMatchingGroup(nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,c,e)
if chk==0 then return tg:CheckSubGroup(s.fselect,3,3) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,3,tp,LOCATION_REMOVED)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetMatchingGroup(nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,c,e)
if #tg<3 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=tg:SelectSubGroup(tp,s.fselect,false,3,3)
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
end
end
--黄幻灵
local s,id,o=GetID()
function s.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
--e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--to Grave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TODECK)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
--e3:SetCountLimit(1,id+o)
e3:SetCode(EVENT_REMOVE)
e3:SetTarget(s.rmtg)
e3:SetOperation(s.rmop)
c:RegisterEffect(e3)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0xc31) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.cfilter(c,tp)
return c:IsSetCard(0xc31) and c:IsAbleToGrave() and Duel.GetMZoneCount(tp,c)>0
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
if #tg>0 and Duel.SendtoGrave(tg,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function s.rmfilter(c,e,tp)
return c:IsAbleToDeck()
end
function s.fselect(g)
return g:IsExists(Card.IsSetCard,1,nil,0xc31)
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tg=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,c,e)
if chk==0 then return tg:CheckSubGroup(s.fselect,4,4) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,4,tp,LOCATION_REMOVED)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,c,e)
if #tg<3 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=tg:SelectSubGroup(tp,s.fselect,false,4,4)
if sg:GetCount()>0 then
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT+REASON_RETURN)
end
end
--大幻灵 红
local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xc31),aux.FilterBoolFunction(Card.IsAttackBelow,1000),true)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
--e1:SetCountLimit(1,id)
e1:SetCondition(s.thcon)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--szone
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
--e2:SetCountLimit(1,id+o)
e2:SetCondition(s.szcon)
e2:SetCost(s.szcost)
e2:SetTarget(s.sztg)
e2:SetOperation(s.szop)
c:RegisterEffect(e2)
--toset
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
--e3:SetCountLimit(1,id+o*2)
e3:SetTarget(s.settg)
e3:SetOperation(s.setop)
c:RegisterEffect(e3)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function s.thfilter(c,e,tp)
return c:IsSetCard(0xc31) and c:IsAbleToHand() and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,c,e,tp)
end
function s.tgfilter(c,e,tp)
return c:IsSetCard(0xc31) and c:IsAbleToGrave()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local hg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if hg:GetCount()>0 then
Duel.SendtoHand(hg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,hg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if tg:GetCount()>0 then
Duel.SendtoGrave(tg,REASON_EFFECT)
end
end
end
function s.cfilter(c,e,tp,loc)
return c:IsSetCard(0xc31) and c:IsAbleToGraveAsCost()
end
function s.szcon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp
end
function s.szcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler(),e,tp)
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function s.sztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD+LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD+LOCATION_HAND)
end
function s.szop(e,tp,eg,ep,ev,re,r,rp)
local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local fg=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
local g
if #hg>0 and (#fg==0 or Duel.SelectOption(tp,aux.Stringid(id,3),aux.Stringid(id,4))==0) then
g=hg:RandomSelect(tp,1)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
end
if g:GetCount()~=0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--大幻灵 蓝
local s,id,o=GetID()
function s.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0xc31),1,1)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
--e1:SetCountLimit(1,id)
e1:SetCondition(s.thcon)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--szone
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
--e2:SetCountLimit(1,id+o)
e2:SetCondition(s.szcon)
e2:SetCost(s.szcost)
e2:SetTarget(s.sztg)
e2:SetOperation(s.szop)
c:RegisterEffect(e2)
--toset
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
--e3:SetCountLimit(1,id+o*2)
e3:SetTarget(s.settg)
e3:SetOperation(s.setop)
c:RegisterEffect(e3)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.thfilter(c,e,tp)
return c:IsSetCard(0xc31) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_GRAVE,0,1,c,e,tp)
end
function s.tgfilter(c,e,tp)
return c:IsAbleToRemove()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_GRAVE)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local hg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if hg:GetCount()>0 then
Duel.SpecialSummon(hg,0,tp,tp,false,false,POS_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if tg:GetCount()>0 then
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
end
end
function s.cfilter(c,e,tp,loc)
return c:IsSetCard(0xc31) and c:IsAbleToGraveAsCost()
end
function s.szcon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp
end
function s.szcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler(),e,tp)
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function s.sztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_ONFIELD)
end
function s.szop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,CATEGORY_DISABLE)
local tc=Duel.SelectMatchingCard(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst()
if tc and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=e1:Clone()
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
tc:RegisterEffect(e3)
end
end
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
end
end
--大幻灵 绿
local s,id,o=GetID()
function s.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,2,2)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
--e1:SetCountLimit(1,id)
e1:SetCondition(s.thcon)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--szone
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
--e2:SetCountLimit(1,id+o)
e2:SetCondition(s.szcon)
e2:SetCost(s.szcost)
e2:SetTarget(s.sztg)
e2:SetOperation(s.szop)
c:RegisterEffect(e2)
--toset
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
--e3:SetCountLimit(1,id+o*2)
e3:SetTarget(s.settg)
e3:SetOperation(s.setop)
c:RegisterEffect(e3)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function s.thfilter(c,e,tp,sg)
local r=LOCATION_REASON_TOFIELD
if not c:IsControler(tp) then r=LOCATION_REASON_CONTROL end
return c:IsSetCard(0xc31) and c:IsType(TYPE_MONSTER) and Duel.GetLocationCount(tp,LOCATION_SZONE,tp,r)>0
and sg:IsExists(s.tgfilter,1,c,e,tp)
end
function s.tgfilter(c,e,tp)
return c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local sg=Duel.GetOverlayGroup(tp,1,1)
if chk==0 then return sg:IsExists(s.thfilter,1,nil,e,tp,sg) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sg=Duel.GetOverlayGroup(tp,1,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=sg:FilterSelect(tp,s.thfilter,1,1,nil,e,tp,sg):GetFirst()
if tc then
if Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
sg:RemoveCard(tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=sg:FilterSelect(tp,s.tgfilter,1,1,nil,e,tp)
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
end
function s.cfilter(c,e,tp,loc)
return c:IsSetCard(0xc31) and c:IsAbleToGraveAsCost()
end
function s.szcon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp
end
function s.szcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler(),e,tp)
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function s.sztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,0x3c,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,1-tp,0x3c)
end
function s.szop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,CATEGORY_DISABLE)
local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,0x3c,1,1,nil):GetFirst()
if tc then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
end
end
--大幻灵 黄
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,s.lcheck)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
--e1:SetCountLimit(1,id)
e1:SetCondition(s.thcon)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--szone
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
--e2:SetCountLimit(1,id+o)
e2:SetCondition(s.szcon)
e2:SetCost(s.szcost)
e2:SetTarget(s.sztg)
e2:SetOperation(s.szop)
c:RegisterEffect(e2)
--toset
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
--e3:SetCountLimit(1,id+o*2)
e3:SetTarget(s.settg)
e3:SetOperation(s.setop)
c:RegisterEffect(e3)
end
function s.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0xc31)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.thfilter(c,e,tp)
return c:IsSetCard(0xc31) and c:IsAbleToDeck() and Duel.IsExistingMatchingCard(nil,tp,LOCATION_REMOVED,0,1,c,e,tp)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_REMOVED)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local hg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
if hg:GetCount()>0 then
Duel.SendtoDeck(hg,nil,2,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
if tg:GetCount()>0 then
Duel.SendtoGrave(tg,REASON_EFFECT+REASON_RETURN)
end
end
end
function s.cfilter(c,e,tp,loc)
return c:IsSetCard(0xc31) and c:IsAbleToGraveAsCost()
end
function s.szcon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp
end
function s.szcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler(),e,tp)
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function s.sztg(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 s.szop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--幻灵创生
local s,id,o=GetID()
function s.initial_effect(c)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCost(s.cost)
e0:SetDescription(aux.Stringid(id,5))
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
--e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--to hand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,4))
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_GRAVE)
e5:SetCost(s.thcost)
e5:SetTarget(s.thtg)
e5:SetOperation(s.thop)
c:RegisterEffect(e5)
end
function s.cfilter(c,e,tp)
return c:IsAbleToGraveAsCost() and c:IsSetCard(0xc31) and Duel.GetMZoneCount(tp,c)>0
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler(),e,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0xc31) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
local loc=0
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then
loc=100
end
e:SetLabel(loc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.tdfilter(c)
return c:IsSetCard(0xc31) and c:IsAbleToHand()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=sg:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 and e:GetLabel()==100 and Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_DECK,0,1,1,nil)
if tg:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
end
function s.costfilter(c)
return c:IsSetCard(0xc31) and c:IsAbleToRemoveAsCost()
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_GRAVE,0,1,1,c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--幻灵爆发
local s,id,o=GetID()
function s.initial_effect(c)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCost(s.cost)
e0:SetDescription(aux.Stringid(id,5))
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--to hand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,4))
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_GRAVE)
--e5:SetCountLimit(1,id)
e5:SetCost(s.thcost)
e5:SetTarget(s.thtg)
e5:SetOperation(s.thop)
c:RegisterEffect(e5)
end
function s.cfilter(c)
return c:IsAbleToGraveAsCost() and c:IsSetCard(0xc31)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0xc31) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
local loc=0
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then
loc=100
end
e:SetLabel(loc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function s.tgfilter(c)
return c:IsSetCard(0xc31) and c:IsAbleToGrave()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 and e:GetLabel()==100 and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if tg:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoGrave(tg,REASON_EFFECT)
end
end
end
function s.costfilter(c)
return c:IsSetCard(0xc31) and c:IsAbleToRemoveAsCost()
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_GRAVE,0,1,1,c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--幻灵威吓
local s,id,o=GetID()
function s.initial_effect(c)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCost(s.cost)
e0:SetDescription(aux.Stringid(id,5))
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(s.chcon)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--to hand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,4))
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_GRAVE)
--e5:SetCountLimit(1,id)
e5:SetCost(s.thcost)
e5:SetTarget(s.thtg)
e5:SetOperation(s.thop)
c:RegisterEffect(e5)
end
function s.cfilter(c)
return c:IsAbleToGraveAsCost() and c:IsSetCard(0xc31)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function s.chcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return loc==0 or Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end
local loc=0
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then
loc=100
end
e:SetLabel(loc)
end
function s.tgfilter(c)
return c:IsSetCard(0xc31) and c:IsAbleToGrave()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,s.repop)
if e:GetLabel()==100 and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_EXTRA,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if tg:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoGrave(tg,REASON_EFFECT)
end
end
end
function s.tdfilter(c,code)
return c:IsCode(code) and c:IsAbleToDeck()
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e:GetHandler():GetCode()):GetFirst()
if tc then
Duel.ConfirmCards(1-tp,tc)
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
function s.costfilter(c)
return c:IsSetCard(0xc31) and c:IsAbleToRemoveAsCost()
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_GRAVE,0,1,1,c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
......@@ -55,7 +55,7 @@ function cm.initial_effect(c)
end
end
function cm.counterfilter(c)
return c:IsSetCard(0xcc30)
return c:IsSetCard(0xce0)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()==e:GetHandler()
......@@ -86,7 +86,7 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e2,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xcc30)
return not c:IsSetCard(0xce0)
end
function cm.thfilter(c)
return c:IsFaceup() and c:IsCode(m)
......
......@@ -59,7 +59,7 @@ function cm.initial_effect(c)
end
end
function cm.counterfilter(c)
return c:IsSetCard(0xcc30)
return c:IsSetCard(0xce0)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()==e:GetHandler()
......@@ -90,7 +90,7 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e2,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xcc30)
return not c:IsSetCard(0xce0)
end
function cm.thfilter(c)
return c:IsFaceup() and c:IsCode(m)
......
......@@ -76,7 +76,7 @@ function cm.initial_effect(c)
end
end
function cm.counterfilter(c)
return c:IsSetCard(0xcc30)
return c:IsSetCard(0xce0)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()==e:GetHandler()
......@@ -107,7 +107,7 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e2,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xcc30)
return not c:IsSetCard(0xce0)
end
function cm.thfilter(c)
return c:IsFaceup() and c:IsCode(m)
......
......@@ -60,7 +60,7 @@ function cm.initial_effect(c)
end
end
function cm.counterfilter(c)
return c:IsSetCard(0xcc30)
return c:IsSetCard(0xce0)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()==e:GetHandler()
......@@ -91,7 +91,7 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e2,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xcc30)
return not c:IsSetCard(0xce0)
end
function cm.thfilter(c)
return c:IsFaceup() and c:IsCode(m)
......
......@@ -58,7 +58,7 @@ function cm.initial_effect(c)
end
end
function cm.counterfilter(c)
return c:IsSetCard(0xcc30)
return c:IsSetCard(0xce0)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()==e:GetHandler()
......@@ -89,7 +89,7 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e2,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xcc30)
return not c:IsSetCard(0xce0)
end
function cm.thfilter(c)
return c:IsFaceup() and c:IsCode(m)
......@@ -165,7 +165,7 @@ function cm.thcon2(e,tp,eg,ep,ev,re,r,rp)
return c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp)
end
function cm.thfilter2(c)
return c:IsSetCard(0xcc30) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
return c:IsSetCard(0xce0) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -28,7 +28,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e3)
end
function cm.filter(c)
return c:IsLevelAbove(7) and c:IsSetCard(0xcc30) and c:IsAbleToHand()
return c:IsLevelAbove(7) and c:IsSetCard(0xce0) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and cm.filter(chkc) end
......@@ -51,7 +51,7 @@ function cm.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function cm.setfilter(c)
return c:IsSetCard(0xcc30) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
return c:IsSetCard(0xce0) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -25,7 +25,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e3)
end
function cm.coinfilter(c)
return c:IsSetCard(0xcc30) and c:IsType(TYPE_MONSTER) and c:IsLevelAbove(7) and c:IsAbleToHand()
return c:IsSetCard(0xce0) and c:IsType(TYPE_MONSTER) and c:IsLevelAbove(7) and c:IsAbleToHand()
end
function cm.cointg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.coinfilter,tp,LOCATION_DECK,0,1,nil) end
......@@ -44,7 +44,7 @@ function cm.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function cm.drfilter(c)
return c:IsSetCard(0xcc30) and c:IsAbleToDeck()
return c:IsSetCard(0xce0) and c:IsAbleToDeck()
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp) and Duel.IsExistingMatchingCard(cm.drfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
......
......@@ -20,7 +20,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsSetCard(0xcc30) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return c:IsSetCard(0xce0) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
......@@ -35,7 +35,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.repfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xcc30) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
return c:IsFaceup() and c:IsSetCard(0xce0) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() and eg:IsExists(cm.repfilter,1,nil,tp) end
......
......@@ -22,10 +22,10 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.drfilter(c)
return c:IsSetCard(0xcc30) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
return c:IsSetCard(0xce0) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function cm.coinfilter(c)
return c:IsSetCard(0xcc30) and c:IsType(TYPE_MONSTER) and c:IsLevelAbove(7) and c:IsAbleToHand()
return c:IsSetCard(0xce0) and c:IsType(TYPE_MONSTER) and c:IsLevelAbove(7) and c:IsAbleToHand()
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) and Duel.IsExistingMatchingCard(cm.drfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
......@@ -51,7 +51,7 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.cfilter(c,tp)
return c:IsSetCard(0xcc30) and c:IsLevelAbove(7) and c:GetControler()==tp
return c:IsSetCard(0xce0) and c:IsLevelAbove(7) and c:GetControler()==tp
end
function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
......
......@@ -2,7 +2,7 @@
local m=89386009
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableCounterPermit(0xcc30)
c:EnableCounterPermit(0xce0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
......@@ -54,22 +54,22 @@ end
function cm.effectfilter(e,ct)
local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT)
local tc=te:GetHandler()
return tc:IsSetCard(0xcc30) and tc:IsLevelAbove(7)
return tc:IsSetCard(0xce0) and tc:IsLevelAbove(7)
end
function cm.acop(e,tp,eg,ep,ev,re,r,rp)
local te,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_LOCATION)
local c=e:GetHandler()
local tc=te:GetHandler()
if re:IsActiveType(TYPE_MONSTER) and tc:IsSetCard(0xcc30) and loc==LOCATION_HAND and c:GetFlagEffect(1)>0 then
c:AddCounter(0xcc30,1)
if re:IsActiveType(TYPE_MONSTER) and tc:IsSetCard(0xce0) and loc==LOCATION_HAND and c:GetFlagEffect(1)>0 then
c:AddCounter(0xce0,1)
end
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0xcc30,3,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0xcc30,3,REASON_COST)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0xce0,3,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0xce0,3,REASON_COST)
end
function cm.thfilter(c)
return c:IsSetCard(0xcc30) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return c:IsSetCard(0xce0) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
......@@ -85,7 +85,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.skcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp and e:GetHandler():GetCounter(0xcc30)>0
return Duel.GetTurnPlayer()==1-tp and e:GetHandler():GetCounter(0xce0)>0
end
function cm.sktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() end
......
......@@ -47,7 +47,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e5)
end
function cm.matfilter(c)
return c:GetOriginalLevel()>=7 and c:IsFusionSetCard(0xcc30)
return c:GetOriginalLevel()>=7 and c:IsFusionSetCard(0xce0)
end
function cm.desfilter(c,code)
return c:IsFaceup() and c:IsCode(code)
......@@ -75,10 +75,10 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function cm.filter(c)
return c:IsFaceup() and c:IsSetCard(0xcc30) and c:IsAbleToDeck() and Duel.GetMZoneCount(tp,c)>0
return c:IsFaceup() and c:IsSetCard(0xce0) and c:IsAbleToDeck() and Duel.GetMZoneCount(tp,c)>0
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xcc30) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
return c:IsSetCard(0xce0) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
......
......@@ -14,6 +14,12 @@ function c98941056.initial_effect(c)
e0:SetCondition(s.descon)
e0:SetCost(s.cost2)
c:RegisterEffect(e0)
local e10=e1:Clone()
e10:SetDescription(aux.Stringid(id,8))
e10:SetRange(LOCATION_DECK)
e10:SetCondition(s.descon2)
e10:SetCost(s.cost3)
c:RegisterEffect(e10)
--Fusion
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98941056,0))
......@@ -22,6 +28,7 @@ function c98941056.initial_effect(c)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id)
e2:SetCost(s.spcost)
e2:SetTarget(s.target)
e2:SetOperation(s.activate)
c:RegisterEffect(e2)
......@@ -42,6 +49,11 @@ function c98941056.initial_effect(c)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeck() and Duel.GetFlagEffect(tp,id)==0 end
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
function c98941056.eftg(e,c)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x9d)
end
......@@ -61,7 +73,7 @@ end
function c98941056.trueac(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(c98941056.extfilter,tp,0,LOCATION_MZONE,nil)
local g2=Duel.GetMatchingGroup(c98941056.thfilter,tp,LOCATION_DECK,0,nil)
if g1:GetCount()>0 and g2:GetCount()>0 and Duel.GetFlagEffect(tp,id+3)==0 and Duel.SelectYesNo(tp,aux.Stringid(98941056,7)) then
if e:GetHandler():IsOnField() and g1:GetCount()>0 and g2:GetCount()>0 and Duel.GetFlagEffect(tp,id+3)==0 and Duel.GetTurnPlayer()==e:GetHandlerPlayer() and Duel.SelectYesNo(tp,aux.Stringid(98941056,7)) then
local ct=g1:GetClassCount(Card.GetCode)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g2:SelectSubGroup(tp,aux.dncheck,false,1,ct)
......@@ -76,6 +88,25 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
end
function s.descon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==e:GetHandlerPlayer()
end
function c98941056.stfilter(c,e,tp)
return c:IsSetCard(0x9d) and c:IsCanBeSpecialSummoned(e,POS_FACEDOWN_DEFENSE,tp,false,false)
end
function s.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local ssg=Duel.GetMatchingGroup(c98941056.stfilter,tp,LOCATION_HAND,0,nil,e,tp)
if chk==0 then return ft>=1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=1 and ssg:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98941056.stfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,g:GetFirst())
end
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,EFFECT_FLAG_OATH,1)
end
function c98941056.filter0(c)
return c:IsFaceup() and c:IsCanBeFusionMaterial()
end
......@@ -114,7 +145,6 @@ end
function c98941056.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local c=e:GetHandler()
if c:IsFacedown() or not c:IsOnField() then return end
local mg1=Duel.GetFusionMaterial(tp):Filter(c98941056.filter3,nil,e)
local mg2=Duel.GetMatchingGroup(c98941056.filter1,tp,0,LOCATION_MZONE,nil,e)
mg1:Merge(mg2)
......
......@@ -445,10 +445,10 @@
!setname 0xc30 炯眼(ブルズアイズ)
!setname 0xc31 三藏通(トリピタパス)
!setname 0xc32 灼经(ヒートラ)
!setname 0xcc30 权天尊主
!counter 0xcc30 权天尊主指示物
!setname 0xcd0 原生种(アインスト)
!setname 0xcd1 上位存在(メリオルエッセ)
!setname 0xce0 权天尊主(インペルード)
!counter 0xce0 权天尊主指示物
!setname 0xec1 フレンズ
!setname 0xfc1 人魂
......@@ -649,6 +649,10 @@
!setname 0x37fb 零一
!setname 0x47fb 亚克
#暗黑三王权 844685751 757 0xc30-0xc3f
!setname 0xc30 普利兹姆
!setname 0xc31 幻灵
#水镜
!setname 0xff0 契灵
!setname 0xff7 式神
......@@ -1195,6 +1199,7 @@
!setname 0x3224 天龙座
!setname 0x5224 海爬兽
!setname 0x9224 宝可·
!setname 0xa224 裂界
#Qwe.3359™
!counter 0x6371 蓄电指示物
......
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