Commit 6c22786a authored by Nemo Ma's avatar Nemo Ma

wild 0407

parent 6d517305
......@@ -1643,6 +1643,37 @@
130006111 0
151194046 0
192746535 0
7210002 0
7210007 0
7210012 0
7210013 0
7210014 0
7210015 0
7210016 0
7210018 0
11450001 0
14000198 0
14000199 0
43990062 0
43990063 0
43990064 0
43990065 0
43990066 0
43990067 0
43990068 0
53796195 0
60007144 0
7210001 0
7210003 0
7210004 0
7210005 0
7210006 0
7210008 0
7210009 0
7210010 0
7210011 0
7210017 0
98920227 0
#Semi-Wild 1003
31409200 0
31409201 0
......
No preview for this file type
--延时摄影
--2024.04.01
local tableclone=function(tab,mytab)
local res=mytab or {}
for i,v in pairs(tab) do res[i]=v end
return res
end
local _Duel=tableclone(Duel)
local _Effect=tableclone(Effect)
local c=Duel.GetFieldGroup(0,0xff,0xff):GetFirst()
if c then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_MOVE)
e1:SetRange(0xff)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetOperation(function(e)
_Duel.Hint(HINT_CARD,0,11450001)
_Duel.Hint=function() end
local ct=_Duel.GetTurnCount()
for _,ph in ipairs({PHASE_DRAW,PHASE_STANDBY,PHASE_MAIN1,PHASE_BATTLE,PHASE_MAIN2,PHASE_END}) do _Duel.SkipPhase(0,ph,RESET_PHASE+PHASE_END,1) end
local e1=_Effect.CreateEffect(c)
_Effect.SetType(e1,EFFECT_TYPE_FIELD)
_Effect.SetProperty(e1,EFFECT_FLAG_PLAYER_TARGET)
_Effect.SetCode(e1,EFFECT_SKIP_TURN)
_Effect.SetCondition(e1,function() return _Duel.GetTurnCount()>ct end)
_Effect.SetTargetRange(e1,1,1)
_Duel.RegisterEffect(e1,0)
end)
c:RegisterEffect(e1,true)
end
function c11450001.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_MOVE)
e1:SetRange(0xff)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetOperation(function(e)
_Duel.Hint(HINT_CARD,0,11450001)
_Duel.Hint=function() end
local ct=_Duel.GetTurnCount()
for _,ph in ipairs({PHASE_DRAW,PHASE_STANDBY,PHASE_MAIN1,PHASE_BATTLE,PHASE_MAIN2,PHASE_END}) do _Duel.SkipPhase(0,ph,RESET_PHASE+PHASE_END,1) end
local e1=_Effect.CreateEffect(c)
_Effect.SetType(e1,EFFECT_TYPE_FIELD)
_Effect.SetProperty(e1,EFFECT_FLAG_PLAYER_TARGET)
_Effect.SetCode(e1,EFFECT_SKIP_TURN)
_Effect.SetCondition(e1,function() return _Duel.GetTurnCount()>ct end)
_Effect.SetTargetRange(e1,1,1)
_Duel.RegisterEffect(e1,0)
end)
c:RegisterEffect(e1,true)
end
\ No newline at end of file
--世 间 万 物 的 破 坏 神
local m=43990067
local cm=_G["c"..m]
function cm.initial_effect(c)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c43990067.target)
e1:SetOperation(c43990067.activate)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
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:SetCondition(c43990067.thcon)
e2:SetTarget(c43990067.thtg)
e2:SetOperation(c43990067.thop)
c:RegisterEffect(e2)
end
function c43990067.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function c43990067.thfilter(c)
return c:IsCode(43990066) and c:IsAbleToHand()
end
function c43990067.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c43990067.thfilter,tp,LOCATION_DECK,0,1,nil) and c:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function c43990067.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c43990067.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and c:IsRelateToEffect(e) and c:IsAbleToHand() then
Group.AddCard(g,c)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c43990067.filter(c,e,tp)
return c:IsCode(43990066)
end
function c43990067.RitualCheck(g,tp,c)
return Duel.GetMZoneCount(tp,g,tp)>0
end
function c43990067.RitualUltimateFilter(c,filter,e,tp,m1,m2,chk)
if bit.band(c:GetType(),0x81)~=0x81 or (filter and not filter(c,e,tp,chk)) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
if m2 then
mg:Merge(m2)
end
if c.mat_filter then
mg=mg:Filter(c.mat_filter,c,tp)
else
mg:RemoveCard(c)
end
local res=mg:CheckSubGroup(c43990067.RitualCheck,1,99,tp,c)
return res
end
function c43990067.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg1=Duel.GetRitualMaterial(tp)
return Duel.IsExistingMatchingCard(c43990067.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,c43990067.filter,e,tp,mg1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c43990067.adfilter(c,f)
return math.max(f(c),0)
end
function c43990067.activate(e,tp,eg,ep,ev,re,r,rp)
::cancel::
local mg1=Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c43990067.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,c43990067.filter,e,tp,mg1,nil)
local tc=tg:GetFirst()
if tc then
local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat=mg:SelectSubGroup(tp,c43990067.RitualCheck,true,1,99,tp,tc)
if not mat then goto cancel end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(mat:GetSum(c43990067.adfilter,Card.GetTextAttack))
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetValue(mat:GetSum(c43990067.adfilter,Card.GetTextDefense))
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetValue(mat:GetSum(c43990067.adfilter,Card.GetLevel))
e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
tc:RegisterEffect(e3)
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
--神裁轮回 正理
function c7210001.initial_effect(c)
--link
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x6f8),1,1)
--splimit
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(c7210001.regcon)
e0:SetOperation(c7210001.regop)
c:RegisterEffect(e0)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(7210001,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,7210001)
e1:SetCondition(c7210001.setcon)
e1:SetCost(c7210001.setcost)
e1:SetTarget(c7210001.settg)
e1:SetOperation(c7210001.setop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(7210001,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,17210001)
e2:SetCondition(c7210001.spcon)
e2:SetCost(c7210001.cost)
e2:SetTarget(c7210001.sptg)
e2:SetOperation(c7210001.spop)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(7210001,2))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,27210001)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCondition(c7210001.drcon)
e3:SetCost(c7210001.cost)
e3:SetTarget(c7210001.drtg)
e3:SetOperation(c7210001.drop)
c:RegisterEffect(e3)
--summon count
Duel.AddCustomActivityCounter(7210001,ACTIVITY_SPSUMMON,c7210001.counterfilter)
end
function c7210001.counterfilter(c)
return c:IsSetCard(0x6f8)
end
function c7210001.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonLocation(LOCATION_EXTRA)
end
function c7210001.regop(e,tp,eg,ep,ev,re,r,rp)
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:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c7210001.exlimit)
Duel.RegisterEffect(e1,tp)
end
function c7210001.exlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsCode(7210001) and c:IsLocation(LOCATION_EXTRA)
end
function c7210001.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c7210001.cosfilter(c)
return c:IsSetCard(0x6f8) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function c7210001.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c7210001.cosfilter,tp,LOCATION_DECK,0,1,nil)
and c7210001.cost(e,tp,eg,ep,ev,re,r,rp,0) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c7210001.cosfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_COST)
end
c7210001.cost(e,tp,eg,ep,ev,re,r,rp,1)
end
function c7210001.setfilter(c,tp)
return c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x6f8) and not c:IsForbidden()
end
function c7210001.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c7210001.setfilter,tp,LOCATION_DECK,0,1,nil,tp) end
end
function c7210001.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c7210001.setfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end
end
function c7210001.lgfilter(c,lg,tp)
return c:IsSetCard(0x6f8) and c:IsSummonLocation(LOCATION_EXTRA) and lg:IsContains(c)
end
function c7210001.spcon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return eg:IsExists(c7210001.lgfilter,1,nil,lg,tp)
end
function c7210001.spfilter(c,e,tp)
return c:IsSetCard(0x6f8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c7210001.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c7210001.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE,e,tp)
end
function c7210001.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 tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c7210001.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end
end
function c7210001.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE)
end
function c7210001.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c7210001.drop(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.Draw(tp,1,REASON_EFFECT)
if not e:GetHandler():IsRelateToEffect(e) then return end
if d>0 then
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMING_SUMMON+TIMING_SPSUMMON+TIMING_SSET+TIMING_END_PHASE)
e1:SetCountLimit(1,37210001)
e1:SetCondition(c7210001.decon)
e1:SetCost(c7210001.decost)
e1:SetTarget(c7210001.detg)
e1:SetOperation(c7210001.deop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e:GetHandler():RegisterEffect(e1)
end
end
function c7210001.decon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function c7210001.decost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c7210001.detg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c7210001.deop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
function c7210001.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(7210001,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c7210001.smlimit)
e1:SetLabelObject(e)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e2)
end
function c7210001.smlimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x6f8)
end
--记忆源初 梦离
function c7210002.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(7210002,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,7210002)
e1:SetTarget(c7210002.thtg)
e1:SetOperation(c7210002.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(7210002,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,17210002)
e3:SetCondition(c7210002.setcon)
e3:SetOperation(c7210002.operation)
c:RegisterEffect(e3)
end
function c7210002.thfilter(c)
return c:IsSetCard(0x6f8) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToHand()
end
function c7210002.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c7210002.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c7210002.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c7210002.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c7210002.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER)
and re:GetHandler():IsSetCard(0x6f8)
end
function c7210002.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetOperation(c7210002.setop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c7210002.filter(c)
return c:IsSetCard(0x6f8) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsSSetable()
end
function c7210002.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,7210002)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c7210002.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SSet(tp,tc)
end
end
--神裁天幕 秩序
function c7210003.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,c7210003.matfilter1,c7210003.matfilter2,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST)
--counter
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(7210003,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,7210003)
e1:SetCondition(function(e)
return e:GetHandler():IsSummonLocation(LOCATION_EXTRA) end)
e1:SetTarget(c7210003.cttg)
e1:SetOperation(c7210003.ctop)
c:RegisterEffect(e1)
--counter and destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(7210003,0))
e2:SetCategory(CATEGORY_COUNTER+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,17210003)
e2:SetTarget(c7210003.cdtg)
e2:SetOperation(c7210003.cdop)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(7210003,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c7210003.decon)
e3:SetCost(c7210003.decost)
e3:SetTarget(c7210003.detg)
e3:SetOperation(c7210003.deop)
c:RegisterEffect(e3)
end
function c7210003.matfilter1(c)
return (c:IsFusionType(TYPE_FUSION) or c:IsFusionType(TYPE_SYNCHRO) or c:IsFusionType(TYPE_LINK) or c:IsFusionType(TYPE_XYZ)) and c:IsFusionSetCard(0x6f8)
end
function c7210003.matfilter2(c)
return c:IsFusionType(TYPE_MONSTER) and c:IsFusionSetCard(0x6f8)
end
function c7210003.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x16f8)
end
function c7210003.ctop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
e:GetHandler():AddCounter(0x16f8,1)
end
end
function c7210003.filter(c,tp)
return c:GetReasonPlayer()==1-tp
end
function c7210003.filter2(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetReasonPlayer()==1-tp
end
function c7210003.cdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c7210003.filter,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x16f8)
end
function c7210003.cdop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
e:GetHandler():AddCounter(0x16f8,1)
if eg:IsExists(c7210003.filter2,1,nil,tp) and Duel.IsExistingMatchingCard(aux.TURE,tp,0,LOCATION_ONFIELD,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end
end
function c7210003.decon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION),LOCATION_ONFIELD)~=0
end
function c7210003.decost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x16f8,1,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x16f8,1,REASON_COST)
end
function c7210003.detg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(aux.TURE,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TURE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c7210003.deop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--归世理清 秩序
function c7210004.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x6f8),2,true)
--special summon and to hand and to grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,7210004)
e1:SetCondition(c7210004.spcon)
e1:SetTarget(c7210004.sptg)
e1:SetOperation(c7210004.spop)
c:RegisterEffect(e1)
--To grave
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,17210004)
e2:SetCost(c7210004.tdcost)
e2:SetTarget(c7210004.tdtg)
e2:SetOperation(c7210004.tdop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetRange(LOCATION_REMOVED)
c:RegisterEffect(e3)
end
function c7210004.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c7210004.spfilter(c,e,sp)
return c:IsCanBeSpecialSummoned(e,0,sp,false,false) and c:IsSetCard(0x6f8)
end
function c7210004.cfilter(c)
return c:IsSetCard(0x6f8) and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function c7210004.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c7210004.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c7210004.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 sg=Duel.SelectMatchingCard(tp,c7210004.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if sg:GetCount()>0 then
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(c7210004.cfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(7210004,0)) then
local res=false
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c7210004.cfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
local tc=g:GetFirst()
if tc and tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
res=true
else
Duel.SendtoGrave(tc,REASON_EFFECT)
res=true
end
if res then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
if #g>0 then
Duel.BreakEffect()
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
end
end
end
function c7210004.tdcost(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 c7210004.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToDeck() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c7210004.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
--神裁双相 双生
function c7210005.initial_effect(c)
c:SetSPSummonOnce(7210005)
--xyz summon
aux.AddXyzProcedureLevelFree(c,aux.FilterBoolFunction(Card.IsSetCard,0x6f8),c7210005.xyzcheck,2,2,c7210005.ovfilter,aux.Stringid(7210005,0))
c:EnableReviveLimit()
--to grave or special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(c7210005.tg)
e1:SetOperation(c7210005.op)
c:RegisterEffect(e1)
--Special Summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c7210005.spcon)
e2:SetCost(c7210005.spcost)
e2:SetTarget(c7210005.sptg)
e2:SetOperation(c7210005.spop)
c:RegisterEffect(e2)
end
function c7210005.xyzcheck(g)
return g:GetClassCount(Card.GetLevel)==1
end
function c7210005.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x6f8) and c:IsSummonLocation(LOCATION_EXTRA)
end
function c7210005.spfilter(c,e,tp)
return c:IsSetCard(0x6f8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c7210005.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c7210005.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
if chk==0 then return b1 or b2 end
local off=1
local ops,opval={},{}
if b1 then
ops[off]=aux.Stringid(7210005,1)
opval[off]=0
off=off+1
end
if b2 then
ops[off]=aux.Stringid(7210005,2)
opval[off]=1
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))+1
local sel=opval[op]
e:SetLabel(sel)
if sel==0 then
e:SetCategory(CATEGORY_TOGRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_ONFIELD)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
end
function c7210005.op(e,tp,eg,ep,ev,re,r,rp)
local sel=e:GetLabel()
if sel==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
else
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c7210005.spfilter,tp,LOCATION_GRAVE,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 c7210005.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_DARK)
and e:GetHandler():GetOverlayGroup():IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_LIGHT)
end
function c7210005.spcost(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 c7210005.spfilter2(c,e,tp)
return c:IsSetCard(0x6f8) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c7210005.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c7210005.spfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c7210005.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(c7210005.spfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c7210005.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
function c7210005.aclimit(e,re,tp)
return not re:GetHandler():IsSetCard(0x6f8)
end
--神裁倾天 王者
function c7210006.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x6f8),2)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(7210006,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,7210006)
e1:SetCondition(c7210006.spcon)
e1:SetTarget(c7210006.sptg)
e1:SetOperation(c7210006.spop)
c:RegisterEffect(e1)
--special summon of self
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(7210006,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,17210006)
e2:SetTarget(c7210006.spstg)
e2:SetOperation(c7210006.spsop)
c:RegisterEffect(e2)
end
function c7210006.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c7210006.spfilter(c,e,tp)
return c:IsSetCard(0x6f8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c7210006.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c7210006.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c7210006.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c7210006.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c7210006.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(7210006,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_ADD_CODE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(7210018)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(1)
tc:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
tc:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e4)
local e5=e2:Clone()
e5:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e5:SetValue(c7210006.fuslimit)
tc:RegisterEffect(e5)
end
end
function c7210006.fuslimit(e,c,st)
return st==SUMMON_TYPE_FUSION
end
function c7210006.tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0x6f8) and c:IsType(TYPE_MONSTER) and not c:IsCode(7210018)
end
function c7210006.spstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c7210006.tgfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c7210006.tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
function c7210006.spsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(7210006,3))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_ADD_CODE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(7210018)
tc:RegisterEffect(e1)
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--希望幼体 夏因
function c7210007.initial_effect(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,7210007)
e1:SetCost(c7210007.thcost)
e1:SetTarget(c7210007.thtg)
e1:SetOperation(c7210007.thop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_RELEASE)
e2:SetCountLimit(1,17210007)
e2:SetTarget(c7210007.drtg)
e2:SetOperation(c7210007.drop)
c:RegisterEffect(e2)
end
function c7210007.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c7210007.thfilter(c)
return c:IsSetCard(0x6f8) and not c:IsCode(7210007) and c:IsLevelBelow(2) and c:IsAbleToHand()
end
function c7210007.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c7210007.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c7210007.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c7210007.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c7210007.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
function c7210007.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x6f8) and c:IsLocation(LOCATION_EXTRA)
end
function c7210007.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c7210007.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--神裁希望 夏因
function c7210008.initial_effect(c)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon rule
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(c7210008.sprcon)
e2:SetOperation(c7210008.sprop)
c:RegisterEffect(e2)
--equip
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,7210008)
e3:SetCondition(function(e)
return e:GetHandler():IsSummonLocation(LOCATION_EXTRA) end)
e3:SetTarget(c7210008.eqtg)
e3:SetOperation(c7210008.eqop)
c:RegisterEffect(e3)
--negate
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_NEGATE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,17210008)
e4:SetCondition(c7210008.negcon)
e4:SetCost(c7210008.negcost)
e4:SetTarget(aux.nbtg)
e4:SetOperation(c7210008.negop)
c:RegisterEffect(e4)
end
function c7210008.sprfilter(c)
return c:IsFaceup() and c:IsSetCard(0x6f8) and c:IsReleasable()
end
function c7210008.sprfilter1(c,tp,g,sc)
local lv=c:GetLevel()
return c:IsType(TYPE_TUNER) and g:IsExists(c7210008.sprfilter2,1,c,tp,c,sc,lv)
end
function c7210008.sprfilter2(c,tp,mc,sc,lv)
local sg=Group.FromCards(c,mc)
return c:IsLevel(lv) and not c:IsType(TYPE_TUNER)
and Duel.GetLocationCountFromEx(tp,tp,sg,sc)>0
end
function c7210008.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c7210008.sprfilter,tp,LOCATION_MZONE,0,nil)
return g:IsExists(c7210008.sprfilter1,1,nil,tp,g,c)
end
function c7210008.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c7210008.sprfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g1=g:FilterSelect(tp,c7210008.sprfilter1,1,1,nil,tp,g,c)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=g:FilterSelect(tp,c7210008.sprfilter2,1,1,mc,tp,mc,c,mc:GetLevel())
g1:Merge(g2)
Duel.Release(g1,REASON_COST)
end
function c7210008.eqfilter(c,tp)
return c:IsSetCard(0x6f8) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function c7210008.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c7210008.eqfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0)
end
function c7210008.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c7210008.eqfilter),tp,LOCATION_GRAVE,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
if Duel.Equip(tp,tc,c) then
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c7210008.eqlimit)
tc:RegisterEffect(e1)
end
end
end
function c7210008.eqlimit(e,c)
return e:GetOwner()==c
end
function c7210008.negcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipCount()>0 and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) and rp==1-tp
end
function c7210008.cfilter(c,rtype)
return c:IsType(rtype) and c:IsAbleToGraveAsCost()
end
function c7210008.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
local rtype=bit.band(re:GetActiveType(),0x7)
if chk==0 then return Duel.IsExistingMatchingCard(c7210008.cfilter,tp,LOCATION_HAND,0,1,nil,rtype) end
Duel.DiscardHand(tp,c7210008.cfilter,1,1,REASON_COST,nil,rtype)
end
function c7210008.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
--归墟噬神 薄伽丘
function c7210009.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,3,5,c7210009.lcheck)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(7210009,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetHintTiming(0,TIMING_SPSUMMON+TIMING_SUMMON+TIMING_MAIN_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,7210009)
e1:SetCondition(c7210009.tdcon)
e1:SetTarget(c7210009.tdtg)
e1:SetOperation(c7210009.tdop)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(7210009,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetCountLimit(1,17210009)
e2:SetTarget(c7210009.cttg)
e2:SetOperation(c7210009.ctop)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,27210009)
e3:SetCondition(c7210009.drcon)
e3:SetTarget(c7210009.drtg)
e3:SetOperation(c7210009.drop)
c:RegisterEffect(e3)
end
function c7210009.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x6f8)
end
function c7210009.tdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function c7210009.tdfilter(c)
return c:IsAbleToDeck() and c:IsSetCard(0x6f8)
end
function c7210009.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c7210009.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c7210009.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c7210009.tdfilter,tp,LOCATION_GRAVE,0,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c7210009.mfilter(c,tp)
local r=LOCATION_REASON_TOFIELD
if not c:IsControler(c:GetOwner()) then r=LOCATION_REASON_CONTROL end
return c:IsType(TYPE_MONSTER) and c:IsFaceupEx() and Duel.GetLocationCount(c:GetOwner(),LOCATION_SZONE,tp,r)>0
end
function c7210009.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 and Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0
and Duel.IsExistingMatchingCard(c7210009.mfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp)
and Duel.SelectYesNo(tp,aux.Stringid(7210009,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RESOLVECARD)
local tc=Duel.SelectMatchingCard(tp,c7210009.mfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst()
if not tc:IsImmuneToEffect(e)
and Duel.MoveToField(tc,tp,tc:GetOwner(),LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
end
function c7210009.filter(c)
return c:GetCounter(0)~=0
end
function c7210009.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c7210009.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
end
function c7210009.ctop(e,tp,eg,ep,ev,re,r,rp)
--Immune
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(7210009,4))
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e:GetHandler():RegisterEffect(e2)
--counter
local sg=Duel.GetMatchingGroup(c7210009.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local tc=sg:GetFirst()
local count=0
while tc do
count=count+tc:GetCounter(0x100e)
tc:RemoveCounter(tp,0,0,0)
tc=sg:GetNext()
end
if count>0 then
Duel.RaiseEvent(e:GetHandler(),EVENT_REMOVE_COUNTER+0x100e,e,REASON_EFFECT,tp,tp,count)
end
end
function c7210009.drcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x6f8) and re:GetHandler():IsOnField()
end
function c7210009.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c7210009.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)~=0 then
Duel.ShuffleHand(p)
Duel.BreakEffect()
Duel.DiscardHand(p,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
--神裁逆世 路因加德
function c7210010.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x6f8),2)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(7210010,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,7210010)
e1:SetCondition(c7210010.decon)
e1:SetTarget(c7210010.detg)
e1:SetOperation(c7210010.deop)
c:RegisterEffect(e1)
--lock
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(7210010,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,7210010)
e2:SetTarget(c7210010.target)
e2:SetOperation(c7210010.operation)
c:RegisterEffect(e2)
end
function c7210010.decon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c7210010.detg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c7210010.deop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
local gt=Duel.Destroy(sg,REASON_EFFECT)
if gt>0 then
Duel.BreakEffect()
local lp=Duel.GetLP(tp)
Duel.SetLP(tp,lp-gt*500)
local ct=Duel.GetOperatedGroup():FilterCount(Card.IsSetCard,nil,0x6f8)
if ct>0 and e:GetHandler():IsFaceup() and e:GetHandler():IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*400)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e:GetHandler():RegisterEffect(e1)
end
end
end
function c7210010.cfilter(c)
return c:IsFacedown() and c:GetSequence()<5
end
function c7210010.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_SZONE) and c7210010.cfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c7210010.cfilter,tp,0,LOCATION_SZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c7210010.cfilter,tp,0,LOCATION_SZONE,1,1,nil)
end
function c7210010.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(7210010,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e1)
end
end
--业炎幼体 无烬
function c7210011.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2,c7210011.lcheck)
c:EnableReviveLimit()
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(7210011,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,7210011)
e1:SetCondition(c7210011.tgcon)
e1:SetTarget(c7210011.tgtg)
e1:SetOperation(c7210011.tgop)
c:RegisterEffect(e1)
--fusion
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(7210011,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,17210011)
e2:SetTarget(c7210011.target)
e2:SetOperation(c7210011.activate)
c:RegisterEffect(e2)
end
function c7210011.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x6f8)
end
function c7210011.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c7210011.tgfilter(c)
return c:IsSetCard(0x6f8) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToGrave()
end
function c7210011.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c7210011.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c7210011.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c7210011.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c7210011.filter0(c,e)
return (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end
function c7210011.filter1(c,e,tp,m,f,chkf)
return (c:IsType(TYPE_FUSION) and c:IsSetCard(0x6f8) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)) and c:CheckFusionMaterial(m,nil,chkf)
end
function c7210011.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg=Duel.GetMatchingGroup(c7210011.filter0,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)
local res=Duel.IsExistingMatchingCard(c7210011.filter1,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 mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c7210011.filter1,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)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c7210011.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c7210011.filter0),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)
local sg1=Duel.GetMatchingGroup(c7210011.filter1,tp,LOCATION_EXTRA,0,nil,e,tp,mg,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(c7210011.filter1,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,mg,nil,chkf)
tc:SetMaterial(mat1)
aux.PlaceCardsOnDeckBottom(tp,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 c7210012.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(7210012,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,7210012)
e1:SetTarget(c7210012.thtg)
e1:SetOperation(c7210012.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--fusion
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(7210012,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_GRAVE_ACTION)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,17210012)
e3:SetTarget(c7210012.target)
e3:SetOperation(c7210012.activate)
c:RegisterEffect(e3)
end
function c7210012.thfilter(c)
return c:IsSetCard(0x6f8) and c:IsType(TYPE_MONSTER) and c:IsLevelBelow(4) and c:IsAbleToHand()
end
function c7210012.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c7210012.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c7210012.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c7210012.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 c7210012.filter0(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end
function c7210012.filter1(c,e,tp,m,f,chkf)
if not (c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)) then return false end
local res=c:CheckFusionMaterial(m,e:GetHandler(),chkf)
return res
end
function c7210012.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg=Duel.GetMatchingGroup(c7210012.filter0,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil,e)
local res=Duel.IsExistingMatchingCard(c7210012.filter1,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 mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c7210012.filter1,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 c7210012.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToChain() or c:IsImmuneToEffect(e) then return end
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c7210012.filter0),tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c7210012.filter1,tp,LOCATION_EXTRA,0,nil,e,tp,mg,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(c7210012.filter1,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,mg,e:GetHandler(),chkf)
tc:SetMaterial(mat1)
if mat1:IsExists(c7210012.fdfilter,1,nil) then
local cg=mat1:Filter(c7210012.fdfilter,nil)
Duel.ConfirmCards(1-tp,cg)
end
aux.PlaceCardsOnDeckBottom(tp,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,e:GetHandler(),chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c7210012.fdfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsFacedown() or c:IsLocation(LOCATION_HAND)
end
--神裁界 - 倒影之城
function c7210013.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(7210013,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,7210013)
e1:SetTarget(c7210013.sptg)
e1:SetOperation(c7210013.spop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(7210013,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,7210013)
e2:SetCondition(c7210013.decon)
e2:SetTarget(c7210013.detg)
e2:SetOperation(c7210013.deop)
c:RegisterEffect(e2)
end
function c7210013.tgfilter(c)
return c:IsSetCard(0x6f8) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c7210013.spfilter(c,e,tp)
return c:IsSetCard(0x6f8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c7210013.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(e:GetLabel()) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-1 then return false end
local loc=LOCATION_ONFIELD
if ft==0 then loc=LOCATION_MZONE end
e:SetLabel(loc)
return Duel.IsExistingTarget(c7210013.tgfilter,tp,loc,0,1,nil)
and Duel.IsExistingMatchingCard(c7210013.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c7210013.tgfilter,tp,e:GetLabel(),0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c7210013.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c7210013.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
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c7210013.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c7210013.splimit(e,c)
return not c:IsSetCard(0x6f8)
end
function c7210013.decfilter(c,tp)
return c:IsSetCard(0x6f8) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsPreviousPosition(POS_FACEUP) and c:GetReasonPlayer()==1-tp and not c:IsReason(REASON_RULE)
end
function c7210013.decon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c7210013.decfilter,1,nil,tp)
end
function c7210013.detg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c7210013.deop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--神裁权 - 三王鼎立
function c7210014.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,7210014)
e1:SetCondition(c7210014.condition)
e1:SetTarget(c7210014.target)
e1:SetOperation(c7210014.activate)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,7210014)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c7210014.detg)
e2:SetOperation(c7210014.deop)
c:RegisterEffect(e2)
end
function c7210014.filter(c)
return c:IsCode(7210018) and c:IsFaceup()
end
function c7210014.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c7210014.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c7210014.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove(tp) end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c7210014.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function c7210014.defilter(tp)
local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,7210006)
local g1=Group.CreateGroup()
if g:GetCount()>0 then
local tc=g:GetFirst()
while tc do
if tc:GetColumnGroup():GetCount()>0 then g1:Merge(tc:GetColumnGroup()) end
tc=g:GetNext()
end
end
return g1
end
function c7210014.detg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c7210014.defilter(tp):GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,c7210014.defilter(tp),c7210014.defilter(tp):GetCount(),0,0)
end
function c7210014.deop(e,tp,eg,ep,ev,re,r,rp)
if c7210014.defilter(tp):GetCount()>0 then
local g=c7210014.defilter(tp)
Duel.Destroy(g,REASON_EFFECT)
end
end
--神裁域 - 终焉领域
function c7210015.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(7210015,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,7210015)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCondition(c7210015.condition)
e1:SetTarget(c7210015.detg)
e1:SetOperation(c7210015.deop)
c:RegisterEffect(e1)
--limit
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(7210015,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,7210015)
e2:SetHintTiming(0,TIMING_TOGRAVE)
e2:SetCondition(c7210015.condition)
e2:SetTarget(c7210015.litg)
e2:SetOperation(c7210015.liop)
c:RegisterEffect(e2)
end
function c7210015.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c7210015.tdfilter(c)
return c:IsSetCard(0x6f8) and c:IsAbleToDeck()
end
function c7210015.detg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c7210015.tdfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c7210015.deop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c7210015.tdfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil):GetFirst()
if tg then
if tg:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,tg)
end
if Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.Destroy(dg,REASON_EFFECT)
end
end
end
function c7210015.litg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=Duel.GetMatchingGroupCount(Card.IsSetCard,tp,LOCATION_MZONE,0,nil,0x6f8)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) end
if chk==0 then return ct>0 and Duel.IsExistingTarget(Card.IsType,tp,0,LOCATION_GRAVE,1,nil,TYPE_MONSTER) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsType,tp,0,LOCATION_GRAVE,1,ct,nil,TYPE_MONSTER)
end
function c7210015.liop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetTarget(c7210015.sumlimit)
e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_MSET)
Duel.RegisterEffect(e3,tp)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetValue(c7210015.aclimit)
Duel.RegisterEffect(e4,tp)
tc=g:GetNext()
end
end
function c7210015.sumlimit(e,c)
return c:IsCode(e:GetLabel())
end
function c7210015.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel()) and re:IsActiveType(TYPE_MONSTER)
end
--善恶幼体 双生
function c7210016.initial_effect(c)
--attribute dark
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_ADD_ATTRIBUTE)
e0:SetRange(0xff+LOCATION_OVERLAY)
e0:SetValue(ATTRIBUTE_DARK)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,7210016)
e1:SetCondition(c7210016.spcon)
e1:SetCost(c7210016.spcost)
e1:SetTarget(c7210016.sptg)
e1:SetOperation(c7210016.spop)
c:RegisterEffect(e1)
--material
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,17210016)
e2:SetCondition(c7210016.macon)
e2:SetTarget(c7210016.matg)
e2:SetOperation(c7210016.maop)
c:RegisterEffect(e2)
--Immune
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(7210016,2))
e3:SetType(EFFECT_TYPE_XMATERIAL)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetValue(aux.indoval)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e5:SetValue(1)
c:RegisterEffect(e5)
--count
Duel.AddCustomActivityCounter(7210016,ACTIVITY_SPSUMMON,c7210016.counterfilter)
end
function c7210016.counterfilter(c)
return c:IsSetCard(0x6f8)
end
function c7210016.cfilter(c)
return c:IsFacedown() or c:IsSetCard(0x6f8)
end
function c7210016.spcon(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)
return ct==Duel.GetMatchingGroupCount(c7210016.cfilter,tp,LOCATION_ONFIELD,0,nil)
end
function c7210016.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(7210016,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c7210016.splimit)
Duel.RegisterEffect(e1,tp)
end
function c7210016.splimit(e,c)
return not c:IsSetCard(0x6f8)
end
function c7210016.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
e:GetHandler():RegisterFlagEffect(7210016,RESET_EVENT+RESET_CHAIN,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c7210016.thfilter(c)
return c:IsSetCard(0x6f8) and c:IsAbleToHand()
end
function c7210016.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(c7210016.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(7210016,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c7210016.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if tc:IsType(TYPE_MONSTER) and tc:IsLevelBelow(4) and tc:IsLocation(LOCATION_HAND) and Duel.SelectYesNo(tp,aux.Stringid(7210016,1)) then
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
function c7210016.tgfilter(c,e,tp,eg)
return c:IsFaceup() and c:IsCanBeEffectTarget(e) and c:IsControler(tp) and eg:IsContains(c) and c:IsType(TYPE_XYZ) and c:IsSummonType(SUMMON_TYPE_XYZ)
end
function c7210016.macon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c7210016.tgfilter,1,nil,e,tp,eg)
end
function c7210016.matg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and eg:IsContains(chkc) end
if chk==0 then return eg:IsExists(c7210016.tgfilter,1,nil,e,tp,eg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c7210016.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,eg)
end
function c7210016.maop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c))
end
end
--神裁食炎 无烬
function c7210017.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,c7210017.matfilter1,c7210017.matfilter2,true)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(7210017,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMING_BATTLE_START)
e1:SetCountLimit(1,7210017)
e1:SetCondition(c7210017.decon)
e1:SetTarget(c7210017.detg)
e1:SetOperation(c7210017.deop)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c7210017.tgcon)
e2:SetValue(aux.imval1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function c7210017.matfilter1(c)
return c:IsFusionAttribute(ATTRIBUTE_FIRE) and c:IsFusionSetCard(0x6f8)
end
function c7210017.matfilter2(c)
return c:IsFusionType(TYPE_MONSTER) and c:IsFusionSetCard(0x6f8)
end
function c7210017.decon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)
end
function c7210017.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x6f8)
end
function c7210017.detg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c7210017.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetChainLimit(c7210017.chainlm)
end
function c7210017.chainlm(e,rp,tp)
return tp==rp
end
function c7210017.deop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c7210017.cfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if ct>0 and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:Select(tp,1,ct,nil)
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end
function c7210017.tgfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO)
end
function c7210017.tgcon(e)
return Duel.IsExistingMatchingCard(c7210017.tgfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment