Commit 57ecd457 authored by Nemo Ma's avatar Nemo Ma

240519 Part B

parent ac5c842f
No preview for this file type
expansions/pics/11561046.jpg

221 KB | W: | H:

expansions/pics/11561046.jpg

16.8 KB | W: | H:

expansions/pics/11561046.jpg
expansions/pics/11561046.jpg
expansions/pics/11561046.jpg
expansions/pics/11561046.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11561048.jpg

240 KB | W: | H:

expansions/pics/11561048.jpg

18.2 KB | W: | H:

expansions/pics/11561048.jpg
expansions/pics/11561048.jpg
expansions/pics/11561048.jpg
expansions/pics/11561048.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/65140032.jpg

37.8 KB | W: | H:

expansions/pics/65140032.jpg

14.5 KB | W: | H:

expansions/pics/65140032.jpg
expansions/pics/65140032.jpg
expansions/pics/65140032.jpg
expansions/pics/65140032.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/67200302.jpg

12.9 KB | W: | H:

expansions/pics/67200302.jpg

15.2 KB | W: | H:

expansions/pics/67200302.jpg
expansions/pics/67200302.jpg
expansions/pics/67200302.jpg
expansions/pics/67200302.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910646.jpg

12.8 KB | W: | H:

expansions/pics/9910646.jpg

53.6 KB | W: | H:

expansions/pics/9910646.jpg
expansions/pics/9910646.jpg
expansions/pics/9910646.jpg
expansions/pics/9910646.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910654.jpg

9.48 KB | W: | H:

expansions/pics/9910654.jpg

43.4 KB | W: | H:

expansions/pics/9910654.jpg
expansions/pics/9910654.jpg
expansions/pics/9910654.jpg
expansions/pics/9910654.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910667.jpg

12.2 KB | W: | H:

expansions/pics/9910667.jpg

52 KB | W: | H:

expansions/pics/9910667.jpg
expansions/pics/9910667.jpg
expansions/pics/9910667.jpg
expansions/pics/9910667.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9911021.jpg

12.6 KB | W: | H:

expansions/pics/9911021.jpg

53.1 KB | W: | H:

expansions/pics/9911021.jpg
expansions/pics/9911021.jpg
expansions/pics/9911021.jpg
expansions/pics/9911021.jpg
  • 2-up
  • Swipe
  • Onion skin
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
local m=11561046 local m=11561046
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c,11561046) aux.AddCodeList(c,6007213,32491822,69890967)
aux.EnableChangeCode(c,11561046,LOCATION_MZONE+LOCATION_GRAVE) aux.EnableChangeCode(c,11561046,LOCATION_MZONE+LOCATION_GRAVE)
--to hand --to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -4,7 +4,7 @@ local cm=_G["c"..m] ...@@ -4,7 +4,7 @@ local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableCounterPermit(0x1) c:EnableCounterPermit(0x1)
--link summon --link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_ZOMBIE+RACE_FIEND),2,4) aux.AddLinkProcedure(c,nil,2,4,c11561048.lcheck)
c:EnableReviveLimit() c:EnableReviveLimit()
--count --count
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -43,6 +43,9 @@ function cm.initial_effect(c) ...@@ -43,6 +43,9 @@ function cm.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end
function c11561048.lcheck(g,lc)
return g:IsExists(Card.IsLinkRace,1,nil,RACE_ZOMBIE+RACE_FIEND)
end end
function c11561048.decost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x1,3,REASON_COST) end
......
--纯白巫女 公主·可可落
local m=11561049
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableCounterPermit(0x1)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,aux.TRUE,c11561049.xyzcheck,3,99)
--xyzlimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e1:SetValue(1)
c:RegisterEffect(e1)
--count
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,11561049+EFFECT_COUNT_CODE_DUEL)
e2:SetCondition(c11561049.ctcon)
e2:SetTarget(c11561049.cttg)
e2:SetOperation(c11561049.ctop)
c:RegisterEffect(e2)
--Remove counter replace
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11561049,0))
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_RCOUNTER_REPLACE+0x1)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c11561049.rcon)
e3:SetOperation(c11561049.rop)
c:RegisterEffect(e3)
--atkup
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e3:SetCondition(c11561049.atkcon)
e4:SetValue(c11561049.atkval)
c:RegisterEffect(e4)
--destroy replace
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_DESTROY_REPLACE)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetTarget(c11561049.destg)
e5:SetValue(1)
e5:SetOperation(c11561049.desop)
c:RegisterEffect(e5)
end
function c11561049.dfilter(c,tp)
return c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c11561049.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local count=eg:FilterCount(c11561049.dfilter,nil,tp)
e:SetLabel(count)
return e:GetHandler():GetOverlayCount()>4 and count>0 and Duel.IsCanRemoveCounter(tp,1,0,0x1,count,REASON_COST)
end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c11561049.desop(e,tp,eg,ep,ev,re,r,rp)
local count=e:GetLabel()
Duel.RemoveCounter(tp,1,0,0x1,count,REASON_COST)
end
function c11561049.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()>2
end
function c11561049.atkval(e)
return Duel.GetCounter(e:GetHandlerPlayer(),1,0,0x1)*100
end
function c11561049.rcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()>0 and re:IsActivated() and bit.band(r,REASON_COST)~=0 and ep==e:GetOwnerPlayer() and e:GetHandler():GetCounter(0x1)>=ev
end
function c11561049.rop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveCounter(ep,0x1,ev,REASON_EFFECT)
end
function c11561049.cfilter(c)
return c:IsCanHaveCounter(0x1)
end
function c11561049.matfilter(c)
return c:IsCanHaveCounter(0x1) and c:IsCanOverlay() and (c:IsFaceupEx() or not c:IsLocation(LOCATION_REMOVED))
end
function c11561049.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(c11561049.cfilter,tp,LOCATION_ONFIELD,0,nil)
if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(c11561049.matfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,ct,nil) end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,ct,0,0x1)
end
function c11561049.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cct=Duel.GetMatchingGroupCount(c11561049.cfilter,tp,LOCATION_ONFIELD,0,nil)
if c:IsFaceup() and c:IsRelateToEffect(e) and cct>0 and c:AddCounter(0x1,cct)~=0 and Duel.IsExistingMatchingCard(c11561049.matfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,cct,nil) then
Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c11561049.matfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,cct,cct,nil,e,tp)
if g:GetCount()>0 then
Duel.Overlay(c,g)
end
end
end
function c11561049.ctcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c11561049.xyzfilter(c)
return c:GetCounter(0x1)==0
end
function c11561049.xyzcheck(g)
return g:Filter(c11561049.xyzfilter,nil):GetClassCount(Card.GetOriginalLevel)==1 and g:IsExists(Card.IsLevelAbove,1,nil,1)
end
\ No newline at end of file
--闪光No.39 希望皇 霍普·彼岸
local m=11561050
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),6,2,c11561050.ovfilter,aux.Stringid(11561050,0),3,c11561050.xyzop)
c:EnableReviveLimit()
--imm
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,11561050)
e1:SetCondition(c11561050.imcon)
e1:SetCost(c11561050.imcost)
e1:SetOperation(c11561050.imop)
c:RegisterEffect(e1)
--Atk Change
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetCondition(c11561050.atkcon)
e2:SetValue(0)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMING_BATTLE_START+TIMING_END_PHASE)
e3:SetCondition(c11561050.spcon)
e3:SetCost(c11561050.imcost)
e3:SetTarget(c11561050.spctg)
e3:SetOperation(c11561050.spcop)
c:RegisterEffect(e3)
end
aux.xyz_number[11561050]=39
function c11561050.sovfilter1(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsCanOverlay() and c:IsFaceup()
end
function c11561050.sovfilter2(c,e,tp)
return c:IsSetCard(0x107f) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11561050.spctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c11561050.sovfilter1,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingTarget(c11561050.sovfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g1=Duel.SelectTarget(tp,c11561050.sovfilter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g2=Duel.SelectTarget(tp,c11561050.sovfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g2,1,0,0)
end
function c11561050.spcop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local scc=g:GetFirst()
local spc=g:GetNext()
local tc
if not spc:IsRelateToEffect(e) or not scc:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.SpecialSummon(spc,0,tp,tp,false,false,POS_FACEUP)>0 and not scc:IsImmuneToEffect(e) then
local og=scc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(spc,scc)
Duel.BreakEffect()
local rec=math.ceil(spc:GetAttack()/2)
Duel.Recover(tp,rec,REASON_EFFECT)
end
end
function c11561050.atkcon(e)
local ph=Duel.GetCurrentPhase()
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x107f) and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c11561050.spcon(e)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x107f)
end
function c11561050.cfilter(c)
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function c11561050.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x107f)
end
function c11561050.xyzop(e,tp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11561050.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c11561050.cfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c11561050.imcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c11561050.imcost(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 c11561050.imtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,0,1,nil) end
end
function c11561050.imop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,0,nil)
local tc=g1:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
e1:SetValue(c11561050.efilter)
tc:RegisterEffect(e1)
tc=g1:GetNext()
end
end
function c11561050.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
\ No newline at end of file
--炙热甜蜜 茜里
local m=11561051
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableCounterPermit(0x1)
--link summon
aux.AddLinkProcedure(c,nil,2,4,c11561048.lcheck)
-- aux.AddLinkProcedure(c,nil,2)
c:EnableReviveLimit()
--add counter
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11561051,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,11561051)
e1:SetCondition(c11561051.ctcon)
e1:SetOperation(c11561051.ctop)
c:RegisterEffect(e1)
--add dun
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11561051,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,11571051)
e2:SetCost(c11561051.adcost)
e2:SetOperation(c11561051.adop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11561051,2))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SPSUMMON_PROC_G)
e3:SetRange(0xff)
e3:SetCondition(c11561051.clcon)
e3:SetOperation(c11561051.debug)
c:RegisterEffect(e3)
--link summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(11561051,3))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,11581051)
e4:SetCondition(c11561051.lkcon)
e4:SetCost(c11561051.lkcost)
e4:SetTarget(c11561051.lktg)
e4:SetOperation(c11561051.lkop)
c:RegisterEffect(e4)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_BE_MATERIAL)
e6:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e6:SetOperation(c11561051.effop)
-- e6:SetLabelObject(e5)
c:RegisterEffect(e6)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetOperation(c11561051.regop)
e5:SetLabelObject(e6)
c:RegisterEffect(e5)
if not c11561051.global_check then
c11561051.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD)
ge1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
ge1:SetCode(EFFECT_CANNOT_LOSE_KOISHI)
ge1:SetTargetRange(1,1)
ge1:SetCondition(c11561051.clcon)
ge1:SetValue(1)
Duel.RegisterEffect(ge1,0)
Duel.RegisterEffect(ge1,1)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_ADJUST)
ge2:SetCondition(c11561051.lpcon)
ge2:SetOperation(c11561051.Lpop)
Duel.RegisterEffect(ge2,0)
Duel.RegisterEffect(ge2,1)
end
end
function c11561051.lcheck(g,lc)
return g:IsExists(Card.IsLinkRace,1,nil,RACE_ZOMBIE+RACE_FIEND)
end
function c11561051.effop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,11561051)
local c=e:GetHandler()
local rc=c:GetReasonCard()
if not rc:IsCanHaveCounter(0x1) or not rc:IsType(TYPE_LINK) then return end
rc:RegisterFlagEffect(11561051,RESET_EVENT+RESETS_STANDARD,0,1,e:GetLabel())
local e1=Effect.CreateEffect(rc)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,11561051)
e1:SetCondition(c11561051.coucon)
e1:SetOperation(c11561051.couop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
end
function c11561051.coucon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c11561051.couop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetFlagEffectLabel(11561051)
if c:IsFaceup() and c:IsRelateToEffect(e) and ct>0 then
c:AddCounter(0x1,ct)
end
end
function c11561051.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():SetLabel(e:GetHandler():GetMaterialCount())
end
function c11561051.lkcon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and e:GetHandler():GetSequence()>4
end
function c11561051.lkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c11561051.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c11561051.lkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.LinkSummon(tp,sg:GetFirst(),nil,c)
end
end
function c11561051.debug(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
local flag=Duel.GetFlagEffectLabel(tp,11561051)
Debug.Message("护盾值"..flag)
end
function c11561051.adcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x1,2,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x1,2,REASON_COST)
end
function c11561051.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_DESTROYED)
e1:SetCondition(c11561051.aqcon1)
e1:SetOperation(c11561051.adop1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c11561051.aqcon1filter(c,tp)
return c:IsType(TYPE_MONSTER) and c:GetReasonPlayer()==1-tp
end
function c11561051.aqcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11561051.aqcon1filter,1,nil,tp)
end
function c11561051.adop1(e,tp,eg,ep,ev,re,r,rp)
local flag=Duel.GetFlagEffectLabel(tp,11561051)
local tc=eg:GetFirst()
local atk=0
while tc do
local tatk=tc:GetTextAttack()
if tatk>0 then atk=atk+tatk end
tc=eg:GetNext()
end
local dun=math.floor(atk/2)
if flag then
Duel.SetFlagEffectLabel(tp,11561051,flag+dun)
else
Duel.RegisterFlagEffect(tp,11561051,RESET_EVENT+RESETS_STANDARD,0,1,dun)
end
e:Reset()
end
function c11561051.clcon(e,tp,eg,ep,ev,re,r,rp)
local flag=Duel.GetFlagEffectLabel(tp,11561051)
return flag and flag>0
end
function c11561051.lpcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<=0
end
function c11561051.Lpop(e,tp,eg,ep,ev,re,r,rp)
local flag=Duel.GetFlagEffectLabel(tp,11561051)
if Duel.GetLP(tp)<=0 and flag then
if Duel.GetFlagEffectLabel(tp,11561051)>=2000 then
Duel.SetLP(tp,2000)
c:SetFlagEffectLabel(11561051,flag-2000)
elseif Duel.GetFlagEffectLabel(tp,11561051)<2000 then
Duel.SetLP(tp,flag)
Duel.SetFlagEffectLabel(tp,11561051,0)
end
end
end
function c11561051.ctcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c11561051.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetMaterialCount()
if c:IsFaceup() and c:IsRelateToEffect(e) and ct>0 then
c:AddCounter(0x1,ct)
end
end
\ No newline at end of file
...@@ -4,7 +4,6 @@ local cm=_G["c"..m] ...@@ -4,7 +4,6 @@ local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--link summon --link summon
aux.AddLinkProcedure(c,aux.TRUE,2,99,c11579812.lcheck) aux.AddLinkProcedure(c,aux.TRUE,2,99,c11579812.lcheck)
aux.AddLinkProcedure(c,aux.TRUE,2,99,nil)
c:EnableReviveLimit() c:EnableReviveLimit()
--immune --immune
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -65,7 +64,7 @@ function c11579812.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,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 or Duel.GetFlagEffect(tp,11580812)>1 then if tc:GetAttack()<aaa and tc:GetFlagEffect(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
...@@ -91,6 +90,7 @@ function c11579812.reptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -91,6 +90,7 @@ function c11579812.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local dam=0 local dam=0
while tc do while tc do
dam=dam+tc:GetBaseAttack() dam=dam+tc:GetBaseAttack()
tc:RegisterFlagEffect(11580812,RESET_PHASE+PHASE_END,0,1)
tc=tg:GetNext() tc=tg:GetNext()
end end
e:SetLabel(dam) e:SetLabel(dam)
...@@ -105,7 +105,6 @@ function c11579812.repop(e,tp,eg,ep,ev,re,r,rp) ...@@ -105,7 +105,6 @@ function c11579812.repop(e,tp,eg,ep,ev,re,r,rp)
end end
function c11579812.damval1(e,re,val,r,rp,rc) function c11579812.damval1(e,re,val,r,rp,rc)
local c=e:GetHandler() local c=e:GetHandler()
Duel.RegisterFlagEffect(tp,11580812,RESET_PHASE+PHASE_END,0,1)
if Duel.GetFlagEffect(tp,11579812)~=0 then if Duel.GetFlagEffect(tp,11579812)~=0 then
Duel.ResetFlagEffect(tp,11579812) Duel.ResetFlagEffect(tp,11579812)
return val*2 return val*2
......
--料理厨·银明
local s,id,o=GetID()
function s.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER)
e1:SetCountLimit(1,id)
e1:SetTarget(s.settg)
e1:SetOperation(s.setop)
c:RegisterEffect(e1)
--copyname
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1,id+1)
e2:SetTarget(s.cptg)
e2:SetOperation(s.cpop)
c:RegisterEffect(e2)
end
function s.setfilter(c)
return c:IsSetCard(0xa221) and c:IsSSetable()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function s.cpfilter(c,code)
return c:IsSetCard(0xa221) and ((c:IsAbleToDeck() and c:IsLocation(LOCATION_GRAVE)) or c:IsLocation(LOCATION_DECK)) and not c:IsCode(code)
end
function s.opfilter(c,code)
return ((c:IsAbleToDeck() and c:IsLocation(LOCATION_GRAVE)) or c:IsLocation(LOCATION_DECK)) and c:IsCode(code)
end
function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local code=c:GetCode()
if chk==0 then return Duel.IsExistingMatchingCard(s.cpfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,code) end
local g=Duel.GetMatchingGroup(s.cpfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,code)
local ag=Group.CreateGroup()
local codes={}
for tc in aux.Next(g) do
local tc_code=tc:GetCode()
if not ag:IsExists(Card.IsCode,1,nil,tc_code) then
ag:AddCard(tc)
table.insert(codes,tc_code)
end
end
table.sort(codes)
local afilter={codes[1],OPCODE_ISCODE}
if #codes>1 then
for i=2,#codes do
table.insert(afilter,codes[i])
table.insert(afilter,OPCODE_ISCODE)
table.insert(afilter,OPCODE_OR)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac=Duel.AnnounceCard(tp,table.unpack(afilter))
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(ac)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
end
function s.cpop(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.opfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,ac):GetFirst()
if tc then
if tc:IsLocation(LOCATION_GRAVE) then
Duel.HintSelection(Group.FromCards(tc))
Duel.SendtoDeck(tc,nil,2,REASON_COST)
else
Duel.ConfirmCards(1-tp,tc)
Duel.ShuffleDeck(tp)
end
end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_END)
e2:SetOperation(s.tgop)
e2:SetLabelObject(c)
Duel.RegisterEffect(e2,tp)
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(id)~=0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.SendtoGrave(tc,nil,REASON_EFFECT)
end
e:Reset()
end
\ No newline at end of file
--料理厨·烛火
local s,id,o=GetID()
function s.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER)
e1:SetCountLimit(1,id)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(s.target)
e1:SetOperation(s.opetation)
c:RegisterEffect(e1)
end
function s.IsFoodMaterial_Listed(c,code)
if not c.FoodMaterial_Listed then return false end
local flag=false
for i=1,#c.FoodMaterial_Listed do
if c.FoodMaterial_Listed[i]==code then flag=true end
end
return flag
end
function s.filter(c)
if not c.FoodMaterial_Listed then return false end
local codes={}
for i=1,#c.FoodMaterial_Listed do
table.insert(codes,c.FoodMaterial_Listed[i])
end
return (c:IsSetCard(0x9221) and #codes>0 and c:IsAbleToExtra() and c:IsFaceup()),codes
end
function s.spfilter(c,e,tp,tc,...)
local codes={...}
local flag=true
for i=1,#codes do
if not s.IsFoodMaterial_Listed(c,codes[i]) then flag=false end
end
return c:IsSetCard(0x9221) and flag and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,tc,c)
end
function s.filter2(c,e)
return s.filter(c) and c:IsCanBeEffectTarget(e)
end
function s.gselect(g,e,tp)
local codes={}
for tc in aux.Next(g) do
for i=1,#tc.FoodMaterial_Listed do
table.insert(codes,tc.FoodMaterial_Listed[i])
end
end
return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,g,table.unpack(codes))
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
local flag,codes=s.filter(chkc)
return chkc:IsLocation(LOCATION_MZONE) and flag and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,chkc,table.unpack(codes))
end
local g=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_MZONE,0,nil,e)
if chk==0 then return g:CheckSubGroup(s.gselect,1,#g,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tg=g:SelectSubGroup(tp,s.gselect,false,1,#g,e,tp)
Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,#tg,tp,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.opetation(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local g=tg:Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local codes={}
for tmp in aux.Next(g) do
for i=1,#tmp.FoodMaterial_Listed do
table.insert(codes,tmp.FoodMaterial_Listed[i])
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil,table.unpack(codes)):GetFirst()
if not tc then return end
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsAbleToGrave() and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.SendtoGrave(c,nil,REASON_EFFECT)
end
end
end
--水产料理食材
local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--Gain effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(s.regop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.counterfilter(c)
return c:IsSetCard(0x9221)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,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(s.splimit)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsSetCard(0x9221)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x9221) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,true)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 or Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>=5 end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local flag1=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5
local flag2=Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>=5
local op=aux.SelectFromOptions(tp,{flag1,aux.Stringid(id,2)},{flag1,aux.Stringid(id,3)})
if not op or op==0 then return end
if op==1 then
Duel.ConfirmDecktop(tp,5)
Duel.SortDecktop(tp,tp,5)
elseif op==2 then
Duel.ConfirmDecktop(1-tp,5)
Duel.SortDecktop(tp,1-tp,5)
end
if Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
Duel.SpecialSummon(sc,0,tp,tp,false,true,POS_FACEUP)
sc:CompleteProcedure()
end
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsSetCard(0x9221) and tc:IsFaceup() then
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1))
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_PUBLIC)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_HAND)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
tc:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--蔬果料理食材
local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--Gain effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(s.regop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.counterfilter(c)
return c:IsSetCard(0x9221)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,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(s.splimit)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsSetCard(0x9221)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x9221) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,true)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,1000,REASON_EFFECT)
if Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
Duel.SpecialSummon(sc,0,tp,tp,false,true,POS_FACEUP)
sc:CompleteProcedure()
end
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsSetCard(0x9221) and tc:IsFaceup() then
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1))
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.repcon)
e1:SetOperation(s.repop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
tc:RegisterEffect(e1)
end
end
end
function s.repcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,300,REASON_EFFECT)
end
--肉类料理食材
local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--Gain effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(s.regop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.counterfilter(c)
return c:IsSetCard(0x9221)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,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(s.splimit)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsSetCard(0x9221)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x9221) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,true)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst()
if not tc then return end
Duel.HintSelection(Group.FromCards(tc))
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
Duel.SpecialSummon(sc,0,tp,tp,false,true,POS_FACEUP)
sc:CompleteProcedure()
end
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsSetCard(0x9221) and tc:IsFaceup() then
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1))
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.repcon)
e1:SetOperation(s.repop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
tc:RegisterEffect(e1)
end
end
end
function s.repcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0xa221)
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(300)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end
--蛋类料理食材
local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(s.cost)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--Gain effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(s.regop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.counterfilter(c)
return c:IsSetCard(0x9221)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,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(s.splimit)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsSetCard(0x9221)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x9221) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,true)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x9221))
e2:SetValue(s.indct)
Duel.RegisterEffect(e2,tp)
if Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
Duel.SpecialSummon(sc,0,tp,tp,false,true,POS_FACEUP)
sc:CompleteProcedure()
end
end
function s.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsSetCard(0x9221) and tc:IsFaceup() then
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1))
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,3))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMINGS_CHECK_MONSTER,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
tc:RegisterEffect(e1)
end
end
end
function s.spcfilter2(c,e,tp)
return c:IsSetCard(0x9221) and c:IsAbleToDeckOrExtraAsCost() and c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end
function s.spfilter2(c,e,tp,v)
local t=Auxiliary.GetValueType(v)
local lv=0
local tc=nil
if t=='Card' then
lv=v:GetLevel()
tc=v
else lv=v end
return c:IsSetCard(0x9221) and c:IsLevel(lv) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return true end
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(s.spcfilter2,tp,LOCATION_MZONE,0,1,e:GetHandler(),e,tp) end
e:SetLabel(0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=Duel.SelectMatchingCard(tp,s.spcfilter2,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),e,tp):GetFirst()
e:SetLabel(tc:GetLevel())
Duel.SendtoDeck(tc,nil,2,REASON_COST)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local lv=e:GetLabel()
if not lv then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,s.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv):GetFirst()
if not sc then return end
Duel.SpecialSummon(sc,0,tp,tp,true,false,POS_FACEUP)
end
\ No newline at end of file
--香料料理食材
local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--Gain effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(s.regop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.counterfilter(c)
return c:IsSetCard(0x9221)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,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(s.splimit)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsSetCard(0x9221)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x9221) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,true)
end
function s.setfilter(c,tp)
return c:IsSetCard(0xa221) and c:CheckUniqueOnField(tp)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local flag=Duel.GetLocationCount(tp,LOCATION_SZONE)>0
if not c:IsOnField() then
flag=Duel.GetLocationCount(tp,LOCATION_SZONE)>1
end
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil,tp) and flag end
end
function s.activate(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 tc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if not tc then return end
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetOperation(s.tgop)
e1:SetLabelObject(tc)
Duel.RegisterEffect(e1,tp)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_TYPE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e2)
if Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
Duel.SpecialSummon(sc,0,tp,tp,false,true,POS_FACEUP)
sc:CompleteProcedure()
end
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(id)~=0 then
Duel.SendtoGrave(tc,nil,REASON_EFFECT)
end
e:Reset()
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsSetCard(0x9221) and tc:IsFaceup() then
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1))
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,3))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1)
e1:SetCost(s.cpcost)
e1:SetTarget(s.cptg)
e1:SetOperation(s.cpop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
tc:RegisterEffect(e1)
end
end
end
function s.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return true end
end
function s.cpfilter(c,code)
return c:IsSetCard(0xa221) and c:IsAbleToDeck() and c:CheckActivateEffect(true,true,false) and not c:IsCode(code)
end
function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local code=c:GetCode()
if chkc then return s.cpfilter(chkc,code) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) end
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingTarget(s.cpfilter,tp,LOCATION_GRAVE,0,1,nil,code) end
e:SetLabel(0)
local g=Duel.GetMatchingGroup(s.cpfilter,tp,LOCATION_GRAVE,0,nil,code)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=Duel.SelectTarget(tp,s.cpfilter,tp,LOCATION_GRAVE,0,1,1,nil,code):GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(tc:GetCode())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
c:RegisterEffect(e1,true)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local te,ceg,cep,cev,cre,cr,crp=tc:CheckActivateEffect(true,true,true)
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,0,0)
end
function s.cpop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or not aux.NecroValleyFilter()(tc) then return end
if Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)==0 then return end
local te=e:GetLabelObject()
if te then
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
end
\ No newline at end of file
--主食料理食材
local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--Gain effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(s.regop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.counterfilter(c)
return c:IsSetCard(0x9221)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,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(s.splimit)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsSetCard(0x9221)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x9221) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,true)
end
function s.setfilter(c,tp)
return c:IsSetCard(0xa221) and c:CheckUniqueOnField(tp)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,1-tp,LOCATION_MZONE)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local tc=Duel.SelectMatchingCard(tp,aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
if not tc then return end
Duel.HintSelection(Group.FromCards(tc))
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
Duel.SpecialSummon(sc,0,tp,tp,false,true,POS_FACEUP)
sc:CompleteProcedure()
end
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsSetCard(0x9221) and tc:IsFaceup() then
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1))
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,3))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(s.rmcon)
e1:SetTarget(s.rmtg)
e1:SetOperation(s.rmop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
tc:RegisterEffect(e1)
end
end
end
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()~=e:GetHandler() and rp==tp and re:GetHandler():IsType(TYPE_FUSION) and re:IsActiveType(TYPE_MONSTER)
end
function s.cpfilter(c,code)
return c:IsSetCard(0xa221) and c:IsAbleToDeck() and c:CheckActivateEffect(true,true,false) and not c:IsCode(code)
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_GRAVE)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--刺身料理
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,11637004)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(s.splimit)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(s.checkop2)
Duel.RegisterEffect(ge1,0)
end
end
s.FoodMaterial_Listed={11637004}
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
Duel.RegisterFlagEffect(0,id,RESET_CHAIN,0,1,tc:GetCode())
end
function s.checkop2(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsSetCard(0x9221) then
Duel.RegisterFlagEffect(0,81,RESET_CHAIN,0,1)
end
end
end
function s.label_check(...)
local labels={...}
local flag=false
if labels then
for i = 0, #labels do
if labels[i]==11637004 then flag=true end
end
end
return flag
end
function s.splimit(e,se,sp,st)
return s.label_check(Duel.GetFlagEffectLabel(0,id)) and se:GetHandler():IsSetCard(0xa221) and Duel.GetFlagEffect(0,81)==0
end
function s.thfilter(c)
return c:IsSetCard(0x9221) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,3)
if #g<3 then return end
Duel.ConfirmDecktop(tp,3)
if g:IsExists(s.thfilter,1,nil) then
local tg=g:Filter(s.thfilter,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
g:Sub(tg)
end
if #g>0 then Duel.ShuffleDeck(tp) end
end
--清炒蔬菜料理
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,11637005)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(s.splimit)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(s.checkop2)
Duel.RegisterEffect(ge1,0)
end
end
s.FoodMaterial_Listed={11637005}
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
Duel.RegisterFlagEffect(0,id,RESET_CHAIN,0,1,tc:GetCode())
end
function s.checkop2(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsSetCard(0x9221) then
Duel.RegisterFlagEffect(0,81,RESET_CHAIN,0,1)
end
end
end
function s.label_check(...)
local labels={...}
local flag=false
if labels then
for i = 0, #labels do
if labels[i]==11637005 then flag=true end
end
end
return flag
end
function s.splimit(e,se,sp,st)
return s.label_check(Duel.GetFlagEffectLabel(0,id)) and se:GetHandler():IsSetCard(0xa221) and Duel.GetFlagEffect(0,81)==0
end
function s.thfilter(c,e,tp)
local flag=false
if c:IsType(TYPE_MONSTER) then
flag=c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
elseif c:IsType(TYPE_SPELL+TYPE_TRAP) then
flag=c:IsSSetable()
end
return c:IsSetCard(0x9221) and (c:IsAbleToHand() or flag) and c:IsFaceupEx()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_GRAVE+LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst()
if not tc then return end
local flag1=tc:IsAbleToHand()
local flag2=false
if tc:IsType(TYPE_MONSTER) then
flag2=tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
elseif tc:IsType(TYPE_SPELL+TYPE_TRAP) then
flag2=tc:IsSSetable()
end
local op=aux.SelectFromOptions(tp,{flag1,aux.Stringid(id,1)},{flag2,aux.Stringid(id,2)})
if op==1 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
elseif op==2 then
if tc:IsType(TYPE_MONSTER) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SSet(tp,tc)
end
end
end
--烤肉料理
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,11637006)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(s.splimit)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(s.checkop2)
Duel.RegisterEffect(ge1,0)
end
end
s.FoodMaterial_Listed={11637006}
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
Duel.RegisterFlagEffect(0,id,RESET_CHAIN,0,1,tc:GetCode())
end
function s.checkop2(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsSetCard(0x9221) then
Duel.RegisterFlagEffect(0,81,RESET_CHAIN,0,1)
end
end
end
function s.label_check(...)
local labels={...}
local flag=false
if labels then
for i = 0, #labels do
if labels[i]==11637006 then flag=true end
end
end
return flag
end
function s.splimit(e,se,sp,st)
return s.label_check(Duel.GetFlagEffectLabel(0,id)) and se:GetHandler():IsSetCard(0xa221) and Duel.GetFlagEffect(0,81)==0
end
function s.thfilter(c)
return c:IsSetCard(0x9221) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.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
--煎蛋料理
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,11637007)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(s.splimit)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(s.checkop2)
Duel.RegisterEffect(ge1,0)
end
end
s.FoodMaterial_Listed={11637007}
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
Duel.RegisterFlagEffect(0,id,RESET_CHAIN,0,1,tc:GetCode())
end
function s.checkop2(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsSetCard(0x9221) then
Duel.RegisterFlagEffect(0,81,RESET_CHAIN,0,1)
end
end
end
function s.label_check(...)
local labels={...}
local flag=false
if labels then
for i = 0, #labels do
if labels[i]==11637007 then flag=true end
end
end
return flag
end
function s.splimit(e,se,sp,st)
return s.label_check(Duel.GetFlagEffectLabel(0,id)) and se:GetHandler():IsSetCard(0xa221) and Duel.GetFlagEffect(0,81)==0
end
function s.setfilter(c)
return c:IsSetCard(0xa221) and c:IsSSetable()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g)
end
end
--蒸馒头料理
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,11637009)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(s.splimit)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
e2:SetTarget(s.destg)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(s.checkop2)
Duel.RegisterEffect(ge1,0)
end
end
s.FoodMaterial_Listed={11637009}
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
Duel.RegisterFlagEffect(0,id,RESET_CHAIN,0,1,tc:GetCode())
end
function s.checkop2(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsSetCard(0x9221) then
Duel.RegisterFlagEffect(0,81,RESET_CHAIN,0,1)
end
end
end
function s.label_check(...)
local labels={...}
local flag=false
if labels then
for i = 0, #labels do
if labels[i]==11637009 then flag=true end
end
end
return flag
end
function s.splimit(e,se,sp,st)
return s.label_check(Duel.GetFlagEffectLabel(0,id)) and se:GetHandler():IsSetCard(0xa221) and Duel.GetFlagEffect(0,81)==0
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
end
--土豆炖牛腩料理
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,11637006,11637005)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(s.splimit)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(aux.bdocon)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--attack all
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ATTACK_ALL)
e3:SetValue(1)
c:RegisterEffect(e3)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(s.checkop2)
Duel.RegisterEffect(ge1,0)
end
end
s.FoodMaterial_Listed={11637006,11637005}
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
Duel.RegisterFlagEffect(0,id,RESET_CHAIN,0,1,tc:GetCode())
end
function s.checkop2(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsSetCard(0x9221) then
Duel.RegisterFlagEffect(0,81,RESET_CHAIN,0,1)
end
end
end
function s.label_check(...)
local labels={...}
local flag1=false
local flag2=false
if labels then
for i = 0, #labels do
if labels[i]==11637006 then flag1=true end
if labels[i]==11637005 then flag2=true end
end
end
return flag1 and flag2
end
function s.splimit(e,se,sp,st)
return s.label_check(Duel.GetFlagEffectLabel(0,id)) and se:GetHandler():IsSetCard(0xa221) and Duel.GetFlagEffect(0,81)==0
end
function s.thfilter(c)
return c:IsSetCard(0xa221) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.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
\ No newline at end of file
--咖喱饭料理
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,11637008,11637009)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(s.splimit)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
e2:SetTarget(s.destg)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PREDRAW)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.thcon)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(s.checkop2)
Duel.RegisterEffect(ge1,0)
end
end
s.FoodMaterial_Listed={11637008,11637009}
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
Duel.RegisterFlagEffect(0,id,RESET_CHAIN,0,1,tc:GetCode())
end
function s.checkop2(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsSetCard(0x9221) then
Duel.RegisterFlagEffect(0,81,RESET_CHAIN,0,1)
end
end
end
function s.label_check(...)
local labels={...}
local flag1=false
local flag2=false
if labels then
for i = 0, #labels do
if labels[i]==11637008 then flag1=true end
if labels[i]==11637009 then flag2=true end
end
end
return flag1 and flag2
end
function s.splimit(e,se,sp,st)
return s.label_check(Duel.GetFlagEffectLabel(0,id)) and se:GetHandler():IsSetCard(0xa221) and Duel.GetFlagEffect(0,81)==0
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
end
function s.thfilter(c)
return c:IsSetCard(0xa221) and c:IsAbleToHand()
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.IsPlayerCanNormalDraw(tp) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
aux.GiveUpNormalDraw(e,tp)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,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()
function s.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(s.splimit)
c:RegisterEffect(e1)
--act qp in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x9221))
e2:SetTargetRange(LOCATION_HAND,0)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetCondition(s.discon)
e3:SetTarget(s.distg)
e3:SetOperation(s.disop)
c:RegisterEffect(e3)
--atk up
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(s.atkcost)
e3:SetTarget(s.atktg)
e3:SetOperation(s.atkop)
c:RegisterEffect(e3)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(s.checkop2)
Duel.RegisterEffect(ge1,0)
end
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if tc:IsSetCard(0xa221) then
Duel.RegisterFlagEffect(0,id,RESET_CHAIN,0,1,tc:GetCode())
end
end
function s.checkop2(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsSetCard(0x9221) then
Duel.RegisterFlagEffect(0,81,RESET_CHAIN,0,1)
end
end
end
function s.label_check(...)
local labels={...}
local flag={}
local num=0
if labels then
for i = 0, #labels do
local tmp=true
for i2=0, #flag do
if labels[i]==flag[i2] then
tmp=false
end
end
if tmp then
num=num+1
table.insert(flag,labels[i])
end
end
end
return num>=3
end
function s.splimit(e,se,sp,st)
return s.label_check(Duel.GetFlagEffectLabel(0,id)) and se:GetHandler():IsSetCard(0xa221) and Duel.GetFlagEffect(0,81)==0
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp==tp and re:GetHandler():IsSetCard(0xa221)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,PLAYER_ALL,LOCATION_MZONE)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local tc=Duel.SelectMatchingCard(tp,aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
if not tc then return end
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
function s.atkcfilter(c)
return c:IsSetCard(0x9221) and c:IsAbleToDeckOrExtraAsCost() and c:IsFaceupEx()
end
function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(s.atkcfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler())
end
e:SetLabel(0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local g=Duel.GetMatchingGroup(s.atkcfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=g:Select(tp,1,#g,nil)
Duel.HintSelection(tg)
local num=Duel.SendtoDeck(tg,nil,2,REASON_COST)
e:SetLabel(num)
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local num=e:GetLabel()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(num*500)
c:RegisterEffect(e1)
end
--扬州炒饭料理
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,11637007,11637009)
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(s.splimit)
c:RegisterEffect(e0)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
--SendtoGrave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetCondition(s.tgcon)
e3:SetTarget(s.tgtg)
e3:SetOperation(s.tgop)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(s.checkop2)
Duel.RegisterEffect(ge1,0)
end
end
s.FoodMaterial_Listed={11637007,11637009}
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if tc:IsSetCard(0xa221) then
Duel.RegisterFlagEffect(0,id,RESET_CHAIN,0,1,tc:GetCode())
end
end
function s.checkop2(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsSetCard(0x9221) then
Duel.RegisterFlagEffect(0,81,RESET_CHAIN,0,1)
end
end
end
function s.label_check(...)
local labels={...}
local flag={}
local flag1=false
local flag2=false
local num=0
if labels then
for i = 0, #labels do
local tmp=true
for i2=0, #flag do
if labels[i]==flag[i2] then
tmp=false
end
end
if tmp then
num=num+1
table.insert(flag,labels[i])
end
if labels[i]==11637007 then flag1=true end
if labels[i]==11637009 then flag2=true end
end
end
return num>=3 and flag1 and flag2
end
function s.splimit(e,se,sp,st)
return s.label_check(Duel.GetFlagEffectLabel(0,id)) and se:GetHandler():IsSetCard(0xa221) and Duel.GetFlagEffect(0,81)==0
end
function s.tgfilter(c)
return c:IsSetCard(0xa221)
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.tgfilter,1,nil)
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,1-tp,LOCATION_ONFIELD)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if #g<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=g:Select(1-tp,1,1,nil)
Duel.HintSelection(tc)
Duel.SendtoGrave(tc,REASON_RULE)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x9221) and not c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if #tc<=0 then return end
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
--鲜虾蒸蛋料理
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,11637004,11637007)
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(s.splimit)
c:RegisterEffect(e0)
--immune
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,0))
e4:SetCategory(CATEGORY_ANNOUNCE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(TIMINGS_CHECK_MONSTER,TIMINGS_CHECK_MONSTER)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetTarget(s.imtg)
e4:SetOperation(s.imop)
c:RegisterEffect(e4)
--immune
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(s.atkcon)
e1:SetTarget(s.atktg)
e1:SetOperation(s.atkop)
c:RegisterEffect(e1)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(s.checkop2)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_CHAIN_SOLVED)
ge2:SetOperation(s.checkop3)
Duel.RegisterEffect(ge2,0)
end
end
s.FoodMaterial_Listed={11637004,11637007}
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
Duel.RegisterFlagEffect(0,id,RESET_CHAIN,0,1,tc:GetCode())
end
function s.checkop2(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsSetCard(0x9221) then
Duel.RegisterFlagEffect(0,81,RESET_CHAIN,0,1)
end
end
end
function s.checkop3(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if tc:IsSetCard(0xa221) and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.RegisterFlagEffect(rp,id+1,0,0,0)
end
end
function s.label_check(...)
local labels={...}
local flag1=false
local flag2=false
if labels then
for i = 0, #labels do
if labels[i]==11637004 then flag1=true end
if labels[i]==11637007 then flag2=true end
end
end
return flag1 and flag2
end
function s.splimit(e,se,sp,st)
return s.label_check(Duel.GetFlagEffectLabel(0,id)) and se:GetHandler():IsSetCard(0xa221) and Duel.GetFlagEffect(0,81)==0
end
function s.imtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local code=Duel.AnnounceCard(tp)
e:SetLabel(code)
end
function s.imop(e,tp,eg,ep,ev,re,r,rp)
local code=e:GetLabel()
local c=e:GetHandler()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetLabel(code)
e2:SetTarget(s.immune)
e2:SetValue(s.efilter)
Duel.RegisterEffect(e2,tp)
end
function s.immune(e,c)
return c:IsSetCard(0x9221) and c:IsType(TYPE_FUSION)
end
function s.efilter(e,re)
local code=e:GetLabel()
return re:GetHandler():IsCode(code)
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetReasonPlayer()==1-tp
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local num=Duel.GetFlagEffect(tp,id+1)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local dg=Group.CreateGroup()
local tc=g:GetFirst()
while tc do
local preatk=tc:GetAttack()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(num*(-300))
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if preatk~=0 and tc:IsAttack(0) then dg:AddCard(tc) end
tc=g:GetNext()
end
Duel.Destroy(dg,REASON_EFFECT)
end
\ No newline at end of file
--圣罗伯特的拼合
local m=21080001
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,15005130)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_EXTRA_SYNCHRO_MATERIAL)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetRange(LOCATION_HAND)
e0:SetValue(cm.matval)
c:RegisterEffect(e0)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_HAND)
e2:SetValue(cm.matval1)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
end
function cm.matval(e,c)
return (c:IsType(TYPE_SYNCHRO)) and aux.IsCodeListed(c,15005130)
end
function cm.mfilter(c)
return true
end
function cm.matval1(e,c,mg,lc)
if not aux.IsCodeListed(c,15005130) then return false,nil end
return true,not mg or mg:IsExists(cm.mfilter,0,nil) and aux.IsCodeListed(c,15005130)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function cm.filter(c)
return (aux.IsCodeListed(c,15005130) or c:IsCode(15005130)) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and not c:IsCode(21080001)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
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.filter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--圣海德威的开辟
local m=21080002
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,15005130)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_EXTRA_SYNCHRO_MATERIAL)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetRange(LOCATION_HAND)
e0:SetValue(cm.matval)
c:RegisterEffect(e0)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_HAND)
e2:SetValue(cm.matval1)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(3,m)
e1:SetCost(cm.spcost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.matval(e,c)
return (c:IsType(TYPE_SYNCHRO) or c:IsType(TYPE_LINK)) and aux.IsCodeListed(c,15005130)
end
function cm.mfilter(c)
return true
end
function cm.matval1(e,c,mg,lc)
if not aux.IsCodeListed(c,15005130) then return false,nil end
return true,not mg or mg:IsExists(cm.mfilter,0,nil) and aux.IsCodeListed(c,15005130)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function cm.spfilter(c,e,tp,sc)
return (aux.IsCodeListed(c,15005130)) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_DECK,0,nil,e,tp,c)
local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if dcount==0 then return end
if g:GetCount()==0 then
Duel.ConfirmDecktop(tp,dcount)
Duel.ShuffleDeck(tp)
return
end
local seq=-1
local tc=g:GetFirst()
local spcard=nil
while tc do
if tc:GetSequence()>seq then
seq=tc:GetSequence()
spcard=tc
end
tc=g:GetNext()
end
Duel.ConfirmDecktop(tp,dcount-seq)
if spcard:IsAbleToHand() then
Duel.SendtoHand(spcard,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,spcard)
Duel.ShuffleHand(tp)
end
end
--异帽机的渴求
local m=21080010
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_MONSTER),3,99,cm.lcheck)
c:EnableReviveLimit()
aux.AddCodeList(c,15005130)
local e13=Effect.CreateEffect(c)
e13:SetDescription(aux.Stringid(m,1))
e13:SetCategory(CATEGORY_REMOVE)
e13:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e13:SetCode(EVENT_SPSUMMON_SUCCESS)
e13:SetRange(LOCATION_MZONE)
e13:SetTarget(cm.destg)
e13:SetOperation(cm.desop)
c:RegisterEffect(e13)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(cm.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetTarget(cm.sptg)
e4:SetOperation(cm.spop)
c:RegisterEffect(e4)
end
function cm.lcheck(g)
return g:IsExists(aux.IsCodeListed,3,nil,15005130) or (g:IsExists(aux.IsCode,1,nil,15005130) and g:IsExists(aux.IsCodeListed,2,nil,15005130)) or (g:IsExists(aux.IsCode,2,nil,15005130) and g:IsExists(aux.IsCodeListed,1,nil,15005130)) or (g:IsExists(aux.IsCode,3,nil,15005130))
end
function cm.desfilter1(c)
return Duel.IsExistingMatchingCard(nil,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
function cm.cfilter(c,ec)
return c:IsFaceup() and ec:GetLinkedGroup():IsContains(c) and Duel.IsExistingMatchingCard(nil,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter1,tp,LOCATION_ONFIELD,0,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,cm.desfilter1,tp,LOCATION_ONFIELD,0,1,1,nil)
if #g1==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g1)
g1:Merge(g2)
Duel.HintSelection(g1)
Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)
end
function cm.spfilter(c,e,tp,sc)
return (aux.IsCodeListed(c,15005130) or c:IsCode(15005130)) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp,sc)>=1
end
function cm.spgcheck(g)
return g:GetSum(Card.GetLevel)>=10
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_DECK,0,nil,e,tp,c)
return e:GetHandler():IsReleasable() and Duel.IsPlayerCanSpecialSummon(tp) and g:CheckSubGroup(cm.spgcheck) and not Duel.IsPlayerAffectedByEffect(tp,63060238) and not Duel.IsPlayerAffectedByEffect(tp,97148796)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsRelateToEffect(e) and c:IsReleasable()) then return end
if Duel.Release(c,REASON_EFFECT)~=0 and Duel.IsPlayerCanSpecialSummon(tp) then
local ct=1
local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
local spg=Group.CreateGroup()
local check=0
while (ct<=dcount and check==0) do
local g=Duel.GetDecktopGroup(tp,ct)
local fg=g:Filter(cm.spfilter,nil,e,tp,c)
if fg:CheckSubGroup(cm.spgcheck) then
check=1
spg=fg
end
ct=ct+1
end
if check==0 then
Duel.ConfirmDecktop(tp,dcount)
Duel.ShuffleDeck(tp)
return
end
Duel.ConfirmDecktop(tp,ct-1)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 or spg:GetCount()==0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if ft>=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local spcg=Group.CreateGroup()
if ft<=Duel.GetLocationCount(tp,LOCATION_MZONE) then
spcg=spg
else
spcg=spg:Select(tp,ft,ft,nil)
end
local tc=spcg:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc=spcg:GetNext()
end
Duel.SpecialSummonComplete()
end
end
end
\ No newline at end of file
...@@ -9,7 +9,7 @@ function c28308574.initial_effect(c) ...@@ -9,7 +9,7 @@ function c28308574.initial_effect(c)
e1:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_TOHAND+CATEGORY_DAMAGE) e1:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_TOHAND+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,28308574) e1:SetCountLimit(1)
e1:SetCondition(c28308574.thcon1) e1:SetCondition(c28308574.thcon1)
e1:SetTarget(c28308574.thtg) e1:SetTarget(c28308574.thtg)
e1:SetOperation(c28308574.thop) e1:SetOperation(c28308574.thop)
...@@ -34,6 +34,13 @@ function c28308574.initial_effect(c) ...@@ -34,6 +34,13 @@ function c28308574.initial_effect(c)
e4:SetOperation(c28308574.regop) e4:SetOperation(c28308574.regop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
e4:SetLabelObject(e3) e4:SetLabelObject(e3)
--indes
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_BE_MATERIAL)
e5:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e5:SetOperation(c28308574.indop)
c:RegisterEffect(e5)
end end
function c28308574.mfilter(c) function c28308574.mfilter(c)
return c:IsFusionSetCard(0x283) and c:IsFusionType(TYPE_PENDULUM) return c:IsFusionSetCard(0x283) and c:IsFusionType(TYPE_PENDULUM)
...@@ -146,5 +153,29 @@ function c28308574.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -146,5 +153,29 @@ function c28308574.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-ct) e1:SetValue(-ct)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e3)
end end
end end
function c28308574.indop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TO_DECK)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SINGLE_RANGE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_CHANGE_CONTROL)
rc:RegisterEffect(e2,true)
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(28308574,4))
end
--闪耀的放课后 五色的笑颜 --闪耀的放课后 五色的笑颜
function c28361833.initial_effect(c) function c28361833.initial_effect(c)
--Synchro summon --Synchro summon
aux.AddSynchroMixProcedure(c,aux.Tuner(Card.IsSetCard,0x283),aux.NonTuner(Card.IsSetCard,0x283),c28361833.mfilter,c28361833.mfilter,0,99) aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x283),aux.FilterBoolFunction(Card.IsSetCard,0x283),2)
c:EnableReviveLimit() c:EnableReviveLimit()
--synchro level --synchro level
local ge0=Effect.CreateEffect(c) local ge0=Effect.CreateEffect(c)
...@@ -23,7 +23,7 @@ function c28361833.initial_effect(c) ...@@ -23,7 +23,7 @@ function c28361833.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c28361833.synlimit) e1:SetValue(aux.synlimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--hokura power --hokura power
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -40,11 +40,10 @@ function c28361833.initial_effect(c) ...@@ -40,11 +40,10 @@ function c28361833.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--to hand --to hand
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(28361833,4))
e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,28361833) e4:SetCountLimit(1)
e4:SetTarget(c28361833.thtg) e4:SetTarget(c28361833.thtg)
e4:SetOperation(c28361833.thop) e4:SetOperation(c28361833.thop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
...@@ -59,14 +58,8 @@ function c28361833.synclv(e,c) ...@@ -59,14 +58,8 @@ function c28361833.synclv(e,c)
return lv return lv
end end
end end
function c28361833.mfilter(c,syncard)
return (c:IsTuner(syncard) or c:IsNotTuner(syncard)) and c:IsSetCard(0x283)
end
function c28361833.synlimit(e,se,sp,st)
return st&SUMMON_TYPE_SYNCHRO==SUMMON_TYPE_SYNCHRO and not se
end
function c28361833.valcheck(e,c) function c28361833.valcheck(e,c)
local val=c:GetMaterial():GetClassCount(Card.GetAttribute) local val=c:GetMaterial():GetClassCount(Card.GetOriginalAttribute)
e:SetLabel(val) e:SetLabel(val)
end end
function c28361833.regcon(e,tp,eg,ep,ev,re,r,rp) function c28361833.regcon(e,tp,eg,ep,ev,re,r,rp)
...@@ -148,28 +141,23 @@ end ...@@ -148,28 +141,23 @@ end
function c28361833.cfilter(c) function c28361833.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x283) return c:IsFaceup() and c:IsSetCard(0x283)
end end
function c28361833.dthfilter(c) function c28361833.thfilter(c)
return c:IsSetCard(0x283) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() return c:IsSetCard(0x283) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end end
function c28361833.gthfilter(c)
return c:IsSetCard(0x283) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c28361833.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c28361833.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c28361833.dthfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c28361833.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c28361833.thop(e,tp,eg,ep,ev,re,r,rp) function c28361833.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c28361833.cfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(c28361833.cfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local dtg=Duel.SelectMatchingCard(tp,c28361833.dthfilter,tp,LOCATION_DECK,0,1,1,nil) local tg=Duel.SelectMatchingCard(tp,c28361833.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #dtg>0 then if #tg>0 then
Duel.SendtoHand(dtg,nil,REASON_EFFECT) Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,dtg) Duel.ConfirmCards(1-tp,tg)
if g:GetClassCount(Card.GetAttribute)>=3 and Duel.IsExistingMatchingCard(c28361833.gthfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(28361833,5)) then if g:GetClassCount(Card.GetAttribute)>=3 and Duel.SelectYesNo(tp,aux.Stringid(28361833,4)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Recover(tp,500,REASON_EFFECT)
local gtg=Duel.SelectMatchingCard(tp,c28361833.gthfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(gtg,nil,REASON_EFFECT)
end end
end end
end end
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c28366995.initial_effect(c) function c28366995.initial_effect(c)
--synchro summon --synchro summon
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddSynchroMixProcedure(c,c28366995.matfilter1,nil,nil,aux.NonTuner(Card.IsSetCard,0x283),1,1) aux.AddSynchroMixProcedure(c,c28366995.matfilter,nil,nil,aux.FilterBoolFunction(Card.IsSetCard,0x283),1,1)
--recover --recover
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_RECOVER+CATEGORY_TOHAND)
...@@ -33,8 +33,8 @@ function c28366995.initial_effect(c) ...@@ -33,8 +33,8 @@ function c28366995.initial_effect(c)
e3:SetOperation(c28366995.indop) e3:SetOperation(c28366995.indop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c28366995.matfilter1(c,syncard) function c28366995.matfilter(c,syncard)
return c:IsTuner(syncard) or (c:IsSetCard(0x287) and Duel.GetLP(c:GetControler())>=9000) return c:IsTuner(syncard) or Duel.GetLP(c:GetControler())>=9000
end end
function c28366995.recon(e,tp,eg,ep,ev,re,r,rp) function c28366995.recon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
...@@ -43,15 +43,15 @@ function c28366995.retg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -43,15 +43,15 @@ function c28366995.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end end
function c28366995.cfilter(c) function c28366995.cfilter(c,tp)
return c:IsAbleToHand() and c:IsLocation(LOCATION_GRAVE) return c:IsAbleToHand() and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp)
end end
function c28366995.reop(e,tp,eg,ep,ev,re,r,rp) function c28366995.reop(e,tp,eg,ep,ev,re,r,rp)
local mg=e:GetHandler():GetMaterial() local mg=e:GetHandler():GetMaterial()
if Duel.Recover(tp,1000,REASON_EFFECT)>0 and Duel.GetLP(tp)>=10000 and mg:IsExists(c28366995.cfilter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(28366995,0)) then if Duel.Recover(tp,1000,REASON_EFFECT)>0 and Duel.GetLP(tp)>=10000 and mg:IsExists(c28366995.cfilter,1,nil,tp) and Duel.SelectYesNo(tp,aux.Stringid(28366995,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=mg:Filter(c28366995.cfilter,nil):Select(tp,1,1,nil) local tg=mg:Filter(c28366995.cfilter,nil,tp):Select(tp,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT) Duel.SendtoHand(tg,nil,REASON_EFFECT)
end end
end end
...@@ -75,7 +75,7 @@ function c28366995.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,7 +75,7 @@ function c28366995.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c28366995.indcon(e,tp,eg,ep,ev,re,r,rp) function c28366995.indcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetReasonCard():IsSetCard(0x283) and e:GetHandler():GetReasonCard():IsType(TYPE_FUSION+TYPE_XYZ+TYPE_LINK) return e:GetHandler():GetReasonCard():IsType(TYPE_FUSION+TYPE_XYZ+TYPE_LINK)
end end
function c28366995.indop(e,tp,eg,ep,ev,re,r,rp) function c28366995.indop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -9,7 +9,7 @@ function c28384498.initial_effect(c) ...@@ -9,7 +9,7 @@ function c28384498.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMING_MAIN_END) e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCountLimit(1,28384498) e1:SetCountLimit(1)
e1:SetCondition(c28384498.condition) e1:SetCondition(c28384498.condition)
e1:SetTarget(c28384498.target) e1:SetTarget(c28384498.target)
e1:SetOperation(c28384498.operation) e1:SetOperation(c28384498.operation)
...@@ -19,7 +19,7 @@ function c28384498.initial_effect(c) ...@@ -19,7 +19,7 @@ function c28384498.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,38384498) e2:SetCountLimit(1)
e2:SetCondition(c28384498.nccon) e2:SetCondition(c28384498.nccon)
e2:SetOperation(c28384498.ncop) e2:SetOperation(c28384498.ncop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -38,25 +38,15 @@ function c28384498.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -38,25 +38,15 @@ function c28384498.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) local b1=Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)
local b2=Duel.IsExistingTarget(c28384498.filter,tp,LOCATION_GRAVE,0,1,nil) local b2=Duel.IsExistingTarget(c28384498.filter,tp,LOCATION_GRAVE,0,1,nil)
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
local off=1 local op=aux.SelectFromOptions(tp,
local ops,opval={},{} {b1,aux.Stringid(28384498,0)},
if b1 then {b2,aux.Stringid(28384498,1)})
ops[off]=aux.Stringid(28384498,0) e:SetLabel(op)
opval[off]=0 if sel==1 then
off=off+1
end
if b2 then
ops[off]=aux.Stringid(28384498,1)
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_DESTROY+CATEGORY_REMOVE) e:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,b1,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,b1,1,0,0)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=Duel.SelectTarget(tp,c28384498.filter,tp,LOCATION_GRAVE,0,1,1,nil) local tc=Duel.SelectTarget(tp,c28384498.filter,tp,LOCATION_GRAVE,0,1,1,nil)
e:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH) e:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,tp,LOCATION_GRAVE)
...@@ -90,22 +80,9 @@ function c28384498.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,22 +80,9 @@ function c28384498.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c28384498.thfilter,tp,LOCATION_DECK,0,1,1,nil,lv,attr) local g=Duel.SelectMatchingCard(tp,c28384498.thfilter,tp,LOCATION_DECK,0,1,1,nil,lv,attr)
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
elseif Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(c28384498.setfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(28384498,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sc=Duel.SelectMatchingCard(tp,c28384498.setfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if sc then
Duel.SSet(tp,sc)
end
end
elseif Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(c28384498.setfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(28384498,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sc=Duel.SelectMatchingCard(tp,c28384498.setfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if sc then
Duel.SSet(tp,sc)
end end
end end
end end
......
--放逐天牢-混沌圣堂
VHisc_HDST=VHisc_HDST or {}
--------------------------search filed---------------------------------
function VHisc_HDST.fth(ec,cid)
local cs=_G["c"..cid]
local e0=Effect.CreateEffect(ec)
e0:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_HAND)
e0:SetCountLimit(1,cid)
e0:SetCost(VHisc_HDST.thcost)
e0:SetTarget(VHisc_HDST.thtg)
e0:SetOperation(VHisc_HDST.thop)
ec:RegisterEffect(e0)
end
function VHisc_HDST.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function VHisc_HDST.thfilter(c)
return c:IsCode(33201450) and c:IsAbleToHand()
end
function VHisc_HDST.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(VHisc_HDST.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function VHisc_HDST.thop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.SelectMatchingCard(tp,VHisc_HDST.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if tg then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
-------------code check------------------
function VHisc_HDST.nck(c)
return c.VHisc_hdst or (VHisc_HDST.global_check and VHisc_HDST.codeck(VHisc_STCN,c))
end
-------------code table------------------
function VHisc_HDST.creattable()
if not VHisc_HDST.global_check then
VHisc_HDST.global_check=true
VHisc_STCN={}
VHisc_STCN[1]=0
end
end
function VHisc_HDST.codeck(tab,cc)
local result=false
for i,v in ipairs(tab) do
if cc:GetOriginalCode()==v then
result=true
end
end
return result
end
--function VHisc_HDST.reset(e,tp,eg,ep,ev,re,r,rp)
-- VHisc_STCN={}
-- VHisc_STCN[1]=0
--end
--------------------------------------------------------------------
VHisc_HDST.creattable()
-------------------------card effect------------------------------
local m=33201450
local cm=_G["c"..m]
if not cm then return end
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atk/def up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetValue(cm.val)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--add card name
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_BE_BATTLE_TARGET)
e4:SetRange(LOCATION_FZONE)
e4:SetCondition(cm.acncon1)
e4:SetOperation(cm.acnop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_BECOME_TARGET)
e5:SetCondition(cm.acncon2)
c:RegisterEffect(e5)
--special summon
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,0))
e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetRange(LOCATION_FZONE)
e6:SetHintTiming(0,TIMING_END_PHASE)
e6:SetCountLimit(2,m)
e6:SetTarget(cm.sumtg)
e6:SetOperation(cm.sumop)
c:RegisterEffect(e6)
end
cm.VHisc_hdst=true
--e2e3
function cm.atkfilter(c)
return VHisc_HDST.nck(c)
end
function cm.val(e,c)
return Duel.GetMatchingGroupCount(cm.atkfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,LOCATION_GRAVE,nil)*100
end
--e4 e5
function cm.acncon1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==1-tp then return false end
local ec=Duel.GetAttacker()
local tc=Duel.GetAttackTarget()
e:SetLabelObject(tc)
return tc and tc:IsFaceup() and VHisc_HDST.nck(ec)
end
function cm.acncon2(e,tp,eg,ep,ev,re,r,rp)
if rp==1-tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or g:GetCount()~=1 then return false end
local ec=re:GetHandler()
local tc=g:GetFirst()
e:SetLabelObject(tc)
return tc:IsControler(1-tp) and tc:IsLocation(LOCATION_ONFIELD) and tc:IsFaceup() and VHisc_HDST.nck(ec)
end
function cm.acnop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
local code=tc:GetOriginalCode()
if not VHisc_HDST.codeck(VHisc_STCN,tc) then
VHisc_STCN[#VHisc_STCN+1]=code
Duel.Hint(HINT_CARD,tp,33201450)
local fg=Duel.GetMatchingGroup(cm.fgfilter,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_EXTRA+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_EXTRA+LOCATION_REMOVED,nil,code)
for fc in aux.Next(fg) do
if fc:GetFlagEffect(33201450)==0 then
fc:RegisterFlagEffect(33201450,nil,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
end
end
end
end
function cm.fgfilter(c,code)
return c:GetOriginalCode()==code
end
--e6
function cm.sumfilter(c,e,tp)
return VHisc_HDST.nck(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.xyzfilter(c)
return c:IsXyzSummonable(nil) and VHisc_HDST.nck(c)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND)
end
function cm.sumop(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.sumfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local sg=Duel.GetMatchingGroup(cm.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
end
\ No newline at end of file
--天狱囚龙 法夫纳
local s,id,o=GetID()
Duel.LoadScript("c33201450.lua")
function s.initial_effect(c)
c:SetSPSummonOnce(33201451)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,VHisc_HDST.nck,2,true)
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_MZONE,LOCATION_MZONE,Duel.Release,REASON_COST+REASON_MATERIAL)
--negate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(s.discon)
e1:SetTarget(s.distg)
e1:SetOperation(s.disop)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(s.efilter)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(aux.bdocon)
e3:SetOperation(s.damop)
c:RegisterEffect(e3)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp
and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
end
function s.disfilter(c)
return VHisc_HDST.nck(c)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.disfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) 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 s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,s.disfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.Hint(24,0,aux.Stringid(id,0))
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
end
function s.efilter(e,re)
return VHisc_HDST.nck(re:GetHandler()) and re:GetHandlerPlayer()~=e:GetHandlerPlayer()
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
local dam=bc:GetBaseAttack()
if bc:GetBaseAttack()<bc:GetBaseDefense() then dam=bc:GetBaseDefense() end
if dam>0 then
Duel.Hint(24,0,aux.Stringid(id,1))
Duel.Hint(HINT_CARD,tp,33201451)
Duel.Damage(1-tp,dam,REASON_EFFECT)
end
end
\ No newline at end of file
--混沌圣堂的警哨
local s,id,o=GetID()
Duel.LoadScript("c33201450.lua")
function s.initial_effect(c)
VHisc_HDST.fth(c,id)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetLabel(0)
e1:SetCountLimit(1)
e1:SetCondition(s.con)
e1:SetTarget(s.postg)
e1:SetOperation(s.posop)
c:RegisterEffect(e1)
end
s.VHisc_hdst=true
function s.con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(function(c,tp) return c:IsControler(1-tp) end,1,nil,tp)
end
function s.posfilter(c)
return c:IsAttackPos() and c:IsCanChangePosition()
end
function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.posfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.posfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
Duel.SelectTarget(tp,s.posfilter,tp,0,LOCATION_MZONE,1,1,nil)
local tc=Duel.GetFirstTarget()
if VHisc_HDST.nck(tc) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) then
e:SetLabel(1)
Duel.SetOperationInfo(0,CATEGORY_SEARCH,nil,0,tp,1)
end
end
function s.filter(c)
return VHisc_HDST.nck(c) and c:IsAbleToHand()
end
function s.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsAttackPos() then
Duel.Hint(24,0,aux.Stringid(id,0))
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
if e:GetLabel()==1 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,2,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
end
--混沌圣堂的判官
local s,id,o=GetID()
Duel.LoadScript("c33201450.lua")
function s.initial_effect(c)
VHisc_HDST.fth(c,id)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetLabel(0)
e1:SetCountLimit(1)
e1:SetCondition(s.retcon)
e1:SetTarget(s.rettg)
e1:SetOperation(s.retop)
c:RegisterEffect(e1)
end
s.VHisc_hdst=true
function s.retcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()~=e:GetHandler() and ep==1-tp
end
function s.retfilter(c)
return c:IsFaceup() and c:IsAbleToHand()
end
function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(s.retfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.retfilter1,tp,0,LOCATION_MZONE,1,1,nil)
local tc=Duel.GetFirstTarget()
if VHisc_HDST.nck(tc) then
e:SetLabel(1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(-500)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(-500)
tc:RegisterEffect(e2)
if e:GetLabel()==1 then
Duel.Destroy(tc,REASON_EFFECT)
Duel.Hint(24,0,aux.Stringid(id,0))
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
\ No newline at end of file
--混沌圣堂的看守
local s,id,o=GetID()
Duel.LoadScript("c33201450.lua")
function s.initial_effect(c)
VHisc_HDST.fth(c,id)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1+10000)
e1:SetLabel(0)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_HAND)
e2:SetTarget(s.desreptg)
e2:SetValue(s.desrepval)
e2:SetOperation(s.desrepop)
c:RegisterEffect(e2)
end
s.VHisc_hdst=true
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function s.filter(c)
return VHisc_HDST.nck(c) and c:IsAbleToHand() and not c:IsCode(33201454)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetAttacker()
if chkc then return chkc==tg end
if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tg)
if e:GetHandler():IsLocation(LOCATION_HAND) then
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_HAND)
end
if VHisc_HDST.nck(tg) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) then
e:SetLabel(1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,1)
end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateAttack() then
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
if e:GetLabel()==1 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,2,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
end
--e2
function s.repfilter(c,tp)
return c:IsLocation(LOCATION_ONFIELD) and c:IsCode(33201450) and c:IsControler(tp) and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) end
if Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
local g=eg:Filter(s.repfilter,nil,tp)
return true
end
return false
end
function s.desrepval(e,c)
return s.repfilter(c,e:GetHandlerPlayer())
end
function s.desrepop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsLocation(LOCATION_HAND) then
Duel.Hint(HINT_CARD,tp,33201454)
Duel.SendtoGrave(c,REASON_REPLACE)
end
end
\ No newline at end of file
--混沌圣堂的破坏者
local s,id,o=GetID()
Duel.LoadScript("c33201450.lua")
function s.initial_effect(c)
VHisc_HDST.fth(c,id)
--Position+Negate
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE+CATEGORY_SPECIAL_SUMMON)
e1:SetLabel(0)
e1:SetCountLimit(1)
e1:SetTarget(s.tg)
e1:SetOperation(s.op)
c:RegisterEffect(e1)
end
s.VHisc_hdst=true
function s.filter(c)
return c:IsFaceup()
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_ONFIELD,1,1,nil)
local tc=Duel.GetFirstTarget()
if VHisc_HDST.nck(tc) then
e:SetLabel(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Hint(24,0,aux.Stringid(id,0))
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e1,true)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_REDIRECT,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(c:GetCode(),1))
if e:GetLabel()==1 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_TRIGGER)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
\ No newline at end of file
--混沌圣堂的追猎者
local s,id,o=GetID()
Duel.LoadScript("c33201450.lua")
function s.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetLabel(0)
e1:SetCondition(s.eqcon)
e1:SetTarget(s.eqtg)
e1:SetOperation(s.eqop)
c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,id+10000)
e3:SetCondition(s.spcon2)
e3:SetTarget(s.sptg2)
e3:SetOperation(s.spop2)
c:RegisterEffect(e3)
end
s.VHisc_hdst=true
function s.eqcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()~=e:GetHandler() and ep==1-tp
end
function s.eqfilter(c)
return c:IsFaceup()
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.eqfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(s.eqfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,s.eqfilter,tp,0,LOCATION_MZONE,1,1,nil)
local tc=Duel.GetFirstTarget()
if VHisc_HDST.nck(tc) then
e:SetLabel(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(1-tp) and tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,c,tc) then return end
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetLabelObject(tc)
e1:SetValue(s.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
Duel.Hint(24,0,aux.Stringid(id,0))
if e:GetLabel()==1 and tc:IsControler(1-tp) then
--control
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_SET_CONTROL)
e2:SetValue(tp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
end
end
end
function s.eqlimit(e,c)
return c==e:GetLabelObject()
end
--e3
function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function s.spfilter2(c,e,tp)
return VHisc_HDST.nck(c) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function s.spop2(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,s.spfilter2,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--混沌圣堂的行刑官
local s,id,o=GetID()
Duel.LoadScript("c33201450.lua")
function s.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,VHisc_HDST.nck,2,2)
c:EnableReviveLimit()
--Position+Negate
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE+CATEGORY_SPECIAL_SUMMON)
e1:SetLabel(0)
e1:SetTarget(s.tg)
e1:SetOperation(s.op)
c:RegisterEffect(e1)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id)
e3:SetCost(aux.bfgcost)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
end
s.VHisc_hdst=true
function s.filter(c)
return c:IsFaceup() and not c:IsAttack(0)
end
function s.setfilter(c)
return VHisc_HDST.nck(c) and not c:IsForbidden()
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local og=e:GetHandler():GetOverlayGroup()
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and not chkc:IsAttack(0) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and og:FilterCount(s.setfilter,nil)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil)
local tc=Duel.GetFirstTarget()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,nil)
if VHisc_HDST.nck(tc) then
e:SetLabel(1)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local og=e:GetHandler():GetOverlayGroup():Filter(s.setfilter,nil)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and og:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=og:Select(tp,1,1,nil):GetFirst()
Duel.Hint(24,0,aux.Stringid(id,0))
if Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) and tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsAttack(0) and not tc:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if e:GetLabel()==1 then
local c=e:GetHandler()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
end
--e3
function s.thfilter(c)
return VHisc_HDST.nck(c) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(24,0,aux.Stringid(id,1))
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>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()
Duel.LoadScript("c33201450.lua")
function s.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,2,4)
c:EnableReviveLimit()
--remove
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetCost(s.rmcost)
e1:SetCondition(s.rmcon)
e1:SetTarget(s.rmtg)
e1:SetOperation(s.rmop)
c:RegisterEffect(e1)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetValue(1)
c:RegisterEffect(e3)
--activate limit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(0,1)
e4:SetValue(s.actlimit)
c:RegisterEffect(e4)
end
s.VHisc_hdst=true
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=e:GetHandler():GetOverlayGroup()
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,rg:GetCount(),REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,rg:GetCount(),rg:GetCount(),REASON_COST)
end
function s.rmfilter(c)
return VHisc_HDST.nck(c) and c:IsAbleToRemove()
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,0,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_EXTRA,1,nil) end
local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_EXTRA,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_EXTRA,nil)
Duel.Hint(24,0,aux.Stringid(id,0))
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
function s.actlimit(e,re,tp)
local tc=re:GetHandler()
return VHisc_HDST.nck(tc)
end
--圣堂之审判
local s,id,o=GetID()
Duel.LoadScript("c33201450.lua")
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--in grave
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.damtg)
e2:SetOperation(s.damop)
c:RegisterEffect(e2)
end
s.VHisc_hdst=true
function s.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function s.thfilter(c)
return c:IsType(TYPE_MONSTER) and VHisc_HDST.nck(c) and c:IsAbleToHand()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and s.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingTarget(s.filter,tp,0,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT) then
Duel.ConfirmCards(1-tp,g)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e5:SetRange(LOCATION_MZONE)
e5:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e5:SetValue(1)
tc:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e6:SetValue(s.fuslimit)
tc:RegisterEffect(e6)
local e7=e5:Clone()
e7:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e7)
local e8=e5:Clone()
e8:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
tc:RegisterEffect(e8)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1))
end
end
end
function s.fuslimit(e,c,sumtype)
return sumtype==SUMMON_TYPE_FUSION
end
function s.damfilter(c)
return c:IsFaceup() and c:GetLevel()>0
end
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.damfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.damfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.damfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetFirst():GetLevel()*200)
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Damage(1-tp,tc:GetLevel()*200,REASON_EFFECT)
end
end
\ No newline at end of file
--只能可控机械骰子
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddSynchroMixProcedure(c,s.matfilter1,nil,nil,aux.NonTuner(nil),1,99)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(s.splimit)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(s.immop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(s.spstg)
e2:SetOperation(s.spsop)
c:RegisterEffect(e2)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_SOLVED)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local ex1,g1,gc1,dp1,dv1=Duel.GetOperationInfo(ev,CATEGORY_DICE)
local ex2,g2,gc2,dp2,dv2=Duel.GetOperationInfo(ev,CATEGORY_COIN)
if not rc:IsRelateToEffect(re) or not re:IsActiveType(TYPE_MONSTER) then return end
local p,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION)
if loc==LOCATION_MZONE and rc:GetFlagEffect(id)==0 and (ex1 and dv1>0 or ex2 and dv2>0) then
rc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
function s.matfilter1(c,syncard)
return (c:IsTuner(syncard) or c:GetFlagEffect(id)>0) and (c.toss_dice or c.toss_coin)
end
function s.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_GRAVE)
end
function s.immop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local d1,d2=Duel.TossDice(tp,2)
if not (c:IsFaceup() and c:IsRelateToEffect(e)) then return end
if d1==d2 then
local off=1
local ops={}
local opval={}
while off<7 do
ops[off]=aux.Stringid(id,off)
opval[off-1]=off
off=off+1
end
local op1=Duel.SelectOption(tp,table.unpack(ops))
local offo=1
local opso={}
local opvalo={}
while offo<6 do
if offo>=op1+1 then
opso[offo]=aux.Stringid(id,offo+1)
opvalo[offo-1]=offo
offo=offo+1
else
opso[offo]=aux.Stringid(id,offo)
opvalo[offo-1]=offo
offo=offo+1
end
end
local op2=Duel.SelectOption(tp,table.unpack(opso))
if op2>=op1 then
op2=op2+1
end
if opval[op1]==1 or opval[op2]==1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
if opval[op1]==2 or opval[op2]==2 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
c:RegisterEffect(e3)
end
if opval[op1]==3 or opval[op2]==3 then
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_UNRELEASABLE_SUM)
e4:SetValue(1)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e5)
end
if opval[op1]==4 or opval[op2]==4 then
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_IMMUNE_EFFECT)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetValue(s.efilter)
e6:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e6)
end
if opval[op1]==5 or opval[op2]==5 then
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e7:SetRange(LOCATION_MZONE)
e7:SetCode(EFFECT_UPDATE_ATTACK)
e7:SetValue(1500)
e7:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e8)
end
if opval[op1]==6 or opval[op2]==6 then
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(id,6))
e8:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE)
e8:SetType(EFFECT_TYPE_QUICK_O)
e8:SetCode(EVENT_CHAINING)
e8:SetCountLimit(1)
e8:SetRange(LOCATION_MZONE)
e8:SetCondition(s.discon)
e8:SetTarget(s.distg)
e8:SetOperation(s.disop)
e8:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e8)
end
else
if d1==1 or d2==1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
if d1==2 or d2==2 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
c:RegisterEffect(e3)
end
if d1==3 or d2==3 then
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_UNRELEASABLE_SUM)
e4:SetValue(1)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e5)
end
if d1==4 or d2==4 then
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_IMMUNE_EFFECT)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetValue(s.efilter)
e6:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e6)
end
if d1==5 or d2==5 then
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e7:SetRange(LOCATION_MZONE)
e7:SetCode(EFFECT_UPDATE_ATTACK)
e7:SetValue(1500)
e7:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e8)
end
if d1==6 or d2==6 then
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(id,6))
e8:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE)
e8:SetType(EFFECT_TYPE_QUICK_O)
e8:SetCode(EVENT_CHAINING)
e8:SetCountLimit(1)
e8:SetRange(LOCATION_MZONE)
e8:SetCondition(s.discon)
e8:SetTarget(s.distg)
e8:SetOperation(s.disop)
e8:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e8)
end
end
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainDisablable(ev)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) and rc:IsDestructable()
and Duel.SelectYesNo(tp,aux.Stringid(id,7)) then
Duel.BreakEffect()
Duel.Destroy(rc,REASON_EFFECT)
end
end
function s.efilter(e,re)
return re:IsActivated()
end
function s.dfilter(c,tp)
return c:IsFaceupEx() and c:GetFlagEffect(id)>0 and Duel.GetMZoneCount(tp,c)>0
end
function s.spstg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,c,tp)
if chk==0 then return #g>1 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function s.spsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,s.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,2,2,aux.ExceptThisCard(e),tp)
if Duel.Destroy(g,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
end
\ No newline at end of file
--血腥蔷薇 伤害欲
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LIMIT_SUMMON_PROC)
e1:SetCondition(s.ttcon)
e1:SetOperation(s.ttop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_LIMIT_SET_PROC)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,0))
e4:SetCategory(CATEGORY_DAMAGE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e4:SetRange(LOCATION_HAND)
e4:SetCost(s.damcost)
e4:SetTarget(s.damtg)
e4:SetOperation(s.damop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,1))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_SUMMON_SUCCESS)
e5:SetOperation(s.operation)
c:RegisterEffect(e5)
end
function s.ttcon(e,c,minc)
if c==nil then return true end
return minc<=3 and Duel.CheckTribute(c,3)
end
function s.ttop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectTribute(tp,c,3,3)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function s.damcost(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 s.damfilter(c)
return c:IsFaceup() and c:IsLevelAbove(1)
end
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.damfilter(c) end
if chk==0 then return Duel.IsExistingTarget(s.damfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,s.damfilter,tp,0,LOCATION_MZONE,1,1,nil)
local dam=g:GetFirst():GetLevel()*300
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then
local dam=tc:GetLevel()*300
Duel.Damage(1-tp,dam,REASON_EFFECT)
end
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(math.ceil(c:GetBaseAttack()/2))
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetValue(math.ceil(c:GetBaseDefense()/2))
c:RegisterEffect(e2)
end
\ No newline at end of file
--血腥蔷薇 窥视欲
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LIMIT_SUMMON_PROC)
e1:SetCondition(s.ttcon)
e1:SetOperation(s.ttop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_LIMIT_SET_PROC)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,0))
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CUSTOM+id)
e4:SetRange(LOCATION_HAND)
e4:SetCondition(s.dcon)
e4:SetCost(s.dcost)
e4:SetTarget(s.dtg)
e4:SetOperation(s.dop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,1))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_SUMMON_SUCCESS)
e5:SetOperation(s.operation)
c:RegisterEffect(e5)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_HAND)
ge1:SetCondition(s.regcon)
ge1:SetOperation(s.regop)
Duel.RegisterEffect(ge1,0)
end
end
function s.cfilter(c,tp)
return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK)
end
function s.regcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentPhase()==PHASE_DRAW or Duel.GetCurrentPhase()==0 then return false end
local v=0
if eg:IsExists(s.cfilter,1,nil,0) then v=v+1 end
if eg:IsExists(s.cfilter,1,nil,1) then v=v+2 end
if v==0 then return false end
e:SetLabel(({0,1,PLAYER_ALL})[v])
return true
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(eg,EVENT_CUSTOM+id,re,r,rp,ep,e:GetLabel())
end
function s.ttcon(e,c,minc)
if c==nil then return true end
return minc<=3 and Duel.CheckTribute(c,3)
end
function s.ttop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectTribute(tp,c,3,3)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function s.dcon(e,tp,eg,ep,ev,re,r,rp)
return ev==1-tp or ev==PLAYER_ALL
end
function s.dcost(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 s.dtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NOT(Card.IsPublic),tp,0,LOCATION_HAND,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
end
function s.dop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.NOT(Card.IsPublic),tp,0,LOCATION_HAND,nil)
if g:GetCount()>0 then
local sg=g:RandomSelect(tp,1)
Duel.ConfirmCards(tp,sg)
local tc=sg:GetFirst()
local fid=c:GetFieldID()
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,fid,66)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1)
e2:SetLabel(fid)
e2:SetTarget(s.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e3,tp)
local e4=e2:Clone()
e4:SetCode(EFFECT_CANNOT_MSET)
Duel.RegisterEffect(e4,tp)
local e5=e2:Clone()
e5:SetCode(EFFECT_CANNOT_SSET)
Duel.RegisterEffect(e5,tp)
local e6=Effect.CreateEffect(e:GetHandler())
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetCode(EFFECT_CANNOT_ACTIVATE)
e6:SetTargetRange(0,1)
e6:SetValue(s.aclimit)
e6:SetLabel(fid)
e6:SetLabelObject(tc)
e6:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e6,tp)
end
end
function s.splimit(e,c)
return c:GetFlagEffectLabel(id)==e:GetLabel()
end
function s.aclimit(e,re,tp)
local c=re:GetHandler()
local tc=e:GetLabelObject()
return c==tc and c:GetFlagEffectLabel(id)==e:GetLabel()
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(math.ceil(c:GetBaseAttack()/2))
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetValue(math.ceil(c:GetBaseDefense()/2))
c:RegisterEffect(e2)
end
\ No newline at end of file
--血腥蔷薇 毁灭欲
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LIMIT_SUMMON_PROC)
e1:SetCondition(s.ttcon)
e1:SetOperation(s.ttop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_LIMIT_SET_PROC)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(545781,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetRange(LOCATION_HAND)
e4:SetCode(EVENT_DAMAGE)
e4:SetCondition(s.descon)
e4:SetCost(s.descost)
e4:SetTarget(s.destg)
e4:SetOperation(s.desop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,0))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_SUMMON_SUCCESS)
e5:SetOperation(s.operation)
c:RegisterEffect(e5)
end
function s.ttcon(e,c,minc)
if c==nil then return true end
return minc<=3 and Duel.CheckTribute(c,3)
end
function s.ttop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectTribute(tp,c,3,3)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function s.descost(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 s.desfilter(c,dam)
return c:IsFaceup() and c:IsDefenseBelow(dam)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_MZONE,1,nil,ev) end
local sg=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil,ev)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil,ev)
Duel.Destroy(sg,REASON_EFFECT)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(math.ceil(c:GetBaseAttack()/2))
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetValue(math.ceil(c:GetBaseDefense()/2))
c:RegisterEffect(e2)
end
\ No newline at end of file
--血腥蔷薇 控制欲
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LIMIT_SUMMON_PROC)
e1:SetCondition(s.ttcon)
e1:SetOperation(s.ttop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_LIMIT_SET_PROC)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,0))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e4:SetRange(LOCATION_HAND)
e4:SetCost(s.immcost)
e4:SetTarget(s.immtg)
e4:SetOperation(s.immop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,0))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_SUMMON_SUCCESS)
e5:SetOperation(s.operation)
c:RegisterEffect(e5)
end
function s.ttcon(e,c,minc)
if c==nil then return true end
return minc<=3 and Duel.CheckTribute(c,3)
end
function s.ttop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectTribute(tp,c,3,3)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function s.immcost(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 s.immtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function s.immop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(s.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UNRELEASABLE_SUM)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UNRELEASABLE_NONSUM)
tc:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e4:SetValue(s.fuslimit)
tc:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
tc:RegisterEffect(e5)
local e6=e3:Clone()
e6:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e6)
local e7=e3:Clone()
e7:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
tc:RegisterEffect(e7)
end
end
function s.efilter(e,te)
return te:GetHandler()~=e:GetHandler()
end
function s.fuslimit(e,c,sumtype)
return sumtype==SUMMON_TYPE_FUSION
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(math.ceil(c:GetBaseAttack()/2))
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetValue(math.ceil(c:GetBaseDefense()/2))
c:RegisterEffect(e2)
end
\ No newline at end of file
--血腥蔷薇 占有欲
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LIMIT_SUMMON_PROC)
e1:SetCondition(s.ttcon)
e1:SetOperation(s.ttop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_LIMIT_SET_PROC)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,0))
e4:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_HAND)
e4:SetCondition(s.tdcon)
e4:SetCost(s.tdcost)
e4:SetTarget(s.tdtg)
e4:SetOperation(s.tdop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,1))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_SUMMON_SUCCESS)
e5:SetOperation(s.operation)
c:RegisterEffect(e5)
end
function s.ttcon(e,c,minc)
if c==nil then return true end
return minc<=3 and Duel.CheckTribute(c,3)
end
function s.ttop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectTribute(tp,c,3,3)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function s.tdcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:GetActivateLocation()==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) and re:GetHandler():IsSummonLocation(LOCATION_EXTRA)
end
function s.tdcost(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 s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local rc=re:GetHandler()
if chk==0 then return rc:IsRelateToEffect(re) and rc:IsAbleToExtra() and rc:IsLocation(LOCATION_MZONE) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,rc,1,0,0)
end
function s.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
and c:IsLocation(LOCATION_GRAVE)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local mg=rc:GetMaterial()
local res=rc:IsSummonType(SUMMON_TYPE_FUSION) or rc:IsSummonType(TYPE_SYNCHRO) or rc:IsSummonType(TYPE_LINK)
if rc:IsRelateToEffect(re) and Duel.SendtoDeck(rc,nil,SEQ_DECKTOP,REASON_EFFECT)~=0
and res
and rc:IsLocation(LOCATION_EXTRA) then
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
local tg=mg:Filter(aux.NecroValleyFilter(s.spfilter),nil,e,tp):Filter(Card.IsControler,nil,1-tp)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=nil
if tg:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=tg:Select(tp,ft,ft,nil)
else
g=tg
end
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,1-tp,false,false,POS_FACEUP)
end
end
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(math.ceil(c:GetBaseAttack()/2))
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetValue(math.ceil(c:GetBaseDefense()/2))
c:RegisterEffect(e2)
end
\ No newline at end of file
--牛头人战曲
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,5053103)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.thcost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.CheckReleaseGroup(tp,aux.TRUE,1,nil) end
local g=Duel.SelectReleaseGroup(tp,aux.TRUE,1,1,nil)
Duel.Release(g,REASON_COST)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.thfilter1(c)
return (c:IsCode(5053103) or c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_BEASTWARRIOR) and c:IsLevel(4) and c:IsAttack(1700) and c:IsDefense(1000))
and c:IsAbleToHand()
end
function s.thfilter2(c)
return not c:IsCode(id) and aux.IsCodeListed(c,5053103) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
return Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK,0,1,nil) or Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local res=0
if tc:GetOwner()==1-tp then res=1 end
local off=1
local ops={}
local opval={}
if Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK,0,1,nil) then
ops[off]=aux.Stringid(id,1)
opval[off-1]=1
off=off+1
end
if Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil) then
ops[off]=aux.Stringid(id,2)
opval[off-1]=2
off=off+1
end
if res==1 and Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil) then
ops[off]=aux.Stringid(id,3)
opval[off-1]=3
off=off+1
end
if off==1 then return end
local op=Duel.SelectOption(tp,table.unpack(ops))
local br=0
if opval[op]==1 or opval[op]==3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
br=1
end
end
if opval[op]==2 or opval[op]==3 then
if br==1 then
Duel.BreakEffect()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter2,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
end
\ No newline at end of file
--牛头人的狂意
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,5053103)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.cfilter(c)
return c:IsLink(3) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_BEASTWARRIOR) and c:GetBaseAttack()==1700 and c:IsFaceup()
end
function s.filter(c,e,tp,check)
return (c:IsCode(5053103) or c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_BEASTWARRIOR) and c:IsLevel(4) and c:IsAttack(1700) and c:IsDefense(1000)) and (c:IsAbleToHand()
or check and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp,check)
end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,check)
if g:GetCount()<=0 then return end
local tc=g:GetFirst()
local b=check and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
if tc:IsAbleToHand() and (not b or Duel.SelectOption(tp,1190,1152)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--牛头人萨满
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,5053103)
aux.AddSynchroMixProcedure(c,s.matfilter1,nil,nil,aux.NonTuner(nil),1,99)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(s.check)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_CONTROL)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetLabelObject(e1)
e2:SetCondition(s.ccon)
e2:SetTarget(s.ctg)
e2:SetOperation(s.cop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
function s.matfilter1(c,syncard)
return c:IsTuner(syncard) or c:IsCode(5053103)
end
function s.check(e,c)
if c:GetMaterial():IsExists(Card.IsCode,1,nil,5053103) then e:SetLabel(1) else e:SetLabel(0) end
end
function s.ccon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabelObject():GetLabel()==1
end
function s.ctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0)
end
function s.cop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.GetControl(tc,tp)
end
end
function s.spfilter(c,e,tp)
return c:IsCanBeEffectTarget(e) and c:IsType(TYPE_MONSTER)
end
function s.spsumfilter1(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp)
end
function s.spsumfilter2(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
end
function s.gcheck(g,e,tp)
if #g~=2 then return false end
local ac=g:GetFirst()
local bc=g:GetNext()
return s.spsumfilter1(ac,e,tp) and s.spsumfilter2(bc,e,tp)
or s.spsumfilter1(bc,e,tp) and s.spsumfilter2(ac,e,tp)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local g=Duel.GetMatchingGroup(s.spfilter,tp,0,LOCATION_GRAVE,nil,e,tp)
if chk==0 then
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)
return not Duel.IsPlayerAffectedByEffect(tp,59822133) and ft1>0 and ft2>0
and g:CheckSubGroup(s.gcheck,2,2,e,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,s.gcheck,false,2,2,e,tp)
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,PLAYER_ALL,LOCATION_GRAVE)
end
function s.ccfilter(c,tp)
return c:GetOwner()==tp
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) or ft1<=0 or ft2<=0 then return end
local g=Duel.GetTargetsRelateToChain()
if not g:CheckSubGroup(s.gcheck,2,2,e,tp) then return end
local sg=nil
if e:GetHandler():GetMaterial():IsExists(s.ccfilter,1,nil,1-tp) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1))
sg=g:FilterSelect(tp,s.spsumfilter2,1,1,nil,e,tp)
else
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2))
sg=g:FilterSelect(1-tp,s.spsumfilter2,1,1,nil,e,tp)
end
Duel.SpecialSummonStep(sg:GetFirst(),0,tp,1-tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep((g-sg):GetFirst(),0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
\ No newline at end of file
--万圣魔术师
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddLinkProcedure(c,nil,2,2,s.lcheck)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(s.condition)
e0:SetOperation(s.regop)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(s.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCondition(s.spcon2)
e3:SetCost(s.spcost2)
e3:SetTarget(s.sptg2)
e3:SetOperation(s.spop2)
c:RegisterEffect(e3)
end
function s.lcheck(g,lc)
return g:GetClassCount(Card.GetLinkCode)==g:GetCount()
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsCode(id) and bit.band(sumtype,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and e:GetLabel()==1
end
function s.spfilter(c,e,tp)
return c:IsFaceup() and c:IsLevel(4) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(s.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabel(c:GetFieldID())
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetTarget(s.disable)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetLabel(c:GetFieldID())
Duel.RegisterEffect(e2,tp)
end
function s.aclimit(e,re,tp)
local rc=re:GetHandler()
return rc:IsOnField() and rc:IsCode(id)
end
function s.disable(e,c)
return not c:IsCode(id) and (not c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT))
end
function s.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsLinkType,1,nil,TYPE_NORMAL) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function s.spfilter2(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_NORMAL) and Duel.IsExistingMatchingCard(s.sspfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,c:GetCode())
end
function s.sspfilter(c,e,tp,code)
return c:IsType(TYPE_NORMAL) and c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.spfilter2(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingTarget(s.spfilter2,tp,LOCATION_MZONE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.spfilter2,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.ssspfilter(c,code)
return c:IsSynchroSummonable(nil) and aux.IsCodeListed(c,code)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() or not tc:IsType(TYPE_MONSTER) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.sspfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,tc:GetCode())
if sg:GetCount()>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.AdjustAll()
if Duel.IsExistingMatchingCard(s.ssspfilter,tp,LOCATION_EXTRA,0,1,nil,tc:GetCode()) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
local tg=Duel.GetMatchingGroup(s.ssspfilter,tp,LOCATION_EXTRA,0,nil,tc:GetCode())
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=tg:Select(tp,1,1,nil)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,3))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(s.immval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END)
e1:SetOwnerPlayer(tp)
sg:GetFirst():RegisterEffect(e1,true)
Duel.SynchroSummon(tp,sg:GetFirst(),nil)
end
end
end
\ No newline at end of file
--源祀神官 格尔格莱姆
local m=64800239
local cm=_G["c"..m]
function cm.initial_effect(c)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+10000)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
end
function cm.thfil(c,ec)
return (c:IsCode(m-9) or c:IsCode(m-8)) and c:IsAbleToHand()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfil,tp,LOCATION_DECK,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfil,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoHand(g,tp,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
local e2=Effect.CreateEffect(c)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(cm.tg)
e2:SetValue(1)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
end
function cm.tg(e,c)
return c:IsType(TYPE_RITUAL) and c:IsFaceup()
end
function cm.thfil(c,tp)
return c:IsCode(m-1) and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectMatchingCard(tp,cm.thfil,tp,LOCATION_DECK,0,1,1,nil,tp)
if chk==0 then return #g>0 end
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,cm.thfil,tp,LOCATION_DECK,0,1,1,nil,tp)
if g:GetCount()>0 then
local xg0=g:GetFirst()
local te=xg0:GetActivateEffect()
if not te:IsActivatable(tp,true,true) then return end
Duel.MoveToField(xg0,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
te:UseCountLimit(tp,1,true)
local tep=xg0:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
end
end
\ No newline at end of file
...@@ -3,11 +3,13 @@ local s,id,o=GetID() ...@@ -3,11 +3,13 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
--ritual summon --ritual summon
local e1=aux.AddRitualProcEqual2(c,s.filter,nil,nil,s.matfilter,true) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--synchro summon --synchro summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -15,6 +17,7 @@ function s.initial_effect(c) ...@@ -15,6 +17,7 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1)
e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.sccon) e2:SetCondition(s.sccon)
...@@ -30,6 +33,42 @@ function s.initial_effect(c) ...@@ -30,6 +33,42 @@ function s.initial_effect(c)
e3:SetValue(LOCATION_DECKSHF) e3:SetValue(LOCATION_DECKSHF)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.spfilter(c,e,tp,mg)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x835) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and mg:Filter(aux.TRUE,c):CheckWithSumEqual(Card.GetLevel,c:GetLevel(),1,99)
end
function s.relfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsReleasable() and c:IsLevelAbove(0)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local mg=Duel.GetMatchingGroup(s.relfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,nil)
return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,mg)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function s.fselect(g,sc)
return g:GetSum(Card.GetLevel)==sc:GetLevel()
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
::cancel::
local mg=Duel.GetMatchingGroup(s.relfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,mg):GetFirst()
if tc then
mg:RemoveCard(tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat=mg:SelectSubGroup(tp,s.fselect,false,1,99,tc)
if not mat then
goto cancel
end
tc:SetMaterial(mat)
Duel.Release(mat,REASON_EFFECT)
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
function s.filter(c,e,tp,chk) function s.filter(c,e,tp,chk)
return c:IsSetCard(0x835) and (not chk or c~=e:GetHandler()) return c:IsSetCard(0x835) and (not chk or c~=e:GetHandler())
end end
...@@ -42,17 +81,16 @@ function s.sccon(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,17 +81,16 @@ function s.sccon(e,tp,eg,ep,ev,re,r,rp)
and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2) and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
end end
function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSpecialSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function s.scop(e,tp,eg,ep,ev,re,r,rp) function s.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end local g=Duel.GetMatchingGroup(Card.IsSpecialSummonable,tp,LOCATION_EXTRA,0,nil,c)
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c) Duel.SpecialSummonRule(tp,sc)
end end
end end
function s.recon(e) function s.recon(e)
......
...@@ -5,7 +5,7 @@ function c67200302.initial_effect(c) ...@@ -5,7 +5,7 @@ function c67200302.initial_effect(c)
--spsummon and to deck --spsummon and to deck
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200302,0)) e1:SetDescription(aux.Stringid(67200302,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_LEAVE_FIELD) e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
...@@ -29,7 +29,6 @@ function c67200302.initial_effect(c) ...@@ -29,7 +29,6 @@ function c67200302.initial_effect(c)
e2:SetOperation(c67200302.ctop) e2:SetOperation(c67200302.ctop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
-- --
function c67200302.spfilter(c,tp) function c67200302.spfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and (c:IsSetCard(0x675) or c:IsSetCard(0x3674)) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and (c:IsSetCard(0x675) or c:IsSetCard(0x3674)) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
...@@ -41,10 +40,17 @@ function c67200302.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,10 +40,17 @@ function c67200302.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c67200302.setfilter(c)
return (c:IsSetCard(0x675) or c:IsSetCard(0x3674)) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c67200302.spop(e,tp,eg,ep,ev,re,r,rp) function c67200302.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and and Duel.IsExistingMatchingCard(c67200302.setfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(67200302,2)) then
Duel.SendtoDeck(eg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c67200302.setfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,2,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end end
end end
-- --
...@@ -55,14 +61,11 @@ function c67200302.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,14 +61,11 @@ function c67200302.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c67200302.filter(c,tp)
return c:IsFaceup()
end
function c67200302.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c67200302.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) and c67200302.filter(chkc,tp) end if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c67200302.filter,tp,0,LOCATION_ONFIELD,1,nil,tp) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c67200302.filter,tp,0,LOCATION_ONFIELD,1,1,nil,tp) local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c67200302.ctop(e,tp,eg,ep,ev,re,r,rp) function c67200302.ctop(e,tp,eg,ep,ev,re,r,rp)
......
--工匠之魔导书
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_END_PHASE,TIMING_END_PHASE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.cffilter(c)
return c:IsSetCard(0x106e) and not c:IsPublic()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cffilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.cffilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),nil,TYPE_MONSTER+TYPE_EFFECT,0,0,1,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_EFFECT+TYPE_MONSTER)
e1:SetReset(RESET_EVENT+0x47c0000)
tc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_ADD_RACE)
e2:SetValue(RACE_SPELLCASTER)
tc:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_ADD_ATTRIBUTE)
e3:SetValue(ATTRIBUTE_LIGHT)
tc:RegisterEffect(e3,true)
local e4=e1:Clone()
e4:SetCode(EFFECT_SET_BASE_ATTACK)
e4:SetValue(2800)
tc:RegisterEffect(e4,true)
local e5=e1:Clone()
e5:SetCode(EFFECT_SET_BASE_DEFENSE)
e5:SetValue(0)
tc:RegisterEffect(e5,true)
local e6=e1:Clone()
e6:SetCode(EFFECT_CHANGE_LEVEL)
e6:SetValue(1)
tc:RegisterEffect(e6,true)
if Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then
--Return to hand
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e7:SetReset(RESET_EVENT+RESETS_REDIRECT)
e7:SetValue(LOCATION_HAND)
tc:RegisterEffect(e7,true)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e8:SetCode(EVENT_TO_HAND)
e8:SetCondition(s.thcon)
e8:SetOperation(s.thop)
Duel.RegisterEffect(e8,tp)
tc:RegisterFlagEffect(id,RESET_EVENT+0x1de0000,0,1,tc:GetRealFieldID())
--copy effect
local e9=Effect.CreateEffect(c)
e9:SetDescription(aux.Stringid(id,1))
e9:SetCategory(CATEGORY_SPECIAL_SUMMON)
e9:SetType(EFFECT_TYPE_QUICK_O)
e9:SetHintTiming(TIMING_MAIN_END,TIMING_MAIN_END)
e9:SetCode(EVENT_FREE_CHAIN)
e9:SetRange(LOCATION_MZONE)
e9:SetCondition(s.cpcon)
e9:SetCost(s.cpcost)
e9:SetTarget(s.cptg)
e9:SetOperation(s.cpop)
e9:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e9,true)
end
Duel.SpecialSummonComplete()
end
end
function s.thfilter(c)
return c:GetFlagEffect(id)~=0
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.thfilter,1,nil)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(s.thfilter,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
e:Reset()
end
function s.cpcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function s.costfilter(c,tp)
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function s.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable()
and Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil,tp) end
local g=Duel.GetMatchingGroup(s.costfilter,tp,LOCATION_HAND,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.Release(e:GetHandler(),REASON_COST)
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end
function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():CheckActivateEffect(false,true,false) end
local c=e:GetHandler()
local te,ceg,cev,cre,cr,crp=c:CheckActivateEffect(false,true,true)
Duel.ClearTargetCard()
c:CreateEffectRelation(e)
local tg=te:GetTarget()
if tg then tg(e,tp,ceg,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
end
function s.cpop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if not (te and te:GetHandler():IsRelateToEffect(e)) then return end
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
--召唤之魔导书
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--remian instead of send to grave
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_CHAIN_SOLVED)
e0:SetReset(RESET_PHASE+PHASE_END)
e0:SetCondition(s.rmcon)
e0:SetOperation(s.rmop)
Duel.RegisterEffect(e0,tp)
--adjust
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetOperation(s.effop)
Duel.RegisterEffect(e1,tp)
end
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL)
and rc:IsType(TYPE_SPELL) and rc:IsRelateToEffect(re) and rc:IsStatus(STATUS_LEAVE_CONFIRMED) and rc:IsSetCard(0x106e) and (rc:GetSequence()==0 or rc:GetSequence()==4)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetOwner()
local rc=re:GetHandler()
rc:CancelToGrave()
--remain field
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,4))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1)
--destory
local fid=rc:GetFieldID()
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetLabel(fid)
e4:SetLabelObject(rc)
e4:SetCondition(s.descon)
e4:SetOperation(s.desop)
Duel.RegisterEffect(e4,tp)
--
rc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid)
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(id)==e:GetLabel() then
return true
else
e:Reset()
return false
end
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT)
end
function s.efffilter(c)
return c:GetSequence()==0 and c:IsSetCard(0x106e) and c:GetFlagEffect(id+1)==0 and c:IsType(TYPE_SPELL) and c:IsFaceup()
end
function s.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetOwner()
local g=Duel.GetMatchingGroup(s.efffilter,tp,LOCATION_SZONE,0,nil)
for tc in aux.Next(g) do
tc:RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
if not aux.PendulumChecklist then
aux.PendulumChecklist=0
local ge1=Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge1:SetOperation(aux.PendulumReset)
Duel.RegisterEffect(ge1,0)
end
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,3))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC_G)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(s.PendCondition())
e1:SetOperation(s.PendOperation())
e1:SetValue(SUMMON_TYPE_PENDULUM)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function s.rpzfilter(c)
return c:GetSequence()==4 and c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and c:IsFaceup()
end
function s.PConditionFilter(c,e,tp,lscale,rscale,eset)
local lv=0
if c.pendulum_level then
lv=c.pendulum_level
else
lv=c:GetLevel()
end
if c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) then lv=7 end
local bool=aux.PendulumSummonableBool(c)
return (c:IsLocation(LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM)))
and lv>lscale and lv<rscale and
((c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,bool,bool)) or (c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),0x106e,TYPES_NORMAL_TRAP_MONSTER,0,0,7,RACE_SPELLCASTER,ATTRIBUTE_LIGHT)))
and not c:IsForbidden()
and (aux.PendulumChecklist&(0x1<<tp)==0 or aux.PConditionExtraFilter(c,e,tp,lscale,rscale,eset))
end
function s.PendCondition()
return function(e,c,og)
if c==nil then return true end
local tp=c:GetControler()
local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_EXTRA_PENDULUM_SUMMON)}
if Auxiliary.PendulumChecklist&(0x1<<tp)~=0 and #eset==0 then return false end
local rpz=Duel.GetMatchingGroup(s.rpzfilter,tp,LOCATION_SZONE,0,nil):GetFirst()
if rpz==nil or c==rpz then return false end
local lscale=6
local rscale=8
--if lscale>rscale then lscale,rscale=rscale,lscale end
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED end
if Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)>0 then loc=loc+LOCATION_EXTRA end
if loc==0 then return false end
local g=nil
if og then
g=og:Filter(Card.IsLocation,nil,loc)
else
g=Duel.GetFieldGroup(tp,loc,0)
end
return g:IsExists(s.PConditionFilter,1,nil,e,tp,lscale,rscale,eset)
end
end
function s.PendOperation()
return function(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
local rpz=Duel.GetMatchingGroup(s.rpzfilter,tp,LOCATION_SZONE,0,nil):GetFirst()
local lscale=6
local rscale=8
if lscale>rscale then lscale,rscale=rscale,lscale end
local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_EXTRA_PENDULUM_SUMMON)}
local tg=nil
local loc=0
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)
local ft=Duel.GetUsableMZoneCount(tp)
local ect=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]
if ect and ect<ft2 then ft2=ect end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then
if ft1>0 then ft1=1 end
if ft2>0 then ft2=1 end
ft=1
end
if ft1>0 then loc=loc|LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED end
if ft2>0 then loc=loc|LOCATION_EXTRA end
if og then
tg=og:Filter(Card.IsLocation,nil,loc):Filter(s.PConditionFilter,nil,e,tp,lscale,rscale,eset)
else
tg=Duel.GetMatchingGroup(s.PConditionFilter,tp,loc,0,nil,e,tp,lscale,rscale,eset)
end
local ce=nil
local b1=Auxiliary.PendulumChecklist&(0x1<<tp)==0
local b2=#eset>0
if b1 and b2 then
local options={1163}
for _,te in ipairs(eset) do
table.insert(options,te:GetDescription())
end
local op=Duel.SelectOption(tp,table.unpack(options))
if op>0 then
ce=eset[op]
end
elseif b2 and not b1 then
local options={}
for _,te in ipairs(eset) do
table.insert(options,te:GetDescription())
end
local op=Duel.SelectOption(tp,table.unpack(options))
ce=eset[op+1]
end
if ce then
tg=tg:Filter(aux.PConditionExtraFilterSpecific,nil,e,tp,lscale,rscale,ce)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
aux.GCheckAdditional=aux.PendOperationCheck(ft1,ft2,ft)
local g=tg:SelectSubGroup(tp,aux.TRUE,true,1,math.min(#tg,ft))
aux.GCheckAdditional=nil
if not g then return end
if ce then
Duel.Hint(HINT_CARD,0,ce:GetOwner():GetOriginalCode())
ce:UseCountLimit(tp)
else
aux.PendulumChecklist=aux.PendulumChecklist|(0x1<<tp)
end
sg:Merge(g)
Duel.HintSelection(Group.FromCards(c))
Duel.HintSelection(Group.FromCards(rpz))
--
local spellg=sg:Filter(s.spellfilter,nil)
local exgc=sg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)
for tc in aux.Next(spellg) do
--spsummon limit
--local e0=Effect.CreateEffect(tc)
--e0:SetType(EFFECT_TYPE_SINGLE)
--e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+ EFFECT_FLAG_UNCOPYABLE)
--e0:SetCode(EFFECT_SPSUMMON_CONDITION)
--e0:SetReset(RESET_EVENT+0x47c0000)
--e0:SetValue(aux.penlimit)
--tc:RegisterEffect(e0,true)
--local mt=getmetatable(tc)
--local loc=mt.psummonable_location
--if loc==nil then
-- loc=0xff
-- mt.psummonable_location=loc
--end
local zone=0xff
if exgc>=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM) then
local lzone=Duel.GetLinkedZone(tp)
zone=zone~lzone
end
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_NORMAL+TYPE_MONSTER)
e1:SetReset(RESET_EVENT+0x47c0000)
tc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_ADD_RACE)
e2:SetValue(RACE_SPELLCASTER)
tc:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_ADD_ATTRIBUTE)
e3:SetValue(ATTRIBUTE_LIGHT)
tc:RegisterEffect(e3,true)
local e4=e1:Clone()
e4:SetCode(EFFECT_SET_BASE_ATTACK)
e4:SetValue(0)
tc:RegisterEffect(e4,true)
local e5=e1:Clone()
e5:SetCode(EFFECT_SET_BASE_DEFENSE)
e5:SetValue(0)
tc:RegisterEffect(e5,true)
local e6=e1:Clone()
e6:SetCode(EFFECT_CHANGE_LEVEL)
e6:SetValue(7)
tc:RegisterEffect(e6,true)
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP,zone)
end
Duel.SpecialSummonComplete()
--Duel.SpecialSummon(spellg,SUMMON_TYPE_PENDULUM,tp,tp,true,false,POS_FACEUP)
end
end
function s.spellfilter(c)
return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL)
end
--召唤之魔导书
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetCost(s.cost)
--e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+1)
e2:SetTarget(s.tdtg)
e2:SetOperation(s.tdop)
c:RegisterEffect(e2)
--
if not s.global then
s.global=true
--fusion substitute
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_FUSION_SUBSTITUTE)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_GRAVE,LOCATION_GRAVE)
e2:SetCondition(s.efcon)
e2:SetTarget(s.eftg)
Duel.RegisterEffect(e2,0)
--[[
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetTargetRange(LOCATION_GRAVE,LOCATION_GRAVE)
e3:SetCondition(s.efcon)
e3:SetTarget(s.eftg)
e3:SetLabelObject(e2)
Duel.RegisterEffect(e3,0)]]
end
end
function s.subcon(e)
return e:GetHandler():IsLocation(LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE)
end
function s.efcon(e)
return s.Boolean
end
function s.eftg(e,c)
return c:IsType(TYPE_SPELL) and c:IsSetCard(0x106e)
end
function s.cfilter(c)
return c:IsType(TYPE_SPELL) and (0x106e)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,2,nil)
end
function s.cffilter(c)
return c:IsSetCard(0x106e) and not c:IsPublic()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cffilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.cffilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function s.filter1(c)
return (c:IsType(TYPE_MONSTER) or (c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) and c:IsSetCard(0x106e))) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function s.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xf4) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
s.Boolean=true
local chkf=tp
local mg1=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
s.Boolean=false
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
s.Boolean=true
local chkf=tp
local mg1=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
local res=mat1:IsExists(Card.IsControler,1,nil,tp) and mat1:IsExists(Card.IsControler,1,nil,1-tp)
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
--[[if Duel.SpecialSummonStep(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,4))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()]]
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
s.Boolean=false
end
function s.thfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL) and c:IsSetCard(0x106e) and c:IsAbleToHand()
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.thfilter(chkc) end
if chk==0 then return e:GetHandler():IsAbleToDeck()
and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--贤者之魔导书
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_END_PHASE,TIMING_END_PHASE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.cffilter(c)
return c:IsSetCard(0x106e) and not c:IsPublic()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cffilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.cffilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
--[[--remain field
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(s.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)]]
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
if e:GetOwner():IsRelateToChain(ev) then
e:GetOwner():CancelToGrave(false)
end
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x150) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return --e:IsCostChecked() and
Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,LOCATION_HAND)
end
function s.eqlimit(e,c)
return e:GetOwner()==c
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Equip(tp,c,tc)
--Add Equip limit
local e0=Effect.CreateEffect(tc)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_EQUIP_LIMIT)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetReset(RESET_EVENT+RESETS_STANDARD)
e0:SetValue(s.eqlimit)
c:RegisterEffect(e0)
--copy
local code=tc:GetOriginalCode()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code)
c:RegisterEffect(e1)
local cregister=Card.RegisterEffect
Card.RegisterEffect=function(card,effect,flag)
if effect and effect:IsHasType(EFFECT_TYPE_IGNITION) then
--spell speed 2
if effect:IsHasType(EFFECT_TYPE_IGNITION) then
local effect2=effect:Clone()
effect2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
effect2:SetCode(EVENT_CHAINING)
effect2:SetLabelObject(effect)
effect2:SetCountLimit(9999)
local con=effect2:GetCondition()
local tg=effect2:GetTarget()
local op=effect2:GetOperation()
effect2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local le=e:GetLabelObject()
return c:GetEquipTarget() and rp==1-tp
and Effect.CheckCountLimit(le,tp)
and (not con or con(e,tp,eg,ep,ev,re,r,rp))
end)
effect2:SetTarget(
function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return not tg or tg(e,tp,eg,ep,ev,re,r,1-tp,0) end
end)
effect2:SetOperation(
function(e,tp,eg,ep,ev,re,r,rp)
local le=e:GetLabelObject()
if
Effect.CheckCountLimit(le,tp) and
(not tg or tg(e,tp,eg,ep,ev,re,r,1-tp,0)) and Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(id,1)) then
Duel.Hint(HINT_CARD,0,id)
le:UseCountLimit(tp)
--
BlackLouts_SpellBook_targetcard=Group.CreateGroup()
local chaininfo={}
local _SelectTarget=Duel.SelectTarget
Duel.SelectTarget=(function(sel_p,f,p,self,o,min,max,c_g_n,...)
local tgroup=Duel.SelectMatchingCard(sel_p,s.TargetFilter(f),p,self,o,min,max,c_g_n,...)
for tc in aux.Next(tgroup) do
tc:CreateEffectRelation(e)
end
Duel.HintSelection(tgroup)
BlackLouts_SpellBook_targetcard:Merge(tgroup)
return tgroup
end)
local _SetOperationInfo=Duel.SetOperationInfo
Duel.SetOperationInfo=(function(chainc,category,targets,count,tg_pl,tg_param)
return
end)
local _GetChainInfo=Duel.GetChainInfo
Duel.GetChainInfo=(function(chainc,...)
local val={...}
local returninfo={}
if #val==0 then return false end
for i=1,#val do
if val[i]==CHAININFO_TARGET_CARDS then
returninfo[i]=BlackLouts_SpellBook_targetcard
else
returninfo[i]=0
end
end
return table.unpack(returninfo)
end)
local _GetFirstTarget=Duel.GetFirstTarget
Duel.GetFirstTarget=(function()
return BlackLouts_SpellBook_targetcard:GetFirst()
end)
--
tg(e,tp,eg,ep,ev,re,r,rp,1)
op(e,tp,eg,ep,ev,re,r,rp)
--
Duel.SelectTarget=_SelectTarget
Duel.SetOperationInfo=_SetOperationInfo
Duel.GetChainInfo=_GetChainInfo
Duel.GetFirstTarget=_GetFirstTarget
end
end)
cregister(card,effect2,flag)
end
end
return cregister(card,effect,flag)
end
c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD,1)
Card.RegisterEffect=cregister
elseif c:IsRelateToEffect(e) and not c:IsStatus(STATUS_LEAVE_CONFIRMED) then
c:CancelToGrave(false)
end
end
function s.TargetFilter(f)
return function(target,...)
return (not f or f(target,...)) and target:IsCanBeEffectTarget()
end
end
--黄金乡的魔神像
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(s.setcon)
e2:SetCountLimit(1,id)
e2:SetHintTiming(TIMING_END_PHASE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
end
function s.atkfilter(c)
return c:IsFaceup() and c:GetAttack()>0
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPES_NORMAL_TRAP_MONSTER,2000,2800,7,RACE_ZOMBIE,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.filter(c)
return c:IsFaceup() and c:IsCode(95440946)
end
function s.setfilter2(c)
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPES_NORMAL_TRAP_MONSTER,2000,2800,7,RACE_ZOMBIE,ATTRIBUTE_LIGHT) then return end
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP)
if Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) then
--atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(s.atkval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
Duel.SpecialSummonComplete()
if Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingMatchingCard(s.setfilter2,tp,LOCATION_DECK,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.setfilter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if Duel.SSet(tp,tc)~=0 then
--Debug.Message("0")
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(s.discon)
e2:SetOperation(s.disop)
e2:SetLabelObject(tc)
Duel.RegisterEffect(e2,tp)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_REDIRECT,0,1)
end
end
end
end
end
function s.atkfilter(c)
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP)
end
function s.atkval(e,c)
local g=Duel.GetMatchingGroup(s.atkfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil)
return g:GetClassCount(Card.GetCode)*400
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
--Debug.Message("1")
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler()==tc
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
--Debug.Message("2")
if tc:GetFlagEffect(id)>0 then
--Debug.Message("3")
local c=e:GetOwner()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e1:SetTarget(s.distg2)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(s.discon2)
e2:SetOperation(s.disop2)
e2:SetLabelObject(tc)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(s.distg2)
e3:SetLabelObject(tc)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
Duel.AdjustInstantly()
end
e:Reset()
end
function s.distg2(e,c)
local tc=e:GetLabelObject()
return c==tc
end
function s.discon2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:GetHandler()==tc
end
function s.disop2(e,tp,eg,ep,ev,re,r,rp)
--Debug.Message("4")
Duel.NegateEffect(ev)
end
function s.setfilter(c)
return c:IsSetCard(0x2142) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_END
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
--封剑纹章士 罗伊
function c75000851.initial_effect(c)
--synchro summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75000851,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,75000851)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCost(c75000851.syncost)
e1:SetTarget(c75000851.syntg)
e1:SetOperation(c75000851.synop)
c:RegisterEffect(e1)
--effect gain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e2:SetCountLimit(1,75000852)
e2:SetCondition(c75000851.effcon)
e2:SetOperation(c75000851.effop)
c:RegisterEffect(e2)
end
function c75000851.syncost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c75000851.synfilter(c,tp,mc)
local mg=Group.FromCards(c,mc)
return c:IsFaceup() and Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg)
end
function c75000851.syntg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c75000851.synfilter(chkc,tp,c) end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c75000851.synfilter,tp,LOCATION_MZONE,0,1,nil,tp,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c75000851.synfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,c)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,2,tp,LOCATION_EXTRA)
end
function c75000851.synop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
Duel.AdjustAll()
local mg=Group.FromCards(c,tc)
if mg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil,mg)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
end
end
--
function c75000851.effcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_SYNCHRO)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
and e:GetHandler():GetReasonCard():IsSetCard(0x756)
end
function c75000851.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(75000851,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c75000851.thtg)
e1:SetOperation(c75000851.thop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(75000851,2))
end
function c75000851.thfilter(c)
return c:IsSetCard(0x756) and c:IsAbleToHand()
end
function c75000851.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c75000851.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(75000851,3))
end
function c75000851.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c75000851.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 c75000853.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75000853,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,75000853+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c75000853.spcon)
c:RegisterEffect(e1)
--synchro
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(75000853,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1,75000854)
e2:SetTarget(c75000853.sctg)
e2:SetOperation(c75000853.scop)
c:RegisterEffect(e2)
end
function c75000853.filter(c)
return c:IsFaceup() and c:IsSetCard(0x756)
end
function c75000853.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c75000853.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
--
function c75000853.mfilter(c,e,tp,mc)
local mg=Group.FromCards(c,mc)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c75000853.scfilter,tp,LOCATION_EXTRA,0,1,nil,mg)
end
function c75000853.scfilter(c,mg,tp)
return c:IsSetCard(0x756) and c:IsSynchroSummonable(nil,mg) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0
end
function c75000853.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c75000853.mfilter(chkc,e,tp,c) end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c75000853.mfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
Duel.SelectTarget(tp,c75000853.mfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,c)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c75000853.scop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end
if not c:IsRelateToEffect(e) then return end
Duel.AdjustAll()
local mg=Group.FromCards(c,tc)
if mg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end
local g=Duel.GetMatchingGroup(c75000853.scfilter,tp,LOCATION_EXTRA,0,nil,mg,tp)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
c:RegisterEffect(e1,true)
local e2=e1:Clone()
tc:RegisterEffect(e2,true)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
end
end
--继承的意志 罗伊
function c75000855.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x756),1)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75000855,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,75000855)
e1:SetCondition(c75000855.tgcon)
e1:SetTarget(c75000855.tgtg)
e1:SetOperation(c75000855.tgop)
c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(75000855,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,75000856)
e3:SetTarget(c75000855.thtg)
e3:SetOperation(c75000855.thop)
c:RegisterEffect(e3)
end
function c75000855.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c75000855.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x756) and c:IsAbleToHand()
end
function c75000855.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c75000855.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c75000855.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c75000855.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
--
function c75000855.scfilter1(c)
return c:IsSetCard(0x756) and c:IsAbleToHand() and c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function c75000855.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c75000855.scfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c75000855.scfilter1,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c75000855.scfilter1,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c75000855.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--业炎之理 弗尔布雷兹
function c75000857.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x756),1)
c:EnableReviveLimit()
--add
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75000857,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,75000857)
e1:SetCondition(c75000857.rmcon)
e1:SetTarget(c75000857.rmtg)
e1:SetOperation(c75000857.rmop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(c75000857.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--Special Summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,75000858)
e3:SetTarget(c75000857.sptg2)
e3:SetOperation(c75000857.spop2)
c:RegisterEffect(e3)
end
function c75000857.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsLinkCode,1,nil,75000853) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c75000857.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()==1
end
function c75000857.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c75000857.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
--
function c75000857.spfilter(c,e,tp)
return c:IsCode(75000853) and c:IsFaceup()
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c75000857.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c75000857.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(c75000857.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c75000857.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c75000857.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) and tc:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) then
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if not Duel.Equip(tp,c,tc,false) then return end
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(tc)
e1:SetValue(c31374201.eqlimit)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(1300)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
end
end
function c31374201.eqlimit(e,c)
return c==e:GetLabelObject()
end
\ No newline at end of file
--帝国的公主 基内维娅
function c75000859.initial_effect(c)
--
local e0=aux.AddThisCardInGraveAlreadyCheck(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75000859,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetLabelObject(e0)
e1:SetCountLimit(1,75000859)
e1:SetCondition(c75000859.spcon)
e1:SetTarget(c75000859.sptg)
e1:SetOperation(c75000859.spop)
c:RegisterEffect(e1)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(75000859,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,75000860)
e3:SetTarget(c75000859.sptg)
e3:SetOperation(c75000859.spop)
c:RegisterEffect(e3)
end
function c75000859.spfilter(c,tp,se)
return c:IsControler(tp) and (c:IsType(TYPE_SYNCHRO) or c:IsSetCard(0x756)) and c:IsFaceup()
and (se==nil or c:GetReasonEffect()~=se)
end
function c75000859.spcon(e,tp,eg,ep,ev,re,r,rp)
local se=e:GetLabelObject():GetLabelObject()
return eg:IsExists(c75000859.spfilter,1,nil,tp,se)
end
function c75000859.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c75000859.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
Duel.SpecialSummonComplete()
end
--
function c75000859.filter(c,e,tp)
return c:IsSetCard(0x756) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c75000859.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c75000859.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c75000859.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c75000859.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c75000859.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--纹章呼唤 封印之剑
function c75000861.initial_effect(c)
c:SetUniqueOnField(1,0,75000861)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75000861,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetTarget(c75000861.thtg)
e1:SetOperation(c75000861.thop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(75000861,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetTarget(c75000861.sptg)
e2:SetOperation(c75000861.spop)
c:RegisterEffect(e2)
--synchro summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(75000861,3))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,75000861)
e3:SetCondition(c75000861.sccon)
e3:SetTarget(c75000861.sctg)
e3:SetOperation(c75000861.scop)
c:RegisterEffect(e3)
end
function c75000861.thfilter(c)
return c:IsSetCard(0x756,0x751) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c75000861.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c75000861.thfilter,tp,LOCATION_DECK,0,1,nil) and e:GetHandler():GetFlagEffect(75000861)==0 end
e:GetHandler():RegisterFlagEffect(75000861,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c75000861.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,c75000861.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 c75000861.spfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x756)
end
function c75000861.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c75000861.spfil,tp,LOCATION_HAND,0,1,nil,e,tp) and e:GetHandler():GetFlagEffect(75000861)==0 end
e:GetHandler():RegisterFlagEffect(75000861,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c75000861.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c75000861.spfil,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--
function c75000861.scconfilter(c,tp)
return c:IsFaceup()
end
function c75000861.sccon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c75000861.scconfilter,1,nil,tp)
end
function c75000861.mfilter(c)
return c:IsSetCard(0x756) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c75000861.syncheck(g,tp,syncard)
return g:IsExists(c75000861.mfilter,1,nil) and syncard:IsSynchroSummonable(nil,g,#g-1,#g-1) and aux.SynMixHandCheck(g,tp,syncard)
end
function c75000861.scfilter(c,tp,mg)
return mg:CheckSubGroup(c75000861.syncheck,2,#mg,tp,c)
end
function c75000861.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetSynchroMaterial(tp)
if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
if mg2:GetCount()>0 then mg:Merge(mg2) end
end
return Duel.IsExistingMatchingCard(c75000861.scfilter,tp,LOCATION_EXTRA,0,1,nil,tp,mg) and c:IsAbleToHand()
end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
end
function c75000861.scop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetSynchroMaterial(tp)
if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
if mg2:GetCount()>0 then mg:Merge(mg2) end
end
local g=Duel.GetMatchingGroup(c75000861.scfilter,tp,LOCATION_EXTRA,0,nil,tp,mg)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local sc=sg:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local tg=mg:SelectSubGroup(tp,c75000861.syncheck,false,2,#mg,tp,sc)
if Duel.SynchroSummon(tp,sc,nil,tg,#tg-1,#tg-1)~=0 then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
end
end
--潜能解放·承
function c75000862.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c75000862.target)
e1:SetOperation(c75000862.activate)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(75000862,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,75000862)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c75000862.drtg)
e2:SetOperation(c75000862.drop)
c:RegisterEffect(e2)
end
function c75000862.cfilter(c,tc)
return c:IsSynchroSummonable(tc)
end
function c75000862.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_SYNCHRO_MATERIAL,tp,false,false)
and Duel.IsExistingMatchingCard(c75000862.cfilter,tp,LOCATION_EXTRA,0,1,nil,c) and c:IsSetCard(0x756)
end
function c75000862.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c75000862.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c75000862.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c75000862.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,tp,LOCATION_EXTRA)
end
function c75000862.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,SUMMON_VALUE_SYNCHRO_MATERIAL,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
Duel.AdjustAll()
if not tc:IsLocation(LOCATION_MZONE) then return end
local g=Duel.GetMatchingGroup(c75000862.cfilter,tp,LOCATION_EXTRA,0,nil,tc)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),tc)
end
end
end
--
function c75000862.cfilter1(c)
return c:IsSetCard(0x756) c:IsAbleToRemove()
and not c:IsCode(75000862)
end
function c75000862.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c75000862.cfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c75000862.cfilter1,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c75000862.cfilter1,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c75000862.drop(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
--神罗 风雪之月
local s,id,o=GetID()
function s.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),1)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetCondition(s.attcon)
e1:SetTarget(s.atttg)
e1:SetOperation(s.attop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(1131)
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(2)
e2:SetCondition(s.discon)
e2:SetCost(s.discost)
e2:SetTarget(s.distg)
e2:SetOperation(s.disop)
c:RegisterEffect(e2)
end
function s.attcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.attfilter(c)
return c:IsFaceupEx() and not c:IsAttribute(ATTRIBUTE_WATER)
end
function s.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.attfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,c) end
local sg=Duel.GetMatchingGroup(s.attfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,c)
end
function s.attop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(s.attfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,c)
for tc in aux.Next(sg) do
if not tc:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(ATTRIBUTE_WATER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0))
end
end
end
function s.cfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToDeckAsCost()
end
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()~=e:GetHandler() and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function s.tdfilter(c,tt)
return c:IsType(tt) and c:IsAbleToDeck()
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tt=nil
if re:IsActiveType(TYPE_MONSTER) then tt=TYPE_MONSTER
elseif re:IsActiveType(TYPE_SPELL) then tt=TYPE_SPELL
elseif re:IsActiveType(TYPE_TRAP) then tt=TYPE_TRAP end
local sg=Duel.GetMatchingGroup(s.tdfilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil,tt)
if (#sg==0 or Duel.SelectOption(tp,1193,1125)==1) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(s.efilter)
e1:SetLabelObject(re)
e1:SetReset(RESET_EVENT+RESET_CHAIN)
c:RegisterEffect(e1)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=sg:Select(tp,1,1,nil)
Duel.SendtoDeck(tg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
end
end
function s.efilter(e,re)
return re==e:GetLabelObject()
end
\ No newline at end of file
--万界星尘 拉尼亚凯亚 --万界星尘·拉尼亚凯亚
function c9910646.initial_effect(c) function c9910646.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,nil,10,2,nil,nil,99) aux.AddXyzProcedure(c,nil,10,2,nil,nil,99)
c:EnableReviveLimit() c:EnableReviveLimit()
--atk & def --search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetDescription(aux.Stringid(9910646,0))
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(c9910646.atkval) e1:SetCountLimit(1)
e1:SetCondition(c9910646.thcon)
e1:SetTarget(c9910646.thtg)
e1:SetOperation(c9910646.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() --spsummon
e2:SetCode(EFFECT_UPDATE_DEFENSE) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c9910646.spcon)
e2:SetTarget(c9910646.sptg)
e2:SetOperation(c9910646.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c9910646.imcon)
e3:SetOperation(c9910646.imop)
c:RegisterEffect(e3)
--material
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCategory(CATEGORY_REMOVE)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(c9910646.xmcon)
e4:SetOperation(c9910646.xmop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetOperation(c9910646.valcheck)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
end end
function c9910646.atkval(e,c) function c9910646.thcon(e,tp,eg,ep,ev,re,r,rp)
return c:GetOverlayCount()*1000 return Duel.GetCurrentChain()>0
end end
function c9910646.imcon(e,tp,eg,ep,ev,re,r,rp) function c9910646.thfilter(c,mc)
return ep~=tp and e:GetHandler():GetFlagEffect(9910646)==0 return c:IsSetCard(0xa952) and (c:IsAbleToHand() or (mc:IsType(TYPE_XYZ) and c:IsCanOverlay()))
end end
function c9910646.imop(e,tp,eg,ep,ev,re,r,rp) function c9910646.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910646.thfilter,tp,LOCATION_DECK,0,1,nil,e:GetHandler()) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c9910646.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) and Duel.SelectYesNo(tp,aux.Stringid(9910646,0)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
if c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)~=0 then local g=Duel.SelectMatchingCard(tp,c9910646.thfilter,tp,LOCATION_DECK,0,1,1,nil,c)
local e1=Effect.CreateEffect(c) local tc=g:GetFirst()
e1:SetType(EFFECT_TYPE_SINGLE) if tc then
e1:SetCode(EFFECT_IMMUNE_EFFECT) if c:IsType(TYPE_XYZ) and tc:IsCanOverlay() and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,aux.Stringid(9910646,1))==1) then
e1:SetValue(c9910646.efilter) Duel.Overlay(c,Group.FromCards(tc))
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN) else
c:RegisterEffect(e1) Duel.SendtoHand(tc,nil,REASON_EFFECT)
c:RegisterFlagEffect(9910646,RESET_CHAIN,0,1) Duel.ConfirmCards(1-tp,tc)
end end
end end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
for sc in aux.Next(sg) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetValue(c9910646.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
sc:RegisterEffect(e1)
end
end end
function c9910646.efilter(e,re) function c9910646.efilter(e,re)
return e:GetHandler()~=re:GetOwner() return e:GetHandler()~=re:GetOwner() and e:GetOwnerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
end end
function c9910646.valcheck(e,tp,eg,ep,ev,re,r,rp) function c9910646.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ct=0 return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
if c:GetSummonType()==SUMMON_TYPE_XYZ then ct=c:GetOverlayCount() end
e:GetLabelObject():SetLabel(ct)
end end
function c9910646.xmcon(e,tp,eg,ep,ev,re,r,rp) function c9910646.spfilter(c,e,tp)
return tp==Duel.GetTurnPlayer() return c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c9910646.matfilter(c,e) function c9910646.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
return c:IsCanOverlay() and not c:IsImmuneToEffect(e) local ct=e:GetHandler():GetPreviousOverlayCountOnField()
if chk==0 then return ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9910646.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
e:SetLabel(ct)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function c9910646.xmop(e,tp,eg,ep,ev,re,r,rp) function c9910646.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local ct=e:GetLabel()-c:GetOverlayCount() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local loc=LOCATION_ONFIELD+LOCATION_GRAVE local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c9910646.spfilter),tp,LOCATION_GRAVE,0,1,e:GetLabel(),nil,e,tp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c9910646.matfilter),tp,loc,loc,c,e) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
if ct<=0 or ct>g:GetCount() or not c:IsType(TYPE_XYZ) or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg=g:Select(tp,ct,ct,nil)
Duel.HintSelection(sg)
local og=Group.CreateGroup()
for tc in aux.Next(sg) do
og:Merge(tc:GetOverlayGroup())
tc:CancelToGrave()
end
if #og>0 then Duel.SendtoGrave(og,REASON_RULE) end
Duel.Overlay(c,sg)
end end
--绝界星 --拉尼亚凯亚之绝
function c9910654.initial_effect(c) function c9910654.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -6,17 +6,10 @@ function c9910654.initial_effect(c) ...@@ -6,17 +6,10 @@ function c9910654.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCondition(c9910654.condition)
e1:SetTarget(c9910654.target) e1:SetTarget(c9910654.target)
e1:SetOperation(c9910654.activate) e1:SetOperation(c9910654.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c9910654.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_XYZ)
end
function c9910654.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9910654.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c9910654.spfilter(c,e,tp) function c9910654.spfilter(c,e,tp)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAttack(0) and c:IsDefense(3000) return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAttack(0) and c:IsDefense(3000)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -26,6 +19,10 @@ function c9910654.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -26,6 +19,10 @@ function c9910654.target(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(c9910654.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c9910654.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c9910654.thfilter(c)
local oc=c:GetOverlayTarget()
return oc and oc:IsType(TYPE_XYZ) and oc:IsLocation(LOCATION_MZONE) and c:IsAbleToHand()
end
function c9910654.activate(e,tp,eg,ep,ev,re,r,rp) function c9910654.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
...@@ -35,7 +32,7 @@ function c9910654.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +32,7 @@ function c9910654.activate(e,tp,eg,ep,ev,re,r,rp)
if ct<2 then return end if ct<2 then return end
local te,tep=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) local te,tep=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
local og=Duel.GetOverlayGroup(tp,1,1) local og=Duel.GetOverlayGroup(tp,1,1)
if tep==1-tp and e:IsHasType(EFFECT_TYPE_ACTIVATE) and og:IsExists(Card.IsAbleToHand,1,nil) if tep==1-tp and e:IsHasType(EFFECT_TYPE_ACTIVATE) and og:IsExists(c9910654.thfilter,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(9910654,0)) then and Duel.SelectYesNo(tp,aux.Stringid(9910654,0)) then
Duel.BreakEffect() Duel.BreakEffect()
local g1=Group.CreateGroup() local g1=Group.CreateGroup()
...@@ -46,8 +43,8 @@ function c9910654.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,8 +43,8 @@ function c9910654.activate(e,tp,eg,ep,ev,re,r,rp)
end end
function c9910654.repop(e,tp,eg,ep,ev,re,r,rp) function c9910654.repop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetOverlayGroup(tp,1,1) local g=Duel.GetOverlayGroup(tp,1,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=g:FilterSelect(tp,Card.IsAbleToHand,1,1,nil) local tg=g:FilterSelect(tp,c9910654.thfilter,1,1,nil)
if tg:GetCount()>0 then if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT) Duel.SendtoHand(tg,nil,REASON_EFFECT)
end end
......
--轨道清理员 寰界星澄号 --轨道清理员 寰界星澄号
function c9910667.initial_effect(c) function c9910667.initial_effect(c)
local g=Group.CreateGroup()
g:KeepAlive()
--xyz summon
aux.AddXyzProcedure(c,nil,5,2)
c:EnableReviveLimit() c:EnableReviveLimit()
--xyz summon
aux.AddXyzProcedureLevelFree(c,c9910667.mfilter,aux.TRUE,2,2)
--remove onfield --remove onfield
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9910667,0)) e1:SetDescription(aux.Stringid(9910667,0))
...@@ -13,84 +11,94 @@ function c9910667.initial_effect(c) ...@@ -13,84 +11,94 @@ function c9910667.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCost(c9910667.rmcost) e1:SetCost(c9910667.rmcost)
e1:SetTarget(c9910667.rmtg1) e1:SetTarget(c9910667.rmtg)
e1:SetOperation(c9910667.rmop1) e1:SetOperation(c9910667.rmop)
e1:SetLabelObject(g)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--remove grave --to hand/remove
local e3=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(9910667,1)) e2:SetDescription(aux.Stringid(9910667,1))
e3:SetCategory(CATEGORY_REMOVE) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_REMOVE+CATEGORY_GRAVE_ACTION)
e3:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1) e2:SetCountLimit(1)
e3:SetTarget(c9910667.rmtg2) e2:SetTarget(c9910667.thtg)
e3:SetOperation(c9910667.rmop2) e2:SetOperation(c9910667.thop)
e3:SetLabelObject(g) c:RegisterEffect(e2)
c:RegisterEffect(e3) if not c9910667.global_check then
c9910667.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_REMOVE)
ge1:SetOperation(c9910667.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c9910667.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsReason(REASON_EFFECT) and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsType(TYPE_XYZ)
and not tc:IsReason(REASON_REDIRECT) then
tc:RegisterFlagEffect(9910667,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(9910667,3))
end
tc=eg:GetNext()
end
end
function c9910667.mfilter(c,xyzc)
return c:IsXyzLevel(xyzc,5) or c:IsXyzLevel(xyzc,10)
end end
function c9910667.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) function c9910667.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c9910667.rmtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9910667.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function c9910667.rmop1(e,tp,eg,ep,ev,re,r,rp) function c9910667.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 if tc:IsRelateToEffect(e) then
and tc:IsLocation(LOCATION_REMOVED) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
if c:IsRelateToEffect(e) then
local sg=e:GetLabelObject()
if c:GetFlagEffect(9910667)==0 then
sg:Clear()
c:RegisterFlagEffect(9910667,RESET_EVENT+RESETS_STANDARD,0,1)
end
sg:AddCard(tc)
tc:CreateRelation(c,RESET_EVENT+RESETS_STANDARD)
end
end end
end end
function c9910667.rmfilter(c) function c9910667.thfilter(c,tp)
return c:IsRace(RACE_MACHINE) and c:IsAbleToRemove() if not c:IsRace(RACE_MACHINE) then return false end
return c:IsAbleToHand() or c9910667.rmfilter(c,tp)
end end
function c9910667.rmtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9910667.rmfilter(c,tp)
if chkc then return false end return c:IsAbleToRemove() and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil)
if chk==0 then return Duel.IsExistingTarget(c9910667.rmfilter,tp,LOCATION_GRAVE,0,1,nil) end
and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end function c9910667.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c9910667.thfilter(chkc,tp) end
local g1=Duel.SelectTarget(tp,c9910667.rmfilter,tp,LOCATION_GRAVE,0,1,1,nil) if chk==0 then return Duel.IsExistingTarget(c9910667.thfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g2=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) local g=Duel.SelectTarget(tp,c9910667.thfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
g1:Merge(g2) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,g1:GetCount(),0,0) end
function c9910667.disfilter(c)
return c:IsFaceup() and c:GetFlagEffect(9910667)~=0
end end
function c9910667.rmop2(e,tp,eg,ep,ev,re,r,rp) function c9910667.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local tc=Duel.GetFirstTarget()
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) if tc:IsRelateToEffect(e) and not aux.NecroValleyNegateCheck(tc) and aux.NecroValleyFilter()(tc) then
local rg=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED) if tc:IsAbleToHand() and (not c9910667.rmfilter(tc,tp) or Duel.SelectOption(tp,1190,aux.Stringid(9910667,2))==0) then
if rg:GetCount()==0 then return end Duel.SendtoHand(tc,nil,REASON_EFFECT)
local tc=rg:GetFirst() elseif c9910667.rmfilter(tc,tp) then
while tc do Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
tc:CreateRelation(c,RESET_EVENT+RESETS_STANDARD) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
tc=rg:GetNext() Duel.HintSelection(g)
end g:AddCard(tc)
local sg=e:GetLabelObject() Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
if c:GetFlagEffect(9910667)==0 then end
sg:Clear()
c:RegisterFlagEffect(9910667,RESET_EVENT+RESETS_STANDARD,0,1)
end end
sg:Merge(rg) local sg=Duel.GetMatchingGroup(c9910667.disfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
for sc in aux.Next(sg) do for sc in aux.Next(sg) do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -7,10 +7,32 @@ function c9911021.initial_effect(c) ...@@ -7,10 +7,32 @@ function c9911021.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,9911021+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c9911021.target) e1:SetTarget(c9911021.target)
e1:SetOperation(c9911021.activate) e1:SetOperation(c9911021.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in set turn
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCondition(c9911021.actcon)
c:RegisterEffect(e2)
if not c9911021.global_check then
c9911021.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SSET)
ge1:SetOperation(c9911021.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c9911021.checkop(e,tp,eg,ep,ev,re,r,rp)
if not re or not re:GetHandler():IsSetCard(0x6954) then return end
local tc=eg:GetFirst()
while tc do
tc:RegisterFlagEffect(9911017,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end end
function c9911021.filter(c,e,tp) function c9911021.filter(c,e,tp)
return c:IsFaceup() and c:GetLevel()>1 and c:IsReleasableByEffect() return c:IsFaceup() and c:GetLevel()>1 and c:IsReleasableByEffect()
...@@ -54,3 +76,6 @@ function c9911021.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,3 +76,6 @@ function c9911021.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end end
end end
function c9911021.actcon(e)
return e:GetHandler():GetFlagEffect(9911017)>0
end
--沧海姬 赫罗锡安
function c9911034.initial_effect(c)
--synchro summon
c:EnableReviveLimit()
aux.AddSynchroMixProcedure(c,c9911034.matfilter1,nil,nil,aux.NonTuner(nil),1,99)
--to deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9911034,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,9911034)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c9911034.tdtg)
e1:SetOperation(c9911034.tdop)
c:RegisterEffect(e1)
--change attribute
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9911034,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,9911035)
e2:SetCondition(c9911034.attcon)
e2:SetTarget(c9911034.atttg)
e2:SetOperation(c9911034.attop)
c:RegisterEffect(e2)
end
function c9911034.matfilter1(c,syncard)
return c:IsTuner(syncard) or (c:IsRace(RACE_ROCK) and c:IsAttribute(ATTRIBUTE_FIRE))
end
function c9911034.tdfilter1(c)
return c:IsSetCard(0x6954) and c:IsAbleToDeck()
end
function c9911034.tdfilter2(c,e)
return c:IsAbleToDeck() and c:IsCanBeEffectTarget(e)
end
function c9911034.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c9911034.tdfilter1,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local ct=Duel.GetMatchingGroupCount(c9911034.tdfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,c9911034.tdfilter1,tp,LOCATION_GRAVE,0,1,ct,nil)
local ect=g1:GetCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ect,ect,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,g1:GetCount(),0,0)
end
function c9911034.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
function c9911034.attcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c9911034.spfilter(c,e,tp)
return c:IsSetCard(0x6954) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end
function c9911034.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsFaceup() and not c:IsAttribute(ATTRIBUTE_EARTH)
and Duel.IsExistingMatchingCard(c9911034.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c9911034.attop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(ATTRIBUTE_EARTH)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
if Duel.IsExistingMatchingCard(c9911034.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c9911034.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
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