Commit f5dfe160 authored by POLYMER's avatar POLYMER

update 240513 partB

parent 5a682a89
...@@ -5872,6 +5872,14 @@ ...@@ -5872,6 +5872,14 @@
21411007 0 21411007 0
130918820 0 130918820 0
131584217 0 131584217 0
57300210 0
57300219 0
7485071 0
7485073 0
7485074 0
7485075 0
7485081 0
7485083 0
#limit #limit
33403513 1 33403513 1
82204250 0 82204250 0
......
No preview for this file type
No preview for this file type
expansions/pics/11500100.jpg

16.2 KB | W: | H:

expansions/pics/11500100.jpg

54.8 KB | W: | H:

expansions/pics/11500100.jpg
expansions/pics/11500100.jpg
expansions/pics/11500100.jpg
expansions/pics/11500100.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11579812.jpg

19 KB | W: | H:

expansions/pics/11579812.jpg

16 KB | W: | H:

expansions/pics/11579812.jpg
expansions/pics/11579812.jpg
expansions/pics/11579812.jpg
expansions/pics/11579812.jpg
  • 2-up
  • Swipe
  • Onion skin
...@@ -143,7 +143,11 @@ function c11500100.ovop(e,tp,eg,ep,ev,re,r,rp) ...@@ -143,7 +143,11 @@ function c11500100.ovop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,11500100) Duel.Hint(HINT_CARD,0,11500100)
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(11500100,2)) Duel.Hint(HINT_MESSAGE,0,aux.Stringid(11500100,2))
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(11500100,2)) Duel.Hint(HINT_MESSAGE,1,aux.Stringid(11500100,2))
Duel.Overlay(c,bc) local og=bc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(c,bc)
end end
function c11500100.xovtg(e,tp,eg,ep,ev,re,r,rp,chk) function c11500100.xovtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsCanOverlay,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,e:GetHandler()) local g=Duel.GetMatchingGroup(Card.IsCanOverlay,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,e:GetHandler())
......
...@@ -25,14 +25,20 @@ function c11560702.initial_effect(c) ...@@ -25,14 +25,20 @@ function c11560702.initial_effect(c)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetValue(1) e1:SetValue(1)
e1:SetCondition(c11560702.actcon) e1:SetCondition(c11560702.actcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) --Disable
e1:SetCode(EFFECT_DISABLE) local e13=Effect.CreateEffect(c)
e1:SetRange(LOCATION_MZONE) e13:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetTargetRange(0,LOCATION_ONFIELD) e13:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c11560702.actcon) e13:SetRange(LOCATION_MZONE)
c:RegisterEffect(e1) e13:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e13:SetCondition(c11560702.discon)
e13:SetOperation(c11560702.disop)
c:RegisterEffect(e13)
local e14=e13:Clone()
e14:SetCode(EVENT_BE_BATTLE_TARGET)
c:RegisterEffect(e14)
--double --double
--local e2=Effect.CreateEffect(c) --local e2=Effect.CreateEffect(c)
--e2:SetCategory(CATEGORY_ATKCHANGE) --e2:SetCategory(CATEGORY_ATKCHANGE)
...@@ -154,6 +160,37 @@ function c11560702.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -154,6 +160,37 @@ function c11560702.desop(e,tp,eg,ep,ev,re,r,rp)
end end
function c11560702.ddcon(e,c)
return Duel.GetFlagEffect(tp,11560702)>0
end
function c11560702.discon(e,tp,eg,ep,ev,re,r,rp)
local c=Duel.GetAttackTarget()
if not c then return false end
if c:IsControler(1-tp) then c=Duel.GetAttacker() end
return c and c==e:GetHandler()
end
function c11560702.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_ONFIELD,c)
local tc=g:GetFirst()
while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE)
tc:RegisterEffect(e1)
if tc:IsType(TYPE_TRAPMONSTER) then
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_TRAPMONSTER)
tc:RegisterEffect(e2)
end
tc=g:GetNext()
end
end
......
--无限暗影 拉比艾尔
local m=11561046
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,11561046)
aux.EnableChangeCode(c,11561046,LOCATION_MZONE+LOCATION_GRAVE)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,11571046)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c11561046.thtg)
e1:SetOperation(c11561046.thop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,11561046)
e2:SetCost(c11561046.spcost)
e2:SetTarget(c11561046.sptarget)
e2:SetOperation(c11561046.spoperation)
c:RegisterEffect(e2)
end
function c11561046.thfilter(c)
return (c:IsCode(6007213,32491822,69890967) or (aux.IsCodeListed(c,6007213) or aux.IsCodeListed(c,32491822) or aux.IsCodeListed(c,69890967))) and not c:IsCode(11561046) and c:IsAbleToHand()
end
function c11561046.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11561046.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11561046.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11561046.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 c11561046.gcheck(g,e,tp)
return g:IsContains(e:GetHandler()) and Duel.GetMZoneCount(tp,g)>0
end
function c11561046.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_ONFIELD,0,nil)
if chk==0 then return g:CheckSubGroup(c11561046.gcheck,3,3,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:SelectSubGroup(tp,c11561046.gcheck,false,3,3,e,tp)
Duel.Release(sg,REASON_COST)
end
function c11561046.spfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsCode(6007213,32491822,69890967) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c11561046.sptarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11561046.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c11561046.spoperation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c11561046.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
--暴 风 之 翼 公 主 ·怜
local m=11561047
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableCounterPermit(0x1)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(c11561047.xyzcondition)
e1:SetTarget(c11561047.xyztarget)
e1:SetOperation(c11561047.XyzOperation)
e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1)
--dest
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_COUNTER+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,11561047+EFFECT_COUNT_CODE_DUEL)
e2:SetCondition(c11561047.cdtcon)
e2:SetTarget(c11561047.cdttg)
e2:SetOperation(c11561047.cdtop)
c:RegisterEffect(e2)
--summon success
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetCondition(c11561047.regcon)
e5:SetOperation(c11561047.regop)
c:RegisterEffect(e5)
--material check
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(c11561047.valcheck)
e3:SetLabelObject(e5)
c:RegisterEffect(e3)
--immune
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c11561047.effcon)
e4:SetValue(1)
c:RegisterEffect(e4)
--cannot be target
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e6:SetRange(LOCATION_MZONE)
e6:SetCondition(c11561047.effcon)
e6:SetValue(aux.imval1)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e7:SetValue(1)
c:RegisterEffect(e7)
end
function c11561047.mfilter(g)
return g:GetClassCount(Card.GetRace)>2
end
function c11561047.valcheck(e,c)
local g=c:GetMaterial()
if g:CheckSubGroup(c11561047.mfilter,3,3) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c11561047.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and e:GetLabel()==1
end
function c11561047.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(11561047,RESET_EVENT+RESETS_STANDARD,0,1)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11561047,1))
end
function c11561047.effcon(e)
return e:GetHandler():GetFlagEffect(11561047)>0
end
function c11561047.cdtcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c11561047.cdttg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()c:GetOverlayCount()
local ct=c:GetOverlayCount()
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,ct,0,0x1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,0)
end
function c11561047.cdtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local og=c:GetOverlayGroup()
if og:GetCount()==0 then return end
local ct=Duel.SendtoGrave(og,REASON_EFFECT)
if ct>0 then
c:AddCounter(0x1,ct)
if Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,ct,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
local cct=Duel.Destroy(g,REASON_EFFECT)
if cct>0 then
Duel.Draw(tp,cct,REASON_EFFECT)
end
end
end
end
end
end
function c11561047.xyzcheck(g,tp,xyzc)
return g:GetClassCount(Card.GetOriginalLevel)==1 and g:IsExists(Card.IsLevelAbove,1,nil,1) and Duel.GetLocationCountFromEx(tp,tp,g,xyzc)>0
end
function c11561047.xyzcondition(e,c,og,min,max)
if c==nil then return true end
local tp=c:GetControler()
local mg
if og then
mg=og
else
mg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
end
local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL)
if sg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(sg)
Auxiliary.GCheckAdditional=Auxiliary.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X)
local res=mg:CheckSubGroup(c11561047.xyzcheck,3,99,tp,c)
Auxiliary.GCheckAdditional=nil
return res
end
function c11561047.xyztarget(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max)
local mg=nil
local mg2=nil
local g=nil
if og then
mg=og
else
mg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
end
local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL)
Duel.SetSelectedCard(sg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
Auxiliary.GCheckAdditional=Auxiliary.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X)
g=mg:SelectSubGroup(tp,c11561047.xyzcheck,cancel,3,99,tp,c)
Auxiliary.GCheckAdditional=nil
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
function c11561047.XyzOperation(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
local mg=nil
if og then
mg=og
else
mg=e:GetLabelObject()
local sg=Group.CreateGroup()
local tc=mg:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=mg:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
end
c:SetMaterial(mg)
Duel.Overlay(c,mg)
mg:DeleteGroup()
end
--裁决之雷 依里
local m=11561048
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableCounterPermit(0x1)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_ZOMBIE+RACE_FIEND),2,4)
c:EnableReviveLimit()
--count
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,11561048)
e1:SetCondition(c11561048.ctcon)
e1:SetTarget(c11561048.cttg)
e1:SetOperation(c11561048.ctop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11561048,0))
e2:SetCategory(CATEGORY_COUNTER+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,11571048)
e2:SetCost(c11561048.ctcost2)
e2:SetTarget(c11561048.cttg2)
e2:SetOperation(c11561048.ctop2)
c:RegisterEffect(e2)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11561048,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetCountLimit(1)
e3:SetCost(c11561048.decost)
e3:SetTarget(c11561048.detg)
e3:SetOperation(c11561048.deop)
c:RegisterEffect(e3)
end
function c11561048.decost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x1,3,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x1,3,REASON_COST)
end
function c11561048.detg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) and Duel.GetLP(tp)<6001) or (Duel.IsExistingMatchingCard(c11561048.ssqfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLP(tp)<4001) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,nil,1-tp,LOCATION_ONFIELD)
end
function c11561048.ssqfilter(c)
return c:GetSequence()>4
end
function c11561048.deop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local off=1
local ops={}
local opval={}
if Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) and Duel.GetLP(tp)<6001 then
ops[off]=aux.Stringid(11561048,3)
opval[off-1]=1
off=off+1
end
if (Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) or Duel.IsExistingMatchingCard(c11561048.ssqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)) and Duel.GetLP(tp)<4001 then
ops[off]=aux.Stringid(11561048,4)
opval[off-1]=2
off=off+1
end
if Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) and Duel.GetLP(tp)<2001 then
ops[off]=aux.Stringid(11561048,5)
opval[off-1]=3
off=off+1
end
if off==1 then return end
local op=Duel.SelectOption(tp,table.unpack(ops))
if opval[op]==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
elseif opval[op]==2 then
local filter=0
for i=0,15 do
if not Duel.IsExistingMatchingCard(c11561048.seqfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,i,tp) then
filter=filter|1<<(i+16)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local flag=Duel.SelectField(tp,1,0,LOCATION_ONFIELD,filter)
Duel.Hint(HINT_ZONE,tp,flag)
local seq=math.log(flag>>16,2)
local dg=Duel.GetMatchingGroup(c11561048.seqfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,seq,tp)
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
elseif opval[op]==3 then
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
end
function c11561048.exmzfilter(c,seq)
return (c:GetControler()==tp and c:GetSequence()==seq) or (c:GetControler()~=tp and c:GetSequence()==11-seq)
end
function c11561048.seqfilter(c,seq,tp)
local loc=LOCATION_MZONE
if seq>=8 then
loc=LOCATION_SZONE
seq=seq-8
end
if seq>=5 and loc==LOCATION_SZONE then return false end
if seq==7 and loc==LOCATION_MZONE then return false end
local cseq=c:GetSequence()
local cloc=c:GetLocation()
if cloc==LOCATION_SZONE and cseq>=5 then return false end
if c:GetControler()==tp and cseq<=4 then return false end
if cloc==LOCATION_MZONE and cseq>=5 and loc==LOCATION_MZONE
and ((c:GetControler()~=tp and (seq==1 and cseq==5 or seq==3 and cseq==6 or seq==cseq)) or (c:GetControler()==tp and (seq==1 and cseq==6 or seq==3 and cseq==5))) then return true end
if cloc==LOCATION_MZONE and seq>=5 and loc==LOCATION_MZONE and Duel.IsExistingMatchingCard(c11561048.exmzfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,seq) then
return (c:GetControler()~=tp and (seq==5 and cseq==1 or seq==6 and cseq==3)) or (c:GetControler()==tp and (seq==5 and cseq==3) or (seq==6 and cseq==1))
end
return (c:GetControler()~=tp and (cseq==seq or seq<5 and cseq<5 and cloc==loc and math.abs(cseq-seq)==1)) or (c:GetControler()==tp and seq>=5 and ((seq==5 and cseq==3) or (seq==6 and cseq==1)))
end
function c11561048.ctcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
e:SetLabel(100)
return true
end
end
function c11561048.cttg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return false end
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return c:GetLinkedGroupCount()>0 and Duel.CheckLPCost(tp,c:GetLinkedGroupCount()*2000,true)
end
Duel.PayLPCost(tp,c:GetLinkedGroupCount()*2000,true)
e:SetLabel(c:GetLinkedGroupCount())
end
function c11561048.ctop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
c:AddCounter(0x1,e:GetLabel())
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(e:GetLabel()*2000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
function c11561048.ctcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and e:GetHandler():GetMaterialCount()>0
end
function c11561048.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,e:GetHandler():GetMaterialCount(),0,0x1)
end
function c11561048.ctop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
e:GetHandler():AddCounter(0x1,e:GetHandler():GetMaterialCount())
end
end
\ No newline at end of file
...@@ -64,7 +64,7 @@ function c11579812.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +64,7 @@ function c11579812.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
local aaa=math.ceil(math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))/2) local aaa=math.ceil(math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))/2)
if tc:GetAttack()<aaa then if tc:GetAttack()<aaa or Duel.GetFlagEffect(tp,11580812)>1 then
Duel.Remove(tc,POS_FACEDOWN,REASON_RULE,1-tp) Duel.Remove(tc,POS_FACEDOWN,REASON_RULE,1-tp)
else else
if Duel.Destroy(tc,REASON_EFFECT)~=0 then if Duel.Destroy(tc,REASON_EFFECT)~=0 then
...@@ -109,6 +109,7 @@ function c11579812.damval1(e,re,val,r,rp,rc) ...@@ -109,6 +109,7 @@ function c11579812.damval1(e,re,val,r,rp,rc)
return val*2 return val*2
end end
return val return val
Duel.RegisterFlagEffect(tp,11580812,RESET_PHASE+PHASE_END,0,1)
end end
......
--神金像的神智
local s,id,o=GetID()
local m=id
local cm=_G["c"..m]
cm.named_with_God_Gold=1
function cm.God_Gold(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_God_Gold
end
function cm.initial_effect(c)
c:EnableReviveLimit()
--ritual level
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_RITUAL_LEVEL)
e0:SetValue(cm.rlevel)
c:RegisterEffect(e0)
--send replace
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT_CB)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(cm.repcon)
e1:SetOperation(cm.repop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.thcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.rlevel(e,c)
local lv=aux.GetCappedLevel(e:GetHandler())
return (7<<16)+lv
end
function cm.repcon(e)
local c=e:GetHandler()
return not c:IsLocation(LOCATION_SZONE)
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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+0x1fc0000)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
Duel.RaiseEvent(c,EVENT_CUSTOM+47408488,e,0,tp,0,0)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return --e:GetHandler():IsDiscardable()
e:GetHandler():IsReleasable()
end
Duel.Release(e:GetHandler(),REASON_COST)
--Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function cm.thfilter(c)
return cm.God_Gold(c) 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
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 s,id,o=GetID()
local m=id
local cm=_G["c"..m]
cm.named_with_God_Gold=1
function cm.God_Gold(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_God_Gold
end
function cm.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e01=Effect.CreateEffect(c)
e01:SetType(EFFECT_TYPE_FIELD)
e01:SetCode(EFFECT_SPSUMMON_PROC)
e01:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e01:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e01:SetValue(SUMMON_TYPE_RITUAL)
e01:SetCondition(cm.spcon)
e01:SetOperation(cm.spcop)
c:RegisterEffect(e01)
--special summon
local e02=Effect.CreateEffect(c)
e02:SetDescription(aux.Stringid(m,0))
e02:SetCategory(CATEGORY_SPECIAL_SUMMON)
e02:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e02:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e02:SetCode(EVENT_TO_GRAVE)
e02:SetCountLimit(1,m)
e02:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ge1=Effect.CreateEffect(e:GetHandler())
ge1:SetDescription(aux.Stringid(m,5))
ge1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
ge1:SetType(EFFECT_TYPE_SINGLE)
local ge01=Effect.CreateEffect(e:GetHandler())
ge01:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
ge01:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
ge01:SetTargetRange(0xff,0)
ge01:SetTarget(function(e,c)
return c:IsCode(7485073)
end)
ge01:SetLabelObject(ge1)
Duel.RegisterEffect(ge01,tp)
--if tp then Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) Debug.Message("0") end
--if e:GetHandlerPlayer() then Duel.RegisterFlagEffect(e:GetHandlerPlayer(),m,RESET_PHASE+PHASE_END,0,1) Debug.Message("1") end
--Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end)
e02:SetTarget(cm.target)
e02:SetOperation(cm.operation)
c:RegisterEffect(e02)
--hint
--local e03=Effect.CreateEffect(c)
--e03:SetDescription(aux.Stringid(m,5))
--e03:SetProperty(EFFECT_FLAG_CLIENT_HINT)
--e03:SetType(EFFECT_TYPE_SINGLE)
--e03:SetRange(0xff)
--[[e03:SetCondition(function(e)
Debug.Message("2")
if Duel.GetFlagEffect(e:GetHandlerPlayer(),m)>0 then Debug.Message("3") end
return Duel.GetFlagEffect(e:GetHandlerPlayer(),m)>0
end)]]
--c:RegisterEffect(e03)
--special summon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e5:SetCost(cm.spcost)
e5:SetTarget(cm.sptg)
e5:SetOperation(cm.spop)
c:RegisterEffect(e5)
--search
local e6=e5:Clone()
e6:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e6:SetDescription(aux.Stringid(m,2))
e6:SetCost(cm.thcost)
e6:SetTarget(cm.thtg)
e6:SetOperation(cm.thop)
c:RegisterEffect(e6)
end
function cm.lv(c)
return 7
end
function cm.spcfilter(c,e,tp)
return c==e:GetHandler()
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local m1=Duel.GetRitualMaterial(tp)
if bit.band(c:GetType(),0x81)~=0x81 or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
mg:RemoveCard(c)
aux.GCheckAdditional=aux.RitualCheckAdditional(c,8,"Greater")
local res=mg:CheckSubGroup(aux.RitualCheck,1,8,tp,c,8,"Greater")
aux.GCheckAdditional=nil
return res
--return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,cm.spcfilter,e,tp,mg,nil,cm.lv,"Greater")
end
function cm.spcop(e,tp,eg,ep,ev,re,r,rp,c)
--::cancel::
local c=e:GetHandler()
if not c then return false end
local mg=Duel.GetRitualMaterial(tp)
mg:RemoveCard(c)
if c then
local mg=mg:Filter(Card.IsCanBeRitualMaterial,c,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(c,8,"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,8,tp,c,8,"Greater")
aux.GCheckAdditional=nil
--if not mat then goto cancel end
c:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
end
end
function cm.hintfilter(c,id)
return c:GetOriginalCode()==id
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(cm.hintfilter,tp,0xff,0,nil,m)
for tc in aux.Next(g) do
tc:RegisterFlagEffect(0,RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,5))
end
end
function cm.filter(c,e,sp)
return c:IsFaceup() and cm.God_Gold(c) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,sp,false,true)
end
function cm.filter2(c,e,sp)
return c:IsCode(7485071) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,sp,false,true)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) or Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp))
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
--[[local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local gct=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_SZONE,0,nil,e,tp)
if ct>gct then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,gct,tp,LOCATION_SZONE)
else
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ct,tp,LOCATION_SZONE)
end]]
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_SZONE+LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE)
end
function cm.gcheck(g)
if g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE)>0 then
return g:FilterCount(Card.IsLocation,nil,LOCATION_SZONE)<=0 and g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE)<=1
end
if g:FilterCount(Card.IsLocation,nil,LOCATION_SZONE)>0 then
return g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE)<=0
end
return g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local g1=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_SZONE,0,nil,e,tp)
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.filter2),tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
local g=Group.__add(g1,g2)
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,cm.gcheck,false,1,ct)
Duel.SpecialSummon(sg,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
--[[if gc<=ct then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,ct,ct,nil)
Duel.SpecialSummon(sg,SUMMON_TYPE_RITUAL,tp,tp,false,false,POS_FACEUP)
end]]
end
function cm.costfilter(c,tp)
return cm.God_Gold(c) and c:IsAbleToGraveAsCost() and ((c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) or (c:IsLocation(LOCATION_ONFIELD) and Duel.GetMZoneCount(tp,c)>0))
end
function cm.costfilter2(c)
return cm.God_Gold(c) and c:IsAbleToGraveAsCost()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp) end
--Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.Release(g,REASON_COST)
--Duel.SendtoGrave(g,REASON_COST)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.thfilter(c)
return --c:IsType(TYPE_SPELL+TYPE_TRAP) and
cm.God_Gold(c) 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.spfilter(c,e,tp)
return cm.God_Gold(c) and not c:IsCode(m) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)
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,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
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,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
end
end
--创圣魔导王的神金像
local s,id,o=GetID()
local m=id
local cm=_G["c"..m]
cm.named_with_God_Gold=1
function cm.God_Gold(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_God_Gold
end
function cm.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e01=Effect.CreateEffect(c)
e01:SetType(EFFECT_TYPE_FIELD)
e01:SetCode(EFFECT_SPSUMMON_PROC)
e01:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e01:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e01:SetValue(SUMMON_TYPE_RITUAL)
e01:SetCondition(cm.spcon)
e01:SetOperation(cm.spcop)
c:RegisterEffect(e01)
--special summon
local e02=Effect.CreateEffect(c)
e02:SetDescription(aux.Stringid(m,0))
e02:SetCategory(CATEGORY_SPECIAL_SUMMON)
e02:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e02:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e02:SetCode(EVENT_TO_GRAVE)
e02:SetCountLimit(1,m)
e02:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ge1=Effect.CreateEffect(e:GetHandler())
ge1:SetDescription(aux.Stringid(m,5))
ge1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
ge1:SetType(EFFECT_TYPE_SINGLE)
local ge01=Effect.CreateEffect(e:GetHandler())
ge01:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
ge01:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
ge01:SetTargetRange(0xff,0)
ge01:SetTarget(function(e,c)
return c:IsCode(7485074)
end)
ge01:SetLabelObject(ge1)
Duel.RegisterEffect(ge01,tp)
end)
e02:SetTarget(cm.target)
e02:SetOperation(cm.operation)
c:RegisterEffect(e02)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.negcon)
e2:SetCost(cm.GGcost)
e2:SetTarget(cm.negtg)
e2:SetOperation(cm.negop)
c:RegisterEffect(e2)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCondition(cm.thcon)
e4:SetTarget(cm.thtg)
e4:SetOperation(cm.thop)
c:RegisterEffect(e4)
--[[--destroy
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,0))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetTarget(cm.destg)
e5:SetOperation(cm.desop)
c:RegisterEffect(e5)
--search
local e6=e5:Clone()
e6:SetCategory(CATEGORY_TOHAND)
e6:SetDescription(aux.Stringid(m,1))
e6:SetTarget(cm.thtg)
e6:SetOperation(cm.thop)
c:RegisterEffect(e6)]]
end
function cm.lv(c)
return 7
end
function cm.spcfilter(c,e,tp)
return c==e:GetHandler()
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local m1=Duel.GetRitualMaterial(tp)
if bit.band(c:GetType(),0x81)~=0x81 or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
mg:RemoveCard(c)
aux.GCheckAdditional=aux.RitualCheckAdditional(c,8,"Greater")
local res=mg:CheckSubGroup(aux.RitualCheck,1,8,tp,c,8,"Greater")
aux.GCheckAdditional=nil
return res
end
function cm.spcop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
if not c then return false end
local mg=Duel.GetRitualMaterial(tp)
mg:RemoveCard(c)
if c then
local mg=mg:Filter(Card.IsCanBeRitualMaterial,c,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(c,8,"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,8,tp,c,8,"Greater")
aux.GCheckAdditional=nil
c:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
end
end
function cm.hintfilter(c,id)
return c:GetOriginalCode()==id
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(cm.hintfilter,tp,0xff,0,nil,m)
for tc in aux.Next(g) do
tc:RegisterFlagEffect(0,RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,5))
end
end
function cm.filter(c,e,sp)
return c:IsFaceup() and cm.God_Gold(c) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,sp,false,true)
end
function cm.filter2(c,e,sp)
return c:IsCode(7485071) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,sp,false,true)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) or Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp))
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_SZONE+LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE)
end
function cm.gcheck(g)
if g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE)>0 then
return g:FilterCount(Card.IsLocation,nil,LOCATION_SZONE)<=0 and g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE)<=1
end
if g:FilterCount(Card.IsLocation,nil,LOCATION_SZONE)>0 then
return g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE)<=0
end
return g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local g1=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_SZONE,0,nil,e,tp)
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.filter2),tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
local g=Group.__add(g1,g2)
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,cm.gcheck,false,1,ct)
Duel.SpecialSummon(sg,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
end
function cm.costfilter(c)
return cm.God_Gold(c) and c:IsAbleToGraveAsCost()
end
function cm.GGcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION)
and (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT)))
and c:IsPreviousPosition(POS_FACEUP)
end
function cm.thfilter1(c)
return c:GetType()==TYPE_SPELL and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter1,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.thfilter1,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
This diff is collapsed.
--奥金魔导师的神金像
local s,id,o=GetID()
local m=id
local cm=_G["c"..m]
cm.named_with_God_Gold=1
function cm.God_Gold(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_God_Gold
end
function cm.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e01=Effect.CreateEffect(c)
e01:SetType(EFFECT_TYPE_FIELD)
e01:SetCode(EFFECT_SPSUMMON_PROC)
e01:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e01:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e01:SetValue(SUMMON_TYPE_RITUAL)
e01:SetCondition(cm.spcon)
e01:SetOperation(cm.spcop)
c:RegisterEffect(e01)
--special summon
local e02=Effect.CreateEffect(c)
e02:SetDescription(aux.Stringid(m,0))
e02:SetCategory(CATEGORY_SPECIAL_SUMMON)
e02:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e02:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e02:SetCode(EVENT_TO_GRAVE)
e02:SetCountLimit(1,m)
e02:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ge1=Effect.CreateEffect(e:GetHandler())
ge1:SetDescription(aux.Stringid(m,5))
ge1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
ge1:SetType(EFFECT_TYPE_SINGLE)
local ge01=Effect.CreateEffect(e:GetHandler())
ge01:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
ge01:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
ge01:SetTargetRange(0xff,0)
ge01:SetTarget(function(e,c)
return c:IsCode(7485081)
end)
ge01:SetLabelObject(ge1)
Duel.RegisterEffect(ge01,tp)
end)
e02:SetTarget(cm.target)
e02:SetOperation(cm.operation)
c:RegisterEffect(e02)
--special summon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e5:SetCost(cm.GGcost)
e5:SetTarget(cm.destg)
e5:SetOperation(cm.desop)
c:RegisterEffect(e5)
--draw
local e6=e5:Clone()
e6:SetCategory(CATEGORY_DRAW)
e6:SetDescription(aux.Stringid(m,2))
e6:SetTarget(cm.drtg)
e6:SetOperation(cm.drop)
c:RegisterEffect(e6)
end
function cm.lv(c)
return 7
end
function cm.spcfilter(c,e,tp)
return c==e:GetHandler()
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local m1=Duel.GetRitualMaterial(tp)
if bit.band(c:GetType(),0x81)~=0x81 or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
mg:RemoveCard(c)
aux.GCheckAdditional=aux.RitualCheckAdditional(c,8,"Greater")
local res=mg:CheckSubGroup(aux.RitualCheck,1,8,tp,c,8,"Greater")
aux.GCheckAdditional=nil
return res
end
function cm.spcop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
if not c then return false end
local mg=Duel.GetRitualMaterial(tp)
mg:RemoveCard(c)
if c then
local mg=mg:Filter(Card.IsCanBeRitualMaterial,c,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(c,8,"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,8,tp,c,8,"Greater")
aux.GCheckAdditional=nil
c:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
end
end
function cm.hintfilter(c,id)
return c:GetOriginalCode()==id
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(cm.hintfilter,tp,0xff,0,nil,m)
for tc in aux.Next(g) do
tc:RegisterFlagEffect(0,RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,5))
end
end
function cm.filter(c,e,sp)
return c:IsFaceup() and cm.God_Gold(c) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,sp,false,true)
end
function cm.filter2(c,e,sp)
return c:IsCode(7485071) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,sp,false,true)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) or Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp))
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_SZONE+LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE)
end
function cm.gcheck(g)
if g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE)>0 then
return g:FilterCount(Card.IsLocation,nil,LOCATION_SZONE)<=0 and g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE)<=1
end
if g:FilterCount(Card.IsLocation,nil,LOCATION_SZONE)>0 then
return g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE)<=0
end
return g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local g1=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_SZONE,0,nil,e,tp)
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.filter2),tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
local g=Group.__add(g1,g2)
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,cm.gcheck,false,1,ct)
Duel.SpecialSummon(sg,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
end
function cm.costfilter(c)
return cm.God_Gold(c) and c:IsAbleToGraveAsCost()
end
function cm.GGcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.Release(g,REASON_COST)
end
--[[function cm.spcfilter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToGraveAsCost()
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(cm.spcfilter,tp,LOCATION_MZONE,0,2,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
end
function cm.spcop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.spcfilter,tp,LOCATION_MZONE,0,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.filter(c,e,sp)
return c:IsFaceup() and c:IsSetCard(0x133) and c:IsCanBeSpecialSummoned(e,0,sp,true,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_SZONE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local gct=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_SZONE,0,nil,e,tp)
if ct>gct then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,gct,tp,LOCATION_SZONE)
else
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ct,tp,LOCATION_SZONE)
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_SZONE,0,nil,e,tp)
local gc=g:GetCount()
if gc==0 then return end
if gc<=ct then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,ct,ct,nil)
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
end
end]]
--[[function cm.costfilter(c)
return c:IsSetCard(0x133) and c:IsAbleToGraveAsCost()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end]]
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsDestructable() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function cm.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 cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--拿非利的神金巨像
local s,id,o=GetID()
local m=id
local cm=_G["c"..m]
cm.named_with_God_Gold=1
function cm.God_Gold(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_God_Gold
end
function cm.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e01=Effect.CreateEffect(c)
e01:SetType(EFFECT_TYPE_FIELD)
e01:SetCode(EFFECT_SPSUMMON_PROC)
e01:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e01:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e01:SetValue(SUMMON_TYPE_RITUAL)
e01:SetCondition(cm.spcon)
e01:SetOperation(cm.spcop)
c:RegisterEffect(e01)
--special summon
local e02=Effect.CreateEffect(c)
e02:SetDescription(aux.Stringid(m,0))
e02:SetCategory(CATEGORY_SPECIAL_SUMMON)
e02:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e02:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e02:SetCode(EVENT_TO_GRAVE)
e02:SetCountLimit(1,m)
e02:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ge1=Effect.CreateEffect(e:GetHandler())
ge1:SetDescription(aux.Stringid(m,5))
ge1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
ge1:SetType(EFFECT_TYPE_SINGLE)
local ge01=Effect.CreateEffect(e:GetHandler())
ge01:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
ge01:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
ge01:SetTargetRange(0xff,0)
ge01:SetTarget(function(e,c)
return c:IsCode(7485083)
end)
ge01:SetLabelObject(ge1)
Duel.RegisterEffect(ge01,tp)
end)
e02:SetTarget(cm.target)
e02:SetOperation(cm.operation)
c:RegisterEffect(e02)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetTarget(cm.placetg)
e3:SetOperation(cm.placeop)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_BATTLE_START)
e4:SetCondition(cm.mvcon)
e4:SetTarget(cm.mvtg)
e4:SetOperation(cm.mvop)
c:RegisterEffect(e4)
end
function cm.lv(c)
return 8
end
function cm.spcfilter(c,e,tp)
return c==e:GetHandler()
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local m1=Duel.GetRitualMaterial(tp)
if bit.band(c:GetType(),0x81)~=0x81 or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
mg:RemoveCard(c)
aux.GCheckAdditional=aux.RitualCheckAdditional(c,9,"Greater")
local res=mg:CheckSubGroup(aux.RitualCheck,1,9,tp,c,9,"Greater")
aux.GCheckAdditional=nil
return res
end
function cm.spcop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
if not c then return false end
local mg=Duel.GetRitualMaterial(tp)
mg:RemoveCard(c)
if c then
local mg=mg:Filter(Card.IsCanBeRitualMaterial,c,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(c,8,"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,8,tp,c,8,"Greater")
aux.GCheckAdditional=nil
c:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
end
end
function cm.hintfilter(c,id)
return c:GetOriginalCode()==id
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(cm.hintfilter,tp,0xff,0,nil,m)
for tc in aux.Next(g) do
tc:RegisterFlagEffect(0,RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,5))
end
end
function cm.filter(c,e,sp)
return c:IsFaceup() and cm.God_Gold(c) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,sp,false,true)
end
function cm.filter2(c,e,sp)
return c:IsCode(7485071) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,sp,false,true)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) or Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp))
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_SZONE+LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE)
end
function cm.gcheck(g)
if g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE)>0 then
return g:FilterCount(Card.IsLocation,nil,LOCATION_SZONE)<=0 and g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE)<=1
end
if g:FilterCount(Card.IsLocation,nil,LOCATION_SZONE)>0 then
return g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE)<=0
end
return g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local g1=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_SZONE,0,nil,e,tp)
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.filter2),tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
local g=Group.__add(g1,g2)
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,cm.gcheck,false,1,ct)
Duel.SpecialSummon(sg,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
end
function cm.costfilter(c)
return cm.God_Gold(c) and c:IsAbleToGraveAsCost()
end
function cm.GGcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.placefilter(c)
return cm.God_Gold(c) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function cm.placetg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ct=Duel.GetLocationCount(tp,LOCATION_SZONE)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) and not e:GetHandler():IsLocation(LOCATION_SZONE) then ct=ct-1 end
return Duel.IsExistingMatchingCard(cm.placefilter,tp,LOCATION_DECK,0,1,nil) and ct>0
end
end
function cm.placeop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.placefilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tc:GetOwner(),LOCATION_SZONE,POS_FACEUP,true)
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
function cm.mvcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsSummonType(SUMMON_TYPE_SPECIAL) and Duel.GetLocationCount(bc:GetOwner(),LOCATION_SZONE)>=1
end
function cm.mvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.mvop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetHandler():GetBattleTarget()
if bc:IsRelateToBattle() and Duel.GetLocationCount(bc:GetOwner(),LOCATION_SZONE)>=1 and bc:IsType(TYPE_MONSTER) and not bc:IsImmuneToEffect(e)
and Duel.MoveToField(bc,tp,bc: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)
bc:RegisterEffect(e1)
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment