Commit b866abf2 authored by tsubaki's avatar tsubaki

1.999zz1

parent dc4045b5
Pipeline #13851 passed with stage
in 55 seconds
No preview for this file type
......@@ -7,13 +7,15 @@ local Gdslist = {}
local Gdsflag=286379010
local Gdsflag2=386379010
function Gds.Adjustdreamsequence(c)
if GDS == true then return end
GDS = true
--adjust
local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PREDRAW)
e1:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e1:SetOperation(Gds.dsop)
Duel.RegisterEffect(e1,0)
local e2=Effect.GlobalEffect()
......@@ -23,8 +25,6 @@ function Gds.Adjustdreamsequence(c)
Duel.RegisterEffect(e2,0)
end
function Gds.dsop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(0,Gdsflag)>0 then return end
Duel.RegisterFlagEffect(0,Gdsflag,RESET_PHASE+PHASE_END,0,1)
local g=Duel.GetMatchingGroup(aux.TRUE,0,0xff,0xff,nil)
if g:GetCount()>0 then
local gc=g:GetCount()
......@@ -44,7 +44,6 @@ function Gds.dsop(e,tp,eg,ep,ev,re,r,rp)
end
end
function Gds.dsop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(0,Gdsflag)<=0 then return end
local g=Duel.GetMatchingGroup(aux.TRUE,0,LOCATION_DECK,LOCATION_DECK,nil):Filter(Card.IsOriginalSetCard,nil,0x279)
local tc=g:GetFirst()
while tc do
......@@ -60,9 +59,21 @@ function Gds.dsop2(e,tp,eg,ep,ev,re,r,rp)
end
local seq=tc:GetSequence()
local fid=tc:GetFieldID()
if seq~=Gdslist[ci][2] and fid==Gdslist[ci][3] and tc:IsLocation(LOCATION_DECK) then
local dtseq=Duel.GetFieldGroupCount(tc:GetControler(),LOCATION_DECK,0)-1
if seq==0 and seq~=Gdslist[ci][2] and fid==Gdslist[ci][3] and tc:IsLocation(LOCATION_DECK) then
Duel.RaiseEvent(tc,EVENT_CUSTOM+86379010,e,0,0,tc:GetControler(),seq)
end
if seq==dtseq and seq~=Gdslist[ci][2] and fid==Gdslist[ci][3] and tc:IsLocation(LOCATION_DECK) then
tc:RegisterFlagEffect(Gdsflag2,RESET_EVENT+0x1fe0000,0,1)
if tc:GetFlagEffect(Gdsflag2)<2 then
Duel.RaiseEvent(tc,EVENT_CUSTOM+86379010,e,0,0,tc:GetControler(),seq)
end
end
if seq~=dtseq then
if tc:GetFlagEffect(Gdsflag2)>0 then
tc:ResetFlagEffect(Gdsflag2)
end
end
Gdslist[ci][2]=tc:GetSequence()
Gdslist[ci][3]=tc:GetFieldID()
tc=g:GetNext()
......
......@@ -10,5 +10,7 @@ function Arcol.GetLostCode(c)
return 86379247
elseif c:IsOriginalSetCard(0xaa5) then
return 86379744
elseif c:IsOriginalSetCard(0x226,0x703) then
return 86379015
else return false end
end
\ No newline at end of file
......@@ -265,6 +265,7 @@
!setname 0x3612 造形术
!setname 0x613 杖刀偶磨弓
!setname 0x614 埴轮
!setname 0x996 冰狱
!setname 0xec1 声缘
!setname 0x1ec1 声缘兽
......
No preview for this file type
pics/50101.jpg

78.8 KB | W: | H:

pics/50101.jpg

96.2 KB | W: | H:

pics/50101.jpg
pics/50101.jpg
pics/50101.jpg
pics/50101.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/50103.jpg

79.4 KB | W: | H:

pics/50103.jpg

96.1 KB | W: | H:

pics/50103.jpg
pics/50103.jpg
pics/50103.jpg
pics/50103.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/50108.jpg

74.9 KB | W: | H:

pics/50108.jpg

96.3 KB | W: | H:

pics/50108.jpg
pics/50108.jpg
pics/50108.jpg
pics/50108.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/50121.jpg

76.3 KB | W: | H:

pics/50121.jpg

97.3 KB | W: | H:

pics/50121.jpg
pics/50121.jpg
pics/50121.jpg
pics/50121.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/50210.jpg

77.2 KB | W: | H:

pics/50210.jpg

94.8 KB | W: | H:

pics/50210.jpg
pics/50210.jpg
pics/50210.jpg
pics/50210.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/50213.jpg

76.9 KB | W: | H:

pics/50213.jpg

94.3 KB | W: | H:

pics/50213.jpg
pics/50213.jpg
pics/50213.jpg
pics/50213.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/50216.jpg

76.8 KB | W: | H:

pics/50216.jpg

97.1 KB | W: | H:

pics/50216.jpg
pics/50216.jpg
pics/50216.jpg
pics/50216.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/50219.jpg

78.7 KB | W: | H:

pics/50219.jpg

94.7 KB | W: | H:

pics/50219.jpg
pics/50219.jpg
pics/50219.jpg
pics/50219.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/50222.jpg

77.5 KB | W: | H:

pics/50222.jpg

93.7 KB | W: | H:

pics/50222.jpg
pics/50222.jpg
pics/50222.jpg
pics/50222.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/50225.jpg

78.6 KB | W: | H:

pics/50225.jpg

94.9 KB | W: | H:

pics/50225.jpg
pics/50225.jpg
pics/50225.jpg
pics/50225.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/50228.jpg

75 KB | W: | H:

pics/50228.jpg

97.3 KB | W: | H:

pics/50228.jpg
pics/50228.jpg
pics/50228.jpg
pics/50228.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/50231.jpg

76.9 KB | W: | H:

pics/50231.jpg

94.8 KB | W: | H:

pics/50231.jpg
pics/50231.jpg
pics/50231.jpg
pics/50231.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/50234.jpg

76.1 KB | W: | H:

pics/50234.jpg

98.4 KB | W: | H:

pics/50234.jpg
pics/50234.jpg
pics/50234.jpg
pics/50234.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/50237.jpg

76.3 KB | W: | H:

pics/50237.jpg

93 KB | W: | H:

pics/50237.jpg
pics/50237.jpg
pics/50237.jpg
pics/50237.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/50240.jpg

77.5 KB | W: | H:

pics/50240.jpg

96 KB | W: | H:

pics/50240.jpg
pics/50240.jpg
pics/50240.jpg
pics/50240.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/50243.jpg

79.1 KB | W: | H:

pics/50243.jpg

95 KB | W: | H:

pics/50243.jpg
pics/50243.jpg
pics/50243.jpg
pics/50243.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/50255.jpg

76.6 KB | W: | H:

pics/50255.jpg

93.6 KB | W: | H:

pics/50255.jpg
pics/50255.jpg
pics/50255.jpg
pics/50255.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/50277.jpg

79.3 KB | W: | H:

pics/50277.jpg

95.7 KB | W: | H:

pics/50277.jpg
pics/50277.jpg
pics/50277.jpg
pics/50277.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/50340.jpg

77.3 KB | W: | H:

pics/50340.jpg

94 KB | W: | H:

pics/50340.jpg
pics/50340.jpg
pics/50340.jpg
pics/50340.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/74562013.jpg

47 KB | W: | H:

pics/74562013.jpg

47.5 KB | W: | H:

pics/74562013.jpg
pics/74562013.jpg
pics/74562013.jpg
pics/74562013.jpg
  • 2-up
  • Swipe
  • Onion skin
--蓝色活泼妖精☆琪露诺✿
function c1100012.initial_effect(c)
--
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c1100012.con1)
e1:SetOperation(c1100012.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetTarget(c1100012.tg2)
e2:SetOperation(c1100012.op2)
c:RegisterEffect(e2)
--
end
--
function c1100012.con1(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0xc999)
end
function c1100012.op1(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_MZONE,0,nil,0xc999)
if mg:GetCount()>0 then Duel.ConfirmCards(1-tp,mg) end
end
--
function c1100012.tfilter2(c)
return c:IsSetCard(0x999) and not c:IsCode(1100012) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c1100012.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1100012.tfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1100012.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,c1100012.tfilter2,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
local att=tc:GetAttribute()
local e2_1=Effect.CreateEffect(e:GetHandler())
e2_1:SetType(EFFECT_TYPE_FIELD)
e2_1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2_1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2_1:SetTargetRange(1,0)
e2_1:SetLabel(att)
e2_1:SetTarget(c1100012.limit2_1)
e2_1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2_1,tp)
end
end
function c1100012.limit2_1(e,c)
return c:IsAttribute(e:GetLabel())
end
--
\ No newline at end of file
--不在此世 不知何时
function c16001105.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:SetCountLimit(1,16001105+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c16001105.condition)
e1:SetTarget(c16001105.target)
e1:SetOperation(c16001105.activate)
c:RegisterEffect(e1)
end
function c16001105.condition(e)
return Duel.GetTurnPlayer()==e:GetHandlerPlayer()
end
function c16001105.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,16001105,0,0x1011,0,0,2,RACE_PSYCHO,ATTRIBUTE_LIGHT) end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c16001105.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,16001105,0,0x1011,0,0,2,RACE_PSYCHO,ATTRIBUTE_LIGHT) then
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TUNER,ATTRIBUTE_LIGHT,RACE_PSYCHO,2,0,0)
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then
--to grave
local fid=e:GetHandler():GetFieldID()
c:RegisterFlagEffect(16001105,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabel(fid)
e1:SetLabelObject(c)
e1:SetCondition(c16001105.tgcon)
e1:SetOperation(c16001105.tgop)
Duel.RegisterEffect(e1,tp)
c:SetTurnCounter(5)
Duel.Hint(24,tp,aux.Stringid(16001105,1))
--The World
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_ONFIELD)
e2:SetCondition(c16001105.licon)
e2:SetTargetRange(0,1)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
--Lost Time
local e01=Effect.CreateEffect(c)
e01:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e01:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e01:SetCode(EVENT_CHAINING)
e01:SetRange(LOCATION_ONFIELD)
e01:SetReset(RESET_EVENT+RESETS_STANDARD)
e01:SetCondition(c16001105.actcon)
e01:SetCondition(c16001105.ltop)
c:RegisterEffect(e01)
--Lost Time
local e02=Effect.CreateEffect(c)
e02:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e02:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e02:SetCode(EVENT_ATTACK_ANNOUNCE)
e02:SetRange(LOCATION_ONFIELD)
e02:SetReset(RESET_EVENT+RESETS_STANDARD)
e02:SetCondition(c16001105.atkcon)
e02:SetCondition(c16001105.ltop)
c:RegisterEffect(e02)
end
end
end
function c16001105.tgcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(16001105)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function c16001105.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetLabelObject(),REASON_EFFECT)
end
function c16001105.licon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
return ct>0
end
function c16001105.ltop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
if ct<1 then return end
if ct>0 then
ct=ct-1
c:SetTurnCounter(ct)
Duel.Hint(24,tp,aux.Stringid(16001105,6-ct))
end
end
function c16001105.actcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp
end
function c16001105.atkcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
\ No newline at end of file
--七色人形剧·西藏人形
local s,id,o=GetID()
function c19500014.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19500014,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,19500014)
e1:SetCost(c19500014.cost)
e1:SetTarget(c19500014.target)
e1:SetOperation(c19500014.operation)
c:RegisterEffect(e1)
--to deck
--local e2=Effect.CreateEffect(c)
--e2:SetDescription(aux.Stringid(19500014,1))
--e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH)
--e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
--e2:SetType(EFFECT_TYPE_QUICK_O)
--e2:SetCode(EVENT_FREE_CHAIN)
--e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
--e2:SetCost(c19500014.tdcost)
--e2:SetCountLimit(1,19500014+o)
--e2:SetTarget(c19500014.tdtg)
--e2:SetOperation(c19500014.tdop)
--c:RegisterEffect(e2)
end
function c19500014.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c19500014.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0x186)
end
function c19500014.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c19500014.desfilter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c19500014.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c19500014.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c19500014.desfilter,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
local sg=Duel.GetMatchingGroup(c19500014.spfilter,tp,LOCATION_REMOVED,0,nil,e,tp)
if sg:GetCount()>0 then
Duel.BreakEffect()
local tg=sg:Select(tp,1,1,nil)
Duel.SpecialSummon(tg:GetFirst(),0,tp,tp,false,false,POS_FACEUP)
end
end
function c19500014.tdfilter(c)
return c:IsAbleToDeck() and c:IsSetCard(0x186)
end
--function c19500014.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
-- local c=e:GetHandler()
--if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() or c.Mobius==999 end
-- if c.Mobius~=999 then Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) else end
--end
--function c19500014.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
--if chkc then return false end
--if chk==0 then return Duel.GetFlagEffect(tp,19500014)==0 and Duel.IsExistingTarget(c19500014.tdfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
--Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
--local g=Duel.SelectTarget(tp,c19500014.tdfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,7,nil)
--Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
--Duel.RegisterFlagEffect(tp,19500014,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
--end
--function c19500014.tdop(e,tp,eg,ep,ev,re,r,rp)
--local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
--local sg=g:Filter(Card.IsRelateToEffect,nil,e)
--if Duel.SelectOption(tp,aux.Stringid(19500014,2),aux.Stringid(19500014,3))==0 then
--Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
--else
--Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
--end
--end
--七色人形剧·京都人形
function c19500015.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,19500015+EFFECT_COUNT_CODE_DUEL)
e1:SetTarget(c19500015.thtg)
e1:SetOperation(c19500015.thop)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(19500015,1))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,19500015+100)
e2:SetCost(c19500015.tdcost)
e2:SetTarget(c19500015.tdtg)
e2:SetOperation(c19500015.tdop)
c:RegisterEffect(e2)
end
function c19500015.thfilter(c)
return c:IsSetCard(0x300) and c:IsAbleToHand()and c:IsType(TYPE_MONSTER)
end
function c19500015.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c19500015.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c19500015.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c19500015.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 c19500015.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() or c.Mobius==999 end
if c.Mobius~=999 then Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) else end
end
function c19500015.tdfilter(c)
return c:IsSetCard(0x300) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c19500015.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c19500015.tdfilter(chkc) end
if chk==0 then return Duel.GetFlagEffect(tp,19500015)==0 and Duel.IsExistingTarget(c19500015.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c19500015.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.RegisterFlagEffect(tp,19500015,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c19500015.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
--七色人形剧·露西亚人形
local s,id,o=GetID()
function c19500016.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19500016,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,19500016)
e1:SetTarget(c19500016.atktg)
e1:SetOperation(c19500016.atkop)
c:RegisterEffect(e1)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(19500016,1))
e2:SetCategory(CATEGORY_DISABLE+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,19500016+o)
e2:SetCost(aux.bfgcost)
e2:SetCondition(c19500016.discon)
e2:SetTarget(c19500016.distg)
e2:SetOperation(c19500016.disop)
c:RegisterEffect(e2)
end
function c19500016.atkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x186,0x300)
end
function c19500016.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c19500016.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c19500016.atkop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,c19500016.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(700)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
--pierce
local e2=e1:Clone()
e2:SetCode(EFFECT_PIERCE)
tc:RegisterEffect(e2)
end
end
function c19500016.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE+LOCATION_GRAVE) and c:IsPreviousControler(tp) and c:IsSetCard(0x186)
end
function c19500016.discon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c19500016.cfilter,1,nil,tp)
end
function c19500016.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
end
function c19500016.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
if tc 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=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
if tc:IsType(TYPE_MONSTER) then
--atkdown
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetValue(-700)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e4)
end
end
end
\ No newline at end of file
--七色人形剧·泰坦妮娅人形
function c19500017.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19500017,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CUSTOM+19500017)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCondition(c19500017.spcon)
e1:SetTarget(c19500017.sptg)
e1:SetOperation(c19500017.spop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(19500017,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,19500017)
e2:SetTarget(c19500017.destg)
e2:SetOperation(c19500017.desop)
c:RegisterEffect(e2)
if not c19500017.global_check then
c19500017.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DESTROYED)
ge1:SetCondition(c19500017.regcon)
ge1:SetOperation(c19500017.regop)
Duel.RegisterEffect(ge1,0)
end
end
function c19500017.spcfilter(c,tp)
return c:IsSetCard(0x186) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c19500017.regcon(e,tp,eg,ep,ev,re,r,rp)
local v=0
if eg:IsExists(c19500017.spcfilter,1,nil,0) then v=v+1 end
if eg:IsExists(c19500017.spcfilter,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 c19500017.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(eg,EVENT_CUSTOM+19500017,re,r,rp,ep,e:GetLabel())
end
function c19500017.spcon(e,tp,eg,ep,ev,re,r,rp)
return ev==tp or ev==PLAYER_ALL
end
function c19500017.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFlagEffect(tp,19500017)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.RegisterFlagEffect(tp,19500017,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c19500017.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c19500017.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c19500017.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
--七色人形剧·荷兰人形
function c19500018.initial_effect(c)
--destory and draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19500018,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
--e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,19500018)
e1:SetCost(c19500018.descost)
e1:SetTarget(c19500018.destg)
e1:SetOperation(c19500018.desop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(19500018,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,19500018+100)
e2:SetCondition(c19500018.drcon)
e2:SetTarget(c19500018.drtg)
e2:SetOperation(c19500018.drop)
c:RegisterEffect(e2)
end
function c19500018.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c19500018.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2)
and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND,0,1,e:GetHandler(),0x186) end
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_HAND,0,e:GetHandler(),0x186)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c19500018.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_HAND,0,1,1,aux.ExceptThisCard(e),0x186)
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.Draw(tp,2,REASON_EFFECT)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(g1,nil,0,REASON_EFFECT)
end
end
function c19500018.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and re:GetHandler():IsSetCard(0x186) and re:GetHandler():IsSetCard(0x300)
end
function c19500018.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c19500018.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)~=0 then
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.SelectYesNo(tp,aux.Stringid(19500018,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(g,nil,0,REASON_EFFECT)
end
end
end
--七色人形剧·歌莉娅人形
function c19500020.initial_effect(c)
--atk limt
--local e1=Effect.CreateEffect(c)
--e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
--e1:SetCode(EVENT_DESTROYED)
--e1:SetProperty(EFFECT_FLAG_DELAY)
--e1:SetCountLimit(1,19500020)
--e1:SetOperation(c19500020.amop)
--c:RegisterEffect(e1)
--destroy replace
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetRange(LOCATION_GRAVE)
e1:SetTarget(c19500020.reptg)
e1:SetValue(c19500020.repval)
e1:SetOperation(c19500020.repop)
c:RegisterEffect(e1)
end
function c19500020.repfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x186,0x300) and c:IsLocation(LOCATION_ONFIELD)
and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c19500020.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,19500020)==0 and e:GetHandler():IsAbleToRemove() and eg:IsExists(c19500020.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c19500020.repval(e,c)
return c19500020.repfilter(c,e:GetHandlerPlayer())
end
function c19500020.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,19500020,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
--七色人形剧·伦敦人形
function c19500021.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19500021,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CHAIN_NEGATED)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE)
e1:SetCountLimit(1,19500021)
e1:SetCost(c19500021.descost)
e1:SetTarget(c19500021.destg)
e1:SetOperation(c19500021.desop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetDescription(aux.Stringid(19500021,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,19500021+100+EFFECT_COUNT_CODE_DUEL)
e2:SetTarget(c19500021.thtg)
e2:SetOperation(c19500021.thop)
c:RegisterEffect(e2)
end
function c19500021.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() or c.Mobius==999 end
if c.Mobius~=999 then Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) else end
end
function c19500021.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,19500021)==0
and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0x186) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.RegisterFlagEffect(tp,19500021,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c19500021.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0x186)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function c19500021.thfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0x186) and c:IsAbleToHand()
end
function c19500021.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c19500021.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c19500021.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c19500021.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 c19500022.initial_effect(c)
--todeck and draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(19500022,0))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,19500022)
e2:SetCost(aux.bfgcost)
e2:SetCondition(c19500022.tdcon)
e2:SetTarget(c19500022.tdtg)
e2:SetOperation(c19500022.tdop)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(19500022,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,19500022+100+EFFECT_COUNT_CODE_DUEL)
e3:SetTarget(c19500022.thtg)
e3:SetOperation(c19500022.thop)
c:RegisterEffect(e3)
end
function c19500022.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x186) and c:IsAbleToHand()
end
function c19500022.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c19500022.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c19500022.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c19500022.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 c19500022.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE+LOCATION_GRAVE) and c:IsPreviousControler(tp) and c:IsSetCard(0x186)
end
function c19500022.tdcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c19500022.cfilter,1,nil,tp)
end
function c19500022.fselect(g,tp)
return g:GetSum(Card.GetLevel)<=4
end
function c19500022.filter(c)
return c:IsLevelAbove(1) and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x186) and c:IsAbleToDeck()
end
function c19500022.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and c19500022.filter(chkc) end
local g=Duel.GetMatchingGroup(c19500022.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c19500022.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:SelectSubGroup(tp,c19500022.fselect,false,1,3,tp)
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,sg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c19500022.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=tc:Filter(Card.IsRelateToEffect,nil,e)
if Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=#tc then return end
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct~=0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--七色人形剧·上海人形
function c19500023.initial_effect(c)
--sp summon(hand)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19500023,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,19500023)
e1:SetCost(c19500023.spcost)
e1:SetTarget(c19500023.sptg)
e1:SetOperation(c19500023.spop)
c:RegisterEffect(e1)
--sp summon(mzone)
--local e2=e1:Clone()
--e2:SetDescription(aux.Stringid(19500023,1))
--e2:SetRange(LOCATION_MZONE)
--e2:SetCountLimit(1,19500023)
--e2:SetTarget(c19500023.sptg2)
--e2:SetOperation(c19500023.spop2)
--c:RegisterEffect(e2)
end
function c19500023.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() or c.Mobius==999 end
if c.Mobius~=999 then Duel.SendtoGrave(e:GetHandler(),REASON_COST) else end
end
function c19500023.spfilter(c,e,tp)
return c:IsSetCard(0x186) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c19500023.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),2)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(c19500023.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,e:GetHandler())
and Duel.IsExistingMatchingCard(c19500023.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) and g:CheckWithSumEqual(Card.GetLevel,2,1,ft) end
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_HAND,0,e:GetHandler(),0x186)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c19500023.spcheck(g)
return g:GetSum(Card.GetLevel)==2
end
function c19500023.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_HAND,0,1,1,aux.ExceptThisCard(e),0x186)
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),2)
local tg=Duel.GetMatchingGroup(c19500023.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if ft<=0 or #tg==0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=tg:SelectWithSumEqual(tp,Card.GetLevel,2,1,ft)
local tc=sg:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
tc=sg:GetNext()
end
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
--七色人形剧剧本
function c19500032.initial_effect(c)
c:SetUniqueOnField(1,0,19500032)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--add counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_DISCARD)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(c19500032.acop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_RELEASE)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_DESTROYED)
c:RegisterEffect(e4)
--counter
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(19500032,0))
e5:SetCategory(CATEGORY_COUNTER)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_SZONE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetCountLimit(1)
e5:SetTarget(c19500032.coutg)
e5:SetOperation(c19500032.couop)
c:RegisterEffect(e5)
--search
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e6:SetDescription(aux.Stringid(19500032,1))
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_SZONE)
e6:SetCountLimit(1)
e6:SetCost(c19500032.thcost)
e6:SetTarget(c19500032.thtg)
e6:SetOperation(c19500032.thop)
c:RegisterEffect(e6)
end
function c19500032.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x186) and c:IsRace(RACE_MACHINE)
end
function c19500032.acop(e,tp,eg,ep,ev,re,r,rp)
local ct=eg:FilterCount(c19500032.cfilter,nil)
if ct>0 then
e:GetHandler():AddCounter(0x128d,ct,true)
end
end
function c19500032.coufilter(c)
return c:IsFaceup() and c:IsCanAddCounter(0x128d,1)
end
function c19500032.coutg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c19500032.coufilter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c19500032.coufilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x128d)
end
function c19500032.couop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
tc:AddCounter(0x128d,1)
end
end
function c19500032.thfilter1(c)
return c:IsCode(19214543) and c:IsAbleToHand()
end
function c19500032.thfilter2(c)
return c:IsCode(19214538) and c:IsAbleToHand()
end
function c19500032.thfilter3(c)
return c:IsCode(19214535) and c:IsAbleToHand()
end
function c19500032.thfilter4(c)
return c:IsCode(19500031) and c:IsAbleToHand()
end
function c19500032.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c19500032.thfilter1,tp,LOCATION_DECK,0,1,nil) and Duel.IsCanRemoveCounter(tp,1,0,0x128d,2,REASON_COST)
local b2=Duel.IsExistingMatchingCard(c19500032.thfilter2,tp,LOCATION_DECK,0,1,nil) and Duel.IsCanRemoveCounter(tp,1,0,0x128d,4,REASON_COST)
local b3=Duel.IsExistingMatchingCard(c19500032.thfilter3,tp,LOCATION_DECK,0,1,nil) and Duel.IsCanRemoveCounter(tp,1,0,0x128d,6,REASON_COST)
local b4=Duel.IsExistingMatchingCard(c19500032.thfilter4,tp,LOCATION_DECK,0,1,nil) and Duel.IsCanRemoveCounter(tp,1,0,0x128d,8,REASON_COST)
if chk==0 then return b1 or b2 or b3 or b4 end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(19500032,2)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(19500032,3)
opval[off-1]=2
off=off+1
end
if b3 then
ops[off]=aux.Stringid(19500032,4)
opval[off-1]=3
off=off+1
end
if b4 then
ops[off]=aux.Stringid(19500032,5)
opval[off-1]=4
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
Duel.RemoveCounter(tp,1,0,0x128d,sel*2,REASON_COST)
end
function c19500032.thfilter(c)
return c:IsCode(19214543,19214538,19214535,19500031) and c:IsAbleToHand()
end
function c19500032.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c19500032.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c19500032.thop(e,tp,eg,ep,ev,re,r,rp)
local sel=e:GetLabel()
local code=0
if sel==1 then code=19214543 elseif sel==2 then code=19214538 elseif sel==3 then code=19214535 else code=19500031 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_DECK,0,1,1,nil,code)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--四季花开·椿の人形
function c19500039.initial_effect(c)
--special summon
-- local e1=Effect.CreateEffect(c)
-- e1:SetType(EFFECT_TYPE_FIELD)
-- e1:SetCode(EFFECT_SPSUMMON_PROC)
--e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
--e1:SetRange(LOCATION_DECK)
-- e1:SetCountLimit(1,19500039)
-- e1:SetCondition(c19500039.spcon)
-- c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
--e2:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_GRAVE)
e1:SetCode(EVENT_REMOVE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,19500039+100)
e1:SetCost(c19500039.SelfRemoveCost)
e1:SetCondition(c19500039.drcon)
e1:SetTarget(c19500039.drtg)
e1:SetOperation(c19500039.drop)
c:RegisterEffect(e1)
--fusion summon
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c19500039.spcon)
e1:SetOperation(c19500039.spop)
c:RegisterEffect(e1)
end
--e1
function c19500039.SelfRemoveCost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c19500039.cfilter(c,tp)
return c:IsSetCard(0x186) and c:IsControler(tp) and c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function c19500039.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c19500039.cfilter,1,nil,tp) and aux.exccon(e)
end
function c19500039.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c19500039.drop(e,tp,eg,ep,ev,re,r,rp)
--if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--E2
function c19500039.spfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and c:IsSetCard(0x186)
end
function c19500039.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c19500039.spfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function c19500039.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c19500039.spfilter,tp,LOCATION_GRAVE,0,1,1nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
--七色人形剧·夜间山人形
local s,id,o=GetID()
function c19500180.initial_effect(c)
--return
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19500022,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,19500022)
e1:SetTarget(c19500180.target)
e1:SetOperation(c19500180.operation)
c:RegisterEffect(e1)
--spsummon & destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(19500022,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,19500022+o)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c19500180.sptg)
e2:SetOperation(c19500180.spop)
c:RegisterEffect(e2)
end
function c19500180.filter(c)
return c:IsSetCard(0x186,0x300) and c:IsFaceup()
end
function c19500180.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c19500180.filter(chkc) end
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c19500180.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c19500180.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c19500180.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
function c19500180.spfilter(c,e,tp)
return c:IsFaceup() and c:IsLevelBelow(2) and c:IsSetCard(0x186) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c19500180.sptg(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 c19500180.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c19500180.spfilter,tp,LOCATION_REMOVED,0,1,c,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c19500180.spfilter,tp,LOCATION_REMOVED,0,1,1,c,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c19500180.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
\ No newline at end of file
--七色人形剧·爱丽丝人形
function c19500190.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x186),1,1)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19500190,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,19500190)
e1:SetCondition(c19500190.descon)
e1:SetTarget(c19500190.destg)
e1:SetOperation(c19500190.desop)
c:RegisterEffect(e1)
end
function c19500190.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c19500190.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c19500190.rmfilter(c)
return c:IsAbleToRemove() and c:IsSetCard(0x186)
end
function c19500190.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)~=0 then
local sg=Duel.GetMatchingGroup(c19500190.rmfilter,tp,LOCATION_GRAVE,0,nil)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(19500190,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=sg:Select(tp,1,1,nil)
Duel.BreakEffect()
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
end
end
--无意的操纵·爱丽丝丶玛格特罗依德
local s,id,o=GetID()
function c19500200.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c19500200.lcheck)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19500200,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,19500200)
e1:SetCondition(c19500200.descon)
e1:SetTarget(c19500200.destg)
e1:SetOperation(c19500200.desop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(19500200,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,19500200+o)
e2:SetTarget(c19500200.sptg)
e2:SetOperation(c19500200.spop)
c:RegisterEffect(e2)
end
function c19500200.lcheck(g,lc)
return g:IsExists(Card.IsLinkRace,1,nil,RACE_MACHINE) and g:IsExists(Card.IsLinkSetCard,1,nil,0x300)
end
function c19500200.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c19500200.rmfilter(c)
return c:IsSetCard(0x186)
end
function c19500200.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c19500200.desfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c19500200.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
local sg=Duel.GetMatchingGroup(c19500200.rmfilter,tp,LOCATION_GRAVE,0,nil)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(19500200,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=sg:Select(tp,1,1,nil)
Duel.BreakEffect()
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
end
end
function c19500200.spfilter(c,e,tp)
return c:IsSetCard(0x300) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c19500200.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c19500200.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c19500200.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c19500200.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--七色的回旋·爱丽丝丶玛格特罗依德
--local s,id,o=GetID()
function c19500210.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,3,c19500210.lcheck)
c:EnableReviveLimit()
--to deck and to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19500210,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,19500210)
e1:SetCondition(c19500210.tdcon)
e1:SetTarget(c19500210.tdtg)
e1:SetOperation(c19500210.tdop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(19500210,1))
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,19500210+1)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c19500210.condition)
e2:SetTarget(c19500210.target)
e2:SetOperation(c19500210.operation)
c:RegisterEffect(e2)
end
function c19500210.lcheck(g,lc)
return g:IsExists(Card.IsLinkRace,1,nil,RACE_MACHINE) and g:IsExists(Card.IsLinkSetCard,1,nil,0x300)
end
function c19500210.tdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c19500210.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x186) and c:IsAbleToGrave()
end
function c19500210.fselect(g,tp)
return g:GetSum(Card.GetLevel)<=3
and Duel.IsExistingMatchingCard(c19500210.tgfilter,tp,LOCATION_DECK,0,g:GetCount(),g)
end
function c19500210.filter(c)
return c:IsLevelAbove(1) and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x186) and c:IsAbleToDeck()
end
function c19500210.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c19500210.filter(chkc) end
local g=Duel.GetMatchingGroup(c19500210.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if chk==0 then return Duel.IsExistingTarget(c19500210.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:SelectSubGroup(tp,c19500210.fselect,false,1,3,tp)
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,sg:GetCount(),0,0)
--Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,0,sg:GetCount(),0,0)
end
function c19500210.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=tc:Filter(Card.IsRelateToEffect,nil,e)
local ct=Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
--Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
--local g=Duel.SelectMatchingCard(tp,c19500210.tgfilter,tp,LOCATION_DECK,0,ct,ct,nil)
--if g:GetCount()>0 then
--Duel.SendtoGrave(g,REASON_EFFECT)
--end
end
function c19500210.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c19500210.desfilter(c,att)
return c:IsSetCard(0x186) and c:IsAttribute(att)
end
function c19500210.target(e,tp,eg,ep,ev,re,r,rp,chk)
local att=eg:GetFirst():GetAttribute()
if chk==0 then return Duel.IsExistingMatchingCard(c19500210.desfilter,tp,LOCATION_DECK,0,1,nil,att) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,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 c19500210.operation(e,tp,eg,ep,ev,re,r,rp)
local att=eg:GetFirst():GetAttribute()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c19500210.desfilter,tp,LOCATION_DECK,0,1,1,nil,att)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
end
\ No newline at end of file
--七色人形剧·演员的轮替
function c19500220.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,19500220)
e1:SetTarget(c19500220.target)
e1:SetOperation(c19500220.activate)
c:RegisterEffect(e1)
end
function c19500220.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end
local dg=Duel.GetMatchingGroup(c19500220.desfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return dg:GetCount()>0 and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c19500220.desfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x186,0x300)
end
function c19500220.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,c19500220.desfilter,tp,LOCATION_HAND,0,1,1,nil)
if tc:IsRelateToEffect(e) and Duel.Destroy(dg,REASON_EFFECT)~=0 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c19500220.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(19500220,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
......@@ -10,6 +10,7 @@ function c20041.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,20041)
e1:SetCondition(c20041.descon)
e1:SetCost(c20041.cost)
e1:SetTarget(c20041.destg)
......@@ -20,6 +21,7 @@ function c20041.initial_effect(c)
e2:SetDescription(aux.Stringid(20041,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLED)
e2:SetCountLimit(1,20042)
e2:SetCondition(c20041.atcon)
e2:SetCost(c20041.cost)
e2:SetOperation(c20041.atop)
......@@ -29,11 +31,10 @@ function c20041.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c20041.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,20041)==0 and Duel.IsExistingMatchingCard(c20041.costfilter,tp,LOCATION_GRAVE,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c20041.costfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c20041.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.RegisterFlagEffect(tp,20041,RESET_PHASE+PHASE_END,0,1)
end
function c20041.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
......
......@@ -9,6 +9,11 @@ function c20254.initial_effect(c)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c20254.spcon)
c:RegisterEffect(e1)
local e4=e1:Clone()
e4:SetRange(LOCATION_GRAVE)
e4:SetCondition(c20254.spcon2)
e4:SetOperation(c20254.spop)
c:RegisterEffect(e4)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
......@@ -30,8 +35,22 @@ function c20254.spcon(e,c)
if c==nil then return true end
if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end
local ct=Duel.GetMatchingGroupCount(c20254.spfilter,c:GetControler(),LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
return ct%2==0
end
function c20254.spfilter2(c)
return c:IsSetCard(0x201) and c:IsAbleToRemoveAsCost()
end
function c20254.spcon2(e,c)
if c==nil then return true end
if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end
local ct=Duel.GetMatchingGroupCount(c20254.spfilter2,c:GetControler(),LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
return ct%2==1
end
function c20254.spop(e,tp,eg,ep,ev,re,r,rp,c)
local tp=c:GetControler()
local g=Duel.SelectMatchingCard(tp,c20254.spfilter2,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c20254.val(e,c)
return c:GetEquipCount()*500
end
......@@ -19,7 +19,7 @@ function c20269.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCountLimit(1,20270)
e2:SetTarget(c20269.target)
e2:SetOperation(c20269.activate)
c:RegisterEffect(e2)
......
......@@ -46,10 +46,10 @@ function c22234.mfilter1(c)
return c:IsRace(RACE_SPELLCASTER)
end
function c22234.mfilter2(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) or (c:IsOriginalCodeRule(22161) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
return c:IsAttribute(ATTRIBUTE_LIGHT) or ((c:IsSetCard(0x183) or c:IsCode(22200)) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
end
function c22234.mfilter3(c)
return c:IsAttribute(ATTRIBUTE_EARTH) or (c:IsOriginalCodeRule(22135) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
return c:IsAttribute(ATTRIBUTE_EARTH) or ((c:IsSetCard(0x182) or c:IsCode(22200)) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
end
function c22234.filter(c)
return c:IsSetCard(0xb046) and c:IsAbleToHand()
......
......@@ -44,10 +44,10 @@ function c22236.mfilter1(c)
return c:IsRace(RACE_SPELLCASTER)
end
function c22236.mfilter2(c)
return c:IsAttribute(ATTRIBUTE_DARK) or (c:IsOriginalCodeRule(22162) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
return c:IsAttribute(ATTRIBUTE_DARK) or ((c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
end
function c22236.mfilter3(c)
return c:IsAttribute(ATTRIBUTE_EARTH) or (c:IsOriginalCodeRule(22135) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
return c:IsAttribute(ATTRIBUTE_EARTH) or ((c:IsSetCard(0x182) or c:IsCode(22200)) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
end
function c22236.thfilter1(c)
return c:IsSetCard(0xb046) and c:IsAbleToHand()
......
......@@ -39,13 +39,13 @@ function c22238.initial_effect(c)
end
--
function c22238.mfilter1(c)
return c:IsAttribute(ATTRIBUTE_WIND) or (c:IsOriginalCodeRule(22133) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
return c:IsAttribute(ATTRIBUTE_WIND) or ((c:IsSetCard(0x180) or c:IsCode(22200)) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
end
function c22238.mfilter2(c)
return c:IsAttribute(ATTRIBUTE_WATER) or (c:IsOriginalCodeRule(22132) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
return c:IsAttribute(ATTRIBUTE_WATER) or ((c:IsSetCard(0x179) or c:IsCode(22200)) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
end
function c22238.mfilter3(c)
return c:IsAttribute(ATTRIBUTE_FIRE) or (c:IsOriginalCodeRule(22131,22191) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
return c:IsAttribute(ATTRIBUTE_FIRE) or ((c:IsSetCard(0x178) or c:IsCode(22200)) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
end
--
function c22238.filters(c)
......
......@@ -39,13 +39,13 @@ function c22240.initial_effect(c)
end
--
function c22240.mfilter1(c)
return c:IsAttribute(ATTRIBUTE_DARK) or (c:IsOriginalCodeRule(22162) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
return c:IsAttribute(ATTRIBUTE_DARK) or ((c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
end
function c22240.mfilter2(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) or (c:IsOriginalCodeRule(22161) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
return c:IsAttribute(ATTRIBUTE_LIGHT) or ((c:IsSetCard(0x183) or c:IsCode(22200)) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
end
function c22240.mfilter3(c)
return c:IsAttribute(ATTRIBUTE_WIND) or (c:IsOriginalCodeRule(22133) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
return c:IsAttribute(ATTRIBUTE_WIND) or ((c:IsSetCard(0x180) or c:IsCode(22200)) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
end
--
function c22240.filter(c)
......
......@@ -19,10 +19,10 @@ function c22249.initial_effect(c)
c:RegisterEffect(e2)
end
function c22249.filter0(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and ((c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_WATER+ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x178,0x179,0x184))
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and ((c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_WATER+ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x178,0x179,0x184) or c:IsCode(22200))
end
function c22249.filter00(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and c:IsOriginalSetCard(0x178,0x179,0x180,0x181,0x182,0x183,0x184)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and (c:IsSetCard(0x178,0x179,0x180,0x181,0x182,0x183,0x184) or c:IsCode(22200))
end
function c22249.filter1(c,e)
return not c:IsImmuneToEffect(e)
......@@ -44,10 +44,10 @@ function c22249.tsfilter01(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_FIRE+ATTRIBUTE_WATER))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter02,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22249.tsfilter03,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter02(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x183)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x183) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter03(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x182)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x182) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22249.tsfilter10(c,e,tp,m,f,chkf,exg)
......@@ -58,10 +58,10 @@ function c22249.tsfilter11(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_FIRE+ATTRIBUTE_WATER))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter12,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22249.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter12(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER))or c:IsOriginalSetCard(0x184)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter13(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x182)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x182) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22249.tsfilter20(c,e,tp,m,f,chkf,exg)
......@@ -69,13 +69,13 @@ function c22249.tsfilter20(c,e,tp,m,f,chkf,exg)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22249.tsfilter21(c)
return ((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x180)) and not c:IsLocation(LOCATION_DECK) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter22,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22249.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c)
return ((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x180) or c:IsCode(22200)) and not c:IsLocation(LOCATION_DECK) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter22,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22249.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter22(c)
return ((c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x179)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c)
return ((c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x179) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter23(c)
return ((c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x178)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
return ((c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x178) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22249.tsfilter30(c,e,tp,m,f,chkf,exg)
......@@ -83,13 +83,13 @@ function c22249.tsfilter30(c,e,tp,m,f,chkf,exg)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22249.tsfilter31(c)
return((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x180)) and not c:IsLocation(LOCATION_DECK) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter32,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22249.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
return((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x180) or c:IsCode(22200)) and not c:IsLocation(LOCATION_DECK) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter32,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22249.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter32(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER))or c:IsOriginalSetCard(0x184)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER))or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter33(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x183)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x183) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22249.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -19,10 +19,10 @@ function c22250.initial_effect(c)
c:RegisterEffect(e2)
end
function c22250.filter0(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and ((c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x178,0x182))
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and ((c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x178,0x182) or c:IsCode(22200))
end
function c22250.filter00(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and c:IsOriginalSetCard(0x178,0x179,0x180,0x181,0x182,0x183,0x184)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and (c:IsSetCard(0x178,0x179,0x180,0x181,0x182,0x183,0x184) or c:IsCode(22200))
end
function c22250.filter1(c,e)
return not c:IsImmuneToEffect(e)
......@@ -43,10 +43,10 @@ function c22250.tsfilter01(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_FIRE+ATTRIBUTE_EARTH))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter02,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22250.tsfilter03,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22250.tsfilter02(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x183)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x183) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22250.tsfilter03(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x182)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x182) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22250.tsfilter10(c,e,tp,m,f,chkf,exg)
......@@ -57,10 +57,10 @@ function c22250.tsfilter11(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_FIRE))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter12,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22250.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22250.tsfilter12(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER))or c:IsOriginalSetCard(0x184)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER))or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22250.tsfilter13(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x182)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x182) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22250.tsfilter20(c,e,tp,m,f,chkf,exg)
......@@ -71,10 +71,10 @@ function c22250.tsfilter21(c)
return ((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x180)) and not c:IsLocation(LOCATION_DECK) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter22,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22250.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c)
end
function c22250.tsfilter22(c)
return ((c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x179)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c)
return ((c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x179) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c)
end
function c22250.tsfilter23(c)
return ((c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x178)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
return ((c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x178) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22250.tsfilter30(c,e,tp,m,f,chkf,exg)
......@@ -82,13 +82,13 @@ function c22250.tsfilter30(c,e,tp,m,f,chkf,exg)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22250.tsfilter31(c)
return((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x180)) and not c:IsLocation(LOCATION_DECK) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter32,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22250.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
return((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x180) or c:IsCode(22200)) and not c:IsLocation(LOCATION_DECK) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter32,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22250.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22250.tsfilter32(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER))or c:IsOriginalSetCard(0x184)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER))or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22250.tsfilter33(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x183)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x183) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22250.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -19,10 +19,10 @@ function c22251.initial_effect(c)
c:RegisterEffect(e2)
end
function c22251.filter0(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and ((c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x183,0x184))
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and ((c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x183,0x184) or c:IsCode(22200))
end
function c22251.filter00(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and c:IsOriginalSetCard(0x178,0x179,0x180,0x181,0x182,0x183,0x184)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and (c:IsSetCard(0x178,0x179,0x180,0x181,0x182,0x183,0x184) or c:IsCode(22200))
end
function c22251.filter1(c,e)
return not c:IsImmuneToEffect(e)
......@@ -43,10 +43,10 @@ function c22251.tsfilter01(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter02,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c) and Duel.IsExistingMatchingCard(c22251.tsfilter03,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22251.tsfilter02(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x183)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x183) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22251.tsfilter03(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x182)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x182) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22251.tsfilter10(c,e,tp,m,f,chkf,exg)
......@@ -57,10 +57,10 @@ function c22251.tsfilter11(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter12,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c) and Duel.IsExistingMatchingCard(c22251.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22251.tsfilter12(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER))or c:IsOriginalSetCard(0x184)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22251.tsfilter13(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x182)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x182) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22251.tsfilter20(c,e,tp,m,f,chkf,exg)
......@@ -68,13 +68,13 @@ function c22251.tsfilter20(c,e,tp,m,f,chkf,exg)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22251.tsfilter21(c)
return ((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x180)) and not c:IsLocation(LOCATION_DECK) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter22,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22251.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
return ((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x180) or c:IsCode(22200)) and not c:IsLocation(LOCATION_DECK) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter22,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22251.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22251.tsfilter22(c)
return ((c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x179)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
return ((c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x179) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22251.tsfilter23(c)
return ((c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x178)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
return ((c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x178) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22251.tsfilter30(c,e,tp,m,f,chkf,exg)
......@@ -82,13 +82,13 @@ function c22251.tsfilter30(c,e,tp,m,f,chkf,exg)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22251.tsfilter31(c)
return((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x180)) and not c:IsLocation(LOCATION_DECK) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter32,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c) and Duel.IsExistingMatchingCard(c22251.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
return((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x180) or c:IsCode(22200)) and not c:IsLocation(LOCATION_DECK) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter32,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c) and Duel.IsExistingMatchingCard(c22251.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22251.tsfilter32(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER))or c:IsOriginalSetCard(0x184)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22251.tsfilter33(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x183)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x183) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22251.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -19,10 +19,10 @@ function c22252.initial_effect(c)
c:RegisterEffect(e2)
end
function c22252.filter0(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and ((c:IsAttribute(ATTRIBUTE_WATER+ATTRIBUTE_WIND+ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x179,0x180,0x182))
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and ((c:IsAttribute(ATTRIBUTE_WATER+ATTRIBUTE_WIND+ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x179,0x180,0x182) or c:IsCode(22200))
end
function c22252.filter00(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and c:IsOriginalSetCard(0x178,0x179,0x180,0x181,0x182,0x183,0x184)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and (c:IsSetCard(0x178,0x179,0x180,0x181,0x182,0x183,0x184) or c:IsCode(22200))
end
function c22252.filter1(c,e)
return not c:IsImmuneToEffect(e)
......@@ -43,10 +43,10 @@ function c22252.tsfilter01(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER+ATTRIBUTE_WIND+ATTRIBUTE_EARTH))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter02,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22252.tsfilter03,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22252.tsfilter02(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x183)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x183) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22252.tsfilter03(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x182)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x182) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22252.tsfilter10(c,e,tp,m,f,chkf,exg)
......@@ -57,10 +57,10 @@ function c22252.tsfilter11(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER+ATTRIBUTE_WIND+ATTRIBUTE_EARTH))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter12,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22252.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22252.tsfilter12(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER))or c:IsOriginalSetCard(0x184)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22252.tsfilter13(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x182)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x182) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22252.tsfilter20(c,e,tp,m,f,chkf,exg)
......@@ -68,13 +68,13 @@ function c22252.tsfilter20(c,e,tp,m,f,chkf,exg)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22252.tsfilter21(c)
return ((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x180)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter22,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c) and Duel.IsExistingMatchingCard(c22252.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
return ((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x180) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter22,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c) and Duel.IsExistingMatchingCard(c22252.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22252.tsfilter22(c)
return ((c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x179)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
return ((c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x179) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22252.tsfilter23(c)
return ((c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x178)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
return ((c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x178) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22252.tsfilter30(c,e,tp,m,f,chkf,exg)
......@@ -82,13 +82,13 @@ function c22252.tsfilter30(c,e,tp,m,f,chkf,exg)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22252.tsfilter31(c)
return((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x180)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter32,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22252.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
return((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x180) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter32,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22252.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22252.tsfilter32(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER))or c:IsOriginalSetCard(0x184)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22252.tsfilter33(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x183)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x183) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22252.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -28,7 +28,7 @@ function c23051.initial_effect(c)
c:RegisterEffect(e3)
end
function c23051.filter(c)
return c:IsSetCard(0x820) and c:IsSSetable() and c:IsType(TYPE_TRAP)
return c:IsSetCard(0x820) and c:IsSSetable() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c23051.scost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,e:GetHandler()) end
......
......@@ -33,11 +33,11 @@ function c23099.cfilter(c)
return c:IsFaceup() and c:IsAbleToHandAsCost() and c:IsSetCard(0x817) and c:IsType(TYPE_TUNER)
end
function c23099.filter(c)
return c:IsFaceup() and c:IsAbleToGraveAsCost() and c:IsType(TYPE_SPELL+TYPE_TRAP)
return c:IsFaceup() and c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c23099.allfilter(c)
return c:IsFaceup() and ((c:IsAbleToHandAsCost() and c:IsSetCard(0x817) and c:IsType(TYPE_TUNER))
or (c:IsAbleToGraveAsCost() and c:IsType(TYPE_SPELL+TYPE_TRAP)))
or (c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP)))
end
function c23099.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local a=Duel.IsExistingMatchingCard(c23099.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......@@ -52,7 +52,7 @@ function c23099.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,c23099.filter,tp,LOCATION_ONFIELD,0,1,1,g1:GetFirst())
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_COST)
Duel.Destroy(g1,REASON_COST)
end
elseif a then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
......@@ -61,7 +61,7 @@ function c23099.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c23099.filter,tp,LOCATION_ONFIELD,0,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
Duel.Destroy(g,REASON_COST)
end
end
function c23099.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -14,6 +14,7 @@ function c23203.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(aux.exccon)
e2:SetCost(c23203.ctcost)
e2:SetTarget(c23203.cttg)
e2:SetOperation(c23203.ctop)
......
......@@ -95,7 +95,7 @@ function c31064.ctop2(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x254c,2)
end
function c31064.ctop3(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x254c,3)
e:GetHandler():AddCounter(0x254c,2)
end
function c31064.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x258) and not c:IsType(TYPE_LINK)
......
--白垩之子☪阿贝多
function c50106.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,5,75,c50106.xyzfilter)
--Geo
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(50106,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,50106+EFFECT_COUNT_CODE_DUEL)
e4:SetCost(c50106.bcost)
e4:SetTarget(c50106.btg)
e4:SetOperation(c50106.bop)
c:RegisterEffect(e4)
end
function c50106.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50106.bcost(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 c50106.bfilter(c,e,tp,atk)
return c:GetAttack()<=atk/2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c50106.btg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local atk=e:GetHandler():GetAttack()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c50106.bfilter,tp,LOCATION_DECK,0,1,nil,e,tp,atk)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
end
function c50106.bop(e,tp,eg,ep,ev,re,r,rp)
local num=1
local genso,count=TET.ELCounter.Get(1-tp)
if genso==50234 and count>0 then num=1-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50234,num,e)
local c=e:GetHandler()
local atk=c:GetAttack()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c50106.bfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,atk)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
Duel.SpecialSummonComplete()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1,true)
end
end
--少年春衫簿☪行秋
function c50114.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,5,75,c50114.xyzfilter)
--Hydro
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(50114,0))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,50114)
e4:SetCost(c50114.bcost)
e4:SetTarget(c50114.btg)
e4:SetOperation(c50114.bop)
c:RegisterEffect(e4)
end
function c50114.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50114.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,3,3,REASON_COST)
end
function c50114.btg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c50114.bop(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_INDESTRUCTABLE_COUNT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x17e0000+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_XMATERIAL)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+0x17e0000+RESET_PHASE+PHASE_END,2)
e3:SetCountLimit(1)
e3:SetCondition(c50114.ctg)
e3:SetOperation(c50114.cop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
c:RegisterEffect(e4)
end
function c50114.ctg(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst():IsControler(tp)
end
function c50114.cop(e,tp,eg,ep,ev,re,r,rp)
local e6=Effect.CreateEffect(e:GetHandler())
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_EXTRA_ATTACK)
e6:SetValue(1)
eg:GetFirst():RegisterEffect(e6)
for i = 1, 3 do
local num=1
local genso,count=TET.ELCounter.Get(1-tp)
if genso==50216 and count>2 then num=3-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50216,num,e)
end
end
--雪融有踪☪重云
function c50117.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,5,75,c50117.xyzfilter)
--Cyro
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(50117,0))
e4:SetCategory(CATEGORY_RECOVER+CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,50117)
e4:SetCost(c50117.bcost)
e4:SetTarget(c50117.btg)
e4:SetOperation(c50117.bop)
c:RegisterEffect(e4)
end
function c50117.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50117.bcost(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 c50117.btg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c50117.bop(e,tp,eg,ep,ev,re,r,rp)
for i = 1, 3 do
local num=1
local genso,count=TET.ELCounter.Get(1-tp)
if genso==50210 and count>2 then num=3-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50210,num,e)
end
end
......@@ -47,7 +47,7 @@ function c50121.bop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(-1000)
e1:SetValue(-500)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
......
--深秘之息☪阿贝多
function c50156.initial_effect(c)
--Geo
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(50156,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetTarget(c50156.btg)
e4:SetOperation(c50156.bop)
c:RegisterEffect(e4)
end
function c50156.bfilter(c)
return c:IsCode(50456) and c:IsFaceup()
end
function c50156.btg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE) >= 0 and not Duel.IsExistingMatchingCard(c50156.bfilter, tp, LOCATION_MZONE, 0, 1, nil)
and Duel.IsPlayerCanSpecialSummonMonster(tp,50456,0x250,0x4011,0,0,1,RACE_ROCK,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c50156.bop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetMZoneCount(tp)<0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,50456,0x250,0x4011,0,0,1,RACE_ROCK,ATTRIBUTE_EARTH) then return end
local token = Duel.CreateToken(tp,50456)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENSE)
e2:SetValue(c:GetDefense())
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
token:RegisterEffect(e2)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
--effect
token:SetUniqueOnField(1,0,50456)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetCondition(c50156.pycon)
e3:SetOperation(c50156.pyop)
token:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_ATTACK_ANNOUNCE)
e4:SetCondition(c50156.apycon)
e4:SetOperation(c50156.apyop)
token:RegisterEffect(e4)
end
function c50156.pycon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsActiveType(TYPE_MONSTER)
and e:GetHandler():GetFlagEffect(50156)==0 and re:GetActivateLocation()==LOCATION_MZONE
end
function c50156.pyop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,50456)
local num=1
local genso,count=TET.ELCounter.Get(1-tp)
if genso==50234 and count>0 then num=1-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50234,num,e)
e:GetHandler():RegisterFlagEffect(50156, RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END, 0, 1)
local def=e:GetHandler():GetDefense()
Duel.Damage(1-tp, def, REASON_EFFECT)
end
function c50156.apycon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:GetControler()==tp and at:GetFlagEffect(50156)==0
end
function c50156.apyop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,50456)
local num=1
local genso,count=TET.ELCounter.Get(1-tp)
if genso==50234 and count>0 then num=1-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50234,num,e)
e:GetHandler():RegisterFlagEffect(50156, RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END, 0, 1)
local def=e:GetHandler():GetDefense()
Duel.Damage(1-tp, def, REASON_EFFECT)
end
--织诗成锦☪行秋
function c50164.initial_effect(c)
--Hydro
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(50164,0))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCountLimit(1)
e4:SetTarget(c50164.btg)
e4:SetOperation(c50164.bop)
c:RegisterEffect(e4)
end
function c50164.btg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c50164.bop(e,tp,eg,ep,ev,re,r,rp)
local num=3
local genso,count=TET.ELCounter.Get(1-tp)
if genso==50216 and count>0 then num=3-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50216,num,e)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_XMATERIAL)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c50164.ccon)
e3:SetOperation(c50164.cop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_CONTINUOUS)
c:RegisterEffect(e4)
end
function c50164.ccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c50164.cop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp, 500, REASON_EFFECT)
end
--释凌咏冰☪重云
function c50167.initial_effect(c)
--Cyro
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(50167,0))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetTarget(c50167.btg)
e4:SetOperation(c50167.bop)
c:RegisterEffect(e4)
end
function c50167.btg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c50167.bop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(c50167.qfilter))
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(300)
Duel.RegisterEffect(e1,tp)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_BATTLE_DAMAGE)
e5:SetCondition(c50167.reccon)
e5:SetOperation(c50167.recop)
e5:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e5,tp)
end
function c50167.qfilter(c)
return c:GetDefense()>=1500 and c:IsFaceup()
end
function c50167.reccon(e,tp,eg,ep,ev,re,r,rp)
return eg:FilterCount(c50167.qfilter, nil)>0 and ep==1-tp and ev>0
end
function c50167.recop(e,tp,eg,ep,ev,re,r,rp)
local num=1
local genso,count=TET.ELCounter.Get(1-tp)
if genso==50210 and count>0 then num=1-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50210,num,e)
end
--逃跑的太阳☪可莉
function c50246.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,5,75,c50246.xyzfilter)
--Pyro
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(50246,0))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,50246)
e4:SetCost(c50246.bcost)
e4:SetTarget(c50246.btg)
e4:SetOperation(c50246.bop)
c:RegisterEffect(e4)
end
function c50246.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50246.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c50246.btg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c50246.bop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(50246,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetCondition(c50246.ccon)
e1:SetOperation(c50246.cop)
c:RegisterEffect(e1)
end
function c50246.ccon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()~=e:GetHandler() and Duel.IsExistingMatchingCard(aux.TRUE, tp, 0, LOCATION_ONFIELD, 1, nil)
end
function c50246.cop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,50246)
local g=Duel.GetMatchingGroup(aux.TRUE, tp, 0, LOCATION_ONFIELD, nil)
local sg=g:RandomSelect(tp, 1)
local hres=Duel.TossDice(tp, 1)
if hres==6 then
Duel.Destroy(sg, REASON_EFFECT)
else
Duel.Damage(1-tp, hres*100, REASON_EFFECT)
local num=1
local genso,count=TET.ELCounter.Get(1-tp)
if genso==50219 and count>1 then num=0 end
TET.ELCounter.Add(nil,1-tp,50219,num,e)
end
end
--断罪皇女!!☪菲谢尔
function c50249.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,5,75,c50249.xyzfilter)
--Electro
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(50249,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(c50249.bcost)
e4:SetTarget(c50249.btg)
e4:SetOperation(c50249.bop)
c:RegisterEffect(e4)
end
function c50249.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50249.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c50249.bfilter(c)
return c:IsCode(50649) and c:IsFaceup()
end
function c50249.btg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE) >= 0 and not Duel.IsExistingMatchingCard(c50249.bfilter, tp, LOCATION_MZONE, 0, 1, nil)
and Duel.IsPlayerCanSpecialSummonMonster(tp,50649,0x250,0x4011,0,0,4,RACE_WINDBEAST,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c50249.bop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetMZoneCount(tp)<0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,50649,0x250,0x4011,0,0,4,RACE_WINDBEAST,ATTRIBUTE_LIGHT) then return end
local token = Duel.CreateToken(tp,50649)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_ATTACK)
e2:SetValue(c:GetAttack())
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
token:RegisterEffect(e2)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
--effect
token:SetUniqueOnField(1,0,50649)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetValue(1)
token:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e5:SetCondition(c50249.rdcon)
e5:SetOperation(c50249.rdop)
token:RegisterEffect(e5)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_DAMAGE_STEP_END)
e3:SetCondition(c50249.elccon)
e3:SetOperation(c50249.eleop)
token:RegisterEffect(e3)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_EXTRA_ATTACK)
e6:SetValue(c50249.val)
token:RegisterEffect(e6)
end
function c50249.rdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and c==Duel.GetAttacker()
end
function c50249.rdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev/2)
end
function c50249.elccon(e,tp,eg,ep,ev,re,r,rp)
local a,d=Duel.GetBattleMonster(tp)
return a and a==e:GetHandler()
end
function c50249.eleop(e,tp,eg,ep,ev,re,r,rp)
local num=1
local genso,count=TET.ELCounter.Get(1-tp)
if genso==50213 and count>0 then num=1-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50213,num,e)
end
function c50249.val(e,c)
return Duel.GetFieldGroupCount(tp, LOCATION_MZONE, 0)-1
end
--忍里之貉☪早柚
function c50252.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,4,75,c50252.xyzfilter)
--Electro
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(50252,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(c50252.bcost)
e4:SetTarget(c50252.btg)
e4:SetOperation(c50252.bop)
c:RegisterEffect(e4)
end
function c50252.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50252.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,3,3,REASON_COST)
end
function c50252.btg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE) >= 0
and Duel.IsPlayerCanSpecialSummonMonster(tp,50652,0x250,0x4011,0,1600,1,RACE_PLANT,ATTRIBUTE_WIND) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c50252.bop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetMZoneCount(tp)<0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,50652,0x250,0x4011,0,1600,1,RACE_PLANT,ATTRIBUTE_WIND) then return end
local token = Duel.CreateToken(tp,50652)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_ATTACK)
e2:SetValue(c:GetAttack()*2)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
token:RegisterEffect(e2)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
--effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(50252,1))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c50252.sptg)
e1:SetOperation(c50252.spop)
token:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_DAMAGE_STEP_END)
e3:SetCondition(c50252.elccon)
e3:SetOperation(c50252.eleop)
token:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetReset(RESET_PHASE+PHASE_END)
e4:SetOperation(c50252.desop)
c:RegisterEffect(e4)
end
function c50252.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,0,0)
local rec=(e:GetHandler():GetAttack()*2)
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec)
end
function c50252.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local rec=(e:GetHandler():GetAttack()*2)
Duel.BreakEffect()
Duel.Recover(p,rec,REASON_EFFECT)
Duel.Draw(p,1,REASON_EFFECT)
end
end
function c50252.elccon(e,tp,eg,ep,ev,re,r,rp)
local a,d=Duel.GetBattleMonster(tp)
return a and a==e:GetHandler()
end
function c50252.eleop(e,tp,eg,ep,ev,re,r,rp)
local num=1
local genso,count=TET.ELCounter.Get(1-tp)
TET.ELCounter.Add(nil,1-tp,50240,num,e)
end
function c50252.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
--闪焰的驻足☪可莉
function c50346.initial_effect(c)
--Pyro
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(50346,0))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetTarget(c50346.btg)
e4:SetOperation(c50346.bop)
c:RegisterEffect(e4)
local e3=e4:Clone()
e3:SetDescription(aux.Stringid(50346,1))
e3:SetTarget(c50346.ctg)
c:RegisterEffect(e3)
end
function c50346.bfilter(c)
return c:IsDestructable()
end
function c50346.btg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c50346.bfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c50346.bfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c50346.bfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c50346.bop(e,tp,eg,ep,ev,re,r,rp)
local num=2
local genso,count=TET.ELCounter.Get(1-tp)
if genso==50219 and count>0 then num=2-count end
if num<0 then num=0 end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c50346.cfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end
function c50346.ctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) and c50346.cfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c50346.cfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c50346.cfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
--圣裁影羽☪菲谢尔
function c50349.initial_effect(c)
--Electro
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(50349,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetTarget(c50349.btg)
e4:SetOperation(c50349.bop)
c:RegisterEffect(e4)
end
function c50349.bfilter(c)
return c:IsCode(50649) and c:IsFaceup()
end
function c50349.btg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE) >= 0 and not Duel.IsExistingMatchingCard(c50349.bfilter, tp, LOCATION_MZONE, 0, 1, nil)
and Duel.IsPlayerCanSpecialSummonMonster(tp,50649,0x250,0x4011,0,0,4,RACE_WINDBEAST,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c50349.bop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetMZoneCount(tp)<0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,50649,0x250,0x4011,0,0,4,RACE_WINDBEAST,ATTRIBUTE_LIGHT) then return end
local token = Duel.CreateToken(tp,50649)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_ATTACK)
e2:SetValue(c:GetAttack())
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
token:RegisterEffect(e2)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
--effect
token:SetUniqueOnField(1,0,50649)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetValue(1)
token:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e5:SetCondition(c50349.rdcon)
e5:SetOperation(c50349.rdop)
token:RegisterEffect(e5)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_DAMAGE_STEP_END)
e3:SetCondition(c50349.elccon)
e3:SetOperation(c50349.eleop)
token:RegisterEffect(e3)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_EXTRA_ATTACK)
e6:SetValue(c50349.val)
token:RegisterEffect(e6)
end
function c50349.rdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and c==Duel.GetAttacker()
end
function c50349.rdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev/2)
end
function c50349.elccon(e,tp,eg,ep,ev,re,r,rp)
local a,d=Duel.GetBattleMonster(tp)
return a and a==e:GetHandler()
end
function c50349.eleop(e,tp,eg,ep,ev,re,r,rp)
local num=1
local genso,count=TET.ELCounter.Get(1-tp)
if genso==50213 and count>0 then num=1-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50213,num,e)
end
function c50349.val(e,c)
return Duel.GetFieldGroupCount(tp, LOCATION_MZONE, 0)-1
end
--快是第一奥义☪早柚
function c50352.initial_effect(c)
--Anemo
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c50352.spcon)
e1:SetOperation(c50352.bop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetRange(LOCATION_DECK)
e2:SetValue(1)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c50352.thcon)
e3:SetOperation(c50352.thop)
c:RegisterEffect(e3)
end
function c50352.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c50352.bop(e,tp,eg,ep,ev,re,r,rp,c)
local tp=c:GetControler()
local num=1
local genso,count=TET.ELCounter.Get(1-tp)
TET.ELCounter.Add(nil,1-tp,50240,num,e)
end
function c50352.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c50352.thop(e,tp,eg,ep,ev,re,r,rp)
local num=1
local genso,count=TET.ELCounter.Get(1-tp)
TET.ELCounter.Add(nil,1-tp,50240,num,e)
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(c50352.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local seq=e:GetHandler():GetSequence()
local val=0
for i=0,4 do
if i~=seq then
local cval=aux.SequenceToGlobal(tp,LOCATION_MZONE,i)
val=val+cval
end
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE_FIELD)
e2:SetValue(val)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c50352.splimit(e,c)
return not c:IsSetCard(0x250)
end
......@@ -51,7 +51,7 @@ function c60151307.spop2(e,tp,eg,ep,ev,re,r,rp,c)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c60151307.tgfilter(c,e,tp)
return c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevel(3)
return c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c60151307.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -17,7 +17,8 @@ function c60151313.initial_effect(c)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60151313,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,60151313)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c60151313.cost)
......
--超人且开悟的大阿阇梨✿圣白莲
function c60151323.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x252a),2,2)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60151323,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,60151323)
e1:SetCondition(c60151323.e2con)
e1:SetTarget(c60151323.e2tg)
e1:SetOperation(c60151323.e2op)
c:RegisterEffect(e1)
--Actlimit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_PIERCE)
e3:SetCondition(c60151323.e3con)
c:RegisterEffect(e3)
--equip
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(60151323,1))
e4:SetCategory(CATEGORY_EQUIP)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCountLimit(1,60151323)
e4:SetCondition(c60151323.e4con)
e4:SetTarget(c60151323.e4tg)
e4:SetOperation(c60151323.e4op)
c:RegisterEffect(e4)
--cannot remove
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetCode(EFFECT_CANNOT_REMOVE)
e5:SetRange(LOCATION_SZONE)
e5:SetCondition(c60151323.ercon)
c:RegisterEffect(e5)
end
--
function c60151323.e2con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_LINK and e:GetHandler():GetMaterial():FilterCount(Card.IsLinkType,nil,TYPE_XYZ)<1
end
function c60151323.e2filter2(c)
return c:IsType(TYPE_XYZ)
end
function c60151323.e2filter(c,e,tp)
return c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c60151323.e2tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c60151323.e2filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c60151323.e2filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c60151323.e2filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c60151323.e2op(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 c60151323.e4con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_LINK and e:GetHandler():GetMaterial():FilterCount(Card.IsLinkType,nil,TYPE_XYZ)>1
end
function c60151323.e4filter(c)
return c:IsSetCard(0x252a) and c:IsType(TYPE_XYZ) and not c:IsForbidden()
end
function c60151323.e4tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c60151323.e4filter(chkc,e) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c60151323.e4filter,tp,LOCATION_GRAVE,0,1,nil,e) end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local ft2=Duel.GetMatchingGroupCount(c60151323.e4filter,tp,LOCATION_GRAVE,0,nil,e)
if ft2>ft then ft2=ft end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c60151323.e4filter,tp,LOCATION_GRAVE,0,1,ft2,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,g:GetCount(),0,0)
end
function c60151323.e4op(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()<=0 or ft<=0 then return end
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local tc=g:GetFirst()
while tc do
Duel.Equip(tp,tc,c,true,true)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetReset(RESET_EVENT+0x1fe0000)
e3:SetValue(c60151323.eqlimit2)
tc:RegisterEffect(e3)
tc=g:GetNext()
end
Duel.EquipComplete()
local atk=g:GetSum(Card.GetRank)*300
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+0x1ff0000)
e2:SetValue(atk)
c:RegisterEffect(e2)
end
--
function c60151323.e3con(e,tp,eg,ep,ev,re,r,rp)
local tg=e:GetHandler():GetEquipTarget()
return tg:IsSetCard(0x252a) and tg:IsType(TYPE_MONSTER)
end
function c60151323.eqlimit2(e,c)
return e:GetOwner()==c
end
--
function c60151323.ercon(e,tp,eg,ep,ev,re,r,rp)
local tg=e:GetHandler():GetEquipTarget()
return tg and tg:IsSetCard(0x252a) and tg:IsType(TYPE_MONSTER)
end
......@@ -14,7 +14,8 @@ function c60151327.initial_effect(c)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,60151328)
e2:SetCondition(aux.exccon)
......
--天符「三千大千世界之主」
function c60151329.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,60151329+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c60151329.target)
e1:SetOperation(c60151329.activate)
c:RegisterEffect(e1)
end
function c60151329.filter(c)
return c:IsFaceup() and c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER) and c:GetFlagEffect(60151329)==0
end
function c60151329.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c60151329.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c60151329.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c60151329.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c60151329.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
if tc:GetFlagEffect(60151329)==0 then
tc:RegisterFlagEffect(60151329,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60151329,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,1)
e1:SetCondition(c60151329.actcon)
e1:SetValue(c60151329.aclimit)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
--disable
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetOperation(c60151329.disop)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
local e2=e3:Clone()
e2:SetCode(EVENT_BE_BATTLE_TARGET)
tc:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetValue(1)
e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
tc:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_EXTRA_ATTACK)
e6:SetValue(c60151329.ac)
e6:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e7:SetCondition(c60151329.damcon)
e7:SetOperation(c60151329.damop)
e7:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e7)
end
end
end
function c60151329.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if bc then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
bc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
bc:RegisterEffect(e2)
end
end
function c60151329.actcon(e)
local c=e:GetHandler()
return (Duel.GetAttacker()==c or Duel.GetAttackTarget()==c) and (c:GetBattleTarget()~=nil or c:GetBattleTarget()==nil)
and e:GetOwnerPlayer()==e:GetHandlerPlayer()
end
function c60151329.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c60151329.ac(e)
return e:GetHandler():GetEquipCount()
end
function c60151329.damcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and (e:GetHandler():GetBattleTarget()~=nil or e:GetHandler():GetBattleTarget()==nil)
and e:GetOwnerPlayer()==tp
end
function c60151329.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev/2)
end
--粲然魔女
local m=66917018
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,cm.mfilter,2,2,cm.lcheck)
c:EnableReviveLimit()
--code
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(66917000)
c:RegisterEffect(e1)
--fusion summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,m+1)
e1:SetCost(aux.bfgcost)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.tg1)
e1:SetOperation(cm.op1)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.mfilter(c)
return c:IsLevelAbove(0)
end
function cm.lcheck(g,lc)
return g:GetClassCount(Card.GetLevel)==g:GetCount() and g:GetClassCount(Card.GetLinkAttribute)==g:GetCount()
end
function cm.spfilter(c,e,tp)
return c:IsCode(66917000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP)
and (c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp))
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function cm.exfilter1(c,tp,rc,mg,opchk)
return Duel.GetLocationCountFromEx(tp,tp,rc,c)>0
and (opchk or Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,c,nil,mg))
end
function cm.spfilter1(c,e,tp,rc,chkrel,chknotrel,tgchk,opchk)
if not (c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end
local mg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
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
mg:AddCard(c)
if tgchk then
return cm.exfilter1(c,tp,nil,mg,opchk)
else
return (chkrel and cm.exfilter1(c,tp,rc,mg-rc)) or (chknotrel and c1m.exfilter1(c,tp,nil,mg))
end
end
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local c=e:GetHandler()
return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp,c,nil,nil,true)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil,e,tp,c,nil,nil,true,true)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then
Duel.RaiseEvent(c,EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
local tg=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil)
if tg:GetCount()>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=tg:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil)
end
end
end
\ No newline at end of file
--冻结的永远之都
function c74563046.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetTarget(c74563046.damtg)
e2:SetOperation(c74563046.damop)
c:RegisterEffect(e2)
--handes
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCondition(c74563046.hdcon)
e4:SetCost(c74563046.cost)
e4:SetTarget(c74563046.hdtg)
e4:SetOperation(c74563046.hdop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_REMOVE)
c:RegisterEffect(e5)
end
function c74563046.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c74563046.hdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD))
end
function c74563046.filter(c,e,tp)
return c:IsSetCard(0x274) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c74563046.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c74563046.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c74563046.hdop(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,c74563046.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c74563046.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c74563046.damop(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_SKIP_TURN)
e1:SetTargetRange(0,1)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
Duel.RegisterEffect(e2,1-tp)
end
\ No newline at end of file
--忒弥斯的肃清
function c74563047.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c74563047.target)
e1:SetOperation(c74563047.activate)
c:RegisterEffect(e1)
end
function c74563047.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,sg,sg:GetCount(),0,0)
end
function c74563047.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
--忒弥斯的审判
function c74563048.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c74563048.target)
e1:SetOperation(c74563048.activate)
c:RegisterEffect(e1)
end
function c74563048.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetChainLimit(aux.FALSE)
end
function c74563048.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Destroy(sg,REASON_EFFECT)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CHANGE_DAMAGE)
e3:SetTargetRange(1,1)
e3:SetValue(0)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
local e4=e3:Clone()
e4:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
end
end
--死之诱惑✿西行寺幽幽子
function c74563049.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_SELF_TOGRAVE)
--link summon
aux.AddLinkProcedure(c,aux.NOT(aux.FilterBoolFunction(Card.IsLinkType,TYPE_TOKEN)),2,2)
c:EnableReviveLimit()
--tograve
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_SELF_TOGRAVE)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c74563049.sdcon)
c:RegisterEffect(e4)
--lv
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetCondition(c74563049.con)
e2:SetTarget(c74563049.sptg)
e2:SetOperation(c74563049.spop)
c:RegisterEffect(e2)
if not c74563049.global_check then
c74563049.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetOperation(c74563049.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c74563049.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsOriginalCodeRule(74563049) and tc:IsPreviousLocation(LOCATION_ONFIELD) and tc:IsReason(REASON_EFFECT) and tc:GetReasonEffect()==nil then
tc:RegisterFlagEffect(74563049,RESET_EVENT+RESETS_STANDARD,0,1)
end
tc=eg:GetNext()
end
end
function c74563049.sdcon(e)
return Duel.IsExistingMatchingCard(aux.TRUE,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end
function c74563049.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(74563049)~=0
end
function c74563049.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c74563049.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
--小修女梅鲁柯特
function c74563601.initial_effect(c)
--Special Summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(74563601,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_HAND)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,74563601)
e2:SetCondition(c74563601.sscon)
e2:SetTarget(c74563601.sstg)
e2:SetOperation(c74563601.ssop)
c:RegisterEffect(e2)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(74563601,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,74563602)
e2:SetTarget(c74563601.rmtg)
e2:SetOperation(c74563601.rmop)
c:RegisterEffect(e2)
end
function c74563601.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c74563601.sscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_HAND+LOCATION_ONFIELD,0)==6
end
function c74563601.sstg(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 c74563601.ssop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c74563601.filter(c)
return (c:GetAttack()%1000)==666 and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c74563601.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c74563601.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c74563601.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--异端修女·梅鲁柯特
function c74563602.initial_effect(c)
--Special Summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(74563602,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_HAND)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,74563603)
e2:SetCondition(c74563602.sscon)
e2:SetTarget(c74563602.sstg)
e2:SetOperation(c74563602.ssop)
c:RegisterEffect(e2)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(74563602,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,74563604)
e2:SetTarget(c74563602.rmtg)
e2:SetOperation(c74563602.rmop)
c:RegisterEffect(e2)
end
function c74563602.sscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_HAND+LOCATION_GRAVE,0)==6
end
function c74563602.sstg(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 c74563602.ssop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c74563602.filter(c)
return c:IsSetCard(0x996) and c:IsAbleToHand()
end
function c74563602.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c74563602.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c74563602.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--小神官梅鲁柯特
function c74563603.initial_effect(c)
--Special Summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(74563602,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_HAND)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,74563605)
e2:SetCondition(c74563603.sscon)
e2:SetTarget(c74563603.sstg)
e2:SetOperation(c74563603.ssop)
c:RegisterEffect(e2)
--damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetOperation(c74563603.regop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c74563603.damcon)
e3:SetOperation(c74563603.damop)
c:RegisterEffect(e3)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(74563604,1))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_REMOVED)
e3:SetCountLimit(1,74563606)
e3:SetCost(c74563603.cost)
e3:SetTarget(c74563603.tdtg)
e3:SetOperation(c74563603.tdop)
c:RegisterEffect(e3)
end
function c74563603.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(74563603,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN,0,1)
end
function c74563603.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and c:GetFlagEffect(74563603)~=0
end
function c74563603.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,74563603)
Duel.Recover(tp,666,REASON_EFFECT)
end
function c74563603.sscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND+LOCATION_ONFIELD)==6
end
function c74563603.sstg(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 c74563603.ssop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c74563603.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() end
Duel.SendtoGrave(c,nil,REASON_RETURN+REASON_COST)
end
function c74563603.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local count=Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)
if chk==0 then return count>6 and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_REMOVED,0,count-6,nil,e,tp) end
end
function c74563603.tdop(e,tp,eg,ep,ev,re,r,rp)
local count=Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)
if count<=6 and not Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_REMOVED,0,count-6,nil,e,tp) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_REMOVED,0,count-6,count-6,nil,e,tp)
Duel.SendtoDeck(g,tp,2,REASON_EFFECT)
end
\ No newline at end of file
--异端神官·梅鲁柯特
function c74563604.initial_effect(c)
--Special Summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(74563602,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_HAND)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,74563607)
e2:SetCondition(c74563604.sscon)
e2:SetTarget(c74563604.sstg)
e2:SetOperation(c74563604.ssop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(74563604,1))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_REMOVED)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,74563608)
e3:SetCost(c74563604.cost)
e3:SetTarget(c74563604.target)
e3:SetOperation(c74563604.operation)
c:RegisterEffect(e3)
--cannot activate
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CHANGE_LEVEL)
e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e6:SetTarget(c74563604.tg)
e6:SetValue(6)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_CHANGE_RANK)
c:RegisterEffect(e7)
--level
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(6)
c:RegisterEffect(e1)
end
function c74563604.tg(e,c)
local seq=c:GetSequence()
return (c:GetColumnGroup():IsContains(e:GetHandler())) or (seq<5 and math.abs(e:GetHandler():GetSequence()-seq)==1 and c:GetControler()==e:GetHandler():GetControler())
end
function c74563604.sscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND+LOCATION_GRAVE)==6
end
function c74563604.sstg(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 c74563604.ssop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c74563604.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() end
Duel.SendtoGrave(c,nil,REASON_RETURN+REASON_COST)
end
function c74563604.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c74563604.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e3)
end
end
end
\ No newline at end of file
--冰狱的显现
function c74563605.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c74563605.target)
e1:SetOperation(c74563605.activate)
c:RegisterEffect(e1)
end
function c74563605.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,74563611,0,TYPES_TOKEN_MONSTER,666,666,6,RACE_FIEND,ATTRIBUTE_DARK) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ft,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ft,0,0)
end
function c74563605.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(ttp,74563611,0,TYPES_TOKEN_MONSTER,666,666,6,RACE_FIEND,ATTRIBUTE_DARK) then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local fid=e:GetHandler():GetFieldID()
local g=Group.CreateGroup()
for i=1,ft do
local token=Duel.CreateToken(tp,74563611)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
g:AddCard(token)
end
Duel.SpecialSummonComplete()
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c74563605.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c74563605.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
--邪教神殿
function c74563606.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c74563606.activate)
c:RegisterEffect(e1)
--change level
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetOperation(c74563606.lvop)
c:RegisterEffect(e2)
end
function c74563606.lvfilter(c,lv)
return c:IsFaceup() and (c:IsLevelAbove(0) and not c:IsLevel(lv)) or (c:IsRankAbove(0) and not c:IsRank(lv))
end
function c74563606.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c74563606.lvfilter,tp,LOCATION_MZONE,0,nil,0)
local lc=g:GetFirst()
while lc do
if lc:IsLevelAbove(0) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(6)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
lc:RegisterEffect(e1)
else
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RANK)
e1:SetValue(6)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
lc:RegisterEffect(e1)
end
lc=g:GetNext()
end
end
function c74563606.thfilter(c)
return (c:GetAttack()%1000)==666 and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c74563606.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c74563606.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(74563606,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--冰狱之王的凝视
function c74563607.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c74563607.cost1)
e1:SetTarget(c74563607.target)
e1:SetOperation(c74563607.activate)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_REMOVED)
e3:SetCountLimit(1,74563609)
e3:SetCost(c74563607.cost)
e3:SetTarget(c74563607.rmtg)
e3:SetOperation(c74563607.rmop)
c:RegisterEffect(e3)
end
function c74563607.cost1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then
local sel=0
if Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,nil,e:GetHandler()) then sel=sel+1 end
if Duel.CheckLPCost(tp,6660) or (Duel.CheckLPCost(tp,666) and Duel.IsPlayerAffectedByEffect(tp,74563666)) then sel=sel+2 end
e:SetLabel(sel)
return sel~=0
end
local sel=e:GetLabel()
if sel==3 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(74563607,2))
sel=Duel.SelectOption(tp,aux.Stringid(74563607,1),aux.Stringid(74563607,0))+1
elseif sel==1 then
Duel.SelectOption(tp,aux.Stringid(74563607,1))
else
Duel.SelectOption(tp,aux.Stringid(74563607,0))
end
e:SetLabel(sel)
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,2,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
else
if Duel.IsPlayerAffectedByEffect(tp,74563666) then
Duel.PayLPCost(tp,666)
else
Duel.PayLPCost(tp,6660)
end
end
end
--
function c74563607.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
function c74563607.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
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(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
function c74563607.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() end
Duel.SendtoGrave(c,nil,REASON_RETURN+REASON_COST)
end
function c74563607.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE)
end
function c74563607.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--冰狱之王的波动
function c74563608.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c74563608.cost1)
e1:SetTarget(c74563608.target)
e1:SetOperation(c74563608.activate)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_REMOVED)
e3:SetCountLimit(1,74563611)
e3:SetCost(c74563608.cost)
e3:SetTarget(c74563608.rmtg)
e3:SetOperation(c74563608.rmop)
c:RegisterEffect(e3)
end
function c74563608.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() end
Duel.SendtoGrave(c,nil,REASON_RETURN+REASON_COST)
end
function c74563608.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE)
end
function c74563608.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
function c74563608.cost1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then
local sel=0
if Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,nil,e:GetHandler()) then sel=sel+1 end
if Duel.CheckLPCost(tp,6660) or (Duel.CheckLPCost(tp,666) and Duel.IsPlayerAffectedByEffect(tp,74563666)) then sel=sel+2 end
e:SetLabel(sel)
return sel~=0
end
local sel=e:GetLabel()
if sel==3 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(74563608,2))
sel=Duel.SelectOption(tp,aux.Stringid(74563608,1),aux.Stringid(74563608,0))+1
elseif sel==1 then
Duel.SelectOption(tp,aux.Stringid(74563608,1))
else
Duel.SelectOption(tp,aux.Stringid(74563608,0))
end
e:SetLabel(sel)
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,2,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
else
if Duel.IsPlayerAffectedByEffect(tp,74563666) then
Duel.PayLPCost(tp,666)
else
Duel.PayLPCost(tp,6660)
end
end
end
function c74563608.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then
return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,nil)
end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,nil)
local counter=math.min(4,g:GetCount())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,counter,0,0)
end
function c74563608.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil)
local gx=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
g:Merge(gx)
local counter=math.min(4,g:GetCount())
while counter>0 do
if counter<4 then Duel.BreakEffect() end
local g1=g:RandomSelect(tp,1):GetFirst()
if g1:IsLocation(LOCATION_GRAVE) then
Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)
else
Duel.SendtoGrave(g1,REASON_EFFECT)
end
g:RemoveCard(g1)
counter=counter-1
end
end
\ No newline at end of file
--冰狱之王的天握
function c74563609.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(c74563609.cost1)
e1:SetTarget(c74563609.target)
e1:SetOperation(c74563609.activate)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_REMOVED)
e3:SetCountLimit(1,74563612)
e3:SetCost(c74563609.cost)
e3:SetTarget(c74563609.rmtg)
e3:SetOperation(c74563609.rmop)
c:RegisterEffect(e3)
end
function c74563609.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() end
Duel.SendtoGrave(c,nil,REASON_RETURN+REASON_COST)
end
function c74563609.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE)
end
function c74563609.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
function c74563609.cost1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then
local sel=0
if Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,nil,e:GetHandler()) then sel=sel+1 end
if Duel.CheckLPCost(tp,6660) or (Duel.CheckLPCost(tp,666) and Duel.IsPlayerAffectedByEffect(tp,74563666)) then sel=sel+2 end
e:SetLabel(sel)
return sel~=0
end
local sel=e:GetLabel()
if sel==3 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(74563609,2))
sel=Duel.SelectOption(tp,aux.Stringid(74563609,1),aux.Stringid(74563609,0))+1
elseif sel==1 then
Duel.SelectOption(tp,aux.Stringid(74563609,1))
else
Duel.SelectOption(tp,aux.Stringid(74563609,0))
end
e:SetLabel(sel)
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,2,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
else
if Duel.IsPlayerAffectedByEffect(tp,74563666) then
Duel.PayLPCost(tp,666)
else
Duel.PayLPCost(tp,6660)
end
end
end
function c74563609.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local rg=Duel.GetDecktopGroup(1-tp,1)
if chkc then return (chkc:IsLocation(LOCATION_ONFIELD) or chkc:IsLocation(LOCATION_GRAVE)) and chkc:IsAbleToRemove() and chkc:GetControler()~=tp end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c74563609.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(1-tp,1)
if #g<=0 then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
g:AddCard(tc)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
end
\ No newline at end of file
--冰狱之王的地坏
function c74563610.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c74563610.cost1)
e1:SetTarget(c74563610.target)
e1:SetOperation(c74563610.activate)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_REMOVED)
e3:SetCountLimit(1,74563613)
e3:SetCost(c74563610.cost)
e3:SetTarget(c74563610.rmtg)
e3:SetOperation(c74563610.rmop)
c:RegisterEffect(e3)
end
function c74563610.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() end
Duel.SendtoGrave(c,nil,REASON_RETURN+REASON_COST)
end
function c74563610.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE)
end
function c74563610.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
function c74563610.cost1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then
local sel=0
if Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,nil,e:GetHandler()) then sel=sel+1 end
if Duel.CheckLPCost(tp,6660) or (Duel.CheckLPCost(tp,666) and Duel.IsPlayerAffectedByEffect(tp,74563666)) then sel=sel+2 end
e:SetLabel(sel)
return sel~=0
end
local sel=e:GetLabel()
if sel==3 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(74563610,2))
sel=Duel.SelectOption(tp,aux.Stringid(74563610,1),aux.Stringid(74563610,0))+1
elseif sel==1 then
Duel.SelectOption(tp,aux.Stringid(74563610,1))
else
Duel.SelectOption(tp,aux.Stringid(74563610,0))
end
e:SetLabel(sel)
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,2,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
else
if Duel.IsPlayerAffectedByEffect(tp,74563666) then
Duel.PayLPCost(tp,666)
else
Duel.PayLPCost(tp,6660)
end
end
end
function c74563610.target(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
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
local count=sg:GetCount()
local count1=0
if count%3~=0 then
count1=(count//3+1)*2
else
count1=count//3*2
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,count1,0,0)
end
function c74563610.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
local count=sg:GetCount()
local count1=0
if count%3~=0 then
count1=(count//3+1)*2
else
count1=count//3*2
end
local sg1=sg:RandomSelect(1-tp,count1)
Duel.Destroy(sg1,REASON_EFFECT)
end
\ No newline at end of file
--冰狱之王·撒旦
function c74563666.initial_effect(c)
--change cost
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(74563666)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
e1:SetCondition(c74563666.sprcon)
e1:SetOperation(c74563666.sprop)
c:RegisterEffect(e1)
--special summon
local e5=Effect.CreateEffect(c)
e5:SetDescription(7)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_REMOVED)
e5:SetCondition(c74563666.con)
e5:SetOperation(c74563666.sprop1)
c:RegisterEffect(e5)
--copy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(70369116,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1)
e2:SetCost(c74563666.cpcost)
e2:SetTarget(c74563666.cptg)
e2:SetOperation(c74563666.cpop)
c:RegisterEffect(e2)
end
function c74563666.sprfilter(c)
return (c:IsRank(6) or c:IsLevel(6) or c:IsLink(6)) and c:IsAbleToRemoveAsCost()
end
function c74563666.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c74563666.sprfilter,tp,LOCATION_MZONE,0,3,nil)
end
function c74563666.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c74563666.sprfilter,tp,LOCATION_MZONE,0,3,3,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c74563666.sprop1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SpecialSummonRule(e:GetHandler():GetControler(),e:GetHandler())
end
function c74563666.cpfilter(c)
return (c:IsType(TYPE_SPELL)) and c:IsSetCard(0x996) and c:IsAbleToRemoveAsCost()
and c:CheckActivateEffect(true,true,false)~=nil
end
function c74563666.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.IsExistingMatchingCard(c74563666.sprfilter,tp,LOCATION_MZONE,0,3,nil)
end
function c74563666.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return true end
end
function c74563666.cptg(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(c74563666.cpfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil)
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c74563666.cpfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
Duel.Remove(g,POS_FACEUP,REASON_COST)
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)
end
function c74563666.cpop(e,tp,eg,ep,ev,re,r,rp)
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
--纯化
function c86379000.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c86379000.op)
c:RegisterEffect(e1)
end
--
function c86379000.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local tg=g:Select(tp,1,1,nil)
Duel.HintSelection(tg)
local tc=tg:GetFirst()
Duel.Exile(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--饕餮『刚欲暴食』
function c86379003.initial_effect(c)
--eat
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetProperty(EFFECT_FLAG_LIMIT_ZONE)
e0:SetCondition(c86379003.zcon)
e0:SetOperation(c86379003.zop)
e0:SetValue(c86379003.zones)
c:RegisterEffect(e0)
end
--
function c86379003.zcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0
end
function c86379003.zones(e,tp,eg,ep,ev,re,r,rp)
local zone=0
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
for tc in aux.Next(g) do
local seq=tc:GetSequence()
if tc:IsLocation(LOCATION_MZONE) then seq=aux.MZoneSequence(seq) end
if seq<5 then zone=zone|1<<(4-seq) end
end
return zone
end
function c86379003.zfilter(c,tp)
return c:GetControler()~=tp and c:IsCanOverlay(tp)
end
function c86379003.zop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=c:GetColumnGroup():Filter(c86379003.zfilter,nil,tp)
if g:GetCount()>0 then
Duel.Overlay(c,g)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetOperation(c86379003.destroy)
c:RegisterEffect(e1)
end
function c86379003.destroy(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct==6 then
local sg=c:GetOverlayGroup()
if sg:GetCount()>0 then
Duel.SendtoHand(sg,tp,REASON_EFFECT)
end
local g=c:GetColumnGroup():Filter(c86379003.zfilter,nil,tp)
if g:GetCount()>0 then
Duel.Overlay(c,g)
end
c:SetTurnCounter(0)
end
end
--星莲-小小僧侣✿圣白莲
function c86379005.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c86379005.matfilter,1)
c:EnableReviveLimit()
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379005,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c86379005.tg)
e1:SetOperation(c86379005.op)
c:RegisterEffect(e1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379005,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c86379005.tg)
e2:SetOperation(c86379005.op)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c86379005.eftg)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--cannot remove
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_CANNOT_REMOVE)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c86379005.ercon)
c:RegisterEffect(e4)
end
--
function c86379005.matfilter(c)
return c:IsLinkSetCard(0x252a) and not c:IsLinkCode(86379005)
end
--
function c86379005.eqfilter(c)
return c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c86379005.teqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x252a)
end
function c86379005.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c86379005.eqfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c86379005.eqfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c86379005.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function c86379005.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.IsExistingMatchingCard(c86379005.teqfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g=Duel.SelectMatchingCard(tp,c86379005.teqfilter,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
local sc=g:GetFirst()
if sc:IsImmuneToEffect(e) then return end
Duel.Equip(tp,tc,sc,true,true)
Duel.EquipComplete()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c86379005.eqlimit)
e1:SetLabelObject(sc)
tc:RegisterEffect(e1)
end
end
end
function c86379005.eqlimit(e,c)
return c==e:GetLabelObject()
end
--
function c86379005.eftg(e,c)
return c==e:GetHandler():GetEquipTarget() and c:IsSetCard(0x252a)
end
--
function c86379005.ercon(e,tp,eg,ep,ev,re,r,rp)
local tg=e:GetHandler():GetEquipTarget()
return tg and tg:IsSetCard(0x252a) and tg:IsType(TYPE_MONSTER)
end
--星莲-骑手僧侣✿圣白莲
function c86379007.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379007,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_DISCARD)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,86379007)
e1:SetTarget(c86379007.sptg)
e1:SetOperation(c86379007.spop)
c:RegisterEffect(e1)
end
--
function c86379007.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,e:GetHandler(),1,0,0)
end
function c86379007.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local zone=0
local seq=0
while seq<5 do
if Duel.CheckLocation(tp,LOCATION_MZONE,seq) and Duel.CheckLocation(tp,LOCATION_SZONE,seq) then
zone=zone|1<<seq
end
seq=seq+1
end
if zone==0 then return end
if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,26145) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP,zone)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,26145):GetFirst()
local zone2=1<<c:GetSequence()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true,zone2)
Duel.Equip(tp,tc,c,true,true)
Duel.EquipComplete()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c86379007.eqlimit)
e1:SetLabelObject(c)
tc:RegisterEffect(e1)
--move
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(86379007,0))
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1)
e5:SetTarget(c86379007.mvtg)
e5:SetOperation(c86379007.mvop)
tc:RegisterEffect(e5)
end
end
function c86379007.eqlimit(e,c)
return c==e:GetLabelObject()
end
--
function c86379007.mvtg(e,tp,eg,ep,ev,re,r,rp,chk)
local zone=0
local seq=0
while seq<5 do
if Duel.CheckLocation(tp,LOCATION_MZONE,seq) and Duel.CheckLocation(tp,LOCATION_SZONE,seq) then
zone=zone|1<<seq
end
seq=seq+1
end
if chk==0 then return zone~=0 end
end
function c86379007.mvfilter1(c)
return c:GetSequence()<5
end
function c86379007.mvfilter2(c)
return c:GetSequence()>4
end
function c86379007.mvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local zone=0
local seq=0
while seq<5 do
if Duel.CheckLocation(tp,LOCATION_MZONE,seq) and Duel.CheckLocation(tp,LOCATION_SZONE,seq) then
zone=zone|1<<seq
end
seq=seq+1
end
if zone==0 then return end
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,~zone)
local seq=math.log(s,2)
local tc=c:GetEquipTarget()
Duel.MoveSequence(tc,seq)
Duel.MoveSequence(c,seq)
local sg=c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp):Filter(Card.IsType,nil,TYPE_MONSTER)
if sg:GetCount()>0 then
local tg1=sg:Filter(c86379007.mvfilter1,nil)
local tg2=sg:Filter(c86379007.mvfilter2,nil)
if tg1:GetCount()>0 then
local tc1=tg1:GetFirst()
local zone1=1<<tc1:GetSequence()
local oc1=Duel.GetMatchingGroup(c86379007.seqfilter,tp,0,LOCATION_SZONE,nil,tc1:GetSequence()):GetFirst()
if oc1 then Duel.Destroy(oc1,REASON_EFFECT) end
local pos=tc1:GetPosition()
if Duel.MoveToField(tc1,tp,1-tp,LOCATION_SZONE,pos,true,zone1) then
local sc=c:GetEquipTarget()
Duel.Equip(tp,tc1,sc,false)
local e1=Effect.CreateEffect(sc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c86379007.eqlimit2)
tc1:RegisterEffect(e1)
end
end
if tg2:GetCount()>0 then
local tc2seq=0
local tc2=tg2:GetFirst()
if tc2:GetSequence()==5 then tc2seq=1 end
if tc2:GetSequence()==6 then tc2seq=3 end
local oc2=Duel.GetMatchingGroup(c86379007.seqfilter,tp,0,LOCATION_MZONE,nil,tc2seq):GetFirst()
if oc2 then Duel.Destroy(oc2,REASON_EFFECT) end
Duel.MoveSequence(tc2,tc2seq)
end
end
end
function c86379007.seqfilter(c,seq)
return c:GetSequence()==seq
end
function c86379007.eqlimit2(e,c)
return e:GetOwner()==c
end
--Lost✿比那名居地子
function c86379009.initial_effect(c)
c:EnableReviveLimit()
--Cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.FALSE)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c86379009.tg)
e1:SetOperation(c86379009.op)
c:RegisterEffect(e1)
--half damage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCountLimit(1,86379016)
e2:SetCondition(c86379009.damcon2)
e2:SetOperation(c86379009.damop2)
c:RegisterEffect(e2)
end
--
function c86379009.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c86379009.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,86379009)>0 then return end
if Duel.GetFlagEffect(1-tp,86379009)>0 then return end
--
local c=e:GetHandler()
--damage
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetTargetRange(1,1)
e1:SetValue(c86379009.damval)
Duel.RegisterEffect(e1,tp)
--addcount
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e2:SetOperation(c86379009.addcount)
Duel.RegisterEffect(e2,tp)
--
local num=Duel.GetTurnCount()
c86379009.PLCounter.Add(tp,86379009,num)
c86379009.PLCounter.Add(1-tp,86379009,num)
--
Duel.RegisterFlagEffect(tp,86379009,0,0,0)
Duel.RegisterFlagEffect(1-tp,86379009,0,0,0)
end
--
function c86379009.damval(e,re,val,r,rp,rc)
if val<=0 then return 0 end
local ct=Duel.GetTurnCount()%10
local dt=3000-(ct*300)
local vt=val-dt
if vt<=0 then vt=0 end
return vt
end
--
function c86379009.addcount(e,tp,eg,ep,ev,re,r,rp)
local num=Duel.GetTurnCount()
c86379009.PLCounter.Add(tp,86379009,num)
c86379009.PLCounter.Add(1-tp,86379009,num)
end
if not c86379009.PLCounter then
local class = {}
class._e = {
[0] = {},
[1] = {},
}
class._n = {
[0] = {},
[1] = {},
}
function class.Add(tp, code, num)
local eg = class._e[tp][code]
if eg then
eg:Reset()
end
local e1 = Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
local count = num%10
class._e[tp][code] = e1
class._n[tp][code] = count
e1:SetDescription(aux.Stringid(code, count))
Duel.RegisterEffect(e1, tp)
end
c86379009.PLCounter = class
end
--
function c86379009.damcon2(e,tp,eg,ep,ev,re,r,rp)
return aux.damcon1(e,tp,eg,ep,ev,re,r,rp)
end
function c86379009.damtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c86379009.damop2(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetLabel(cid)
e1:SetValue(c86379009.damval2)
e1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
--
if e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsAbleToHand() then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
end
function c86379009.damval2(e,re,val,r,rp,rc)
local cc=Duel.GetCurrentChain()
if cc==0 or bit.band(r,REASON_EFFECT)==0 then return val end
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return val end
return 0
end
--梦符『绀色的狂梦』
function c86379011.initial_effect(c)
--reverse
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379011,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(2,31051)
e1:SetTarget(c86379011.tg1)
e1:SetOperation(c86379011.op1)
c:RegisterEffect(e1)
--reverse
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379011,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(2,31051)
e2:SetTarget(c86379011.tg2)
e2:SetOperation(c86379011.op2)
c:RegisterEffect(e2)
end
--
function c86379011.filter1(c)
return c:IsSetCard(0x279) and not (c:IsFaceup() or Duel.IsPlayerAffectedByEffect(tp,31027))
end
function c86379011.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379011.filter1,tp,LOCATION_DECK,0,3,nil) end
end
function c86379011.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,c86379011.filter1,tp,LOCATION_DECK,0,3,3,nil)
if g:GetCount()==3 then
Duel.ConfirmCards(1-tp,g)
local tc=g:GetFirst()
while tc do
tc:ReverseInDeck()
tc=g:GetNext()
end
Duel.ShuffleDeck(tp)
end
end
--
function c86379011.filter2(c)
return c:IsSetCard(0x279) and (c:IsFaceup() or Duel.IsPlayerAffectedByEffect(tp,31027)) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c86379011.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379011.filter2,tp,LOCATION_DECK,0,1,nil) and Duel.IsPlayerCanSpecialSummonMonster(tp,86379011,0x279,0x1011,0,0,1,RACE_PSYCHO,ATTRIBUTE_DARK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
local st=Duel.GetMatchingGroupCount(c86379011.filter2,tp,LOCATION_DECK,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if st>ft then st=ft end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,st,tp,LOCATION_DECK)
end
function c86379011.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,86379011,0x279,0x1011,0,0,1,RACE_PSYCHO,ATTRIBUTE_DARK) then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(c86379011.filter2,tp,LOCATION_DECK,0,nil)
while g:GetCount()>0 and ft>0 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CHANGE_TYPE)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetValue(TYPE_NORMAL+TYPE_MONSTER+TYPE_TUNER)
e5:SetReset(RESET_EVENT+0x47c0000)
tc:RegisterEffect(e5,true)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_ADD_RACE)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e6:SetValue(RACE_PSYCHO)
e6:SetReset(RESET_EVENT+0x47c0000)
tc:RegisterEffect(e6,true)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_ADD_ATTRIBUTE)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e7:SetValue(ATTRIBUTE_DARK)
e7:SetReset(RESET_EVENT+0x47c0000)
tc:RegisterEffect(e7,true)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetCode(EFFECT_SET_BASE_ATTACK)
e8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e8:SetValue(0)
e8:SetReset(RESET_EVENT+0x47c0000)
tc:RegisterEffect(e8,true)
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetCode(EFFECT_SET_BASE_DEFENSE)
e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e9:SetValue(0)
e9:SetReset(RESET_EVENT+0x47c0000)
tc:RegisterEffect(e9,true)
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e1:SetValue(c86379011.efilter)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
tc:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
tc:RegisterEffect(e3,true)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e4,true)
ft=ft-1
g:RemoveCard(tc)
end
Duel.SpecialSummonComplete()
end
function c86379011.efilter(e,c)
return not c:IsSetCard(0x273)
end
--梦符『刈安色的错综迷梦』
require "expansions/script/nef/Gds"
function c86379013.initial_effect(c)
--
Gds.Adjustdreamsequence(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(2,31051)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CUSTOM+86379010)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_DECK)
e1:SetCondition(c86379013.condition)
e1:SetTarget(c86379013.target)
e1:SetOperation(c86379013.operation)
c:RegisterEffect(e1)
end
--
function c86379013.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst()==e:GetHandler() and e:GetHandler():GetFlagEffect(86379013)==0
end
function c86379013.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return
((ev==Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-1) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil))
or ((ev==0) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil))
end
local ti=0
if e:GetHandler():IsFaceup() or Duel.IsPlayerAffectedByEffect(tp,31027) then
ti=10
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
else
e:GetHandler():ReverseInDeck()
end
e:GetHandler():RegisterFlagEffect(86379013,RESET_CHAIN,0,1)
if ((ev==Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-1) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)) then
e:SetLabel(1+ti)
else
e:SetLabel(0+ti)
end
end
function c86379013.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabel()
local flag=0
local face=0
if ct>=10 then
face=1
ct=ct-10
end
if ct==1 then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if g:GetCount()>0 then
--flag=1
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(500)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
else
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
--flag=1
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-500)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(-500)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
end
if not c:IsRelateToEffect(e) then return end
--if flag==0 then return end
if face==1
and Duel.IsPlayerCanSpecialSummonMonster(tp,86379013,0x279,TYPES_NORMAL_TRAP_MONSTER,1500,1500,1,RACE_PSYCHO,ATTRIBUTE_DARK)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CHANGE_TYPE)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetValue(TYPE_NORMAL+TYPE_MONSTER)
e5:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e5,true)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_ADD_RACE)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e6:SetValue(RACE_PSYCHO)
e6:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e6,true)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_ADD_ATTRIBUTE)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e7:SetValue(ATTRIBUTE_DARK)
e7:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e7,true)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetCode(EFFECT_SET_BASE_ATTACK)
e8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e8:SetValue(1500)
e8:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e8,true)
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetCode(EFFECT_SET_BASE_DEFENSE)
e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e9:SetValue(1500)
e9:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e9,true)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
c:RegisterFlagEffect(86379014,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_IMMUNE_EFFECT)
e10:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e10:SetRange(LOCATION_MZONE)
e10:SetCondition(c86379013.flagcon)
e10:SetValue(c86379013.efilter)
e10:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e10,true)
Duel.SpecialSummonComplete()
end
end
function c86379013.flagcon(e)
return e:GetHandler():GetFlagEffect(86379014)>0 or Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),86379025)
end
function c86379013.efilter(e,te)
return te:IsActiveType(TYPE_MONSTER)
and not te:GetHandler():IsSetCard(0x279)
end
--梦符『蔚蓝色的愁三重梦』
require "expansions/script/nef/Gds"
function c86379015.initial_effect(c)
--
Gds.Adjustdreamsequence(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(2,31051)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_DEFCHANGE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CUSTOM+86379010)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_DECK)
e1:SetCondition(c86379015.condition)
e1:SetTarget(c86379015.target)
e1:SetOperation(c86379015.operation)
c:RegisterEffect(e1)
end
--
function c86379015.filter1(c)
return c:IsFaceup() and not c:IsType(TYPE_LINK) and (c:GetDefense()~=3000 or not c:IsPosition(POS_FACEUP_DEFENSE))
end
function c86379015.filter2(c)
return c:IsFaceup() and not c:IsType(TYPE_LINK) and (c:GetDefense()~=0 or not c:IsPosition(POS_FACEUP_DEFENSE))
end
function c86379015.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst()==e:GetHandler() and e:GetHandler():GetFlagEffect(86379015)==0
end
function c86379015.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return
((ev==Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-1) and Duel.IsExistingMatchingCard(c86379015.filter1,tp,LOCATION_MZONE,0,1,nil))
or ((ev==0) and Duel.IsExistingMatchingCard(c86379015.filter2,tp,0,LOCATION_MZONE,1,nil))
end
local ti=0
if e:GetHandler():IsFaceup() or Duel.IsPlayerAffectedByEffect(tp,31027) then
ti=10
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
else
e:GetHandler():ReverseInDeck()
end
e:GetHandler():RegisterFlagEffect(86379015,RESET_CHAIN,0,1)
if ((ev==Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-1) and Duel.IsExistingMatchingCard(c86379015.filter1,tp,LOCATION_MZONE,0,1,nil)) then
e:SetLabel(1+ti)
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,tp,LOCATION_MZONE)
else
e:SetLabel(0+ti)
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,LOCATION_MZONE)
end
end
function c86379015.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabel()
local flag=0
local face=0
if ct>=10 then
face=1
ct=ct-10
end
if ct==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,c86379015.filter1,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
--flag=1
Duel.HintSelection(g)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_DEFENSE_FINAL)
e1:SetValue(3000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if not tc:IsPosition(POS_DEFENSE) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
end
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,c86379015.filter2,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
--flag=1
Duel.HintSelection(g)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_DEFENSE_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if not tc:IsPosition(POS_DEFENSE) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
end
end
end
if not c:IsRelateToEffect(e) then return end
--if flag==0 then return end
if face==1
and Duel.IsPlayerCanSpecialSummonMonster(tp,86379015,0x279,TYPES_NORMAL_TRAP_MONSTER,0,3000,1,RACE_PSYCHO,ATTRIBUTE_DARK)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CHANGE_TYPE)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetValue(TYPE_NORMAL+TYPE_MONSTER)
e5:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e5,true)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_ADD_RACE)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e6:SetValue(RACE_PSYCHO)
e6:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e6,true)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_ADD_ATTRIBUTE)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e7:SetValue(ATTRIBUTE_DARK)
e7:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e7,true)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetCode(EFFECT_SET_BASE_ATTACK)
e8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e8:SetValue(0)
e8:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e8,true)
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetCode(EFFECT_SET_BASE_DEFENSE)
e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e9:SetValue(3000)
e9:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e9,true)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
c:RegisterFlagEffect(86379016,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_IMMUNE_EFFECT)
e10:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e10:SetRange(LOCATION_MZONE)
e10:SetCondition(c86379015.flagcon)
e10:SetValue(c86379015.efilter)
e10:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e10,true)
Duel.SpecialSummonComplete()
end
end
function c86379015.flagcon(e)
return e:GetHandler():GetFlagEffect(86379016)>0 or Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),86379025)
end
function c86379015.efilter(e,te)
return te:IsActiveType(TYPE_SPELL)
and not te:GetHandler():IsSetCard(0x279)
end
--梦符『绯红色的压迫噩梦』
require "expansions/script/nef/Gds"
function c86379017.initial_effect(c)
--
Gds.Adjustdreamsequence(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(2,31051)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CUSTOM+86379010)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_DECK)
e1:SetCondition(c86379017.condition)
e1:SetTarget(c86379017.target)
e1:SetOperation(c86379017.operation)
c:RegisterEffect(e1)
end
--
function c86379017.filter1(c)
return c:GetAttack()~=3000 or not c:IsPosition(POS_FACEUP_ATTACK)
end
function c86379017.filter2(c)
return c:GetAttack()~=0 or not c:IsPosition(POS_FACEUP_ATTACK)
end
function c86379017.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst()==e:GetHandler() and e:GetHandler():GetFlagEffect(86379017)==0
end
function c86379017.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return
((ev==Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-1) and Duel.IsExistingMatchingCard(c86379017.filter1,tp,LOCATION_MZONE,0,1,nil))
or ((ev==0) and Duel.IsExistingMatchingCard(c86379017.filter2,tp,0,LOCATION_MZONE,1,nil))
end
local ti=0
if e:GetHandler():IsFaceup() or Duel.IsPlayerAffectedByEffect(tp,31027) then
ti=10
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
else
e:GetHandler():ReverseInDeck()
end
e:GetHandler():RegisterFlagEffect(86379017,RESET_CHAIN,0,1)
if ((ev==Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-1) and Duel.IsExistingMatchingCard(c86379017.filter1,tp,LOCATION_MZONE,0,1,nil)) then
e:SetLabel(1+ti)
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,tp,LOCATION_MZONE)
else
e:SetLabel(0+ti)
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,LOCATION_MZONE)
end
end
function c86379017.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabel()
local flag=0
local face=0
if ct>=10 then
face=1
ct=ct-10
end
if ct==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,c86379017.filter1,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
--flag=1
Duel.HintSelection(g)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(3000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if not tc:IsPosition(POS_ATTACK) then
Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
end
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,c86379017.filter2,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
--flag=1
Duel.HintSelection(g)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if not tc:IsPosition(POS_ATTACK) then
Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
end
end
end
if not c:IsRelateToEffect(e) then return end
--if flag==0 then return end
if face==1
and Duel.IsPlayerCanSpecialSummonMonster(tp,86379017,0x279,TYPES_NORMAL_TRAP_MONSTER,3000,0,1,RACE_PSYCHO,ATTRIBUTE_DARK)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CHANGE_TYPE)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetValue(TYPE_NORMAL+TYPE_MONSTER)
e5:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e5,true)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_ADD_RACE)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e6:SetValue(RACE_PSYCHO)
e6:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e6,true)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_ADD_ATTRIBUTE)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e7:SetValue(ATTRIBUTE_DARK)
e7:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e7,true)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetCode(EFFECT_SET_BASE_ATTACK)
e8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e8:SetValue(3000)
e8:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e8,true)
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetCode(EFFECT_SET_BASE_DEFENSE)
e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e9:SetValue(0)
e9:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e9,true)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
c:RegisterFlagEffect(86379018,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_IMMUNE_EFFECT)
e10:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e10:SetRange(LOCATION_MZONE)
e10:SetCondition(c86379017.flagcon)
e10:SetValue(c86379017.efilter)
e10:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e10,true)
Duel.SpecialSummonComplete()
end
end
function c86379017.flagcon(e)
return e:GetHandler():GetFlagEffect(86379018)>0 or Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),86379025)
end
function c86379017.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
and not te:GetHandler():IsSetCard(0x279)
end
--梦符『捕梦网』
require "expansions/script/nef/Gds"
function c86379019.initial_effect(c)
--
Gds.Adjustdreamsequence(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(2,31051)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379019,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CUSTOM+86379010)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_DECK)
e1:SetCondition(c86379019.condition)
e1:SetTarget(c86379019.target)
e1:SetOperation(c86379019.operation)
c:RegisterEffect(e1)
--Deck Confirm
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379019,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1)
e2:SetCondition(c86379019.dccon)
e2:SetTarget(c86379019.dctg)
e2:SetOperation(c86379019.dcop)
c:RegisterEffect(e2)
end
--
function c86379019.filter1(c)
return c:IsSetCard(0x279) and c:IsAbleToDeck()
end
function c86379019.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function c86379019.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c86379019.filter1,tp,LOCATION_HAND,0,1,nil) and c:GetFlagEffect(86379019)==0 end
c:RegisterFlagEffect(86379019,RESET_CHAIN,0,1)
if e:GetHandler():IsFaceup() or Duel.IsPlayerAffectedByEffect(tp,31027) then
e:SetLabel(1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
else
e:SetLabel(0)
e:GetHandler():ReverseInDeck()
end
end
function c86379019.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local flag=0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.GetMatchingGroup(c86379019.filter1,tp,LOCATION_HAND,0,nil)
if g:GetCount()>0 then
--flag=1
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
Duel.ShuffleDeck(tp)
local dg=Duel.GetOperatedGroup():GetCount()
Duel.Draw(tp,dg,REASON_EFFECT)
end
if not c:IsRelateToEffect(e) then return end
--if flag==0 then return end
if e:GetLabel()==1
and Duel.IsPlayerCanSpecialSummonMonster(tp,86379019,0x279,0x1121,0,0,1,RACE_PSYCHO,ATTRIBUTE_DARK)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CHANGE_TYPE)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetValue(TYPE_NORMAL+TYPE_MONSTER+TYPE_TUNER)
e5:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e5,true)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_ADD_RACE)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e6:SetValue(RACE_PSYCHO)
e6:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e6,true)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_ADD_ATTRIBUTE)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e7:SetValue(ATTRIBUTE_DARK)
e7:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e7,true)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetCode(EFFECT_SET_BASE_ATTACK)
e8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e8:SetValue(0)
e8:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e8,true)
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetCode(EFFECT_SET_BASE_DEFENSE)
e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e9:SetValue(0)
e9:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e9,true)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e1:SetValue(c86379019.efilter4)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
c:RegisterEffect(e3,true)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e4,true)
Duel.SpecialSummonComplete()
end
end
function c86379019.efilter4(e,c)
if not c then return false end
return not c:IsSetCard(0x273)
end
--
function c86379019.dccon(e)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
end
function c86379019.dctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0) or (Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0) end
end
function c86379019.dcop(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
local b=Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)
local f1 = a>0 and b<=0
local f2 = b>0 and a<=0
local f3 = a>0 and b>0
if a<=0 and b<=0 then return end
local off=1
local ops={}
local opval={}
if f1 or f3 then
ops[off]=aux.Stringid(86379019,2)
opval[off-1]=1
off=off+1
end
if f2 or f3 then
ops[off]=aux.Stringid(86379019,3)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
if sel==1 then
local g=Duel.GetDecktopGroup(tp,1)
Duel.ConfirmDecktop(tp,1)
local tc=g:GetFirst()
local opt=Duel.SelectOption(tp,aux.Stringid(86379019,4),aux.Stringid(86379019,5))
if opt==1 then
Duel.MoveSequence(tc,opt)
end
end
if sel==2 then
local g=Duel.GetDecktopGroup(1-tp,1)
Duel.ConfirmDecktop(1-tp,1)
local tc=g:GetFirst()
local opt=Duel.SelectOption(tp,aux.Stringid(86379019,4),aux.Stringid(86379019,5))
if opt==1 then
Duel.MoveSequence(tc,opt)
end
end
end
--梦符『梦我梦中』
require "expansions/script/nef/Gds"
function c86379021.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(2,31051)
c:RegisterEffect(e0)
--to field
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379021,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
e1:SetRange(LOCATION_DECK)
e1:SetCondition(c86379021.tscon)
e1:SetTarget(c86379021.tstg)
e1:SetOperation(c86379021.tsop)
c:RegisterEffect(e1)
--level
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_LEVEL)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c86379021.lvtg)
e2:SetValue(1)
c:RegisterEffect(e2)
--add code
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetCode(EFFECT_ADD_SETCODE)
e3:SetTarget(c86379021.eftg)
e3:SetValue(0x208)
c:RegisterEffect(e3)
--change tune
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(86379021,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_CUSTOM+86379010)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c86379021.ctcon)
e4:SetTarget(c86379021.cttg)
e4:SetOperation(c86379021.ctop)
c:RegisterEffect(e4)
end
--
function c86379021.tsfilter(c,tp)
return c:IsSetCard(0x279) and (c:IsFaceup() or Duel.IsPlayerAffectedByEffect(tp,31027)) and c:IsAbleToHand()
end
function c86379021.tscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(c86379021.tsfilter,tp,LOCATION_DECK,0,nil,tp)==3
end
function c86379021.tstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
local g=Duel.GetMatchingGroup(c86379021.tsfilter,tp,LOCATION_DECK,0,nil,tp)
Duel.SetTargetCard(g)
end
function c86379021.tsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
local sg=tg:Filter(c86379021.tsfilter,nil,tp)
if sg:GetCount()==3 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
local ct=Duel.GetOperatedGroup():GetCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local dg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,ct,ct,nil)
Duel.SendtoDeck(dg,nil,2,REASON_EFFECT)
Duel.ShuffleHand(tp)
end
end
end
--
function c86379021.lvtg(e,c)
return c:IsSetCard(0x279) and c:IsFaceup() and c:GetLevel()>0
end
function c86379021.eftg(e,c)
return bit.band(c:GetOriginalType(),TYPE_MONSTER)==0 and c:IsFaceup()
end
--
function c86379021.ctfilter(c)
return c:IsSetCard(0x279) and c:IsFaceup() and not c:IsType(TYPE_LINK)
end
function c86379021.ctcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c86379021.ctfilter,tp,LOCATION_MZONE,0,1,nil) and ep==tp
end
function c86379021.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c86379021.ctfilter,tp,LOCATION_MZONE,0,1,nil) and c:GetFlagEffect(86379021)==0 end
c:RegisterFlagEffect(86379021,RESET_CHAIN,0,1)
end
function c86379021.ctfilter1(c)
return c:IsSetCard(0x279) and c:IsFaceup() and c:IsType(TYPE_TUNER) and not c:IsType(TYPE_LINK)
end
function c86379021.ctfilter2(c)
return c:IsSetCard(0x279) and c:IsFaceup() and not c:IsType(TYPE_TUNER) and not c:IsType(TYPE_LINK)
end
function c86379021.ctop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c86379021.ctfilter,tp,LOCATION_MZONE,0,nil)
local g1=g:Filter(c86379021.ctfilter1,nil)
local g2=g:Filter(c86379021.ctfilter2,nil)
if g1:GetCount()>0 then
local tc1=g1:GetFirst()
while tc1 do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMOVE_TYPE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(TYPE_TUNER)
tc1:RegisterEffect(e1)
tc1=g1:GetNext()
end
end
if g2:GetCount()>0 then
local tc2=g2:GetFirst()
while tc2 do
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetValue(TYPE_TUNER)
tc2:RegisterEffect(e2)
tc2=g2:GetNext()
end
end
end
--食梦的妖怪✿哆来咪·苏伊特
require "expansions/script/nef/Gds"
function c86379023.initial_effect(c)
--link summon
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(c86379023.lkcon1)
e1:SetOperation(c86379023.lkop1)
e1:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e1)
--Deck Confirm
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379023,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1)
e2:SetTarget(c86379023.dctg)
e2:SetOperation(c86379023.dcop)
c:RegisterEffect(e2)
--todeck
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetOperation(c86379023.tdop)
c:RegisterEffect(e3)
--copy
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCondition(c86379023.cpcon)
e4:SetOperation(c86379023.cpop)
c:RegisterEffect(e4)
--cannot be link material
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e5:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e5:SetValue(1)
c:RegisterEffect(e5)
end
--
function c86379023.dcfilter(c)
return c:IsSetCard(0x279)
end
function c86379023.dctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379023.dcfilter,tp,LOCATION_DECK,0,3,nil) end
end
function c86379023.dcop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c86379023.dcfilter,tp,LOCATION_DECK,0,3,3,nil)
if g:GetCount()>=3 then
Duel.ConfirmCards(1-tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local sg=g:Select(1-tp,1,1,nil)
local tc=sg:GetFirst()
Duel.ConfirmCards(tp,tc)
local opt=Duel.SelectOption(tp,aux.Stringid(86379023,2),aux.Stringid(86379023,3))
Duel.ShuffleDeck(tp)
if opt==0 and tc:GetSequence()~=(Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-1) then
Duel.MoveSequence(tc,0)
end
if opt==1 and tc:GetSequence()~=0 then
Duel.MoveSequence(tc,1)
end
end
end
--
function c86379023.tdfilter(c)
return c:IsSetCard(0x279) and c:IsAbleToDeck() and c:IsType(TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS)
end
function c86379023.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c86379023.tdfilter,tp,LOCATION_GRAVE,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_CARD,0,86379023)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
--
function c86379023.cpcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c86379023.cpfilter(c)
return c:IsCode(86379013,86379015,86379017,86379019,86379021)
end
function c86379023.lmtfilter(c)
return not c:IsPreviousLocation(LOCATION_MZONE)
end
function c86379023.flagcon(e)
return e:GetHandler():GetFlagEffect(86379023)>0 or Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),86379025)
end
function c86379023.cpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=c:GetMaterial()
if g:GetCount()<=0 then return end
c:RegisterFlagEffect(86379023,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
if g:IsExists(c86379023.cpfilter,1,nil) then
if g:IsExists(Card.IsCode,1,nil,86379013) then
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
--e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetReset(RESET_EVENT+RESETS_STANDARD)
e0:SetCode(EFFECT_ADD_CODE)
--e0:SetCondition(c86379023.flagcon)
e0:SetValue(86379013)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379023,4))
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:SetCondition(c86379023.flagcon)
e1:SetValue(c86379023.efilter1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
if g:IsExists(Card.IsCode,1,nil,86379015) then
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
--e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetReset(RESET_EVENT+RESETS_STANDARD)
e0:SetCode(EFFECT_ADD_CODE)
--e0:SetCondition(c86379023.flagcon)
e0:SetValue(86379015)
c:RegisterEffect(e0)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379023,5))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c86379023.flagcon)
e2:SetValue(c86379023.efilter2)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
end
if g:IsExists(Card.IsCode,1,nil,86379017) then
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
--e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetReset(RESET_EVENT+RESETS_STANDARD)
e0:SetCode(EFFECT_ADD_CODE)
--e0:SetCondition(c86379023.flagcon)
e0:SetValue(86379017)
c:RegisterEffect(e0)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(86379023,6))
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c86379023.flagcon)
e3:SetValue(c86379023.efilter3)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
end
if g:IsExists(Card.IsCode,1,nil,86379019) then
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
--e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetReset(RESET_EVENT+RESETS_STANDARD)
e0:SetCode(EFFECT_ADD_CODE)
--e0:SetCondition(c86379023.flagcon)
e0:SetValue(86379019)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
--e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
--e1:SetCondition(c86379023.flagcon)
e1:SetValue(c86379023.efilter4)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
c:RegisterEffect(e3)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e4)
local ct=g:FilterCount(Card.IsCode,nil,86379019)
for i=1,ct do
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(86379023,7))
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e5:SetCountLimit(1)
e5:SetTarget(c86379023.dctg2)
e5:SetOperation(c86379023.dcop2)
--e5:SetCondition(c86379023.flagcon)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e5)
end
end
if g:IsExists(Card.IsCode,1,nil,86379021) then
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
--e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetReset(RESET_EVENT+RESETS_STANDARD)
e0:SetCode(EFFECT_ADD_CODE)
--e0:SetCondition(c86379023.flagcon)
e0:SetValue(86379021)
c:RegisterEffect(e0)
local ct=g:FilterCount(Card.IsCode,nil,86379021)
--level up
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_UPDATE_LEVEL)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
--e5:SetCondition(c86379023.flagcon)
e5:SetTarget(c86379023.lvtg2)
e5:SetValue(ct)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e5)
--add code
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(LOCATION_MZONE,0)
e6:SetCode(EFFECT_ADD_SETCODE)
e6:SetTarget(c86379023.eftg2)
e6:SetValue(0x208)
e6:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e6)
--change tune
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(86379023,8))
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e7:SetCode(EVENT_CUSTOM+86379010)
e7:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CLIENT_HINT)
e7:SetRange(LOCATION_MZONE)
e7:SetCondition(c86379023.ctcon)
e7:SetTarget(c86379023.cttg)
e7:SetOperation(c86379023.ctop)
e7:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e7)
end
--[[ if g:IsExists(Card.IsCode,1,nil,10282) then
local ct=g:FilterCount(Card.IsCode,nil,10282)
--indes
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(86379023,9))
e8:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e8:SetRange(LOCATION_MZONE)
e8:SetTargetRange(LOCATION_MZONE,0)
e8:SetCountLimit(ct)
e8:SetTarget(c86379023.indestg)
e8:SetValue(c86379023.indescon)
e8:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e8,true)
end
if g:IsExists(Card.IsCode,1,nil,10283) then
local e9=Effect.CreateEffect(c)
e9:SetDescription(aux.Stringid(86379023,10))
e9:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CLIENT_HINT)
e9:SetType(EFFECT_TYPE_QUICK_O)
e9:SetRange(LOCATION_MZONE)
e9:SetCode(EVENT_ATTACK_ANNOUNCE)
e9:SetCondition(c86379023.aco)
e9:SetTarget(c86379023.atg)
e9:SetOperation(c86379023.aop)
e9:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e9,true)
end]]
end
end
function c86379023.efilter1(e,te)
return te:IsActiveType(TYPE_MONSTER)
and not te:GetHandler():IsSetCard(0x279)
end
function c86379023.efilter2(e,te)
return te:IsActiveType(TYPE_SPELL)
and not te:GetHandler():IsSetCard(0x279)
end
function c86379023.efilter3(e,te)
return te:IsActiveType(TYPE_TRAP)
and not te:GetHandler():IsSetCard(0x279)
end
function c86379023.efilter4(e,c)
if not c then return false end
return not c:IsSetCard(0x273)
end
--
function c86379023.dctg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0) or (Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0) end
end
function c86379023.dcop2(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
local b=Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)
local f1 = a>0 and b<=0
local f2 = b>0 and a<=0
local f3 = a>0 and b>0
if a<=0 and b<=0 then return end
local off=1
local ops={}
local opval={}
if f1 or f3 then
ops[off]=aux.Stringid(86379023,11)
opval[off-1]=1
off=off+1
end
if f2 or f3 then
ops[off]=aux.Stringid(86379023,12)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
if sel==1 then
local g=Duel.GetDecktopGroup(tp,1)
Duel.ConfirmCards(tp,g)
local tc=g:GetFirst()
local opt=Duel.SelectOption(tp,aux.Stringid(86379023,2),aux.Stringid(86379023,3))
if opt==1 then
Duel.MoveSequence(tc,opt)
end
end
if sel==2 then
local g=Duel.GetDecktopGroup(1-tp,1)
Duel.ConfirmCards(tp,g)
local tc=g:GetFirst()
local opt=Duel.SelectOption(tp,aux.Stringid(86379023,2),aux.Stringid(86379023,3))
if opt==1 then
Duel.MoveSequence(tc,opt)
end
end
end
--
function c86379023.lvtg2(e,c)
return c:IsSetCard(0x279) and c:IsFaceup() and c:GetLevel()>0
end
function c86379023.eftg2(e,c)
return bit.band(c:GetOriginalType(),TYPE_MONSTER)==0 and c:IsFaceup()
end
--
function c86379023.ctfilter(c)
return c:IsSetCard(0x279) and c:IsFaceup() and not c:IsType(TYPE_LINK)
end
function c86379023.ctcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c86379023.ctfilter,tp,LOCATION_MZONE,0,1,nil) and ep==tp
end
function c86379023.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c86379023.ctfilter,tp,LOCATION_MZONE,0,1,nil) and c:GetFlagEffect(86379024)==0 end
c:RegisterFlagEffect(86379024,RESET_CHAIN,0,1)
end
function c86379023.ctfilter1(c)
return c:IsSetCard(0x279) and c:IsFaceup() and c:IsType(TYPE_TUNER) and not c:IsType(TYPE_LINK)
end
function c86379023.ctfilter2(c)
return c:IsSetCard(0x279) and c:IsFaceup() and not c:IsType(TYPE_TUNER) and not c:IsType(TYPE_LINK)
end
function c86379023.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c86379023.ctfilter,tp,LOCATION_MZONE,0,nil)
local g1=g:Filter(c86379023.ctfilter1,nil)
local g2=g:Filter(c86379023.ctfilter2,nil)
if g1:GetCount()>0 then
local tc1=g1:GetFirst()
while tc1 do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMOVE_TYPE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(TYPE_TUNER)
tc1:RegisterEffect(e1)
tc1=g1:GetNext()
end
end
if g2:GetCount()>0 then
local tc2=g2:GetFirst()
while tc2 do
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetValue(TYPE_TUNER)
tc2:RegisterEffect(e2)
tc2=g2:GetNext()
end
end
end
--
function c86379023.cfilter2(c)
return c:IsSetCard(0x279) and c:IsAbleToRemove()
end
function c86379023.aco(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.IsExistingMatchingCard(c86379023.cfilter2,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,1,nil)
end
function c86379023.atg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetAttacker()
if chkc then return false end
if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tg)
end
function c86379023.aop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.NegateAttack()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c86379023.cfilter2,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
--
function c86379023.indestg(e,c)
return c:IsSetCard(0x100)
end
function c86379023.indescon(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0
end
--
function c86379023.lkfilter1(c,lc,tp)
if c:IsLocation(LOCATION_MZONE) then
return c:IsCanBeLinkMaterial(lc) and (bit.band(c:GetOriginalType(),TYPE_MONSTER)==0 or c:IsSetCard(0x273,0x279)) and c:IsFaceup()
else
return c:IsSetCard(0x273,0x279) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND))
end
end
function c86379023.lvfilter1(c)
if c:IsType(TYPE_LINK) and c:GetLink()>1 then
return 1+0x10000*c:GetLink()
else
return 1
end
end
function c86379023.lcheck1(tp,sg,lc,minc,ct)
return ct>=minc and sg:CheckWithSumEqual(c86379023.lvfilter1,lc:GetLink(),ct,ct) and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0
end
function c86379023.lkchenk1(c,tp,sg,mg,lc,ct,minc,maxc)
sg:AddCard(c)
ct=ct+1
local res=c86379023.lcheck1(tp,sg,lc,minc,ct) or (ct<maxc and mg:IsExists(c86379023.lkchenk1,1,sg,tp,sg,mg,lc,ct,minc,maxc))
sg:RemoveCard(c)
ct=ct-1
return res
end
function c86379023.lkcon1(e,c)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c86379023.lkfilter1,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil,c,tp)
local sg=Group.CreateGroup()
for i,pe in ipairs({Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_LMATERIAL)}) do
local pc=pe:GetHandler()
if not mg:IsContains(pc) then return false end
sg:AddCard(pc)
end
local ct=sg:GetCount()
local minc=3
local maxc=3
if ct>maxc then return false end
return (c86379023.lcheck1(tp,sg,c,minc,ct) or mg:IsExists(c86379023.lkchenk1,1,nil,tp,sg,mg,c,ct,minc,maxc))
end
function c86379023.lkop1(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c86379023.lkfilter1,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil,c,tp)
local sg=Group.CreateGroup()
for i,pe in ipairs({Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_LMATERIAL)}) do
sg:AddCard(pe:GetHandler())
end
local ct=sg:GetCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
sg:Select(tp,ct,ct,nil)
local minc=3
local maxc=3
for i=ct,maxc-1 do
local cg=mg:Filter(c86379023.lkchenk1,sg,tp,sg,mg,c,i,minc,maxc)
if cg:GetCount()==0 then break end
local minct=1
if c86379023.lcheck1(tp,sg,c,minc,i) then
if not Duel.SelectYesNo(tp,210) then break end
minct=0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local g=cg:Select(tp,minct,1,nil)
if g:GetCount()==0 then break end
sg:Merge(g)
end
c:SetMaterial(sg)
Duel.SendtoGrave(sg,REASON_MATERIAL+REASON_LINK)
end
--恶梦的奇美拉✿哆来咪·苏伊特
function c86379031.initial_effect(c)
c:EnableReviveLimit()
--fusion material
aux.AddFusionProcFunFunRep(c,aux.FilterBoolFunction(Card.IsSetCard,0x273),c86379031.mfilter1,1,99,true)
--disable
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379031,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,86379031)
e1:SetCondition(c86379031.con1)
e1:SetCost(c86379031.cost1)
e1:SetOperation(c86379031.op1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379031,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c86379031.con2)
e2:SetCost(c86379031.cost1)
e2:SetOperation(c86379031.op1)
c:RegisterEffect(e2)
--chain attack
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(86379031,2))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(c86379031.atcon)
e3:SetCost(c86379031.atcost)
e3:SetTarget(c86379031.attg)
e3:SetOperation(c86379031.atop)
c:RegisterEffect(e3)
end
--
function c86379031.mfilter1(c)
return bit.band(c:GetOriginalType(),TYPE_MONSTER)==0 or ((c:IsFaceup() or Duel.IsPlayerAffectedByEffect(c:GetControler(),31027)) and c:IsLocation(LOCATION_DECK) and c:IsSetCard(0x279) and Duel.IsPlayerAffectedByEffect(c:GetControler(),86379033))
end
--
function c86379031.costfilter(c)
return c:IsSetCard(0x279) and c:IsAbleToDeckAsCost()
end
function c86379031.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379031.costfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c86379031.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c86379031.con1(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()~=e:GetHandler() and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c86379031.op1(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c86379031.repop)
end
function c86379031.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsLocation(LOCATION_DECK) then
c:ReverseInDeck()
else
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
end
end
--
function c86379031.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE and re:GetHandler()~=e:GetHandler() and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
--
function c86379031.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetAttacker()==c and aux.bdocon(e,tp,eg,ep,ev,re,r,rp) and c:IsChainAttackable(0)
end
function c86379031.atfilter(c)
return c:IsSetCard(0xba) and c:IsType(TYPE_XYZ) and c:IsAbleToRemoveAsCost()
end
function c86379031.atcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(86379031)<e:GetHandler():GetMaterialCount() end
e:GetHandler():RegisterFlagEffect(86379031,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
e:SetLabel(Duel.AnnounceType(tp))
end
function c86379031.attg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0) or (Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0) end
end
function c86379031.atop(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
local b=Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)
local ty=e:GetLabel()
local f1 = a>0 and b<=0
local f2 = b>0 and a<=0
local f3 = a>0 and b>0
if a<=0 and b<=0 then return end
local off=1
local ops={}
local opval={}
if f1 or f3 then
ops[off]=aux.Stringid(86379031,3)
opval[off-1]=1
off=off+1
end
if f2 or f3 then
ops[off]=aux.Stringid(86379031,4)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
if sel==1 then
local g=Duel.GetDecktopGroup(tp,1)
Duel.ConfirmDecktop(tp,1)
local tc=g:GetFirst()
Duel.MoveSequence(tc,1)
if (ty==0 and tc:IsType(TYPE_MONSTER)) or (ty==1 and tc:IsType(TYPE_SPELL)) or (ty==2 and tc:IsType(TYPE_TRAP)) then
Duel.ChainAttack()
end
end
if sel==2 then
local g=Duel.GetDecktopGroup(1-tp,1)
Duel.ConfirmDecktop(1-tp,1)
local tc=g:GetFirst()
Duel.MoveSequence(tc,1)
if (ty==0 and tc:IsType(TYPE_MONSTER)) or (ty==1 and tc:IsType(TYPE_SPELL)) or (ty==2 and tc:IsType(TYPE_TRAP)) then
Duel.ChainAttack()
end
end
end
--羊符『奇美拉融合』
function c86379033.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379033,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c86379033.target)
e1:SetOperation(c86379033.activate)
c:RegisterEffect(e1)
--recover
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379033,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_LEAVE_GRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,86379033)
e2:SetCost(c86379033.gcost)
e2:SetTarget(c86379033.gtg)
e2:SetOperation(c86379033.gop)
c:RegisterEffect(e2)
end
--
c86379033.spchecks=aux.CreateChecks(Card.IsSetCard,{0x273,0x279})
function c86379033.sprfilter1(c,chkf)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
and
((c:IsSetCard(0x273) and c:IsLocation(LOCATION_HAND+LOCATION_MZONE))
or (c:IsSetCard(0x273) and c:IsLocation(LOCATION_DECK) and (c:IsFaceup() or Duel.IsPlayerAffectedByEffect(chkf,31027)))
or (c:IsSetCard(0x279) and c:IsLocation(LOCATION_DECK) and (c:IsFaceup() or Duel.IsPlayerAffectedByEffect(chkf,31027))))
end
function c86379033.sprfilter2(g,tp)
return Duel.GetLocationCountFromEx(tp,tp,g,TYPE_FUSION)>0
end
--
function c86379033.filter0(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and (c:IsFaceup() or Duel.IsPlayerAffectedByEffect(c:GetControler(),31027))
end
function c86379033.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c86379033.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c86379033.filter3(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:IsOriginalCodeRule(86379031)
end
function c86379033.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local mg2=Duel.GetMatchingGroup(c86379033.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c86379033.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local exg=Duel.GetMatchingGroup(c86379033.sprfilter1,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_DECK,0,nil)
local res2=exg:CheckSubGroupEach(c86379033.spchecks,c86379033.sprfilter2,tp) and Duel.IsExistingMatchingCard(c86379033.filter3,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not (res or res2) then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c86379033.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res or res2
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c86379033.activate(e,tp,eg,ep,ev,re,r,rp)
--effect flag
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(86379033)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
--
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c86379033.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c86379033.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(c86379033.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c86379033.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
--flag reset
e1:Reset()
end
--
function c86379033.mgfilter(c,e,tp,fusc)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE)
and c:IsReason(REASON_MATERIAL) and c:GetReasonCard()==fusc and c:IsAbleToHand()
end
function c86379033.rfilter(c,e,tp)
local mg=c:GetMaterial()
local ct=mg:GetCount()
return ct>0 and mg:FilterCount(c86379033.mgfilter,nil,e,tp,c)>0 and c:IsReleasable() and c:IsSetCard(0x273)
end
function c86379033.mgfilter2(c,e,tp,fusc)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE)
and c:IsReason(REASON_MATERIAL) and c:GetReasonCard()==fusc
end
function c86379033.gcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379033.rfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
local sg=Duel.SelectMatchingCard(tp,c86379033.rfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil)
local tc=sg:GetFirst()
local tg=tc:GetMaterial():Filter(c86379033.mgfilter2,nil,e,tp,tc)
local sc=tg:GetFirst()
while sc do
sc:RegisterFlagEffect(86379033,RESET_EVENT+RESETS_STANDARD,0,0)
sc=tg:GetNext()
end
tg:KeepAlive()
e:SetLabelObject(tg)
Duel.Release(sg,REASON_COST)
end
function c86379033.gtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
local tg=e:GetLabelObject()
Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_GRAVE)
end
function c86379033.gfilter(c)
return c:IsAbleToHand() and c:GetFlagEffect(86379033)>0
end
function c86379033.gop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if e:GetHandler():IsAbleToHand() and tg:GetCount()>0 and tg:FilterCount(c86379033.gfilter,nil)>0 then
local sg=tg:Filter(c86379033.gfilter,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local hg=sg:Select(tp,1,1,nil)
hg:AddCard(e:GetHandler())
Duel.SendtoHand(hg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,hg)
end
end
--梦境之地
function c86379035.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--add
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
e2:SetRange(LOCATION_FZONE)
e2:SetCondition(c86379035.adcon)
e2:SetOperation(c86379035.adop)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_FZONE)
e3:SetCondition(c86379035.rccon)
e3:SetOperation(c86379035.rcop)
c:RegisterEffect(e3)
--change atk
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(86379035,1))
e4:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_REMOVE_COUNTER+0x123a)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetRange(LOCATION_FZONE)
e4:SetCountLimit(1,86379035)
e4:SetCondition(c86379035.ctcon)
e4:SetTarget(c86379035.cttg)
e4:SetOperation(c86379035.ctop)
c:RegisterEffect(e4)
end
--
function c86379035.adfilter(c)
return c:IsFaceup() and c:GetFlagEffect(86379035)==0
end
function c86379035.adcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c86379035.adfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
return g:GetCount()>0
end
function c86379035.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c86379035.adfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
local tc=g:GetFirst()
while tc do
tc:RegisterFlagEffect(86379035,RESET_EVENT+RESETS_STANDARD,0,1)
if tc:GetFieldID()>c:GetFieldID() then
tc:AddCounter(0x123a,1)
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x123a,e,REASON_EFFECT,tp,tc:GetControler(),1)
end
tc=g:GetNext()
end
end
--
function c86379035.rccon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
return rc:GetCounter(0x123a)>0 and rc~=c
end
function c86379035.rcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
local ct=rc:GetCounter(0x123a)
if ct>0 then
rc:RemoveCounter(tp,0x123a,ct,REASON_EFFECT)
c:AddCounter(0x123a,ct)
Duel.RaiseEvent(rc,EVENT_REMOVE_COUNTER+0x123a,e,REASON_EFFECT,tp,rc:GetControler(),ct)
Duel.RaiseEvent(c,EVENT_REMOVE_COUNTER+0x123a,e,REASON_EFFECT,tp,c:GetControler(),ct)
end
end
--
function c86379035.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst()==e:GetHandler()
end
function c86379035.cttg(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
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DEFCHANGE,g,g:GetCount(),0,0)
end
function c86379035.ctfilter(c,e,adt)
return ((c:GetLevel()>1 or c:GetRank()>1) or (adt>0 and (c:GetAttack()>0 or c:GetDefense()>0))) and not c:IsImmuneToEffect(e)
end
function c86379035.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local ct=ev
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()<=0 then return end
local adt=c:GetCounter(0x123a)*200
local st=g:FilterCount(c86379035.ctfilter,nil,e,adt)*300
local tc=g:GetFirst()
while tc do
if tc:GetLevel()>1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+0x1fe1000)
e1:SetValue(-ct)
tc:RegisterEffect(e1)
end
if tc:GetRank()>1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_RANK)
e1:SetReset(RESET_EVENT+0x1fe1000)
e1:SetValue(-ct)
tc:RegisterEffect(e1)
end
if tc:GetAttack()>0 and adt>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe1000)
e1:SetValue(-adt)
tc:RegisterEffect(e1)
end
if tc:GetDefense()>0 and adt>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetReset(RESET_EVENT+0x1fe1000)
e1:SetValue(-adt)
tc:RegisterEffect(e1)
end
tc=g:GetNext()
end
if st>0 then
local lp=Duel.GetLP(1-tp)
if lp>st then
Duel.SetLP(1-tp,lp-st)
else
Duel.SetLP(1-tp,0)
end
end
end
--梦符『干涉梦境』
function c86379037.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_COUNTER+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c86379037.tg)
e1:SetOperation(c86379037.op)
c:RegisterEffect(e1)
end
--
function c86379037.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379037.filter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) or
(Duel.IsExistingMatchingCard(c86379037.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and Duel.IsCanRemoveCounter(tp,1,1,0x123a,1,REASON_EFFECT)) or
(Duel.IsExistingMatchingCard(c86379037.filter3,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and Duel.IsCanRemoveCounter(tp,1,1,0x123a,2,REASON_EFFECT)) or
(Duel.IsExistingMatchingCard(c86379037.filter4,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and Duel.IsCanRemoveCounter(tp,1,1,0x123a,3,REASON_EFFECT))
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetTarget(c86379037.etg)
e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e1:SetReset(RESET_CHAIN)
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_COUNTER,nil,1,tp,LOCATION_DECK)
end
function c86379037.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local b1=Duel.IsExistingMatchingCard(c86379037.filter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp)
local b2=(Duel.IsExistingMatchingCard(c86379037.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and Duel.IsCanRemoveCounter(tp,1,1,0x123a,1,REASON_EFFECT))
local b3=(Duel.IsExistingMatchingCard(c86379037.filter3,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and Duel.IsCanRemoveCounter(tp,1,1,0x123a,2,REASON_EFFECT))
local b4=(Duel.IsExistingMatchingCard(c86379037.filter4,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and Duel.IsCanRemoveCounter(tp,1,1,0x123a,3,REASON_EFFECT))
if (b1 or b2 or b3 or b4) then
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(86379037,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(86379037,1)
opval[off-1]=2
off=off+1
end
if b3 then
ops[off]=aux.Stringid(86379037,2)
opval[off-1]=3
off=off+1
end
if b4 then
ops[off]=aux.Stringid(86379037,3)
opval[off-1]=4
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,c86379037.filter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
Duel.RaiseEvent(tc,EVENT_CHAIN_SOLVED,tc:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
end
end
if sel==2 then
local g=Duel.GetMatchingGroup(c86379037.cfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp)
if g:GetCount()>0 and Duel.IsCanRemoveCounter(tp,1,1,0x123a,1,REASON_EFFECT) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tc=g:Select(tp,1,1,nil):GetFirst()
tc:RemoveCounter(tp,0x123a,1,REASON_EFFECT)
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x123a,e,REASON_EFFECT,tp,tc:GetControler(),1)
if Duel.IsExistingMatchingCard(c86379037.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c86379037.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
if sel==3 then
local g=Duel.GetMatchingGroup(c86379037.cfilter3,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp)
if g:GetCount()>0 and Duel.IsCanRemoveCounter(tp,1,1,0x123a,2,REASON_EFFECT) then
local ct=0
while ct<2 do
local cg=Duel.GetMatchingGroup(c86379037.cfilter3,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tc=cg:Select(tp,1,1,nil):GetFirst()
tc:RemoveCounter(tp,0x123a,1,REASON_EFFECT)
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x123a,e,REASON_EFFECT,tp,tc:GetControler(),1)
ct=ct+1
end
if Duel.IsExistingMatchingCard(c86379037.filter3,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c86379037.filter3,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
if sel==4 then
local g=Duel.GetMatchingGroup(c86379037.cfilter4,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp)
if g:GetCount()>0 and Duel.IsCanRemoveCounter(tp,1,1,0x123a,3,REASON_EFFECT) then
local ct=0
while ct<3 do
local cg=Duel.GetMatchingGroup(c86379037.cfilter4,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tc=cg:Select(tp,1,1,nil):GetFirst()
tc:RemoveCounter(tp,0x123a,1,REASON_EFFECT)
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x123a,e,REASON_EFFECT,tp,tc:GetControler(),1)
ct=ct+1
end
if Duel.IsExistingMatchingCard(c86379037.filter4,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c86379037.filter4,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
end
end
--
function c86379037.etg(e,c)
return c:GetCounter(0x123a)>0
end
--
function c86379037.filter1(c,tp)
return c:IsCode(86379035) and c:GetActivateEffect():IsActivatable(tp)
end
--
function c86379037.filter2(c)
return c:IsSetCard(0x279) and c:IsAbleToHand()
end
function c86379037.cfilter2(c,tp)
return c:IsCanRemoveCounter(tp,0x123a,1,REASON_EFFECT)
end
--
function c86379037.filter3(c)
return c:IsCode(86379033) and c:IsAbleToHand()
end
function c86379037.cfilter3(c,tp)
return c:IsCanRemoveCounter(tp,0x123a,1,REASON_EFFECT)
end
--
function c86379037.filter4(c)
return c:IsSetCard(0x273) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function c86379037.cfilter4(c,tp)
return c:IsCanRemoveCounter(tp,0x123a,1,REASON_EFFECT)
end
......@@ -7,6 +7,7 @@ function c86379221.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c86379221.spcon)
e1:SetTarget(c86379221.sptg)
e1:SetOperation(c86379221.spop)
c:RegisterEffect(e1)
......@@ -65,6 +66,10 @@ function c86379221.mfilterf(c,tp,mg,rc)
return mg:CheckWithSumEqual(Card.GetRitualLevel,rc:GetLevel(),1,99,rc)
else return false end
end
function c86379221.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetFlagEffect(tp,86379222)<=0
end
function c86379221.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
......@@ -77,6 +82,7 @@ function c86379221.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
return mg:IsExists(c86379221.mfilterf,1,nil,tp,mg,c)
end
end
Duel.RegisterFlagEffect(tp,86379222,RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c86379221.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -7,6 +7,7 @@ function c86379223.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c86379223.spcon)
e1:SetTarget(c86379223.sptg)
e1:SetOperation(c86379223.spop)
c:RegisterEffect(e1)
......@@ -67,6 +68,10 @@ function c86379223.mfilterf(c,tp,mg,rc)
return mg:CheckWithSumEqual(Card.GetRitualLevel,rc:GetLevel(),1,99,rc)
else return false end
end
function c86379223.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetFlagEffect(tp,86379224)<=0
end
function c86379223.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
......@@ -79,6 +84,7 @@ function c86379223.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
return mg:IsExists(c86379223.mfilterf,1,nil,tp,mg,c)
end
end
Duel.RegisterFlagEffect(tp,86379224,RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c86379223.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -7,6 +7,7 @@ function c86379225.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c86379225.spcon)
e1:SetTarget(c86379225.sptg)
e1:SetOperation(c86379225.spop)
c:RegisterEffect(e1)
......@@ -66,6 +67,10 @@ function c86379225.mfilterf(c,tp,mg,rc)
return mg:CheckWithSumEqual(Card.GetRitualLevel,rc:GetLevel(),1,99,rc)
else return false end
end
function c86379225.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetFlagEffect(tp,86379226)<=0
end
function c86379225.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
......@@ -78,6 +83,7 @@ function c86379225.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
return mg:IsExists(c86379225.mfilterf,1,nil,tp,mg,c)
end
end
Duel.RegisterFlagEffect(tp,86379226,RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c86379225.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -5,11 +5,10 @@ function c86379251.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379251,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,86379251)
e1:SetCondition(c86379251.spcon)
--e1:SetCondition(c86379251.spcon)
e1:SetTarget(c86379251.sptg)
e1:SetOperation(c86379251.spop)
c:RegisterEffect(e1)
......
......@@ -67,7 +67,7 @@ function c86379382.op(e,tp,eg,ep,ev,re,r,rp)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD)
--Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
--
......
......@@ -2,7 +2,7 @@
function c86379550.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x208),2,2,nil,nil,13)
c86379550.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x208),2,2,nil,nil,13)
--lv change
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
......@@ -42,7 +42,7 @@ function c86379550.initial_effect(c)
end
--
function c86379550.lvtg(e,c)
return c:IsSetCard(0x256)
return c:IsSetCard(0x256) and not c:IsCode(86379550)
end
function c86379550.lvval(e,c,rc)
local lv=c:GetLevel()
......@@ -121,3 +121,121 @@ function c86379550.desop(e,tp,eg,ep,ev,re,r,rp)
if not tc:IsRelateToEffect(e) then return end
Duel.Destroy(tc,REASON_EFFECT)
end
--
--Xyz monster, lv k*n
function c86379550.AddXyzProcedure(c,f,lv,ct,alterf,desc,maxct,op)
local e1=Effect.CreateEffect(c)
e1:SetDescription(1165)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
if not maxct then maxct=ct end
if alterf then
e1:SetCondition(Auxiliary.XyzCondition2(f,lv,ct,maxct,alterf,desc,op))
e1:SetTarget(Auxiliary.XyzTarget2(f,lv,ct,maxct,alterf,desc,op))
e1:SetOperation(c86379550.XyzOperation2(f,lv,ct,maxct,alterf,desc,op))
else
e1:SetCondition(Auxiliary.XyzCondition(f,lv,ct,maxct))
e1:SetTarget(Auxiliary.XyzTarget(f,lv,ct,maxct))
e1:SetOperation(c86379550.XyzOperation(f,lv,ct,maxct))
end
e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1)
end
--Xyz Summon(normal)
function c86379550.XyzOperation(f,lv,minc,maxc)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
if og and not min then
local sg=Group.CreateGroup()
local tc=og:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=og:GetNext()
end
local sg1=sg:Filter(Card.IsSetCard,nil,0x256)
if sg1:GetCount()>0 then
sg:Sub(sg1)
Duel.Overlay(c,sg1)
end
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_RULE)
end
c:SetMaterial(og)
Duel.Overlay(c,og)
else
local mg=e:GetLabelObject()
local sg=Group.CreateGroup()
local tc=mg:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=mg:GetNext()
end
local sg1=sg:Filter(Card.IsSetCard,nil,0x256)
if sg1:GetCount()>0 then
sg:Sub(sg1)
Duel.Overlay(c,sg1)
end
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_RULE)
end
c:SetMaterial(mg)
Duel.Overlay(c,mg)
mg:DeleteGroup()
end
end
end
--Xyz summon(alterf)
function c86379550.XyzOperation2(f,lv,minc,maxc,alterf,desc,op)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
if og and not min then
local sg=Group.CreateGroup()
local tc=og:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=og:GetNext()
end
local sg1=sg:Filter(Card.IsSetCard,nil,0x256)
if sg1:GetCount()>0 then
sg:Sub(sg1)
Duel.Overlay(c,sg1)
end
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_RULE)
end
c:SetMaterial(og)
Duel.Overlay(c,og)
else
local mg=e:GetLabelObject()
if e:GetLabel()==1 then
local mg2=mg:GetFirst():GetOverlayGroup()
if mg2:GetCount()~=0 then
Duel.Overlay(c,mg2)
end
else
local sg=Group.CreateGroup()
local tc=mg:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=mg:GetNext()
end
local sg1=sg:Filter(Card.IsSetCard,nil,0x256)
if sg1:GetCount()>0 then
sg:Sub(sg1)
Duel.Overlay(c,sg1)
end
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_RULE)
end
end
c:SetMaterial(mg)
Duel.Overlay(c,mg)
mg:DeleteGroup()
end
end
end
--
\ No newline at end of file
......@@ -11,6 +11,7 @@ function c86379654.initial_effect(c)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,86379654)
e1:SetCondition(c86379654.condition)
--e1:SetCost(c86379654.cost)
e1:SetTarget(c86379654.target)
e1:SetOperation(c86379654.operation)
c:RegisterEffect(e1)
......@@ -93,6 +94,12 @@ function c86379654.matfilter(c)
return not c:IsLinkType(TYPE_TOKEN) and c:IsSetCard(0x208)
end
--
function c86379654.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c86379654.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_LINK
end
......@@ -100,18 +107,29 @@ function c86379654.spfilter(c,e,tp)
return c:IsSetCard(0x225a) and c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c86379654.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379654.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
if chk==0 then return Duel.IsExistingMatchingCard(c86379654.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c86379654.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
local c=e:GetHandler()
local fid=c:GetFieldID()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c86379654.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,c86379654.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local rc=Duel.GetOperatedGroup():GetFirst()
local tc=g:GetFirst()
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 then
tc:RegisterFlagEffect(86379654,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabelObject(tc)
e1:SetOperation(c86379654.op1_1)
Duel.RegisterEffect(e1,tp)
end
--[[local rc=Duel.GetOperatedGroup():GetFirst()
local tg=rc:GetColumnGroup()
tg:AddCard(rc)
if Duel.Remove(tg,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)<1 then return end
......@@ -131,10 +149,17 @@ function c86379654.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetCondition(c86379654.con1_2)
e1:SetOperation(c86379654.op1_2)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
Duel.RegisterEffect(e1,tp)]]
end
end
end
function c86379654.op1_1(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(86379654)>0 then
Duel.ReturnToField(tc)
end
end
--
function c86379654.con1_2(e,tp,eg,ep,ev,re,r,rp)
local fid,ct=e:GetLabel()
return Duel.GetTurnCount()~=ct
......@@ -148,7 +173,7 @@ function c86379654.op1_2(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local sg=g:Filter(c86379654.refilter2,nil,fid)
for i=1,2 do
local p=tp
local p=tp
if i==2 then p=1-tp end
if sg:GetCount()<1 then return end
local lg=sg:Filter(Card.IsPreviousControler,nil,p)
......
......@@ -5,6 +5,7 @@ function c86379728.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,86379728+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c86379728.activate)
c:RegisterEffect(e1)
--target
......
--疏✿伊吹萃香
--Lost✿伊吹童子
function c86379744.initial_effect(c)
--
Afi.AdjustFieldInfoStore(c)
--
c:EnableReviveLimit()
--Cannot special summon
local e1=Effect.CreateEffect(c)
......@@ -11,7 +14,6 @@ function c86379744.initial_effect(c)
--spsum
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379744,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+0+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE)
......@@ -34,37 +36,36 @@ function c86379744.initial_effect(c)
e4:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e4:SetValue(1)
c:RegisterEffect(e4)
--token
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(86379744,0))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e5:SetCode(EVENT_ADJ_LEV)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(c86379744.tkcon)
e5:SetTarget(c86379744.tktg)
e5:SetOperation(c86379744.tkop)
c:RegisterEffect(e5)
end
--
function c86379744.lvcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLevel()>1
end
function c86379744.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return ct>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,200999,0x208,0x4011,0,0,1,RACE_ZOMBIE,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,0,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ct,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ct,0,0)
if chk==0 then return e:GetHandler():GetLevel()>1 end
end
function c86379744.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if c:GetLevel()<=1 then return end
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct<=0 then return end
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CHANGE_LEVEL)
e0:SetValue(e:GetHandler():GetLevel()-1)
e0:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e0)
if Duel.IsPlayerCanSpecialSummonMonster(tp,200999,0x208,0x4011,0,0,1,RACE_ZOMBIE,ATTRIBUTE_EARTH) then
for i=1,ct do
local token=Duel.CreateToken(tp,200999)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
end
end
--
function c86379744.tcfilter(c)
......@@ -76,3 +77,25 @@ end
function c86379744.tfilter(e,re)
return e:GetHandlerPlayer()~=re:GetHandlerPlayer()
end
--
function c86379744.tkcon(e,tp,eg,ep,ev,re,r,rp)
return ev==2 and eg:GetFirst()==e:GetHandler()
end
function c86379744.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return ct>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,200999,0x208,0x4011,0,0,1,RACE_ZOMBIE,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ct,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ct,0,0)
end
function c86379744.tkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,200999,0x208,0x4011,0,0,1,RACE_ZOMBIE,ATTRIBUTE_EARTH) then
for i=1,ct do
local token=Duel.CreateToken(tp,200999)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
end
end
......@@ -40,6 +40,7 @@ function c86379748.activate(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then
local tg=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379748,1)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
......@@ -55,6 +56,7 @@ function c86379748.activate(e,tp,eg,ep,ev,re,r,rp)
end
tg:KeepAlive()
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379748,0)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCountLimit(1)
......
......@@ -42,7 +42,7 @@ function c86379864.initial_effect(c)
end
--
function c86379864.matfilter(c)
return c:IsLinkRace(RACE_SEASERPENT) and not c:IsLinkCode(86379864)
return c:IsLinkSetCard(0x190) and not c:IsLinkCode(86379864)
end
function c86379864.lcheck(g)
return g:IsExists(Card.IsLinkRace,1,nil,RACE_SEASERPENT)
......
......@@ -7,13 +7,14 @@ function c86379883.initial_effect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
--e1:SetCountLimit(1,86379883)
e1:SetCountLimit(1,86379883)
e1:SetTarget(c86379883.tg)
e1:SetOperation(c86379883.op)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
--e2:SetCountLimit(1,86379883)
......@@ -102,6 +103,9 @@ function c86379883.aclimit(e,re,tp)
return re:GetHandler():GetOriginalCode()==e:GetLabel()
end
--
function c86379883.gcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function c86379883.gcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
......@@ -163,4 +167,4 @@ function c86379883.gop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(token,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,token)
end
end
\ No newline at end of file
end
......@@ -4,6 +4,7 @@ function c86379887.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,86379887+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c86379887.target)
e1:SetOperation(c86379887.activate)
c:RegisterEffect(e1)
......
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