Commit 4f9ba10a authored by Nemo Ma's avatar Nemo Ma

Update 1206

Updated 515 cards
parent d8642c52
......@@ -128,7 +128,7 @@
77771010 0
79029274 0
82204249 0
89380006 0
#89380006 0
#
79029309 0
65010018 0
......@@ -378,10 +378,6 @@
89389004 0
90700050 0
90700051 0
114427368 2
114967855 2
117066828 2
118875971 2
112640060 0
112741551 0
115379763 0
......@@ -845,7 +841,6 @@
119041155 0
119918512 0
120366274 0
121074344 0
82221014 0
9950297 0
9950444 0
......@@ -1389,15 +1384,7 @@
9950998 1
9951062 1
9951067 1
98730001 1
98730004 1
98730007 1
98730010 1
98730013 1
98730015 1
98730017 1
98730019 1
118038143 2
#118038143 2
9950448 1
9950452 1
33403500 1
......@@ -2070,21 +2057,21 @@
9951003 1
9951062 1
9951067 1
46250004 1
46250009 1
98730001 1
#46250004 1
#46250009 1
#98730001 1
98730004 1
98730007 1
98730010 1
98730013 1
98730015 1
98730017 1
98730019 1
#98730007 1
98730010 0
#98730013 1
#98730015 1
#98730017 1
#98730019 1
98730213 1
98730215 1
98730217 1
98730219 1
118038143 1
#118038143 1
#semi limit
9980110 2
9980129 2
......
No preview for this file type
expansions/pics/9910014.jpg

48.3 KB | W: | H:

expansions/pics/9910014.jpg

48.7 KB | W: | H:

expansions/pics/9910014.jpg
expansions/pics/9910014.jpg
expansions/pics/9910014.jpg
expansions/pics/9910014.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910075.jpg

48.4 KB | W: | H:

expansions/pics/9910075.jpg

49.1 KB | W: | H:

expansions/pics/9910075.jpg
expansions/pics/9910075.jpg
expansions/pics/9910075.jpg
expansions/pics/9910075.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910246.jpg

45.1 KB | W: | H:

expansions/pics/9910246.jpg

46.5 KB | W: | H:

expansions/pics/9910246.jpg
expansions/pics/9910246.jpg
expansions/pics/9910246.jpg
expansions/pics/9910246.jpg
  • 2-up
  • Swipe
  • Onion skin
local m=15000560
local cm=_G["c"..m]
cm.name="镜舞台"
function cm.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetOperation(cm.acop)
c:RegisterEffect(e0)
--cannot mset
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetRange(LOCATION_FZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(1,0)
e3:SetTarget(cm.splimit)
c:RegisterEffect(e3)
--force zone
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_MUST_USE_MZONE)
e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(LOCATION_EXTRA,0)
e4:SetValue(0x600060)
c:RegisterEffect(e4)
--token
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetRange(LOCATION_FZONE)
e5:SetCode(EVENT_ADJUST)
e5:SetCondition(cm.tkcon)
e5:SetOperation(cm.tkop)
c:RegisterEffect(e5)
--damage
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_DESTROYED)
e6:SetRange(LOCATION_FZONE)
e6:SetCondition(cm.damcon)
e6:SetOperation(cm.damop)
c:RegisterEffect(e6)
--Damage
local e7=Effect.CreateEffect(c)
e7:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e7:SetCode(EVENT_DESTROYED)
e7:SetCondition(cm.dam2con)
e7:SetTarget(cm.dam2tg)
e7:SetOperation(cm.dam2op)
c:RegisterEffect(e7)
end
function cm.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil)
if g:GetCount()~=0 then
Duel.SendtoHand(g,nil,REASON_EFFECT+REASON_RULE)
end
end
function cm.splimit(e,c)
if c:IsCode(15000561) then return false end
if c:IsLocation(LOCATION_EXTRA) then return false end
return true
end
function cm.ntkfilter(c)
return c:GetSequence()<5 and not c:IsCode(15000561)
end
function cm.mrfilter(c,tp)
return c:GetSequence()<5 and not Duel.IsExistingMatchingCard(cm.mrfilter2,tp,LOCATION_MZONE,0,1,nil,c,tp)
end
function cm.mrfilter2(c,sc,tp)
return c:GetSequence()<5 and c:GetColumnGroup():IsContains(sc) and c:GetControler()==tp
end
function cm.tkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(cm.mrfilter,tp,0,LOCATION_MZONE,1,nil,tp) or Duel.IsExistingMatchingCard(cm.ntkfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.tkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
local ag=Duel.GetMatchingGroup(cm.mrfilter,tp,0,LOCATION_MZONE,nil,tp)
local tc=ag:GetFirst()
while tc do
if Duel.IsPlayerCanSpecialSummonMonster(tp,15000561,nil,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) then
Duel.HintSelection(Group.FromCards(tc))
local code=15000561
local zone=tc:GetColumnZone(LOCATION_MZONE,tp)
local pos=tc:GetPosition()
if pos==POS_FACEDOWN_DEFENSE then pos=POS_FACEUP_DEFENSE end
local token=Duel.CreateToken(tp,code)
if Duel.SpecialSummonStep(token,0,tp,tp,false,false,pos,zone) then
--atkdef
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(cm.atkval)
token:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SET_DEFENSE)
e2:SetValue(cm.defval)
token:RegisterEffect(e2)
--ChangePosition
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_ADJUST)
e3:SetCondition(cm.cpcon)
e3:SetOperation(cm.cpop)
token:RegisterEffect(e3)
--Destroy
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_ADJUST)
e4:SetCondition(cm.descon)
e4:SetOperation(cm.desop)
token:RegisterEffect(e4)
Duel.SpecialSummonComplete()
end
end
tc=ag:GetNext()
end
end
function cm.atkval(e,c)
local tc=Duel.GetFirstMatchingCard(cm.desfilter,e:GetHandler():GetControler(),0,LOCATION_MZONE,nil,e:GetHandler())
if tc==nil then return 0 end
if tc:IsFacedown() then return 0 end
return tc:GetAttack()
end
function cm.defval(e,c)
local tc=Duel.GetFirstMatchingCard(cm.desfilter,e:GetHandler():GetControler(),0,LOCATION_MZONE,nil,e:GetHandler())
if tc==nil then return 0 end
if tc:IsFacedown() then return 0 end
return tc:GetDefense()
end
function cm.cpfilter(c,sc)
return c:GetSequence()<5 and c:GetColumnGroup():IsContains(sc) and c:GetPosition()~=sc:GetPosition()
end
function cm.cpcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(cm.cpfilter,tp,0,LOCATION_MZONE,1,nil,c)
end
function cm.cpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
local tc=Duel.GetMatchingGroup(cm.cpfilter,tp,0,LOCATION_MZONE,nil,c):GetFirst()
if tc then
local pos=tc:GetPosition()
if tc:IsPosition(POS_FACEDOWN_DEFENSE) then pos=POS_FACEUP_DEFENSE end
if pos==c:GetPosition() then return end
Duel.ChangePosition(c,pos)
end
end
function cm.desfilter(c,sc)
return c:GetSequence()<5 and c:GetColumnGroup():IsContains(sc)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
return not Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_MZONE,1,nil,c)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
Duel.Destroy(c,REASON_RULE)
end
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsCode,1,nil,15000561)
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
Duel.Damage(1-tp,200,REASON_EFFECT)
end
function cm.dam2con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and c:IsPreviousPosition(POS_FACEUP)
end
function cm.dam2tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tp=c:GetControler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,15000561) end
local p=PLAYER_ALL
local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,15000561)
Duel.SetTargetPlayer(p)
Duel.SetTargetParam(g:GetCount()*1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,g:GetCount()*1000)
end
function cm.dam2op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,15000561)
if g:GetCount()~=0 then
local x=Duel.Destroy(g,REASON_EFFECT)
if Duel.GetLP(1-tp)<x*1000 and Duel.GetLP(tp)>x*1000 then
Duel.RegisterFlagEffect(tp,15000560,RESET_PHASE+PHASE_END,0,1)
Debug.Message("会被刺痛的手臂,还有什么资格谈论守护......")
end
Duel.Damage(tp,x*1000,REASON_EFFECT,true)
Duel.Damage(1-tp,x*1000,REASON_EFFECT,true)
Duel.RDComplete()
if Duel.GetLP(1-tp)>0 and Duel.GetLP(tp)>0 and Duel.GetFlagEffect(tp,15000560)~=0 then
Duel.ResetFlagEffect(tp,15000560)
Debug.Message("我会重铸镜门,来看清一万个破碎的未来......")
end
end
end
\ No newline at end of file
local m=15000568
local cm=_G["c"..m]
cm.name="见影灵·霁刃"
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,cm.matfilter,1,1)
c:EnableReviveLimit()
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(cm.drcon)
e1:SetTarget(cm.drtg)
e1:SetOperation(cm.drop)
c:RegisterEffect(e1)
end
function cm.matfilter(c)
return c:IsLinkCode(15000561)
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_FUSION or r==REASON_LINK
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.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
local tc=Duel.GetOperatedGroup():GetFirst()
Duel.ConfirmCards(1-tp,tc)
if tc:IsCode(15000560) or aux.IsCodeListed(tc,15000560) then
local g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
end
else
Duel.BreakEffect()
Duel.SendtoGrave(tc,REASON_EFFECT)
end
Duel.ShuffleHand(tp)
end
end
\ No newline at end of file
local m=15000569
local cm=_G["c"..m]
cm.name="寂影双·坠刃"
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,cm.lcheck)
c:EnableReviveLimit()
--zone limit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_MUST_USE_MZONE)
e0:SetRange(LOCATION_MZONE)
e0:SetTargetRange(1,0)
e0:SetValue(cm.zonelimit)
c:RegisterEffect(e0)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(cm.value)
c:RegisterEffect(e1)
--SpecialSummon and SearchCard
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,15000569)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
--Destroy
local e4=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_CUSTOM+15000569)
e4:SetCountLimit(1,15010569)
e4:SetCondition(cm.dcon)
e4:SetTarget(cm.dtg)
e4:SetOperation(cm.dop)
c:RegisterEffect(e4)
end
function cm.lcheck(g,lc)
return g:IsExists(Card.IsLinkCode,1,nil,15000561)
end
function cm.zonelimit(e)
return 0x1f001f | (0x600060 & ~e:GetHandler():GetLinkedZone())
end
function cm.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,0,LOCATION_MZONE,LOCATION_MZONE,nil,TYPE_TOKEN)*500
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler()
return Duel.IsPlayerCanSpecialSummonMonster(1-tp,15000561,nil,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) and Duel.GetMZoneCount(1-tp)~=0
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local tp=e:GetHandler():GetControler()
if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(1-tp,15000561,nil,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) and Duel.GetMZoneCount(1-tp)~=0 end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_FZONE,0,nil)
if g:GetCount()~=0 then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,0)
end
function cm.desfilter(c)
return (c:IsCode(15000560) or aux.IsCodeListed(c,15000560)) and c:IsAbleToHand()
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=e:GetHandler():GetControler()
if not Duel.IsPlayerCanSpecialSummonMonster(1-tp,15000561,nil,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) and Duel.GetMZoneCount(1-tp)~=0 then return end
local token=Duel.CreateToken(tp,15000561)
if Duel.SpecialSummon(token,0,1-tp,1-tp,false,false,POS_FACEUP)~=0 then
Duel.RaiseEvent(c,EVENT_CUSTOM+15000569,re,r,rp,ep,ev)
if Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local ag=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(ag,nil,REASON_EFFECT)
end
end
if Duel.GetFlagEffect(tp,m)~=0 then return end
cm[tp]=0
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:SetValue(cm.val)
e1:SetReset(RESET_PHASE+PHASE_END,1)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.val(e,re,dam,r,rp,rc)
if cm[e:GetOwnerPlayer()]==1 or bit.band(r,REASON_EFFECT)~=0 then
return math.floor(dam/2)
else return dam end
end
function cm.dcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_FZONE,0,1,nil)
end
function cm.dtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tp=e:GetHandler():GetControler()
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_FZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_FZONE,0,nil)
e:GetHandler():ResetFlagEffect(m)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.dop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=e:GetHandler():GetControler()
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_FZONE,0,nil)
if g:GetCount()~=0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
local m=15000575
local cm=_G["c"..m]
cm.name="镜像·倒影之国度"
function cm.initial_effect(c)
aux.AddCodeList(c,15000560)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--avoid battle damage
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_MONSTER))
e3:SetValue(cm.tglimit)
c:RegisterEffect(e3)
--remove
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetProperty(EFFECT_FLAG_IMMEDIATELY_APPLY)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(cm.attactop)
c:RegisterEffect(e2)
--Activate field
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(cm.thcon)
e3:SetCost(cm.thcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.atktarget(e,c)
return c:IsType(TYPE_MONSTER)
end
function cm.tglimit(e,c)
return c and not c:GetBattleTarget():GetColumnGroup():IsContains(c)
end
function cm.attactop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
local sc=Duel.GetAttackTarget()
if sc==nil then return end
if sc:GetColumnGroup():IsContains(tc) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
tc:RegisterEffect(e1,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
sc:RegisterEffect(e1,true)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsStatus(STATUS_EFFECT_ENABLED)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and e:GetHandler():IsLocation(LOCATION_SZONE) end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function cm.filter(c,tp)
return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true,true) and c:IsCode(15000560)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
if not Duel.CheckPhaseActivity() then e:SetLabel(1) else e:SetLabel(0) end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
if e:GetLabel()==1 then Duel.RegisterFlagEffect(tp,15248873,RESET_CHAIN,0,1) end
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp)
Duel.ResetFlagEffect(tp,15248873)
local tc=g:GetFirst()
if tc then
local te=tc:GetActivateEffect()
if e:GetLabel()==1 then Duel.RegisterFlagEffect(tp,15248873,RESET_CHAIN,0,1) end
local b2=te:IsActivatable(tp,true,true)
Duel.ResetFlagEffect(tp,15248873)
if b2 then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
end
end
\ No newline at end of file
--悲叹之雏 圆香
function c22050000.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050000,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,22050000)
e1:SetTarget(c22050000.target)
e1:SetOperation(c22050000.operation)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050000,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,22050000)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c22050000.sptg)
e2:SetOperation(c22050000.spop)
c:RegisterEffect(e2)
end
function c22050000.filter1(c,e)
return c:IsLocation(LOCATION_HAND+LOCATION_MZONE) and not c:IsImmuneToEffect(e)
end
function c22050000.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x2ff8) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c22050000.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_MZONE)
local res=Duel.IsExistingMatchingCard(c22050000.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c22050000.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22050000.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetFusionMaterial(tp):Filter(c22050000.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c22050000.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c22050000.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,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,c,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c22050000.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)
if chk==0 then return ft1>0 and ft2>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22050001,0xff8,0x4011,0,0,1,RACE_ROCK,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENSE,tp)
and Duel.IsPlayerCanSpecialSummonMonster(tp,22050001,0xff8,0x4011,0,0,1,RACE_ROCK,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENSE,1-tp)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
end
function c22050000.spop(e,tp,eg,ep,ev,re,r,rp)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)
if ft1<=0 or ft2<=0 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,22050001,0xff8,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENSE,tp)
and Duel.IsPlayerCanSpecialSummonMonster(tp,22050001,0xff8,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENSE,1-tp) then
local token=Duel.CreateToken(tp,22050001)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local token=Duel.CreateToken(tp,22050001)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE)
Duel.SpecialSummonComplete()
end
end
--悲叹少女 鹿目圆香
function c22050010.initial_effect(c)
c:EnableCounterPermit(0xfec)
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,22050000,aux.FilterBoolFunction(Card.IsFusionSetCard,0xff8),1,true,true)
--counter
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050010,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c22050010.cttg)
e1:SetOperation(c22050010.ctop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050010,0))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(aux.bdocon)
e2:SetTarget(c22050010.cttg)
e2:SetOperation(c22050010.ctop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22050010,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,22050010)
e3:SetCost(c22050010.thcost)
e3:SetTarget(c22050010.thtg1)
e3:SetOperation(c22050010.thop1)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22050010,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,22050011)
e4:SetCost(c22050010.cost)
e4:SetTarget(c22050010.target)
e4:SetOperation(c22050010.operation)
c:RegisterEffect(e4)
end
function c22050010.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0xfec)
end
function c22050010.ctop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
e:GetHandler():AddCounter(0xfec,1)
end
end
function c22050010.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0xfec,2,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0xfec,2,REASON_COST)
end
function c22050010.thfilter1(c)
return c:IsSetCard(0xff8) and c:IsAbleToHand()
end
function c22050010.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22050010.thfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22050010.thop1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22050010.thfilter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c22050010.cfilter(c)
return c:IsCode(22050100) and c:IsAbleToRemoveAsCost()
end
function c22050010.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22050010.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c22050010.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c22050010.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c22050010.filter1(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c22050010.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and c:IsCode(22050150) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c22050010.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(c22050010.filter0,tp,LOCATION_GRAVE,0,nil)
local res=Duel.IsExistingMatchingCard(c22050010.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c22050010.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,tp,LOCATION_GRAVE)
end
function c22050010.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetMatchingGroup(c22050010.filter1,tp,LOCATION_GRAVE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c22050010.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c22050010.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,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,c,chkf)
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--悲叹之律-序曲
function c22050020.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050020,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22050020+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c22050020.target)
e1:SetOperation(c22050020.activate)
c:RegisterEffect(e1)
--flip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050020,2))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetOperation(c22050020.operation)
c:RegisterEffect(e2)
end
function c22050020.filter(c)
return c:IsSetCard(0xff8) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c22050020.filter0(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsSetCard(0xff8)
end
function c22050020.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xff8) and c:IsAbleToGrave()
end
function c22050020.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22050020.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if Duel.GetMatchingGroupCount(c22050020.filter0,tp,LOCATION_MZONE,0,1,nil)>=0 and Duel.IsExistingMatchingCard(c22050020.tgfilter,tp,LOCATION_DECK,0,1,nil) then
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
end
end
function c22050020.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22050020.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if Duel.GetMatchingGroupCount(c22050020.filter0,tp,LOCATION_MZONE,0,1,nil)>=1 and Duel.IsExistingMatchingCard(c22050020.tgfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(22050020,1)) then
Duel.BreakEffect()
Duel.ShuffleDeck(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c22050020.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g1:GetCount()>0 then
Duel.SendtoGrave(g1,REASON_EFFECT)
end
end
end
end
function c22050020.filter1(c)
return c:IsFaceup() and c:IsCanAddCounter(0xfec,1)
end
function c22050020.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c22050020.filter1,tp,LOCATION_ONFIELD,0,nil)
local tc=g:GetFirst()
while tc do
tc:AddCounter(0xfec,1)
tc=g:GetNext()
end
end
--悲叹之雏 焰
function c22050030.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050030,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,22050030)
e1:SetTarget(c22050030.target)
e1:SetOperation(c22050030.operation)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050030,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,22050030)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c22050030.sptg)
e2:SetOperation(c22050030.spop)
c:RegisterEffect(e2)
end
function c22050030.filter1(c,e)
return c:IsLocation(LOCATION_HAND+LOCATION_MZONE) and not c:IsImmuneToEffect(e)
end
function c22050030.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x2ff8) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c22050030.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_MZONE)
local res=Duel.IsExistingMatchingCard(c22050030.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c22050030.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22050030.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetFusionMaterial(tp):Filter(c22050030.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c22050030.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c22050030.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,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,c,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c22050030.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)
if chk==0 then return ft1>0 and ft2>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22050001,0xff8,0x4011,0,0,1,RACE_ROCK,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,tp)
and Duel.IsPlayerCanSpecialSummonMonster(tp,22050001,0xff8,0x4011,0,0,1,RACE_ROCK,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,1-tp)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
end
function c22050030.spop(e,tp,eg,ep,ev,re,r,rp)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)
if ft1<=0 or ft2<=0 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,22050001,0xff8,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,tp)
and Duel.IsPlayerCanSpecialSummonMonster(tp,22050001,0xff8,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,1-tp) then
local token=Duel.CreateToken(tp,22050031)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local token=Duel.CreateToken(tp,22050031)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE)
Duel.SpecialSummonComplete()
end
end
--悲叹之雏 麻美
function c22050040.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050040,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,22050040)
e1:SetTarget(c22050040.target)
e1:SetOperation(c22050040.operation)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050040,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,22050040)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c22050040.sptg)
e2:SetOperation(c22050040.spop)
c:RegisterEffect(e2)
end
function c22050040.filter1(c,e)
return c:IsLocation(LOCATION_HAND+LOCATION_MZONE) and not c:IsImmuneToEffect(e)
end
function c22050040.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x2ff8) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c22050040.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_MZONE)
local res=Duel.IsExistingMatchingCard(c22050040.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c22050040.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22050040.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetFusionMaterial(tp):Filter(c22050040.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c22050040.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c22050040.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,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,c,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c22050040.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)
if chk==0 then return ft1>0 and ft2>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22050001,0xff8,0x4011,0,0,1,RACE_ROCK,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE,tp)
and Duel.IsPlayerCanSpecialSummonMonster(tp,22050001,0xff8,0x4011,0,0,1,RACE_ROCK,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE,1-tp)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
end
function c22050040.spop(e,tp,eg,ep,ev,re,r,rp)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)
if ft1<=0 or ft2<=0 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,22050001,0xff8,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE,tp)
and Duel.IsPlayerCanSpecialSummonMonster(tp,22050001,0xff8,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE,1-tp) then
local token=Duel.CreateToken(tp,22050041)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local token=Duel.CreateToken(tp,22050041)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE)
Duel.SpecialSummonComplete()
end
end
--悲叹之雏 纱耶香
function c22050050.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050050,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,22050050)
e1:SetTarget(c22050050.target)
e1:SetOperation(c22050050.operation)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050050,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,22050050)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c22050050.sptg)
e2:SetOperation(c22050050.spop)
c:RegisterEffect(e2)
end
function c22050050.filter1(c,e)
return c:IsLocation(LOCATION_HAND+LOCATION_MZONE) and not c:IsImmuneToEffect(e)
end
function c22050050.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x2ff8) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c22050050.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_MZONE)
local res=Duel.IsExistingMatchingCard(c22050050.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c22050050.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22050050.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetFusionMaterial(tp):Filter(c22050050.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c22050050.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c22050050.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,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,c,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c22050050.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)
if chk==0 then return ft1>0 and ft2>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22050001,0xff8,0x4011,0,0,1,RACE_ROCK,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE,tp)
and Duel.IsPlayerCanSpecialSummonMonster(tp,22050001,0xff8,0x4011,0,0,1,RACE_ROCK,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE,1-tp)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
end
function c22050050.spop(e,tp,eg,ep,ev,re,r,rp)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)
if ft1<=0 or ft2<=0 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,22050001,0xff8,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE,tp)
and Duel.IsPlayerCanSpecialSummonMonster(tp,22050001,0xff8,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE,1-tp) then
local token=Duel.CreateToken(tp,22050051)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local token=Duel.CreateToken(tp,22050051)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE)
Duel.SpecialSummonComplete()
end
end
--悲叹之雏 杏子
function c22050060.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050060,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,22050060)
e1:SetTarget(c22050060.target)
e1:SetOperation(c22050060.operation)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050060,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,22050060)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c22050060.sptg)
e2:SetOperation(c22050060.spop)
c:RegisterEffect(e2)
end
function c22050060.filter1(c,e)
return c:IsLocation(LOCATION_HAND+LOCATION_MZONE) and not c:IsImmuneToEffect(e)
end
function c22050060.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x2ff8) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c22050060.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_MZONE)
local res=Duel.IsExistingMatchingCard(c22050060.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c22050060.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22050060.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetFusionMaterial(tp):Filter(c22050060.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c22050060.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c22050060.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,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,c,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c22050060.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)
if chk==0 then return ft1>0 and ft2>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22050001,0xff8,0x4011,0,0,1,RACE_ROCK,ATTRIBUTE_FIRE,POS_FACEUP_DEFENSE,tp)
and Duel.IsPlayerCanSpecialSummonMonster(tp,22050001,0xff8,0x4011,0,0,1,RACE_ROCK,ATTRIBUTE_FIRE,POS_FACEUP_DEFENSE,1-tp)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
end
function c22050060.spop(e,tp,eg,ep,ev,re,r,rp)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)
if ft1<=0 or ft2<=0 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,22050001,0xff8,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_FIRE,POS_FACEUP_DEFENSE,tp)
and Duel.IsPlayerCanSpecialSummonMonster(tp,22050001,0xff8,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_FIRE,POS_FACEUP_DEFENSE,1-tp) then
local token=Duel.CreateToken(tp,22050061)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local token=Duel.CreateToken(tp,22050061)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE)
Duel.SpecialSummonComplete()
end
end
--悲叹之律-变奏曲
function c22050070.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050070,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_SUMMON+TIMING_SPSUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,22050070+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c22050070.target)
e1:SetOperation(c22050070.activate)
c:RegisterEffect(e1)
--flip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050070,2))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetOperation(c22050070.operation)
c:RegisterEffect(e2)
end
function c22050070.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c22050070.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c22050070.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and tc:IsSetCard(0xff8) and tc:IsAttribute(ATTRIBUTE_EARTH) then
if Duel.IsExistingMatchingCard(c22050070.filter,tp,0,LOCATION_ONFIELD,1,c)
and Duel.SelectYesNo(tp,aux.Stringid(22050070,1)) then
local sg=Duel.GetMatchingGroup(c22050070.filter,tp,0,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(sg,REASON_EFFECT)
end
end
end
function c22050070.filter1(c)
return c:IsFaceup() and c:IsCanAddCounter(0xfec,1)
end
function c22050070.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c22050070.filter1,tp,LOCATION_ONFIELD,0,nil)
local tc=g:GetFirst()
while tc do
tc:AddCounter(0xfec,1)
tc=g:GetNext()
end
end
--悲叹之律-最强音
function c22050080.initial_effect(c)
c:EnableCounterPermit(0xfec)
c:SetCounterLimit(0xfec,5)
c:SetUniqueOnField(1,0,22050080)
--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:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(aux.chainreg)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c22050080.ctcon)
e3:SetOperation(c22050080.acop)
c:RegisterEffect(e3)
--destroy replace
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetRange(LOCATION_SZONE)
e4:SetTarget(c22050080.desreptg)
e4:SetValue(c22050080.desrepval)
e4:SetOperation(c22050080.desrepop)
c:RegisterEffect(e4)
end
function c22050080.ctcon(e,tp,eg,ep,ev,re,r,rp)
if not re then return false end
local c=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and c:IsSetCard(0xff8) and c:IsControler(tp) and e:GetHandler():GetFlagEffect(1)>0
end
function c22050080.acop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0xfec,1)
end
function c22050080.repfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c22050080.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c22050080.repfilter,1,nil,tp)
and c:IsCanRemoveCounter(tp,0xfec,1,REASON_EFFECT) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function c22050080.desrepval(e,c)
return c22050080.repfilter(c,e:GetHandlerPlayer())
end
function c22050080.desrepop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveCounter(tp,0xfec,1,REASON_EFFECT)
end
\ No newline at end of file
--悲叹之律-镇魂曲
function c22050090.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,22050090+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c22050090.condition)
e1:SetTarget(c22050090.target)
e1:SetOperation(c22050090.activate)
c:RegisterEffect(e1)
--flip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050070,2))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetOperation(c22050090.operation)
c:RegisterEffect(e2)
end
function c22050090.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xff8)
end
function c22050090.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c22050090.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function c22050090.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function c22050090.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
function c22050090.filter1(c)
return c:IsFaceup() and c:IsCanAddCounter(0xfec,1)
end
function c22050090.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c22050090.filter1,tp,LOCATION_ONFIELD,0,nil)
local tc=g:GetFirst()
while tc do
tc:AddCounter(0xfec,1)
tc=g:GetNext()
end
end
\ No newline at end of file
--悲叹之律-小夜曲
function c22050100.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22050100+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c22050100.target)
e1:SetOperation(c22050100.activate)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050100,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_REMOVED)
e2:SetCondition(c22050100.spcon)
e2:SetTarget(c22050100.sptg)
e2:SetOperation(c22050100.spop)
c:RegisterEffect(e2)
end
function c22050100.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()==e:GetHandler():GetTurnID()+0
end
function c22050100.filter(c)
return c:IsSetCard(0x2ff8) and c:IsType(TYPE_MONSTER)
end
function c22050100.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c22050100.filter,tp,LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
function c22050100.spop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetMatchingGroup(c22050100.filter,tp,LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
Duel.Draw(p,ct,REASON_EFFECT)
end
function c22050100.filter0(c)
return c:IsFaceup() and c:IsCanBeFusionMaterial()
end
function c22050100.filter1(c,e)
return c:IsFaceup() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function c22050100.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xff8) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c22050100.filter3(c,e)
return c:IsOnField() and not c:IsImmuneToEffect(e)
end
function c22050100.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c22050100.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil)
local mg2=Duel.GetMatchingGroup(c22050100.filter0,tp,0,LOCATION_MZONE,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c22050100.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c22050100.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22050100.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c22050100.filter3,nil,e)
local mg2=Duel.GetMatchingGroup(c22050100.filter1,tp,0,LOCATION_MZONE,nil,e)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(c22050100.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(c22050100.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
end
function c22050100.rmcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()==e:GetHandler():GetTurnID()
end
function c22050100.regop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentPhase()==PHASE_STANDBY then
e:GetHandler():RegisterFlagEffect(22050100,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,2,Duel.GetTurnCount())
else
e:GetHandler():RegisterFlagEffect(22050100,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,1,0)
end
end
function c22050100.drcon(e,tp,eg,ep,ev,re,r,rp)
local tid=e:GetHandler():GetFlagEffectLabel(22050100)
return tid and tid~=Duel.GetTurnCount()
end
function c22050100.drfilter(c)
return c:IsSetCard(0x1ff8) and c:IsType(TYPE_MONSTER)
end
function c22050100.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c22050100.drfilter,tp,LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
function c22050100.drop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetMatchingGroup(c22050100.drfilter,tp,LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
Duel.Draw(p,ct,REASON_EFFECT)
end
--悲叹少女 晓美焰
function c22050110.initial_effect(c)
c:EnableCounterPermit(0xfec)
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,22050030,aux.FilterBoolFunction(Card.IsFusionSetCard,0xff8),1,true,true)
--counter
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050110,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c22050110.cttg)
e1:SetOperation(c22050110.ctop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050110,0))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(aux.bdocon)
e2:SetTarget(c22050110.cttg)
e2:SetOperation(c22050110.ctop)
c:RegisterEffect(e2)
--disable spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22050110,1))
e3:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_SPSUMMON)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,22050110)
e3:SetCondition(c22050110.discon)
e3:SetCost(c22050110.discost)
e3:SetTarget(c22050110.distg)
e3:SetOperation(c22050110.disop)
c:RegisterEffect(e3)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(92418590,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,22050111)
e1:SetCost(c22050110.spcost)
e1:SetTarget(c22050110.sptg)
e1:SetOperation(c22050110.spop)
c:RegisterEffect(e1)
end
function c22050110.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0xfec)
end
function c22050110.ctop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
e:GetHandler():AddCounter(0xfec,1)
end
end
function c22050110.discon(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function c22050110.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0xfec,2,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0xfec,2,REASON_COST)
end
function c22050110.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,eg:GetCount(),0,0)
end
function c22050110.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.SendtoDeck(eg,nil,2,REASON_EFFECT)
end
function c22050110.cfilter(c)
return c:IsCode(22050020) and c:IsAbleToRemoveAsCost()
end
function c22050110.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22050110.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c22050110.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c22050110.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c22050110.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
\ No newline at end of file
--悲叹少女 巴麻美
function c22050120.initial_effect(c)
c:EnableCounterPermit(0xfec)
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,22050040,aux.FilterBoolFunction(Card.IsFusionSetCard,0xff8),1,true,true)
--counter
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050120,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c22050120.cttg)
e1:SetOperation(c22050120.ctop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050120,0))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(aux.bdocon)
e2:SetTarget(c22050120.cttg)
e2:SetOperation(c22050120.ctop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22050120,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,22050120)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCost(c22050120.descost)
e3:SetTarget(c22050120.destg)
e3:SetOperation(c22050120.desop)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22050120,2))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,22050121)
e4:SetCost(c22050120.thcost)
e4:SetTarget(c22050120.thtg)
e4:SetOperation(c22050120.thop)
c:RegisterEffect(e4)
end
function c22050120.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0xfec)
end
function c22050120.ctop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
e:GetHandler():AddCounter(0xfec,1)
end
end
function c22050120.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0xfec,2,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0xfec,2,REASON_COST)
end
function c22050120.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c22050120.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c22050120.cfilter(c,tp)
return c:IsCode(22050070) and c:IsAbleToRemoveAsCost()
end
function c22050120.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c22050120.cfilter,tp,LOCATION_GRAVE,0,1,c,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c22050120.cfilter,tp,LOCATION_GRAVE,0,1,1,c,tp)
g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c22050120.thfilter(c)
return c:IsSetCard(0x1ff8) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c22050120.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(c22050120.thfilter,tp,LOCATION_DECK,0,nil)
return g:GetClassCount(Card.GetCode)>=2
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function c22050120.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c22050120.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetClassCount(Card.GetCode)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg1=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
Duel.SendtoHand(tg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg1)
end
--悲叹少女 美树纱耶香
function c22050130.initial_effect(c)
c:EnableCounterPermit(0xfec)
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,22050050,aux.FilterBoolFunction(Card.IsFusionSetCard,0xff8),1,true,true)
--counter
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050130,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c22050130.cttg)
e1:SetOperation(c22050130.ctop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050130,0))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(aux.bdocon)
e2:SetTarget(c22050130.cttg)
e2:SetOperation(c22050130.ctop)
c:RegisterEffect(e2)
--attack all
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22050130,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,22050130)
e3:SetCondition(c22050130.condition)
e3:SetCost(c22050130.atkcost)
e3:SetOperation(c22050130.atkoperation)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_CONTROL)
e4:SetDescription(aux.Stringid(22050130,2))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,22050131)
e4:SetCost(c22050130.cost)
e4:SetTarget(c22050130.sptg)
e4:SetOperation(c22050130.spop)
c:RegisterEffect(e4)
end
function c22050130.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0xfec)
end
function c22050130.ctop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
e:GetHandler():AddCounter(0xfec,1)
end
end
function c22050130.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() and not e:GetHandler():IsHasEffect(EFFECT_ATTACK_ALL)
end
function c22050130.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0xfec,2,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0xfec,2,REASON_COST)
end
function c22050130.atkoperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ATTACK_ALL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function c22050130.cfilter(c)
return c:IsCode(22050080) and c:IsAbleToRemoveAsCost()
end
function c22050130.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22050130.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c22050130.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c22050130.spfilter(c,e,tp)
return c:IsSetCard(0x2ff8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_FUSION) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c22050130.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c22050130.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,e:GetHandler(),1,0,0)
end
function c22050130.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c22050130.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.BreakEffect()
if c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
Duel.GetControl(c,1-tp)
end
end
\ No newline at end of file
--悲叹少女 佐仓杏子
function c22050140.initial_effect(c)
c:EnableCounterPermit(0xfec)
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,22050060,aux.FilterBoolFunction(Card.IsFusionSetCard,0xff8),1,true,true)
--counter
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050140,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c22050140.cttg)
e1:SetOperation(c22050140.ctop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050140,0))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(aux.bdocon)
e2:SetTarget(c22050140.cttg)
e2:SetOperation(c22050140.ctop)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22050140,1))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,22050140)
e3:SetCondition(c22050140.condition)
e3:SetCost(c22050140.cost)
e3:SetTarget(c22050140.target)
e3:SetOperation(c22050140.operation)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22050140,2))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCategory(CATEGORY_REMOVE)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,22050141)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCost(c22050140.rmcost)
e4:SetTarget(c22050140.rmtg)
e4:SetOperation(c22050140.rmop)
c:RegisterEffect(e4)
end
function c22050140.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0xfec)
end
function c22050140.ctop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
e:GetHandler():AddCounter(0xfec,1)
end
end
function c22050140.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c22050140.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0xfec,2,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0xfec,2,REASON_COST)
end
function c22050140.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c22050140.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c22050140.cfilter(c)
return c:IsCode(22050090) and c:IsAbleToRemoveAsCost()
end
function c22050140.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22050140.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c22050140.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c22050140.filter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and not (c:IsSetCard(0xff8)) and c:IsAbleToDeck()
end
function c22050140.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22050140.filter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_REMOVED,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(c22050140.filter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c22050140.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c22050140.filter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_ONFIELD,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
--悲叹终焉 圆环之理
function c22050150.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c22050150.ffilter,5,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--todeck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050150,0))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c22050150.tdcon)
e2:SetTarget(c22050150.tdtg)
e2:SetOperation(c22050150.tdop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetDescription(aux.Stringid(22050150,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(c22050150.cost)
e3:SetTarget(c22050150.target)
e3:SetOperation(c22050150.operation)
c:RegisterEffect(e3)
end
function c22050150.ffilter(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0x2ff8) and (not sg or not sg:IsExists(Card.IsFusionAttribute,1,c,c:GetFusionAttribute()))
end
function c22050150.tdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c22050150.tdfilter(c)
return (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup()) and c:IsAbleToDeck() and c:IsType(TYPE_MONSTER)
end
function c22050150.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c22050150.tdfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetChainLimit(aux.FALSE)
end
function c22050150.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c22050150.tdfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,aux.ExceptThisCard(e))
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
function c22050150.filter(c,e,tp)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x2ff8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c22050150.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,22050001) end
local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,22050001)
Duel.Release(g,REASON_COST)
end
function c22050150.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22050150.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22050150.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c22050150.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--强欲而贪欲的赠礼
function c22050160.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22050160+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c22050160.cost)
e1:SetTarget(c22050160.target)
e1:SetOperation(c22050160.activate)
c:RegisterEffect(e1)
end
function c22050160.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(1-tp,10)
if chk==0 then return g:FilterCount(Card.IsAbleToRemoveAsCost,nil)==10
and Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>=12 end
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
function c22050160.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(1-tp,2) end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,2)
end
function c22050160.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--幻梦界 灵梦
function c22050170.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050170,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,22050170)
e1:SetCost(c22050170.descost)
e1:SetTarget(c22050170.destg)
e1:SetOperation(c22050170.desop)
c:RegisterEffect(e1)
c22050170.discard_effect=e1
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050170,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,22050170)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(c22050170.descon)
e2:SetCost(c22050170.descost1)
e2:SetTarget(c22050170.destg)
e2:SetOperation(c22050170.desop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22050170,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,22050171)
e3:SetCost(c22050170.cost)
e3:SetTarget(c22050170.target)
e3:SetOperation(c22050170.operation)
c:RegisterEffect(e3)
end
function c22050170.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c22050170.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c22050170.descost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() and Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST)
end
function c22050170.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c22050170.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c22050170.cfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsType(TYPE_XYZ)
end
function c22050170.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22050170.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c22050170.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c22050170.target(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 c22050170.operation(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
\ No newline at end of file
--梦幻星界 博丽灵梦
function c22050180.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT)
--xyz summon
aux.AddXyzProcedure(c,nil,5,3,c22050180.ovfilter,aux.Stringid(22050180,0))
c:EnableReviveLimit()
--disable spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050180,1))
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_SUMMON)
e1:SetCondition(c22050180.dscon)
e1:SetCost(c22050180.cost)
e1:SetTarget(c22050180.dstg)
e1:SetOperation(c22050180.dsop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e2)
--xyz
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22050180,2))
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_DETACH_MATERIAL)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,22050181)
e3:SetOperation(c22050180.xyzop)
c:RegisterEffect(e3)
end
function c22050180.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xff6) and c:IsType(TYPE_XYZ) and c:IsRank(4)
end
function c22050180.dscon(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function c22050180.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c22050180.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c22050180.dsop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
function c22050180.xyzop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCondition(c22050180.discon)
e1:SetOperation(c22050180.disop)
Duel.RegisterEffect(e1,tp)
end
function c22050180.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainNegatable(ev) and e:GetHandler():GetFlagEffect(22050180)==0 and ep~=tp
end
function c22050180.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
e:GetHandler():RegisterFlagEffect(22050180,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT)
e:Reset()
end
end
\ No newline at end of file
--幻梦界 魔理沙
function c22050190.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050190,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,22050190)
e1:SetTarget(c22050190.thtg)
e1:SetOperation(c22050190.thop)
c:RegisterEffect(e1)
--attack up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050190,1))
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_DETACH_MATERIAL)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,22050191)
e2:SetTarget(c22050190.xyztg)
e2:SetOperation(c22050190.xyzop)
c:RegisterEffect(e2)
end
function c22050190.thfilter(c)
return c:IsSetCard(0xff6) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c22050190.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22050190.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22050190.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22050190.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 c22050190.mtfilter(c)
return c:IsCanOverlay()
end
function c22050190.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c22050190.mtfilter,tp,0,LOCATION_HAND,1,nil) end
end
function c22050190.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1)
if g:GetCount()>0 then
Duel.Overlay(c,g)
end
end
\ No newline at end of file
--幻梦界 魔理沙
function c22050200.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050200,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,22050200)
e1:SetCost(c22050200.cost)
e1:SetTarget(c22050200.target)
e1:SetOperation(c22050200.operation)
c:RegisterEffect(e1)
c22050200.discard_effect=e1
--search itself
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050200,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(TIMING_END_PHASE)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,22050200)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(c22050200.con)
e2:SetCost(c22050200.cost1)
e2:SetTarget(c22050200.target)
e2:SetOperation(c22050200.operation)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22050200,1))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,22050201)
e3:SetCondition(aux.exccon)
e3:SetCost(c22050200.drcost)
e3:SetTarget(c22050200.drtg)
e3:SetOperation(c22050200.drop)
c:RegisterEffect(e3)
end
function c22050200.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c22050200.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c22050200.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() and Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST)
end
function c22050200.filter(c,e,tp)
return c:IsSetCard(0xff6) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c22050200.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c22050200.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c22050200.operation(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,c22050200.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 c22050200.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST)
end
function c22050200.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 c22050200.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--幻梦界 咲夜
function c22050210.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050210,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,22050210)
e1:SetCost(c22050210.cost)
e1:SetTarget(c22050210.target)
e1:SetOperation(c22050210.operation)
c:RegisterEffect(e1)
c22050210.discard_effect=e1
--search itself
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050210,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(TIMING_END_PHASE)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,22050210)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(c22050210.con)
e2:SetCost(c22050210.cost1)
e2:SetTarget(c22050210.target)
e2:SetOperation(c22050210.operation)
c:RegisterEffect(e2)
--end battle phase
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22050210,1))
e3:SetType(EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,22050211)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCondition(c22050210.condition)
e3:SetCost(aux.bfgcost)
e3:SetOperation(c22050210.operation1)
c:RegisterEffect(e3)
end
function c22050210.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c22050210.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c22050210.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() and Duel.CheckRemoveOverlayCard(tp,1,0,12,REASON_COST) end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
Duel.RemoveOverlayCard(tp,1,0,12,12,REASON_COST)
end
function c22050210.filter(c)
return c:IsSetCard(0xff6) and c:IsAbleToHand()
end
function c22050210.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22050210.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,e:GetHandler(),1,0,0)
end
function c22050210.operation(e,tp,eg,ep,ev,re,r,rp)
local turnp=Duel.GetTurnPlayer()
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22050210.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.SkipPhase(turnp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(turnp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1)
Duel.SkipPhase(turnp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
end
end
function c22050210.cfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsType(TYPE_XYZ) and c:IsSetCard(0xff6) and c:GetPreviousControler()==tp
end
function c22050210.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c22050210.cfilter,1,nil,tp)
end
function c22050210.operation1(e,tp,eg,ep,ev,re,r,rp)
Duel.SkipPhase(1-tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1,1)
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1)
Duel.SkipPhase(1-tp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
end
--幻梦界 紫
function c22050220.initial_effect(c)
--material
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050220,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,22050220)
e1:SetTarget(c22050220.mattg)
e1:SetOperation(c22050220.matop)
c:RegisterEffect(e1)
--material
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050220,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,22050220)
e2:SetCondition(c22050220.con)
e2:SetCost(c22050220.cost)
e2:SetTarget(c22050220.mattg)
e2:SetOperation(c22050220.matop)
c:RegisterEffect(e2)
--Immune
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_XMATERIAL)
e5:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(aux.tgoval)
e5:SetCondition(c22050220.con1)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e6:SetValue(aux.indoval)
c:RegisterEffect(e6)
end
function c22050220.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c22050220.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST)
end
function c22050220.matfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function c22050220.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c22050220.matfilter(chkc) end
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING)
and Duel.IsExistingTarget(c22050220.matfilter,tp,LOCATION_MZONE,0,1,nil)
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c22050220.matfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c22050220.matop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c))
end
end
function c22050220.con1(e)
return e:GetHandler():GetOriginalRace()==RACE_SPELLCASTER
end
\ No newline at end of file
--梦幻星界 十六夜咲夜
function c22050230.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--attach
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050230,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,22050230)
e1:SetCondition(c22050230.matcon)
e1:SetTarget(c22050230.mattg)
e1:SetOperation(c22050230.matop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050230,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_DETACH_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,22050231)
e2:SetTarget(c22050230.thtg)
e2:SetOperation(c22050230.thop)
c:RegisterEffect(e2)
end
function c22050230.matcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1
end
function c22050230.mattg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>3 end
end
function c22050230.matop(e,tp,eg,ep,ev,re,r,rp)
local turnp=Duel.GetTurnPlayer()
local c=e:GetHandler()
local g=Duel.GetDecktopGroup(1-tp,6)
if c:IsRelateToEffect(e) and g:GetCount()==6 then
Duel.DisableShuffleCheck()
Duel.Overlay(c,g)
Duel.BreakEffect()
Duel.SkipPhase(turnp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(turnp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1)
Duel.SkipPhase(turnp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
end
end
function c22050230.thfilter(c)
return c:IsSetCard(0xff6) and c:IsAbleToHand()
end
function c22050230.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c22050230.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22050230.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c22050230.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c22050230.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--幻梦界 琪露诺
function c22050240.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050240,0))
e1:SetCategory(EFFECT_TYPE_ACTIVATE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,22050240)
e1:SetCost(c22050240.cost)
e1:SetTarget(c22050240.target)
e1:SetOperation(c22050240.operation)
c:RegisterEffect(e1)
c22050240.discard_effect=e1
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetDescription(aux.Stringid(22050240,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCountLimit(1,22050240)
e2:SetCondition(c22050240.con)
e2:SetCost(c22050240.cost1)
e2:SetTarget(c22050240.target)
e2:SetOperation(c22050240.operation)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22050240,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,22050241)
e3:SetCost(c22050240.spcost)
e3:SetTarget(c22050240.sptg)
e3:SetOperation(c22050240.spop)
c:RegisterEffect(e3)
end
function c22050240.con(e,tp,eg,ep,ev,re,r,rp)
return aux.dscon() and Duel.GetTurnPlayer()~=tp
end
function c22050240.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c22050240.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() and Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST)
end
function c22050240.filter(c)
return c:IsFaceup()
end
function c22050240.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22050240.filter,tp,0,LOCATION_MZONE,1,nil) end
end
function c22050240.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c22050240.filter,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(900)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c22050240.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST)
end
function c22050240.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c22050240.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(900)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetValue(900)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EFFECT_CHANGE_LEVEL)
e3:SetValue(3)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3,true)
end
Duel.SpecialSummonComplete()
end
\ No newline at end of file
--幻梦界 大妖精
function c22050250.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050250,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,22050250)
e1:SetCondition(c22050250.spcon)
e1:SetTarget(c22050250.sptg)
e1:SetOperation(c22050250.spop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050250,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,22050251)
e2:SetCondition(c22050250.spcon1)
e2:SetTarget(c22050250.sptg1)
e2:SetOperation(c22050250.spop1)
e2:SetHintTiming(0,TIMING_END_PHASE)
c:RegisterEffect(e2)
end
function c22050250.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xff6) and c:IsLevel(3)
end
function c22050250.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c22050250.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c22050250.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c22050250.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local atk=c:GetBaseAttack()
local def=c:GetBaseDefense()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(3)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
function c22050250.spcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOriginalRace()==RACE_SPELLCASTER
end
function c22050250.filter(c,e,tp,rk,mc)
return c:IsRank(rk) and c:IsSetCard(0xff6) and e:GetHandler():IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c22050250.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c22050250.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetRank()+1,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22050250.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c22050250.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetRank()+1,c)
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
\ No newline at end of file
--梦幻星界 琪露诺
function c22050260.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT)
--xyz summon
aux.AddXyzProcedure(c,nil,3,2)
c:EnableReviveLimit()
--disable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c22050260.discon)
e1:SetOperation(c22050260.disop)
c:RegisterEffect(e1)
--attack up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050260,0))
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_DETACH_MATERIAL)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,22050260)
e2:SetTarget(c22050260.xyztg)
e2:SetOperation(c22050260.xyzop)
c:RegisterEffect(e2)
end
function c22050260.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local atk=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_ATTACK)
return re:IsActiveType(TYPE_MONSTER) and atk<901
end
function c22050260.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c22050260.mtfilter(c)
return c:IsType(TYPE_MONSTER)
end
function c22050260.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c22050260.mtfilter,tp,0,LOCATION_EXTRA,1,nil) end
end
function c22050260.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
if g:GetCount()==0 then return end
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c22050260.mtfilter,tp,0,LOCATION_EXTRA,1,1,nil)
if g:GetCount()>0 then
Duel.Overlay(c,g)
end
end
--幻梦界 妖梦
function c22050270.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050270,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,22050270)
e1:SetCost(c22050270.cost)
e1:SetTarget(c22050270.atktg)
e1:SetOperation(c22050270.atkop)
c:RegisterEffect(e1)
c22050270.discard_effect=e1
--atkup
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050270,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetCountLimit(1,22050270)
e2:SetCondition(c22050270.con)
e2:SetCost(c22050270.cost1)
e2:SetTarget(c22050270.atktg)
e2:SetOperation(c22050270.atkop)
c:RegisterEffect(e2)
--double
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22050270,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,22050271)
e3:SetCondition(c22050270.condition)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c22050270.target)
e3:SetOperation(c22050270.operation)
c:RegisterEffect(e3)
end
function c22050270.con(e,tp,eg,ep,ev,re,r,rp)
return aux.dscon() and Duel.GetTurnPlayer()~=tp
end
function c22050270.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c22050270.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() and Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST)
end
function c22050270.atkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function c22050270.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c22050270.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22050270.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c22050270.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c22050270.atkop(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(tc:GetAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function c22050270.condition(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsOnField() and re:GetHandler():IsRelateToEffect(re) and (re:IsActiveType(TYPE_MONSTER)
or (re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not re:IsHasType(EFFECT_TYPE_ACTIVATE)))
end
function c22050270.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsDestructable() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
function c22050270.operation(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--梦幻星界 魂魄妖梦
function c22050280.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--repeat attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050280,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_START)
e1:SetCountLimit(1,22050280)
e1:SetTarget(c22050280.rmtg)
e1:SetOperation(c22050280.rmop)
c:RegisterEffect(e1)
--attack up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050280,1))
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_DETACH_MATERIAL)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,22050280)
e2:SetTarget(c22050280.xyztg)
e2:SetOperation(c22050280.xyzop)
c:RegisterEffect(e2)
end
function c22050280.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=c:GetBattleTarget()
if chk==0 then return tc and tc:IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0)
end
function c22050280.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetAttacker()
if c==tc then tc=Duel.GetAttackTarget() end
if tc and tc:IsRelateToBattle() then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
if c:IsRelateToEffect(e) and c:IsChainAttackable() then
Duel.ChainAttack()
end
end
function c22050280.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c22050280.xyzop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
Duel.Destroy(tg,REASON_EFFECT)
end
end
\ No newline at end of file
--幻梦界 露米娅
function c22050290.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050290,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,22050290)
e1:SetTarget(c22050290.sptg)
e1:SetCost(c22050290.spcost)
e1:SetOperation(c22050290.spop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050290,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,22050291)
e2:SetCondition(c22050290.spcon1)
e2:SetTarget(c22050290.sptg1)
e2:SetOperation(c22050290.spop1)
e2:SetHintTiming(0,TIMING_END_PHASE)
c:RegisterEffect(e2)
end
function c22050290.cffilter(c)
return c:IsSetCard(0xff6) and (c:IsAttribute(ATTRIBUTE_WATER) or c:IsAttribute(ATTRIBUTE_WIND)) and not c:IsPublic()
end
function c22050290.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22050290.cffilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c22050290.cffilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function c22050290.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c22050290.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local atk=c:GetBaseAttack()
local def=c:GetBaseDefense()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(3)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
function c22050290.spcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOriginalRace()==RACE_SPELLCASTER
end
function c22050290.filter(c,e,tp,rk,mc)
return c:IsRank(rk) and c:IsSetCard(0xff6) and e:GetHandler():IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c22050290.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c22050290.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetRank()-1,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22050290.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c22050290.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetRank()-1,c)
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
\ No newline at end of file
--悲叹的孵化者
function c22050300.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c22050300.matfilter,1,1)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050300,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,22050300)
e1:SetLabel(0)
e1:SetCost(c22050300.cost)
e1:SetTarget(c22050300.target)
e1:SetOperation(c22050300.activate)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050300,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c22050300.addcon)
e2:SetTarget(c22050300.addct)
e2:SetOperation(c22050300.addc)
c:RegisterEffect(e2)
end
function c22050300.matfilter(c)
return c:IsSummonType(SUMMON_TYPE_NORMAL) and c:IsSetCard(0xff8)
end
function c22050300.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function c22050300.filter1(c,e,tp)
return c:IsSetCard(0xff8) and Duel.IsExistingMatchingCard(c22050300.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetOriginalAttribute(),c)
end
function c22050300.filter2(c,e,tp,att,mc)
return c:IsSetCard(0x2ff8) and c:GetOriginalAttribute()==att and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial()
and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c22050300.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) and Duel.CheckReleaseGroup(tp,c22050300.filter1,1,nil,e,tp)
end
local rg=Duel.SelectReleaseGroup(tp,c22050300.filter1,1,1,nil,e,tp)
e:SetLabel(rg:GetFirst():GetOriginalAttribute())
Duel.Release(rg,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22050300.activate(e,tp,eg,ep,ev,re,r,rp)
if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) then return end
local att=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c22050300.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,att,nil)
local tc=g:GetFirst()
if tc then
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)~=0 then
tc:CompleteProcedure()
end
end
end
function c22050300.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x2ff8) and c:GetSummonPlayer()==tp
end
function c22050300.addcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and eg:IsExists(c22050300.cfilter,1,nil,tp)
end
function c22050300.filter(c)
return c:IsFaceup() and c:IsCanAddCounter(0xfec,1)
end
function c22050300.addct(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c22050300.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c22050300.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0xfec)
end
function c22050300.addc(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
tc:AddCounter(0xfec,1)
end
end
\ No newline at end of file
--幻梦界 爱丽丝
function c22050310.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050310,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,22050310)
e1:SetCost(c22050310.spcost)
e1:SetTarget(c22050310.sptg)
e1:SetOperation(c22050310.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050310,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,22050310)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c22050310.thtg)
e2:SetOperation(c22050310.thop)
c:RegisterEffect(e2)
end
function c22050310.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST)
end
function c22050310.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return 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)
end
function c22050310.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 c22050310.thfilter(c)
return c:IsSetCard(0xff6) and c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c22050310.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22050310.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22050310.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22050310.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 c22050320.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050320,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,22050320)
e1:SetTarget(c22050320.target)
e1:SetCost(c22050320.cost)
e1:SetOperation(c22050320.operation)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050320,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_DETACH_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,22050231)
e2:SetTarget(c22050320.thtg)
e2:SetOperation(c22050320.thop)
c:RegisterEffect(e2)
end
function c22050320.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(22050320,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c22050320.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c22050320.splimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_XYZ)
end
function c22050320.filter(c,e,tp)
return c:IsSetCard(0xff6) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c22050320.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingMatchingCard(c22050320.filter,tp,LOCATION_HAND,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(c22050320.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c22050320.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
local g1=Duel.GetMatchingGroup(c22050320.filter,tp,LOCATION_HAND,0,nil,e,tp)
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(c22050320.filter),tp,LOCATION_GRAVE,0,nil,e,tp)
if g1:GetCount()==0 or g2:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg2=g2:Select(tp,1,1,nil)
sg1:Merge(sg2)
Duel.SpecialSummon(sg1,0,tp,tp,false,false,POS_FACEUP)
end
function c22050320.thfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c22050320.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c22050320.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22050320.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c22050320.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c22050320.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c22050320.aclimit)
e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c22050320.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
\ No newline at end of file
--幻梦界 早苗
function c22050330.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050330,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,22050330)
e1:SetCost(c22050330.cost)
e1:SetTarget(c22050330.target)
e1:SetOperation(c22050330.activate)
c:RegisterEffect(e1)
c22050330.discard_effect=e1
local e2=e1:Clone()
e2:SetCountLimit(1,22050330)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetHintTiming(TIMING_DAMAGE_STEP,0x21e0)
e2:SetCondition(c22050330.condition)
c:RegisterEffect(e2)
end
function c22050330.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xff6) and c:IsType(TYPE_XYZ)
end
function c22050330.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c22050330.cfilter,tp,LOCATION_MZONE,0,2,nil) and Duel.GetTurnPlayer()~=tp
end
function c22050330.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c22050330.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetOverlayCount()>0
end
function c22050330.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c22050330.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22050330.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c22050330.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c22050330.spfilter(c,e,tp)
return c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(0xff6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp)
end
function c22050330.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local mg=tc:GetOverlayGroup()
Duel.SendtoGrave(mg,REASON_EFFECT)
Duel.BreakEffect()
local g=mg:Filter(aux.NecroValleyFilter(c22050330.spfilter),nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>0 and g:GetCount()>0 then
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if g:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=g:Select(tp,ft,ft,nil)
end
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
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)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
end
end
--梦幻星界 东风谷早苗
function c22050340.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--material
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050340,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,22050340)
e1:SetTarget(c22050340.mttg)
e1:SetOperation(c22050340.mtop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050340,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_DETACH_MATERIAL)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,22050341)
e2:SetTarget(c22050340.xyztg)
e2:SetOperation(c22050340.xyzop)
c:RegisterEffect(e2)
end
function c22050340.mtfilter(c)
return c:IsSetCard(0xff6) and c:IsCanOverlay()
end
function c22050340.mttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c22050340.mtfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c22050340.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c22050340.mtfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Overlay(c,g)
end
end
function c22050340.xyzfilter(c)
return c:IsXyzSummonable(nil)
end
function c22050340.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22050340.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22050340.xyzop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c22050340.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
--幻梦界 正邪
function c22050350.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050350,0))
e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,22050350)
e1:SetCost(c22050350.descost)
e1:SetTarget(c22050350.target)
e1:SetOperation(c22050350.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050350,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,22050350)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(c22050350.descon)
e2:SetCost(c22050350.descost1)
e2:SetTarget(c22050350.target)
e2:SetOperation(c22050350.operation)
--ad
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22050350,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetCountLimit(1,22050351)
e3:SetOperation(c22050350.activate)
c:RegisterEffect(e3)
end
function c22050350.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c22050350.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c22050350.descost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() and Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST)
end
function c22050350.filter(c)
local tp=c:GetControler()
return c:IsFaceup() and c:IsAbleToChangeControler() and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0
end
function c22050350.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c22050350.filter,tp,0,LOCATION_MZONE,1,nil)
and Duel.IsExistingTarget(c22050350.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g2=Duel.SelectTarget(tp,c22050350.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g1=Duel.SelectTarget(tp,c22050350.filter,tp,LOCATION_MZONE,0,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g1,2,0,0)
end
function c22050350.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local a=g:GetFirst()
local b=g:GetNext()
if a:IsRelateToEffect(e) and b:IsRelateToEffect(e) then
Duel.SwapControl(a,b)
end
end
function c22050350.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_REVERSE_UPDATE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
Duel.RegisterEffect(e1,tp)
end
--梦幻星界 鬼人正邪
function c22050360.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050360,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,22050360)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c22050360.condition)
e1:SetTarget(c22050360.target)
e1:SetOperation(c22050360.operation)
c:RegisterEffect(e1)
--xyz
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050360,1))
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_DETACH_MATERIAL)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,22050361)
e2:SetTarget(c22050360.xyztg)
e2:SetOperation(c22050360.xyzop)
c:RegisterEffect(e2)
end
function c22050360.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasProperty(EFFECT_FLAG_PLAYER_TARGET)
end
function c22050360.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local te=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_EFFECT)
local ftg=te:GetTarget()
return ftg==nil or ftg(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function c22050360.operation(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(ev,CHAININFO_TARGET_PLAYER)
Duel.ChangeTargetPlayer(ev,1-p)
end
function c22050360.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0
and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,e:GetHandler()) end
end
function c22050360.xyzop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local g2=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g1:GetCount()==0 or g2:GetCount()==0 then return end
Duel.ConfirmCards(tp,g2)
Duel.ConfirmCards(1-tp,g1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local ag1=g2:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
local ag2=g1:Select(1-tp,1,1,nil)
Duel.SendtoHand(ag1,tp,REASON_EFFECT)
Duel.SendtoHand(ag2,1-tp,REASON_EFFECT)
end
--梦幻星界 少名妙针丸
function c22050370.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--material
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050370,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,22050370)
e1:SetTarget(c22050370.mttg)
e1:SetOperation(c22050370.mtop)
c:RegisterEffect(e1)
--xyz
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetDescription(aux.Stringid(22050370,1))
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_DETACH_MATERIAL)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,22050371)
e2:SetTarget(c22050370.xyztg)
e2:SetOperation(c22050370.xyzop)
c:RegisterEffect(e2)
end
function c22050370.mttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp)
and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function c22050370.mtop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(p,Card.IsAbleToDeck,p,LOCATION_HAND,0,1,63,nil)
if g:GetCount()==0 then return end
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
Duel.ShuffleDeck(p)
Duel.BreakEffect()
Duel.Draw(p,g:GetCount(),REASON_EFFECT)
end
function c22050370.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c22050370.xyzop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.Draw(tp,1,REASON_EFFECT)
if ct==0 then return end
local dc=Duel.GetOperatedGroup():GetFirst()
Duel.ConfirmCards(1-tp,dc)
if dc:IsSetCard(0xff6) and dc:IsType(TYPE_MONSTER) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
Duel.ShuffleHand(tp)
end
--梦幻星界 八云紫
function c22050380.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,c22050380.mfilter,c22050380.xyzcheck,2,2)
--apply effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22050380,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,22050380)
e1:SetTarget(c22050380.efftg)
e1:SetOperation(c22050380.effop)
c:RegisterEffect(e1)
--attack up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050380,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_DETACH_MATERIAL)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,22050381)
e2:SetTarget(c22050380.sptg)
e2:SetOperation(c22050380.spop)
c:RegisterEffect(e2)
--cannot be target
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetTargetRange(LOCATION_ONFIELD,0)
e4:SetTarget(c22050380.tgtg)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
--indes
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_ONFIELD,0)
e5:SetTarget(c22050380.tgtg)
e5:SetValue(aux.indoval)
c:RegisterEffect(e5)
end
function c22050380.mfilter(c,xyzc)
return c:IsXyzType(TYPE_XYZ) and c:IsSetCard(0xff6)
end
function c22050380.xyzcheck(g)
return g:GetClassCount(Card.GetRank)==1
end
function c22050380.tgtg(e,c)
return c:IsSetCard(0xff6) and c~=e:GetHandler()
end
function c22050380.efffilter(c,e,tp,eg,ep,ev,re,r,rp)
if not (c:IsSetCard(0xff6) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())) then return false end
local m=_G["c"..c:GetCode()]
if not m then return false end
local te=m.discard_effect
if not te then return false end
local tg=te:GetTarget()
return not tg or tg and tg(e,tp,eg,ep,ev,re,r,rp,0)
end
function c22050380.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c22050380.efffilter(chkc,e,tp,eg,ep,ev,re,r,rp) end
if chk==0 then return Duel.IsExistingTarget(c22050380.efffilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,eg,ep,ev,re,r,rp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c22050380.efffilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
local tc=g:GetFirst()
Duel.ClearTargetCard()
tc:CreateEffectRelation(e)
e:SetLabelObject(tc)
local m=_G["c"..tc:GetCode()]
local te=m.discard_effect
local tg=te:GetTarget()
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
end
function c22050380.effop(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetLabelObject()
if tc:IsRelateToEffect(e) then
local m=_G["c"..tc:GetCode()]
local te=m.discard_effect
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
Duel.BreakEffect()
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
function c22050380.spfilter(c,e,tp)
return c:IsSetCard(0xff6) and c:IsRank(4) and c:IsXyzType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c22050380.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22050380.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22050380.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c22050380.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
--幻梦界 秦心
function c22050470.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--attack up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050470,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_DETACH_MATERIAL)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTarget(c22050470.damtg)
e2:SetOperation(c22050470.damop)
c:RegisterEffect(e2)
--destroy replace
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetTarget(c22050470.reptg)
c:RegisterEffect(e4)
end
function c22050470.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end
function c22050470.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function c22050470.repfilter(c)
return c:IsSetCard(0xff6) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end
function c22050470.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
and Duel.IsExistingMatchingCard(c22050470.repfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil) end
if Duel.SelectEffectYesNo(tp,c,96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c22050470.repfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
Duel.Overlay(c,g)
return true
else return false end
end
--悲叹轮回 叛逆的物语
function c22050480.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c22050480.ffilter,5,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToDeckAsCost,LOCATION_MZONE+LOCATION_GRAVE,0,Duel.SendtoGrave,REASON_COST)
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(c22050480.splimit)
c:RegisterEffect(e1)
--todeck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050480,0))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetTarget(c22050480.tdtg)
e2:SetOperation(c22050480.tdop)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e3:SetTargetRange(0xfe,0xff)
e3:SetValue(LOCATION_DECK)
e3:SetTarget(c22050480.rmtg)
c:RegisterEffect(e3)
end
function c22050480.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c22050480.ffilter(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0x1ff8) and (not sg or not sg:IsExists(Card.IsFusionAttribute,1,c,c:GetFusionAttribute()))
end
function c22050480.tdfilter(c)
return (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup()) and c:IsAbleToDeck() and c:IsType(TYPE_MONSTER)
end
function c22050480.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c22050480.tdfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetChainLimit(aux.FALSE)
end
function c22050480.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c22050480.tdfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,aux.ExceptThisCard(e))
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
function c22050480.rmtg(e,c)
return c:GetOwner()~=e:GetHandlerPlayer()
end
\ No newline at end of file
--悲叹之律-不协和音
function c22050490.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22010910,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22050490+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c22050490.target)
e1:SetOperation(c22050490.activate)
c:RegisterEffect(e1)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22010910,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCost(c22050490.spcost)
e4:SetTarget(c22050490.sptg)
e4:SetOperation(c22050490.spop)
c:RegisterEffect(e4)
end
function c22050490.filter(c)
return c:IsSetCard(0xff8) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c22050490.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22050490.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22050490.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22050490.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
function c22050490.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0xfec,1,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0xfec,1,REASON_COST)
end
function c22050490.filter0(c)
return c:IsOnField() and c:IsAbleToRemove()
end
function c22050490.filter1(c,e)
return c:IsOnField() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c22050490.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xff8) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c22050490.filter3(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c22050490.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c22050490.filter0,nil)
local mg2=Duel.GetMatchingGroup(c22050490.filter3,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c22050490.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c22050490.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD+LOCATION_GRAVE)
end
function c22050490.spop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c22050490.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c22050490.filter3,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(c22050490.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(c22050490.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.Remove(mat1,POS_FACEUP,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
end
--悲叹之律-狂想曲
function c22050500.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--1
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22050500,0))
e2:SetProperty(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,22050500)
e2:SetCost(c22050500.cost)
e2:SetTarget(c22050500.target)
e2:SetOperation(c22050500.operation)
c:RegisterEffect(e2)
--2
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22050500,1))
e3:SetProperty(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCountLimit(1,22050501)
e3:SetCost(c22050500.cost2)
e3:SetTarget(c22050500.target2)
e3:SetOperation(c22050500.operation)
c:RegisterEffect(e3)
--3
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22050500,2))
e4:SetProperty(CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMING_END_PHASE)
e4:SetCountLimit(1,22050502)
e4:SetCost(c22050500.cost3)
e4:SetTarget(c22050500.target3)
e4:SetOperation(c22050500.operation)
c:RegisterEffect(e4)
--4
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(22050500,3))
e5:SetProperty(CATEGORY_TOGRAVE)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetRange(LOCATION_SZONE)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetHintTiming(0,TIMING_END_PHASE)
e5:SetCountLimit(1,22050503)
e5:SetCost(c22050500.cost4)
e5:SetTarget(c22050500.target4)
e5:SetOperation(c22050500.operation)
c:RegisterEffect(e5)
--5
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(22050500,4))
e6:SetProperty(CATEGORY_TOGRAVE)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetRange(LOCATION_SZONE)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetHintTiming(0,TIMING_END_PHASE)
e6:SetCountLimit(1,22050504)
e6:SetCost(c22050500.cost5)
e6:SetTarget(c22050500.target5)
e6:SetOperation(c22050500.operation)
c:RegisterEffect(e6)
end
function c22050500.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0xfec,2,REASON_COST) end
e:GetHandler():RegisterFlagEffect(22050500,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0)
end
function c22050500.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0xfec,2,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0xfec,2,REASON_COST)
e:GetHandler():RegisterFlagEffect(22050501,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0)
end
function c22050500.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0xfec,3,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0xfec,3,REASON_COST)
e:GetHandler():RegisterFlagEffect(22050502,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0)
end
function c22050500.cost4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0xfec,4,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0xfec,4,REASON_COST)
e:GetHandler():RegisterFlagEffect(22050503,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0)
end
function c22050500.cost5(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0xfec,5,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0xfec,5,REASON_COST)
end
function c22050500.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xff8) and c:IsAbleToGrave()
end
function c22050500.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22050500.tgfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c22050500.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c22050500.tgfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c22050500.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c22050500.tgfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) and c:GetFlagEffect(22050500)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c22050500.target3(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c22050500.tgfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) and c:GetFlagEffect(22050501)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c22050500.target4(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c22050500.tgfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) and c:GetFlagEffect(22050502)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c22050500.target5(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c22050500.tgfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) and c:GetFlagEffect(22050503)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
--无形自我·假面
function c22060010.initial_effect(c)
--CODE
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22060010,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,22060010)
e1:SetCost(c22060010.cost)
e1:SetTarget(c22060010.cdtg)
e1:SetOperation(c22060010.cdop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,22060011)
e2:SetTarget(c22060010.target)
e2:SetOperation(c22060010.operation)
c:RegisterEffect(e2)
end
function c22060010.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c22060010.cdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22060010.cdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function c22060010.cdfilter(c)
return c:IsFaceup()
end
function c22060010.cdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(22060010)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c22060010.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end
function c22060010.filter1(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end
function c22060010.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xff3) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c22060010.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(c22060010.filter0,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
local res=Duel.IsExistingMatchingCard(c22060010.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c22060010.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,LOCATION_MZONE+LOCATION_GRAVE)
end
function c22060010.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetMatchingGroup(c22060010.filter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c22060010.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c22060010.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,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,c,chkf)
tc:SetMaterial(mat1)
Duel.SendtoDeck(mat1,nil,2,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--无形无念·灾祸
function c22060020.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,22060010,aux.FilterBoolFunction(c22060020.fusfilter),1,true,true)
--copy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22060020,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,22060020)
e1:SetCost(c22060020.cpcost)
e1:SetTarget(c22060020.cptg)
e1:SetOperation(c22060020.cpop)
c:RegisterEffect(e1)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22060020,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetTarget(c22060020.tgtg)
e2:SetOperation(c22060020.tgop)
c:RegisterEffect(e2)
end
function c22060020.fusfilter(c)
return bit.band(c:GetOriginalType(),TYPE_SPELL)==TYPE_SPELL
end
function c22060020.cpfilter(c)
return (c:GetType()==TYPE_SPELL or c:IsType(TYPE_QUICKPLAY)) and c:IsAbleToGraveAsCost()
and c:CheckActivateEffect(false,true,false)~=nil
end
function c22060020.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return true end
end
function c22060020.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(c22060020.cpfilter,tp,LOCATION_HAND,0,1,nil)
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c22060020.cpfilter,tp,LOCATION_HAND,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
Duel.SendtoGrave(g,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 c22060020.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
function c22060020.filter(c)
return c:IsSetCard(0xff3) and c:IsAbleToGrave()
end
function c22060020.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22060020.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c22060020.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c22060020.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--无形无念·王权
function c22060030.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,22060010,aux.FilterBoolFunction(c22060030.fusfilter),1,true,true)
--copy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22060030,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1)
e1:SetCost(c22060030.cost)
e1:SetTarget(c22060030.target)
e1:SetOperation(c22060030.operation)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22060030,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,22060030)
e2:SetCondition(c22060030.condition)
e2:SetTarget(c22060030.target1)
e2:SetOperation(c22060030.operation1)
c:RegisterEffect(e2)
end
function c22060030.fusfilter(c)
return bit.band(c:GetOriginalType(),TYPE_TRAP)==TYPE_TRAP
end
function c22060030.filter(c)
return bit.band(c:GetType(),0x20004)==0x20004 and c:IsAbleToGraveAsCost()
end
function c22060030.cost(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c22060030.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c22060030.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
e:SetLabel(g:GetFirst():GetOriginalCode())
end
function c22060030.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c22060030.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local code=e:GetLabel()
if not c:IsRelateToEffect(e) then return end
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetValue(code)
c:RegisterEffect(e2)
c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD,1)
end
end
function c22060030.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_SZONE)
end
function c22060030.target1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return 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)
end
function c22060030.operation1(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
\ No newline at end of file
--无形之影·怪物
function c22060040.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,22060010,aux.FilterBoolFunction(Card.IsFusionType,TYPE_FUSION),1,true,true)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22060040,1))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCondition(c22060040.condition)
e1:SetTarget(c22060040.target)
e1:SetOperation(c22060040.operation)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetValue(c22060040.atkval)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetCondition(c22060040.indcon)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e4)
--tohand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(22060040,1))
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e5:SetTarget(c22060040.thtg)
e5:SetOperation(c22060040.thop)
c:RegisterEffect(e5)
end
function c22060040.condition(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c22060040.filter(c)
return c:IsLevelBelow(8) and c:IsType(TYPE_FUSION) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGrave()
end
function c22060040.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e)
and Duel.IsExistingMatchingCard(c22060040.filter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
end
function c22060040.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c22060040.filter,tp,LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst()
local c=e:GetHandler()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE)
and c:IsRelateToEffect(e) and c:IsFaceup() then
local code=tc:GetCode()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetValue(code)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD,1)
end
end
function c22060040.atkval(e)
return Duel.GetMatchingGroupCount(Card.IsAttribute,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK)*300
end
function c22060040.indcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_GRAVE,0,3,nil,ATTRIBUTE_DARK)
end
function c22060040.thfilter(c)
return c:IsSetCard(0xff3) and c:IsAbleToHand()
end
function c22060040.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c22060040.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22060040.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c22060040.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c22060040.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--希洛克的门番
function c22060050.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xff3),2,true)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22060050,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,22060050)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c22060050.sptg)
e3:SetOperation(c22060050.spop)
c:RegisterEffect(e3)
--tg
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22060050,1))
e4:SetCategory(CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,22060051)
e4:SetTarget(c22060050.tgtg)
e4:SetOperation(c22060050.tgop)
c:RegisterEffect(e4)
end
function c22060050.filter(c,e,tp)
return c:IsSetCard(0xff3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c22060050.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c22060050.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c22060050.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c22060050.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c22060050.spop(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c22060050.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_TOGRAVE,g,1,0,0)
end
function c22060050.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c22060050.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c22060050.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,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 c22060060.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xff3),2,true)
--battle indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
--atk limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetValue(c22060060.atklimit)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22060060,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,22060060)
e3:SetTarget(c22060060.settg)
e3:SetOperation(c22060060.setop)
c:RegisterEffect(e3)
--activate trap
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,22060061)
e4:SetOperation(c22060060.operation)
c:RegisterEffect(e4)
end
function c22060060.atklimit(e,c)
return c~=e:GetHandler()
end
function c22060060.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c22060060.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22060060.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c22060060.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c22060060.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c22060060.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
end
function c22060060.setfilter(c)
return c:IsSetCard(0xff3) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c22060060.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c22060060.setfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c22060060.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,c22060060.setfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function c22060060.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SSet(tp,tc)
end
end
function c22060060.operation(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_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetTargetRange(LOCATION_SZONE,0)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
--希洛克的飓风
function c22060070.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22060070,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c22060070.target)
e1:SetOperation(c22060070.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22060070,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,22060070)
e2:SetCondition(c22060070.spcon)
e2:SetTarget(c22060070.sptg)
e2:SetOperation(c22060070.spop)
c:RegisterEffect(e2)
end
function c22060070.tdfilter(c)
return c:IsFacedown() and c:IsAbleToDeck()
end
function c22060070.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c22060070.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22060070.tdfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c22060070.tdfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c22060070.activate(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
function c22060070.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0xff3) and rp==tp
end
function c22060070.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(22060070)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22060070,0xff3,0x11,1000,1000,3,RACE_FAIRY,ATTRIBUTE_DARK) end
c:RegisterFlagEffect(22060070,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c22060070.spop(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,22060070,0xff3,0x11,1000,1000,3,RACE_FAIRY,ATTRIBUTE_DARK) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
end
\ No newline at end of file
--希洛克·狂风
function c22060080.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--tg
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22060080,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,22060080)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c22060080.condition)
e2:SetTarget(c22060080.target)
e2:SetOperation(c22060080.operation)
c:RegisterEffect(e2)
--SpecialSummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22060080,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c22060080.spcon)
e4:SetTarget(c22060080.sptg)
e4:SetOperation(c22060080.spop)
c:RegisterEffect(e4)
end
function c22060080.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c22060080.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 g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c22060080.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c22060080.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_SZONE)
end
function c22060080.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(22060080)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22060080,0xff3,0x11,1000,1000,3,RACE_FAIRY,ATTRIBUTE_DARK) end
c:RegisterFlagEffect(22060080,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c22060080.spop(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,22060080,0xff3,0x11,1000,1000,3,RACE_FAIRY,ATTRIBUTE_DARK) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
end
\ No newline at end of file
--千变万花
function c22060090.initial_effect(c)
aux.AddCodeList(c,22060010)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22060090+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c22060090.target)
e1:SetOperation(c22060090.activate)
c:RegisterEffect(e1)
end
function c22060090.fcheck(tp,sg,fc)
if sg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then
return sg:IsExists(c22060090.filterchk,1,nil) end
return true
end
function c22060090.filterchk(c)
return c:IsCode(22060010) and c:IsOnField()
end
function c22060090.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
function c22060090.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c22060090.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xff3) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c22060090.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg=Duel.GetFusionMaterial(tp)
local mg2=Duel.GetMatchingGroup(c22060090.filter0,tp,LOCATION_DECK,0,nil)
if mg:IsExists(c22060090.filterchk,1,nil) and mg2:GetCount()>0 then
mg:Merge(mg2)
aux.FCheckAdditional=c22060090.fcheck
end
local res=Duel.IsExistingMatchingCard(c22060090.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf)
aux.FCheckAdditional=nil
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c22060090.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
end
function c22060090.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c22060090.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c22060090.filter0,tp,LOCATION_DECK,0,nil)
if mg1:IsExists(c22060090.filterchk,1,nil) and mg2:GetCount()>0 then
mg1:Merge(mg2)
aux.FCheckAdditional=c22060090.fcheck
end
local sg1=Duel.GetMatchingGroup(c22060090.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
aux.FCheckAdditional=nil
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c22060090.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
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 not tc then return end
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
aux.FCheckAdditional=c22060090.fcheck
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
aux.FCheckAdditional=nil
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
--希洛克的武斗者
function c22060100.initial_effect(c)
--gain
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_EVENT_PLAYER)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetCountLimit(1,22060100)
e1:SetCondition(c22060100.mtcon)
e1:SetOperation(c22060100.mtop)
c:RegisterEffect(e1)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22060100,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,22060101)
e3:SetTarget(c22060100.thtg)
e3:SetOperation(c22060100.thop)
c:RegisterEffect(e3)
end
function c22060100.mtcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_FUSION and eg:IsExists(Card.IsSetCard,1,nil,0xff3)
end
function c22060100.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=eg:Filter(Card.IsSetCard,nil,0xff3)
local rc=g:GetFirst()
if not rc then return end
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22060100,1))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCountLimit(1)
e1:SetCost(c22060100.atkcost)
e1:SetOperation(c22060100.atkop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetValue(TYPE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e3,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(22060100,0))
end
function c22060100.cfilter(c)
return c:IsSetCard(0xff3) and c:GetBaseAttack()>0 and c:IsAbleToGraveAsCost()
end
function c22060100.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22060100.cfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c22060100.cfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
e:SetLabel(g:GetFirst():GetBaseAttack())
end
function c22060100.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function c22060100.thfilter(c)
return c:IsSetCard(0xff3) and c:IsType(TYPE_MONSTER) and not c:IsCode(22060100) and c:IsAbleToHand()
end
function c22060100.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22060100.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22060100.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22060100.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 c22060110.initial_effect(c)
--gain
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_EVENT_PLAYER)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetCountLimit(1,22060110)
e1:SetCondition(c22060110.mtcon)
e1:SetOperation(c22060110.mtop)
c:RegisterEffect(e1)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22060110,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,22060111)
e3:SetTarget(c22060110.thtg)
e3:SetOperation(c22060110.thop)
c:RegisterEffect(e3)
end
function c22060110.mtcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_FUSION and eg:IsExists(Card.IsSetCard,1,nil,0xff3)
end
function c22060110.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=eg:Filter(Card.IsSetCard,nil,0xff3)
local rc=g:GetFirst()
if not rc then return end
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22060110,1))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCountLimit(1)
e1:SetTarget(c22060110.target)
e1:SetOperation(c22060110.operation)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetValue(TYPE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e3,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(22060110,0))
end
function c22060110.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.disfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c22060110.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)
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)
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)
tc:RegisterEffect(e3)
end
end
end
function c22060110.thfilter(c)
return c:IsSetCard(0xff3) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c22060110.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22060110.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22060110.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22060110.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 c22060120.initial_effect(c)
--battle indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
--attack twice
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
e2:SetValue(4)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22060120,0))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetOperation(c22060120.atkop)
c:RegisterEffect(e3)
end
function c22060120.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--希洛克的狂战士
function c22060130.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xff3),2,true)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22060130,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c22060130.thcon)
e1:SetTarget(c22060130.thtg)
e1:SetOperation(c22060130.thop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22060130,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e2:SetCode(EVENT_CHAINING)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCountLimit(1,22060130)
e2:SetCondition(c22060130.negcon)
e2:SetCost(c22060130.negcost)
e2:SetTarget(c22060130.negtg)
e2:SetOperation(c22060130.negop)
c:RegisterEffect(e2)
end
function c22060130.matfilter(c)
return c:IsSetCard(0xff3) and c:IsType(TYPE_MONSTER)
end
function c22060130.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c22060130.thfilter(c)
return c:IsSetCard(0xff3) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c22060130.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22060130.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22060130.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22060130.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 c22060130.negcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function c22060130.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c22060130.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function c22060130.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
--希洛克的狂暗杀者
function c22060140.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xff3),2,true)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22060140,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c22060140.thcon)
e1:SetTarget(c22060140.thtg)
e1:SetOperation(c22060140.thop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22060140,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e2:SetCode(EVENT_CHAINING)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCountLimit(1,22060140)
e2:SetCondition(c22060140.negcon)
e2:SetCost(c22060140.negcost)
e2:SetTarget(c22060140.negtg)
e2:SetOperation(c22060140.negop)
c:RegisterEffect(e2)
end
function c22060140.matfilter(c)
return c:IsSetCard(0xff3) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c22060140.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c22060140.thfilter(c)
return c:IsLevel(5) and c:IsRace(RACE_WARRIOR) and c:IsAbleToHand()
end
function c22060140.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22060140.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22060140.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22060140.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 c22060140.negcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function c22060140.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c22060140.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function c22060140.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
--希洛克·魅魔
function c22060150.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22060150,0))
e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c22060150.target)
e1:SetOperation(c22060150.operation)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(c22060150.descon)
e2:SetOperation(c22060150.desop)
c:RegisterEffect(e2)
--control
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_TARGET)
e3:SetCode(EFFECT_SET_CONTROL)
e3:SetRange(LOCATION_SZONE)
e3:SetValue(c22060150.ctval)
c:RegisterEffect(e3)
--SpecialSummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22060150,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c22060150.spcon)
e4:SetTarget(c22060150.sptg)
e4:SetOperation(c22060150.spop)
c:RegisterEffect(e4)
end
function c22060150.filter(c,e,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsType(TYPE_LINK) and c:IsCanBeEffectTarget(e) and c:IsControlerCanBeChanged()
end
function c22060150.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c22060150.filter(chkc,e,1-tp) end
if chk==0 then return eg:IsExists(c22060150.filter,1,nil,e,1-tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=eg:FilterSelect(tp,c22060150.filter,1,1,nil,e,1-tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c22060150.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
c:SetCardTarget(tc)
--redirect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetCondition(c22060150.dircon)
e2:SetValue(LOCATION_REMOVED)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
function c22060150.ctval(e,c)
return e:GetHandlerPlayer()
end
function c22060150.dircon(e)
return e:GetHandler():IsReason(REASON_DESTROY)
end
function c22060150.dircon(e)
return e:GetHandler():IsReason(REASON_DESTROY)
end
function c22060150.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget()
return tc and eg:IsContains(tc)
end
function c22060150.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c22060150.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEDOWN) and c:IsPreviousLocation(LOCATION_SZONE)
end
function c22060150.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(22060150)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22060150,0xff3,0x11,1000,1000,3,RACE_FAIRY,ATTRIBUTE_DARK) end
c:RegisterFlagEffect(22060150,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c22060150.spop(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,22060150,0xff3,0x11,1000,1000,3,RACE_FAIRY,ATTRIBUTE_DARK) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
end
\ No newline at end of file
--希洛克·幽灵
function c22060160.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22060160,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c22060160.target)
e1:SetOperation(c22060160.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22060160,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,22060160)
e2:SetCondition(c22060160.spcon)
e2:SetTarget(c22060160.sptg)
e2:SetOperation(c22060160.spop)
c:RegisterEffect(e2)
end
function c22060160.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),PLAYER_ALL,LOCATION_GRAVE)
end
function c22060160.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
function c22060160.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0xff3) and rp==tp
end
function c22060160.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(22060160)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22060160,0xff3,0x11,1000,1000,3,RACE_FAIRY,ATTRIBUTE_DARK) end
c:RegisterFlagEffect(22060160,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c22060160.spop(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,22060160,0xff3,0x11,1000,1000,3,RACE_FAIRY,ATTRIBUTE_DARK) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
end
\ No newline at end of file
--被污染的天空之城
function c22060170.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:SetCountLimit(1,22060170+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c22060170.activate)
c:RegisterEffect(e1)
--token
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22060170,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetCondition(c22060170.tkcon)
e2:SetTarget(c22060170.sptg)
e2:SetOperation(c22060170.spop)
c:RegisterEffect(e2)
end
function c22060170.thfilter(c)
return c:IsCode(22060010) and c:IsAbleToHand()
end
function c22060170.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c22060170.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(22060170,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)
end
end
function c22060170.cfilter2(c,tp)
return c:GetSummonPlayer()==tp and c:IsSetCard(0xff3) and c:IsFaceup() and c:IsType(TYPE_FUSION)
end
function c22060170.tkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c22060170.cfilter2,1,nil,tp)
end
function c22060170.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,22060171,0xff3,0x4011,1000,1000,3,RACE_FAIRY,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c22060170.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,22060171,0xff3,0x4011,1000,1000,3,RACE_FAIRY,ATTRIBUTE_DARK) then
local token1=Duel.CreateToken(tp,22060171)
Duel.SpecialSummonStep(token1,0,tp,tp,false,false,POS_FACEUP)
local token2=Duel.CreateToken(tp,22060171)
Duel.SpecialSummonStep(token2,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
--希洛克·梦魇
function c22060180.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22060180,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c22060180.target)
e1:SetOperation(c22060180.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22060180,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,22060180)
e2:SetCondition(c22060180.spcon)
e2:SetTarget(c22060180.sptg)
e2:SetOperation(c22060180.spop)
c:RegisterEffect(e2)
end
function c22060180.filter(c)
return c:IsSetCard(0xff3) and not c:IsCode(22060180) and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function c22060180.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22060180.filter,tp,LOCATION_DECK,0,1,nil) end
end
function c22060180.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c22060180.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()<=0 then return end
local tc=g:GetFirst()
if tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function c22060180.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0xff3) and rp==tp
end
function c22060180.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(22060180)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22060180,0xff3,0x11,1000,1000,3,RACE_FAIRY,ATTRIBUTE_DARK) end
c:RegisterFlagEffect(22060180,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c22060180.spop(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,22060180,0xff3,0x11,1000,1000,3,RACE_FAIRY,ATTRIBUTE_DARK) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
end
\ No newline at end of file
--希洛克·鬼压床
function c22060190.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--act limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetValue(c22060190.aclimit)
c:RegisterEffect(e2)
--self destroy
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EFFECT_SELF_DESTROY)
e3:SetCondition(c22060190.sdcon)
c:RegisterEffect(e3)
--SpecialSummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22060190,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,22060190)
e4:SetCondition(c22060190.spcon)
e4:SetTarget(c22060190.sptg)
e4:SetOperation(c22060190.spop)
c:RegisterEffect(e4)
end
function c22060190.aclimit(e,re,tp)
return re:GetActivateLocation()==LOCATION_MZONE and re:GetHandler():IsStatus(STATUS_SPSUMMON_TURN) and not re:GetHandler():IsType(TYPE_FUSION)
end
function c22060190.sdfilter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION)
end
function c22060190.sdcon(e)
return not Duel.IsExistingMatchingCard(c22060190.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c22060190.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_DECK+LOCATION_HAND)
end
function c22060190.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(22060190)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22060190,0xff3,0x11,1000,1000,3,RACE_FAIRY,ATTRIBUTE_DARK) end
c:RegisterFlagEffect(22060190,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c22060190.spop(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,22060190,0xff3,0x11,1000,1000,3,RACE_FAIRY,ATTRIBUTE_DARK) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
end
\ No newline at end of file
--希洛克的仲裁
function c22060200.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xff3),aux.FilterBoolFunction(Card.IsFusionType,TYPE_FUSION),true)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22060200,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,22060200)
e1:SetCondition(c22060200.remcon)
e1:SetTarget(c22060200.remtg)
e1:SetOperation(c22060200.remop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22060200,4))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,22060201)
e2:SetCondition(c22060200.tgcon)
e2:SetTarget(c22060200.tgtg)
e2:SetOperation(c22060200.tgop)
c:RegisterEffect(e2)
--fusion summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22060200,5))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,22060202)
e3:SetCondition(c22060200.sccon)
e3:SetTarget(c22060200.sctg)
e3:SetOperation(c22060200.scop)
c:RegisterEffect(e3)
end
function c22060200.remcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c22060200.remtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE)
end
function c22060200.remop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil)
local g3=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
local sg=Group.CreateGroup()
if g1:GetCount()>0 and ((g2:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(22060200,1))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg1=g1:Select(tp,1,1,nil)
Duel.HintSelection(sg1)
sg:Merge(sg1)
end
if g2:GetCount()>0 and ((sg:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(22060200,2))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg2=g2:Select(tp,1,1,nil)
Duel.HintSelection(sg2)
sg:Merge(sg2)
end
if g3:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,aux.Stringid(22060200,3))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg3=g3:RandomSelect(tp,1)
sg:Merge(sg3)
end
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
function c22060200.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c22060200.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c22060200.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c22060200.sccon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_FUSION)
end
function c22060200.filter(c,e,tp)
return c:IsSetCard(0xff3) and c:IsLevelBelow(6) and c:IsType(TYPE_FUSION)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c22060200.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
and Duel.IsExistingMatchingCard(c22060200.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22060200.scop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c22060200.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
end
end
--宇宙恶魔-宇宙之罗什
function c22060210.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c22060210.ffilter,3,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_MZONE,LOCATION_MZONE,Duel.SendtoGrave,REASON_COST)
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(c22060210.splimit)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(2000)
e2:SetCondition(c22060210.atkcon)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetCondition(c22060210.indcon)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e4)
--todeck
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(22060210,0))
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetCategory(CATEGORY_TODECK)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(c22060210.tdcon)
e5:SetTarget(c22060210.tdtg)
e5:SetOperation(c22060210.tdop)
c:RegisterEffect(e5)
--act limit
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetCode(EFFECT_CANNOT_ACTIVATE)
e6:SetCondition(c22060210.con)
e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(0,1)
e6:SetValue(c22060210.aclimit)
c:RegisterEffect(e6)
--disable
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetRange(LOCATION_MZONE)
e7:SetTargetRange(0,LOCATION_MZONE)
e7:SetCode(EFFECT_DISABLE)
e7:SetCondition(c22060210.discon)
c:RegisterEffect(e7)
--disable search
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetCode(EFFECT_CANNOT_TO_HAND)
e8:SetRange(LOCATION_MZONE)
e8:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e8:SetTargetRange(0,1)
e8:SetCondition(c22060210.cdcon)
e8:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_DECK))
c:RegisterEffect(e8)
end
function c22060210.ffilter(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0xff4) and (not sg or not sg:IsExists(Card.IsFusionAttribute,1,c,c:GetFusionAttribute()))
end
function c22060210.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c22060210.cfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)
end
function c22060210.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c22060210.cfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
end
function c22060210.cfilter1(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_MONSTER)
end
function c22060210.indcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c22060210.cfilter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
end
function c22060210.cfilter2(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)
end
function c22060210.tdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c22060210.cfilter2,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
end
function c22060210.filter2(c)
return c:IsAbleToDeck()
end
function c22060210.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22060210.filter2,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c22060210.filter2,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c22060210.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c22060210.filter2,tp,0,LOCATION_ONFIELD,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
function c22060210.cfilter3(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)
end
function c22060210.con(e)
local ph=Duel.GetCurrentPhase()
return Duel.IsExistingMatchingCard(c22060210.cfilter3,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c22060210.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c22060210.cfilter4(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)
end
function c22060210.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c22060210.cfilter4,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
end
function c22060210.cfilter5(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER)
end
function c22060210.cdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c22060210.cfilter5,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
end
\ No newline at end of file
--人类背叛者
function c22060220.initial_effect(c)
c:EnableReviveLimit()
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--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)
e1:SetCondition(c22060220.sprcon)
e1:SetOperation(c22060220.sprop)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c22060220.disable)
e2:SetCode(EFFECT_ADD_SETCODE)
e2:SetValue(0xff4)
c:RegisterEffect(e2)
end
function c22060220.sprfilter(c)
return c:IsSetCard(0xff4) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c22060220.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c22060220.sprfilter,tp,LOCATION_GRAVE,0,3,nil)
end
function c22060220.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c22060220.sprfilter,tp,LOCATION_GRAVE,0,3,3,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
\ No newline at end of file
--超时空恶魔-光之欧格里
function c22060230.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xff4),aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_LIGHT),true)
aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_MZONE,LOCATION_MZONE,Duel.SendtoGrave,REASON_COST)
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(c22060230.splimit)
c:RegisterEffect(e1)
--battle
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22060230,0))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c22060230.descon)
e4:SetTarget(c22060230.destg)
e4:SetOperation(c22060230.desop)
c:RegisterEffect(e4)
end
function c22060230.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c22060230.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c22060230.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c22060230.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT)
end
--超时空恶魔-暗之艾森
function c22060240.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xff4),aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_DARK),true)
aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_MZONE,LOCATION_MZONE,Duel.SendtoGrave,REASON_COST)
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e1:SetCondition(c22060240.indcon)
e2:SetValue(aux.imval1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
--to defense
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22060240,0))
e4:SetCategory(CATEGORY_POSITION)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_DAMAGE_STEP_END)
e4:SetCondition(c22060240.condition)
e4:SetTarget(c22060240.potg)
e4:SetOperation(c22060240.poop)
c:RegisterEffect(e4)
end
function c22060240.indcon(e)
return e:GetHandler():IsDefensePos()
end
function c22060240.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker()==e:GetHandler()
end
function c22060240.potg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsAttackPos() end
Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0)
end
function c22060240.poop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsAttackPos() and c:IsRelateToEffect(e) then
Duel.ChangePosition(c,POS_FACEUP_DEFENSE)
end
end
\ No newline at end of file
--超时空恶魔-重力之白斯
function c22060250.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xff4),aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_EARTH),true)
aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_MZONE,LOCATION_MZONE,Duel.SendtoGrave,REASON_COST)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c22060250.efilter)
c:RegisterEffect(e1)
end
function c22060250.efilter(e,te)
return te:IsActiveType(TYPE_MONSTER) and te:IsAttackBelow(3000) and te:GetOwner()~=e:GetOwner()
end
\ No newline at end of file
--超时空恶魔-量子之薛定谔
function c22060260.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c22060260.ffilter,2,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_MZONE,LOCATION_MZONE,Duel.SendtoGrave,REASON_COST)
--act limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c22060260.chainop)
c:RegisterEffect(e1)
--negate attack
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(22060260,0))
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EVENT_ATTACK_ANNOUNCE)
e6:SetCountLimit(1)
e6:SetCondition(c22060260.negcon)
e6:SetCost(c22060260.cost)
e6:SetOperation(c22060260.negop)
c:RegisterEffect(e6)
end
function c22060260.ffilter(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0xff4) and (not sg or not sg:IsExists(Card.IsFusionAttribute,1,c,c:GetFusionAttribute()))
end
function c22060260.flipop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(22060260,RESET_EVENT+RESETS_STANDARD,0,1)
end
function c22060260.chainop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetChainLimit(aux.FALSE)
end
function c22060260.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
if Duel.Remove(c,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
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:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(c22060260.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c22060260.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c22060260.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateAttack()
end
function c22060260.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
\ No newline at end of file
--超时空-狂热者
function c22060270.initial_effect(c)
--spsummon limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c22060270.sslimit)
c:RegisterEffect(e1)
end
function c22060270.sslimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION)
end
\ No newline at end of file
--超时空-常春藤魔
function c22060280.initial_effect(c)
--spsummon limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c22060280.sslimit)
c:RegisterEffect(e1)
end
function c22060280.sslimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION)
end
\ No newline at end of file
--闪光No.107 银河眼平行龙
function c22060310.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),9,3,c22060310.ovfilter,aux.Stringid(22060310,0))
c:EnableReviveLimit()
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e0:SetValue(1)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22060310,1))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_CHAINING)
e1:SetCost(c22060310.atkcost)
e1:SetCondition(c22060310.condition)
e1:SetOperation(c22060310.activate)
c:RegisterEffect(e1)
--disable attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22060310,2))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetCost(c22060310.atkcost)
e2:SetTarget(c22060310.damtg)
e2:SetOperation(c22060310.atkop)
c:RegisterEffect(e2)
end
c22060310.xyz_number=107
function c22060310.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x107b) and c:IsType(TYPE_XYZ) and c:IsRank(8)
end
function c22060310.atkcost(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 c22060310.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
and Duel.IsChainNegatable(ev)
end
function c22060310.activate(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e1:SetTarget(c22060310.distg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(c22060310.discon)
e2:SetOperation(c22060310.disop)
e2:SetLabel(rc:GetOriginalCode())
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c22060310.distg(e,c)
local code=e:GetLabel()
local code1,code2=c:GetOriginalCodeRule()
return code1==code or code2==code
end
function c22060310.discon(e,tp,eg,ep,ev,re,r,rp)
local code=e:GetLabel()
local code1,code2=re:GetHandler():GetOriginalCodeRule()
return (code1==code or code2==code)
end
function c22060310.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c22060310.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local atk=e:GetHandler():GetAttack()
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk)
end
function c22060310.atkop(e,tp,eg,ep,ev,re,r,rp)
local atk=e:GetHandler():GetAttack()
Duel.NegateAttack()
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
\ No newline at end of file
--迎风而行
function c22070090.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:SetCountLimit(1,22070090+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c22070090.spcost)
e1:SetTarget(c22070090.target)
e1:SetOperation(c22070090.activate)
c:RegisterEffect(e1)
end
function c22070090.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(22070090,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c22070090.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c22070090.filter(c)
return c:IsRace(RACE_CYBERSE) and c:IsAbleToHand()
end
function c22070090.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22070090.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22070090.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22070090.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
function c22070090.splimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_CYBERSE)
end
--星尘龙·星创
function c22070130.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--change name
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetCode(EFFECT_CHANGE_CODE)
e0:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e0:SetValue(44508094)
c:RegisterEffect(e0)
--disable spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22070130,0))
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_SPSUMMON)
e1:SetCondition(c22070130.condition)
e1:SetCost(c22070130.cost)
e1:SetTarget(c22070130.target)
e1:SetOperation(c22070130.operation)
c:RegisterEffect(e1)
end
function c22070130.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function c22070130.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,22070131,0xa3,0x4011,2500,2000,8,RACE_DRAGON,ATTRIBUTE_WIND) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c22070130.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,22070131,0xa3,0x4011,2500,2000,8,RACE_DRAGON,ATTRIBUTE_WIND) then return end
Duel.BreakEffect()
local token=Duel.CreateToken(tp,22070131)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
function c22070130.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
if Duel.Remove(c,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
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:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(c22070130.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c22070130.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
--赠礼者
function c22070140.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,1,1)
c:EnableReviveLimit()
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22070140,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c22070140.condition)
e1:SetTarget(c22070140.target)
e1:SetOperation(c22070140.operation)
c:RegisterEffect(e1)
end
function c22070140.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c22070140.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,2)
end
function c22070140.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--一站斩必杀刺客
function c22070150.initial_effect(c)
--win
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCondition(c22070150.wincon)
e1:SetOperation(c22070150.winop)
c:RegisterEffect(e1)
--self destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SELF_DESTROY)
e2:SetCondition(c22070150.sdcon)
c:RegisterEffect(e2)
end
function c22070150.wincon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return ep~=tp and Duel.GetAttackTarget()==nil and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)<4
end
function c22070150.winop(e,tp,eg,ep,ev,re,r,rp)
local WIN_REASON_FLYING_ELEPHANT=0xfe
Duel.Win(tp,WIN_REASON_FLYING_ELEPHANT)
end
function c22070150.sdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsAttack(c:GetBaseAttack())
end
\ No newline at end of file
--恋之虫
function c22070170.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsRace,RACE_INSECT),aux.FilterBoolFunction(Card.IsRace,RACE_PLANT),true)
--search
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c22070170.remcon)
e3:SetOperation(c22070170.regop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22070170,0))
e4:SetCategory(CATEGORY_RECOVER)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(c22070170.thcon)
e4:SetTarget(c22070170.target)
e4:SetOperation(c22070170.operation)
c:RegisterEffect(e4)
end
function c22070170.remcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c22070170.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(22070170,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c22070170.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(22070170)~=0
end
function c22070170.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,PLAYER_ALL,8000)
end
function c22070170.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,8000,REASON_EFFECT)
Duel.Recover(1-tp,8000,REASON_EFFECT)
end
--星尘龙·天才
function c22070190.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_SYNCHRO),aux.FilterBoolFunction(Card.IsCode,44508094),1,1)
c:EnableReviveLimit()
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22070190,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c22070190.discon)
e1:SetCost(c22070190.cost)
e1:SetTarget(c22070190.distg)
e1:SetOperation(c22070190.disop)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c22070190.eftg)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--chain attack
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22070190,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DAMAGE_STEP_END)
e3:SetCondition(c22070190.atcon)
e3:SetCost(c22070190.atcost)
e3:SetOperation(c22070190.atop)
c:RegisterEffect(e3)
end
function c22070190.eftg(e,c)
return c:IsType(TYPE_SYNCHRO) and c:IsFaceup()
end
function c22070190.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c22070190.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
if Duel.Remove(c,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
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:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(c22070190.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c22070190.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function c22070190.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22070131,0xa3,0x4011,2500,2000,8,RACE_DRAGON,ATTRIBUTE_WIND) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
end
end
function c22070190.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,22070131,0xa3,0x4011,2500,2000,8,RACE_DRAGON,ATTRIBUTE_WIND) then return end
Duel.BreakEffect()
local token=Duel.CreateToken(tp,22070131)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
end
function c22070190.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetAttacker()==c and c:IsChainAttackable(0)
end
function c22070190.costfilter(c)
return c:IsCode(22070131) and :IsFaceup()
end
function c22070190.atcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c22070190.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c22070190.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c22070190.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack()
end
\ No newline at end of file
--智慧的引导
function c22070200.initial_effect(c)
c:EnableReviveLimit()
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c22070200.spcon)
e2:SetOperation(c22070200.spop)
c:RegisterEffect(e2)
--coin
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22070200,0))
e3:SetCategory(CATEGORY_COIN+CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(c22070200.cost)
e3:SetCountLimit(1)
e3:SetTarget(c22070200.damtg)
e3:SetOperation(c22070200.damop)
c:RegisterEffect(e3)
end
c22070200.toss_coin=true
function c22070200.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
local g=Duel.GetDecktopGroup(tp,18)
return g:GetCount()>=18 and (ft>0 or g:IsExists(Card.IsLocation,ct,nil,LOCATION_MZONE))
end
function c22070200.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
local g=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_DECK,0,c,POS_FACEDOWN)
local rg=nil
if ft<=0 then
rg=g:FilterSelect(tp,Card.IsLocation,ct,ct,nil,LOCATION_MZONE)
if ct<18 then
g:Sub(rg)
rg:Merge(g1)
end
else
rg=Duel.GetDecktopGroup(tp,18)
end
Duel.Remove(rg,POS_FACEDOWN,REASON_COST)
end
function c22070200.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SelectOption(tp,aux.Stringid(22070200,0))
Duel.SelectOption(1-tp,aux.Stringid(22070200,0))
end
function c22070200.filter(c)
return c:IsAbleToHand()
end
function c22070200.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22070200.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
end
function c22070200.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local coin=Duel.TossCoin(tp,1)
if coin==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22070200.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SelectOption(tp,aux.Stringid(22070200,1))
Duel.SelectOption(1-tp,aux.Stringid(22070200,1))
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
else
Duel.SelectOption(tp,aux.Stringid(22070200,2))
Duel.SelectOption(1-tp,aux.Stringid(22070200,2))
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
--鬼牌
function c22070210.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_SUMMON+TIMING_SPSUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c22070210.target)
e1:SetOperation(c22070210.activate)
c:RegisterEffect(e1)
end
function c22070210.filter(c)
return c:IsType(TYPE_MONSTER)
end
function c22070210.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c22070210.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c22070210.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c22070210.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c22070210.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--威光空间
function c22070230.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
c:RegisterEffect(e1)
--act limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetValue(c22070230.aclimit)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22070230,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetCondition(c22070230.descon)
e3:SetTarget(c22070230.destg)
e3:SetOperation(c22070230.desop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
end
function c22070230.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
function c22070230.cfilter(c,tp)
return c:IsFaceup() and c:GetSummonPlayer()==tp
end
function c22070230.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c22070230.cfilter,1,nil,tp)
end
function c22070230.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c22070230.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Destroy(c,REASON_EFFECT)
end
end
--古神 克苏鲁
function c22070290.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22070290,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c22070290.condition)
e1:SetTarget(c22070290.target)
e1:SetOperation(c22070290.operation)
c:RegisterEffect(e1)
--activate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22070290,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c22070290.cost)
e2:SetTarget(c22070290.target1)
e2:SetOperation(c22070290.operation1)
c:RegisterEffect(e2)
end
function c22070290.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonLocation()==LOCATION_GRAVE
end
function c22070290.filter(c)
return c:IsDisabled() and c:IsControlerCanBeChanged()
end
function c22070290.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c22070290.filter(chkc) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE,1-tp,LOCATION_REASON_CONTROL)
if chk==0 then return ft>0 and Duel.IsExistingTarget(c22070290.filter,tp,0,LOCATION_MZONE,1,nil) end
local ct=math.min(ft,3)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c22070290.filter,tp,0,LOCATION_MZONE,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,#g,0,0)
end
function c22070290.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.GetControl(tg,tp,PHASE_END,1)
end
function c22070290.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c22070290.filter0(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c22070290.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c22070290.filter0(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22070290.filter0,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c22070290.filter0,tp,0,LOCATION_MZONE,1,1,nil)
end
function c22070290.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
Duel.AdjustInstantly(tc)
end
end
\ No newline at end of file
--外神 尤格
function c22070310.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,4,2,nil,nil,5)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c22070310.atkval)
c:RegisterEffect(e1)
--turn skip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22070310,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c22070310.skipcost)
e2:SetTarget(c22070310.skiptg)
e2:SetOperation(c22070310.skipop)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22070310,0))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetCategory(CATEGORY_TODECK)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(c22070310.skipcost)
e4:SetTarget(c22070310.tdtg3)
e4:SetOperation(c22070310.tdop3)
c:RegisterEffect(e4)
end
function c22070310.atkval(e,c)
return c:GetOverlayCount()*1000
end
function c22070310.skipcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,5,REASON_COST) end
c:RemoveOverlayCard(tp,5,5,REASON_COST)
end
function c22070310.skiptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_SKIP_TURN) end
end
function c22070310.skipop(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)
e1:SetCondition(c22070310.skipcon)
Duel.RegisterEffect(e1,tp)
end
function c22070310.skipcon(e)
return Duel.GetTurnPlayer()~=e:GetHandlerPlayer()
end
function c22070310.tdtg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND+LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND+LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c22070310.tdop3(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND+LOCATION_ONFIELD,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
\ No newline at end of file
--外神 尼古拉丝
function c22070320.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,4,2,nil,nil,5)
--token
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22070320,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c22070320.spcost)
e1:SetTarget(c22070320.sptg)
e1:SetOperation(c22070320.spop)
c:RegisterEffect(e1)
end
function c22070320.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c22070320.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22070321,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c22070320.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,22070321,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) then return end
local token=Duel.CreateToken(tp,22070321)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
--影灵衣的神之影
function c22070330.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x9d),aux.FilterBoolFunction(Card.IsType,TYPE_RITUAL),true)
--cannot spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetRange(LOCATION_EXTRA)
e1:SetValue(c22070330.splimit)
c:RegisterEffect(e1)
--ritula
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22070330,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,22070330)
e2:SetTarget(c22070330.sptg)
e2:SetOperation(c22070330.spop)
c:RegisterEffect(e2)
--ritual level
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_RITUAL_LEVEL)
e3:SetValue(c22070330.rlevel)
c:RegisterEffect(e3)
--to hand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(22070330,1))
e5:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,22070331)
e5:SetTarget(c22070330.thtg)
e5:SetOperation(c22070330.thop)
c:RegisterEffect(e5)
end
function c22070330.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c22070330.spfilter(c,e,tp,lp)
return bit.band(c:GetType(),0x81)==0x81 and c:IsSetCard(0xb4)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false)
end
function c22070330.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c22070330.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c22070330.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c22070330.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
tc:SetMaterial(nil)
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
function c22070330.rlevel(e,c)
local lv=e:GetHandler():GetLevel()
if c:IsSetCard(0xb4) then
local clv=c:GetLevel()
return lv*65536+clv
else return lv end
end
function c22070330.filter1(c)
return bit.band(c:GetType(),0x82)==0x82 and c:IsSetCard(0xb4) and c:IsAbleToHand()
end
function c22070330.filter2(c)
return bit.band(c:GetType(),0x81)==0x81 and c:IsSetCard(0xb4) and c:IsAbleToHand()
end
function c22070330.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22070330.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22070330.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22070330.filter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c22070330.filter2),tp,LOCATION_GRAVE,0,nil)
if mg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(22070330,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=mg:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
--圣影依-神数法神
function c22070340.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcMix(c,false,true,c22070340.fusfilter1,c22070340.fusfilter2)
aux.EnablePendulumAttribute(c,false)
--pendulm
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22070340,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,22070340)
e1:SetCondition(c22070340.pspcon)
e1:SetOperation(c22070340.pspop)
c:RegisterEffect(e1)
--fusion
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22070340,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,22070340)
e2:SetCondition(c22070340.fspcon)
e2:SetTarget(c22070340.fsptg)
e2:SetOperation(c22070340.fspop)
c:RegisterEffect(e2)
--cannot spsummon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
e3:SetRange(LOCATION_EXTRA)
e3:SetValue(c22070340.splimit)
c:RegisterEffect(e3)
--summon success
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCondition(c22070340.sumcon)
e4:SetOperation(c22070340.sumsuc)
c:RegisterEffect(e4)
--fusion
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(22070340,2))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,22070341)
e5:SetTarget(c22070340.fsptg1)
e5:SetOperation(c22070340.fspop1)
c:RegisterEffect(e5)
--pendulum
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(22070340,3))
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_DESTROYED)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCondition(c22070340.pencon)
e6:SetTarget(c22070340.pentg)
e6:SetOperation(c22070340.penop)
c:RegisterEffect(e6)
end
function c22070340.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c22070340.fusfilter1(c)
return c:IsSetCard(0x9d) and c:IsFusionType(TYPE_FUSION)
end
function c22070340.fusfilter2(c)
return c:IsFusionType(TYPE_PENDULUM)
end
function c22070340.cfilter(c)
return c:IsSetCard(0xc4)
end
function c22070340.pspcon(e,tp,eg,ep,ev,re,r,rp)
if not PENDULUM_CHECKLIST then
PENDULUM_CHECKLIST=0
local ge1=Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge1:SetOperation(Auxiliary.PendulumReset)
Duel.RegisterEffect(ge1,0)
end
local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_EXTRA_PENDULUM_SUMMON)}
local lscale=1
local rscale=7
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
if loc==0 then return false end
local g=nil
if og then
g=og:Filter(Card.IsLocation,nil,loc)
else
g=Duel.GetFieldGroup(tp,loc,0)
end
return g:IsExists(aux.PConditionFilter,1,nil,e,tp,lscale,rscale,eset) and Duel.IsExistingMatchingCard(c22070340.cfilter,tp,LOCATION_PZONE,0,1,e:GetHandler())
end
function c22070340.pspop(e,tp,eg,ep,ev,re,r,rp,sg,og)
if not PENDULUM_CHECKLIST then
PENDULUM_CHECKLIST=0
local ge1=Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge1:SetOperation(Auxiliary.PendulumReset)
Duel.RegisterEffect(ge1,0)
end
local lscale=1
local rscale=7
local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_EXTRA_PENDULUM_SUMMON)}
local tg=nil
local loc=0
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCountFromEx(tp)
local ft=Duel.GetUsableMZoneCount(tp)
local ect=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]
if ect and ect<ft2 then ft2=ect end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then
if ft1>0 then ft1=1 end
if ft2>0 then ft2=1 end
ft=1
end
if ft1>0 then loc=loc|LOCATION_HAND end
if ft2>0 then loc=loc|LOCATION_EXTRA end
if og then
tg=og:Filter(Card.IsLocation,nil,loc):Filter(aux.PConditionFilter,nil,e,tp,lscale,rscale,eset)
else
tg=Duel.GetMatchingGroup(aux.PConditionFilter,tp,loc,0,nil,e,tp,lscale,rscale,eset)
end
local ce=nil
local b1=PENDULUM_CHECKLIST&(0x1<<tp)==0
local b2=#eset>0
if b1 and b2 then
local options={1163}
for _,te in ipairs(eset) do
table.insert(options,te:GetDescription())
end
local op=Duel.SelectOption(tp,table.unpack(options))
if op>0 then
ce=eset[op]
end
elseif b2 and not b1 then
local options={}
for _,te in ipairs(eset) do
table.insert(options,te:GetDescription())
end
local op=Duel.SelectOption(tp,table.unpack(options))
ce=eset[op+1]
end
if ce then
tg=tg:Filter(aux.PConditionExtraFilterSpecific,nil,e,tp,lscale,rscale,ce)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg:SelectSubGroup(tp,aux.PendOperationCheck,false,1,#tg,ft1,ft2,ft)
if not g then return end
if ce then
Duel.Hint(HINT_CARD,0,ce:GetOwner():GetOriginalCode())
ce:Reset()
end
Duel.HintSelection(Group.FromCards(lpz))
Duel.HintSelection(Group.FromCards(rpz))
for tc in aux.Next(g) do
local bool=aux.PendulumSummonableBool(tc)
Duel.SpecialSummonStep(tc,SUMMON_TYPE_PENDULUM,tp,tp,bool,bool,POS_FACEUP)
end
Duel.SpecialSummonComplete()
for tc in aux.Next(g) do tc:CompleteProcedure() end
end
function c22070340.fspcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xc4)
end
function c22070340.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c22070340.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x9d) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c22070340.fsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(c22070340.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c22070340.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22070340.fspop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c22070340.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c22070340.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c22070340.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c22070340.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c22070340.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(0,1)
e1:SetTarget(c22070340.sumlimit)
Duel.RegisterEffect(e1,tp)
end
function c22070340.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function c22070340.ffilter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
function c22070340.ffilter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c22070340.ffilter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x9d) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c22070340.fsptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
if Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,2,nil,0xc4) then
local mg2=Duel.GetMatchingGroup(c22070340.ffilter0,tp,LOCATION_EXTRA,0,nil)
mg1:Merge(mg2)
end
local res=Duel.IsExistingMatchingCard(c22070340.ffilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c22070340.ffilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22070340.fspop1(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c22070340.ffilter1,nil,e)
if Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,2,nil,0xc4) then
local mg2=Duel.GetMatchingGroup(c22070340.ffilter0,tp,LOCATION_EXTRA,0,nil)
mg1:Merge(mg2)
end
local sg1=Duel.GetMatchingGroup(c22070340.ffilter2,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(c22070340.ffilter2,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
end
function c22070340.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c22070340.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c22070340.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--神影依·乌洛波罗斯
function c22070370.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c22070370.ffilter,3,true)
--cannot spsummon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetRange(LOCATION_EXTRA)
e0:SetValue(c22070370.splimit)
c:RegisterEffect(e0)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22070370,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,22070370)
e1:SetCondition(c22070370.remcon)
e1:SetTarget(c22070370.remtg)
e1:SetOperation(c22070370.remop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(1)
c:RegisterEffect(e2)
--to hand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(22070370,4))
e5:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_HANDES)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,22070371)
e5:SetTarget(c22070370.thtg)
e5:SetOperation(c22070370.thop)
c:RegisterEffect(e5)
end
function c22070370.ffilter(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0x9d) and (not sg or not sg:IsExists(Card.IsFusionAttribute,1,c,c:GetFusionAttribute()))
end
function c22070370.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c22070370.remcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c22070370.remtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE)
end
function c22070370.remop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil)
local g3=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
local sg=Group.CreateGroup()
if g1:GetCount()>0 and ((g2:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(22070370,1))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg1=g1:Select(tp,1,1,nil)
Duel.HintSelection(sg1)
sg:Merge(sg1)
end
if g2:GetCount()>0 and ((sg:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(22070370,2))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg2=g2:Select(tp,1,1,nil)
Duel.HintSelection(sg2)
sg:Merge(sg2)
end
if g3:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,aux.Stringid(22070370,3))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg3=g3:RandomSelect(tp,1)
sg:Merge(sg3)
end
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
function c22070370.thfilter(c)
return c:IsSetCard(0x9d) and c:IsAbleToHand()
end
function c22070370.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22070370.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,tp,1)
end
function c22070370.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c22070370.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
if g:GetFirst():IsLocation(LOCATION_HAND) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 then
Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD,nil)
end
end
end
\ No newline at end of file
--千篇万花
function c33710901.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33710901,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c33710901.target)
e1:SetOperation(c33710901.activate)
c:RegisterEffect(e1)
--forbidden
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0x7f,0x7f)
e2:SetTarget(c33710901.bantg)
e2:SetValue(c33710901.cval)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(33710901,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1)
e3:SetCondition(c33710901.spcon)
e3:SetTarget(c33710901.sptg)
e3:SetOperation(c33710901.spop)
e3:SetLabelObject(e1)
c:RegisterEffect(e3)
--EFFECT GAIN
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_ADJUST)
e5:SetRange(LOCATION_SZONE)
e5:SetLabelObject(e1)
e5:SetOperation(c33710901.op)
c:RegisterEffect(e5)
--
end
function c33710901.eftg(e,c)
local code=e:GetLabelObject():GetLabelObject():GetLabel()
return c:IsType(TYPE_MONSTER) and c:GetOriginalCode()==code
end
function c33710901.acfilter(c,code,mc)
return c:GetTextAttack()==mc:GetTextAttack() and c:GetTextDefense()==mc:GetTextDefense() and c:GetOriginalCode()~=code and c:IsAbleToRemove() and c:IsType(TYPE_MONSTER) and c:GetLevel()==mc:GetLevel() and c:GetAttribute()==mc:GetAttribute() and c:GetRace()==mc:GetRace()
end
function c33710901.acfilter1(c,code,mc)
if c:GetTextAttack()==mc:GetTextAttack() and c:GetTextDefense()==mc:GetTextDefense() and c:GetOriginalCode()~=code and c:IsAbleToRemove() and c:IsType(TYPE_MONSTER)and c:GetLevel()==mc:GetLevel() and c:GetAttribute()==mc:GetAttribute() and c:GetRace()==mc:GetRace()
then c:RegisterFlagEffect(code+16100000000,RESET_CHAIN,0,0) return true
else return false
end
end
function c33710901.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
local flag=0
local ag=Group.CreateGroup()
local codes={}
for c in aux.Next(g) do
local code=c:GetCode()
if not ag:IsExists(Card.IsCode,1,nil,code) and g:IsExists(c33710901.acfilter,1,nil,code,c) and c:IsType(TYPE_MONSTER) then
ag:AddCard(c)
table.insert(codes,code)
flag=1
end
end
if chk==0 then return flag==1 end
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
local flag=0
local ag=Group.CreateGroup()
local codes1={}
for c in aux.Next(g) do
local code=c:GetCode()
if not ag:IsExists(Card.IsCode,1,nil,code) then
local sg=Duel.GetMatchingGroup(c33710901.acfilter1,tp,LOCATION_DECK,0,nil,code,c)
if sg:GetCount()>0 and c:IsType(TYPE_MONSTER) then
ag:AddCard(c)
table.insert(codes1,code)
flag=1
end
end
end
table.sort(codes1)
--c:IsCode(codes[1])
local afilter={codes1[1],OPCODE_ISCODE}
if #codes1>1 then
--or ... or c:IsCode(codes[i])
for i=2,#codes1 do
table.insert(afilter,codes1[i])
table.insert(afilter,OPCODE_ISCODE)
table.insert(afilter,OPCODE_OR)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac=Duel.AnnounceCard(tp,table.unpack(afilter))
getmetatable(e:GetHandler()).announce_filter={TYPE_SPELL+TYPE_TRAP,OPCODE_ISTYPE,OPCODE_NOT}
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c33710901.filter(c,code)
return c:IsAbleToRemove() and c:GetFlagEffect(code+16100000000)~=0 and c:GetCode()~=code
end
function c33710901.copyfilter(c,code)
return c:GetOriginalCode()==code
end
function c33710901.copyfilter22(c,code)
return c:GetFlagEffect(33710901)~=0
end
function c33710901.activate(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(tp,c33710901.filter,tp,LOCATION_DECK,0,1,1,nil,ac):GetFirst()
if tc and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then
e:SetLabel(ac)
e:SetLabelObject(tc)
e:GetHandler():RegisterFlagEffect(16133710901,RESET_EVENT+RESETS_STANDARD,0,0)
local g=Duel.GetMatchingGroup(c33710901.copyfilter,tp,0x7f,0x7f,nil,ac)
for gc in aux.Next(g) do
tc:RegisterFlagEffect(33710901,RESET_EVENT+EVENT_CUSTOM+33710901,0,0)
local cid=tc:CopyEffect(tc:GetOriginalCode(),0)
local e0=Effect.CreateEffect(tc)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_ADJUST)
e0:SetLabel(cid)
e0:SetLabelObject(e:GetHandler())
e0:SetOperation(c33710901.resetop)
Duel.RegisterEffect(e0,tp)
end
end
end
function c33710901.resetop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject():GetFlagEffect(16133710901)==0 then
local c=e:GetOwner()
local cid=e:GetLabel()
if cid~=0 then
c:ResetEffect(cid,RESET_COPY)
c:ResetEffect(RESET_DISABLE,RESET_EVENT)
c:ResetFlagEffect(33710901)
end
e:Reset()
end
end
function c33710901.resetop1(e,tp,eg,ep,ev,re,r,rp)
Debug.Message(1)
end
function c33710901.bantg(e,c)
local code1,code2=c:GetOriginalCodeRule()
local fcode=e:GetLabelObject():GetLabel()
return (code1==fcode or code2==fcode) and (not c:IsOnField() or c:GetRealFieldID()>e:GetFieldID())
end
function c33710901.cval(e)
return e:GetLabelObject():GetLabelObject():GetOriginalCode()
end
function c33710901.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousControler()==tp
end
function c33710901.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c33710901.spop(e,tp,eg,ep,ev,re,r,rp)
local fc=e:GetLabelObject():GetLabelObject()
if not fc then return end
local code=fc:GetCode()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,1)
e1:SetLabel(code)
e1:SetValue(c33710901.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c33710901.actlimit(e,te,tp)
return te:GetHandler():GetCode()==e:GetLabel()
end
function c33710901.copyfilter1(c,code)
return c:GetOriginalCode()==code and c:GetFlagEffect(33710901)==0
end
function c33710901.op(e,tp,eg,ep,ev,re,r,rp)
local code=e:GetLabelObject():GetLabel()
local ac=e:GetLabelObject():GetLabelObject():GetOriginalCode()
local g=Duel.GetMatchingGroup(c33710901.copyfilter1,tp,0x7f,0x7f,nil,code)
for tc in aux.Next(g) do
tc:RegisterFlagEffect(33710901,RESET_EVENT+EVENT_CUSTOM+33710901,0,0)
local cid=tc:CopyEffect(ac,0)
local e0=Effect.CreateEffect(tc)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_ADJUST)
e0:SetLabel(cid)
e0:SetLabelObject(e:GetHandler())
e0:SetOperation(c33710901.resetop)
Duel.RegisterEffect(e0,tp)
end
end
\ No newline at end of file
--虚拟主播 有栖Mana SP
function c33710902.initial_effect(c)
c:EnableReviveLimit()
--Actto
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33710902,0))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE+CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c33710902.tgtg)
e2:SetOperation(c33710902.tgop)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(c33710902.valcheck)
e1:SetLabelObject(e2)
c:RegisterEffect(e1)
end
function c33710902.tgfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SPELL) and (c:IsAbleToGrave() or c:IsAbleToRemove())
end
function c33710902.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33710902.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) or (e:GetLabel()==1 and Duel.IsExistingMatchingCard(c33710902.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,LOCATION_DECK,1,nil)) end
if e:GetLabel()==0 then
local sg=Duel.SelectMatchingCard(tp,c33710902.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SetTargetCard(sg)
end
if e:GetLabel()==1 then
local g=Duel.GetFieldGroup(tp,0,LOCATION_DECK)
Duel.ConfirmCards(tp,g)
local sg=Duel.SelectMatchingCard(tp,c33710902.tgfilter,tp,LOCATION_DECK,LOCATION_DECK,1,1,nil)
Duel.SetTargetCard(sg)
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,1,tp,2100)
end
function c33710902.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if g:GetCount()>0 then
local tc=g:GetFirst()
if tc and tc:IsAbleToGrave() and (not tc:IsAbleToRemove() or Duel.SelectOption(tp,1191,1192)==0) then
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 then
Duel.Recover(tp,2100,REASON_EFFECT)
end
else
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then
Duel.Recover(tp,2100,REASON_EFFECT)
end
end
end
local tg=Duel.GetOperatedGroup()
if tg:GetCount()~=0 and tg:GetFirst():IsCode(33701330) then
Duel.SetLP(tp,Duel.GetLP(tp)*2)
end
end
function c33710902.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsSetCard,1,nil,0x344c) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
\ No newline at end of file
--天之理
function c33710903.initial_effect(c)
--re
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33710903,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c33710903.target)
e1:SetOperation(c33710903.operation)
c:RegisterEffect(e1)
if not c33710903.global_check then
c33710903.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(c33710903.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c33710903.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if tc then
Duel.RegisterFlagEffect(re:GetHandler():GetControler(),16133710903+Duel.GetTurnCount(),RESET_PHASE+PHASE_END,0,2)
end
end
function c33710903.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
end
function c33710903.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetCode(EFFECT_CANNOT_ACTIVATE)
e0:SetTargetRange(1,0)
e0:SetValue(c33710903.actlimit)
Duel.RegisterEffect(e0,tp)
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local c=e:GetHandler()
if g:GetCount()>0 then
g:GetFirst():ReverseInDeck()
local tc=g:GetFirst()
local e1=Effect.CreateEffect(tc)
e1:SetDescription(aux.Stringid(33710903,1))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_HAND)
e1:SetTarget(c33710903.sptg)
e1:SetOperation(c33710903.spop)
e1:SetReset(RESET_EVENT+0x1de0000)
tc:RegisterEffect(e1)
end
end
function c33710903.actlimit(e,te,tp)
local g=Duel.GetDecktopGroup(tp,1)
if not g then return false end
return Duel.GetTurnPlayer()~=tp
and g:GetFirst():IsFaceup()
end
function c33710903.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,Duel.GetFlagEffect(1-tp,16133710903+Duel.GetTurnCount()-1)*500)
end
function c33710903.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Damage(1-tp,Duel.GetFlagEffect(1-tp,16133710903+Duel.GetTurnCount()-1)*500,REASON_EFFECT)
end
end
\ No newline at end of file
--将死亡唱成一首歌
function c33710904.initial_effect(c)
--to remove
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c33710904.tgtg)
e1:SetOperation(c33710904.tgop)
c:RegisterEffect(e1)
end
function c33710904.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(1-tp,LOCATION_MZONE,0)
if chk==0 then return Duel.IsPlayerCanRemove(1-tp)
and g:IsExists(Card.IsAbleToRemove,1,nil,1-tp,POS_FACEUP,REASON_RULE) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_MZONE)
end
function c33710904.tgop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanRemove(1-tp) then return end
local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
local ct=g:GetCount()
if ct>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local sg=g:FilterSelect(1-tp,Card.IsAbleToRemove,1,ct,nil,1-tp,POS_FACEUP,REASON_RULE)
if Duel.Remove(sg,POS_FACEUP,REASON_RULE)~=0 then
local og=Duel.GetOperatedGroup()
local sum=(og:GetSum(Card.GetTextAttack)+og:GetSum(Card.GetTextDefense))*3
if sum==0 then sum=8000 end
Duel.SetLP(1-tp,sum)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(c33710904.aclimit)
e1:SetLabelObject(og)
Duel.RegisterEffect(e1,tp)
end
end
end
function c33710904.aclimit(e,re,tp)
local c=re:GetHandler()
local tg=e:GetLabelObject()
local flag=false
if not tg then return false end
local tc=tg:GetFirst()
while tc do
flag=c:IsCode(tc:GetCode())
tc=tg:GetNext()
end
return flag
end
\ No newline at end of file
--流浪的交易者 ~各取所需~
function c33710905.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c33710905.activate)
c:RegisterEffect(e1)
end
function c33710905.activate(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.GetMatchingGroupCount(Card.IsAbleToHand,tp,LOCATION_HAND,0,nil)>0 or Duel.GetMatchingGroupCount(Card.IsAbleToHand,1-tp,LOCATION_HAND,0,nil)>0
local b2=Duel.GetMatchingGroupCount(Card.IsControlerCanBeChanged,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)>0
local b3=Duel.GetMatchingGroupCount(Card.IsAbleToDeck,tp,LOCATION_DECK,0,nil)>9 and Duel.GetMatchingGroupCount(Card.IsAbleToDeck,1-tp,LOCATION_DECK,0,nil)>9
stsck1={1,2,3,4}
if not b1 then table.remove(stsck1,2) end
if not b2 then table.remove(stsck1,3) end
if not b3 then table.remove(stsck1,4) end
local op=0
if #stsck1==1 then op=Duel.SelectOption(tp,aux.Stringid(33710905,1)) end
if #stsck1==2 then op=Duel.SelectOption(tp,aux.Stringid(33710905,stsck1[1]),aux.Stringid(33710905,stsck1[2])) end
if #stsck1==3 then op=Duel.SelectOption(tp,aux.Stringid(33710905,stsck1[1]),aux.Stringid(33710905,stsck1[2]),aux.Stringid(33710905,stsck1[3])) end
if #stsck1==4 then op=Duel.SelectOption(tp,aux.Stringid(33710905,1),aux.Stringid(33710905,2),aux.Stringid(33710905,3),aux.Stringid(33710905,4)) end
local op1=op
op=stsck1[op1+1]-1
table.remove(stsck1,op1+1)
if op==0 then
local lp1=Duel.GetLP(tp)
local lp2=Duel.GetLP(1-tp)
Duel.SetLP(tp,lp2)
Duel.SetLP(1-tp,lp1)
elseif op==1 then
local g1=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local g2=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
if g1:GetCount()==0 and g2:GetCount()==0 then return end
if g2 then
Duel.ConfirmCards(tp,g2)
end
if g1 then
Duel.ConfirmCards(1-tp,g1)
end
if g2 then
Duel.SendtoHand(g2,tp,REASON_EFFECT)
end
if g1 then
Duel.SendtoHand(g1,1-tp,REASON_EFFECT)
end
elseif op==2 then
local g1=Duel.GetMatchingGroup(Card.IsControlerCanBeChanged,tp,LOCATION_ONFIELD,0,nil)
local g2=Duel.GetMatchingGroup(Card.IsControlerCanBeChanged,1-tp,LOCATION_ONFIELD,0,nil)
Duel.GetControl(g1,1-tp)
Duel.GetControl(g2,tp)
else
local g1=Duel.GetDecktopGroup(tp,10)
local g2=Duel.GetDecktopGroup(1-tp,10)
Duel.SendtoDeck(g2,tp,2,REASON_EFFECT)
Duel.SendtoDeck(g1,1-tp,2,REASON_EFFECT)
end
local num=#stsck1
tp=1-tp
local num2=0
for i=1,num,1 do
if #stsck1==0 then return end
if #stsck1==1 then op=Duel.SelectOption(tp,aux.Stringid(33710905,stsck1[1])) end
if #stsck1==2 then op=Duel.SelectOption(tp,aux.Stringid(33710905,stsck1[1]),aux.Stringid(33710905,stsck1[2])) end
if #stsck1==3 then op=Duel.SelectOption(tp,aux.Stringid(33710905,stsck1[1]),aux.Stringid(33710905,stsck1[2]),aux.Stringid(33710905,stsck1[3])) end
local op1=op
op=stsck1[op1+1]-1
table.remove(stsck1,op1+1)
if op==0 then
local lp1=Duel.GetLP(tp)
local lp2=Duel.GetLP(1-tp)
Duel.SetLP(tp,lp2)
Duel.SetLP(1-tp,lp1)
elseif op==1 then
local g1=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local g2=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
if g1:GetCount()==0 and g2:GetCount()==0 then return end
if g2 then
Duel.ConfirmCards(tp,g2)
end
if g1 then
Duel.ConfirmCards(1-tp,g1)
end
if g2 then
Duel.SendtoHand(g2,tp,REASON_EFFECT)
end
if g1 then
Duel.SendtoHand(g1,1-tp,REASON_EFFECT)
end
elseif op==2 then
local g1=Duel.GetMatchingGroup(Card.IsControlerCanBeChanged,tp,LOCATION_ONFIELD,0,nil)
local g2=Duel.GetMatchingGroup(Card.IsControlerCanBeChanged,1-tp,LOCATION_ONFIELD,0,nil)
Duel.GetControl(g1,1-tp)
Duel.GetControl(g2,tp)
else
local g1=Duel.GetDecktopGroup(tp,10)
local g2=Duel.GetDecktopGroup(1-tp,10)
Duel.SendtoDeck(g2,tp,2,REASON_EFFECT)
Duel.SendtoDeck(g1,1-tp,2,REASON_EFFECT)
end
num2=num2+1
if not Duel.SelectYesNo(tp,aux.Stringid(33710905,5)) or #stsck1==0 then
Duel.SetLP(tp,Duel.GetLP(tp)+5555*num2)
return
end
end
Duel.SetLP(tp,Duel.GetLP(tp)+5555*num2)
end
\ No newline at end of file
--劳改
function c33710906.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
---
if not c33710906.global_check then
c33710906.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(c33710906.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_CHAINING)
ge3:SetOperation(c33710906.checkop2)
Duel.RegisterEffect(ge3,0)
end
--changemonster
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33710906,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,33710906)
e1:SetCondition(c33710906.con1)
e1:SetOperation(c33710906.op1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--changetrap
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,33710907)
e3:SetCondition(c33710906.con2)
e3:SetOperation(c33710906.op2)
c:RegisterEffect(e3)
--changeSpell
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,33710908)
e4:SetCondition(c33710906.con3)
e4:SetOperation(c33710906.op3)
c:RegisterEffect(e4)
end
function c33710906.monfil(c)
return c:GetSummonPlayer()==Duel.GetTurnPlayer()
end
function c33710906.checkop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c33710906.monfil,nil)
if g:GetCount()>0 then Duel.RegisterFlagEffect(Duel.GetTurnPlayer(),33710906,RESET_PHASE+PHASE_END,0,1) end
end
function c33710906.checkop2(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.RegisterFlagEffect(re:GetHandler():GetControler(),33710907,RESET_PHASE+PHASE_END,0,1)
end
if re:GetHandler():IsType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.RegisterFlagEffect(re:GetHandler():GetControler(),33710908,RESET_PHASE+PHASE_END,0,1)
end
end
function c33710906.prfilter(c)
return c:IsFaceup() and c:IsCode(33710906)
end
function c33710906.con1(e,tp,eg)
local g=eg:Filter(c33710906.monfil,nil)
return g:GetCount()>0 and Duel.GetFlagEffect(Duel.GetTurnPlayer,33710906)==0 and Duel.GetMatchingGroupCount(c33710906.prfilter,tp,LOCATION_ONFIELD,0,nil)>0
end
function c33710906.op1(e,tp,eg)
local g=eg:Filter(c33710906.monfil,nil)
for tc in aux.Next(g) do
tc:ReplaceEffect(33710924, RESET_EVENT + RESETS_STANDARD)
end
end
function c33710906.con2(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.GetFlagEffect(Duel.GetTurnPlayer,33710907)==0 and Duel.GetMatchingGroupCount(c33710906.prfilter,tp,LOCATION_ONFIELD,0,nil)>1
end
function c33710906.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c33710906.repop)
end
function c33710906.con3(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.GetFlagEffect(Duel.GetTurnPlayer,33710908)==0 and Duel.GetMatchingGroupCount(c33710906.prfilter,tp,LOCATION_ONFIELD,0,nil)>2
end
function c33710906.op3(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c33710906.repop)
end
function c33710906.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,2000,REASON_EFFECT)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
\ No newline at end of file
--砂之星的采集
function c33710907.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--deck check
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33710907,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetTarget(c33710907.tg)
e1:SetOperation(c33710907.op)
c:RegisterEffect(e1)
end
function c33710907.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end
local code=e:GetHandler():GetCode()
getmetatable(e:GetHandler()).announce_filter={0x442,OPCODE_ISSETCARD,code,OPCODE_ISCODE,OPCODE_NOT,OPCODE_AND}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function c33710907.thfilter(c,code)
return c:IsCode(code) and c:IsAbleToHand()
end
function c33710907.tgfilter(c,code)
return c:IsCode(code) and c:IsAbleToGrave()
end
function c33710907.op(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local b1=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4
local b2=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>9
local op=0
local flag=0
local flag1=1
local num=5
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(33710907,1),aux.Stringid(33710907,2))
else
op=Duel.SelectOption(tp,aux.Stringid(33710907,1))
end
if op==0 then
num=5
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5)
if g:GetClassCount(Card.GetCode)~=g:GetCount() then flag1=0 end
if g:GetCount()>0 then
if g:IsExists(Card.IsCode,1,nil,ac) then
local thg=g:Filter(c33710907.thfilter,nil,ac)
if thg:GetCount()>0 then
local tc=thg:Select(tp,1,1,nil)
Duel.SendtoHand(tc,tp,REASON_EFFECT)
flag=1
end
end
end
else
num=10
Duel.ConfirmDecktop(tp,10)
local g=Duel.GetDecktopGroup(tp,10)
if g:GetClassCount(Card.GetCode)~=g:GetCount() then flag1=0 end
if g:GetCount()>0 then
if g:IsExists(Card.IsCode,1,nil,ac) then
local thg=g:Filter(c33710907.thfilter,nil,ac)
if thg:GetCount()>0 then
local tc=thg:Select(tp,1,1,nil)
Duel.SendtoHand(tc,tp,REASON_EFFECT)
flag=1
end
end
end
end
if num==5 and Duel.IsExistingMatchingCard(c33710907.tgfilter,tp,LOCATION_DECK,0,1,nil,ac) and flag==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tgg=Duel.SelectMatchingCard(tp,c33710907.tgfilter,tp,LOCATION_DECK,0,1,1,nil,ac)
Duel.SendtoGrave(tgg,REASON_EFFECT)
end
if num==10 and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_DECK,0,1,nil,ac) and flag==0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(33710907,3))
local tgg=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_DECK,0,1,1,nil,ac)
if tgg:GetCount()>0 then
Duel.MoveSequence(tgg:GetFirst(),0)
Duel.ConfirmDecktop(tp,1)
end
end
if flag1==0 then Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) end
end
\ No newline at end of file
--虚拟YouTuber 饼叽v
function c33710908.initial_effect(c)
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33710908,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c33710908.seqtg)
e2:SetOperation(c33710908.seqop)
c:RegisterEffect(e2)
end
function c33710908.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 and e:GetHandler():IsLocation(LOCATION_MZONE) end
end
function c33710908.seqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) then return end
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local seq=0
if c:IsControlerCanBeChanged() then
seq=Duel.SelectDisableField(tp,1,LOCATION_MZONE,LOCATION_MZONE,0xe000e0)
else
seq=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0xe000e0)
end
if seq==nil then return end
local nseq=math.log(seq,2)
if nseq<16 then Duel.MoveSequence(c,nseq) end
if nseq>15 then
local dis=bit.lshift(0x1,nseq-16)
Duel.GetControl(c,1-tp,0,0,dis)
end
local seq=c:GetSequence()
local dg=Group.CreateGroup()
if seq<5 then dg=Duel.GetMatchingGroup(c33710908.desfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,seq,c:GetControler()) end
if dg:GetCount()>0 then
local b1=dg:IsExists(Card.IsAbleToGrave,1,nil) and Duel.IsExistingMatchingCard(c33710908.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,dg:GetSum(Card.GetLevel))
local b2=dg:IsExists(c33710908.filtt,1,nil,c:GetControler()) and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c33710908.spfilter2),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)
local op=0
if not (b1 or b2) then return end
if not Duel.SelectYesNo(tp,aux.Stringid(33710908,1)) then return end
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(33710908,2),aux.Stringid(33710908,3))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(33710908,2))
else
op=Duel.SelectOption(tp,aux.Stringid(33710908,3))+1
end
if op==0 then
if Duel.SendtoGrave(dg,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup()
local lv=og:GetSum(Card.GetLevel)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c33710908.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,dg:GetSum(Card.GetLevel))
if tg:GetCount()>0 then
Duel.SpecialSummon(tg,0,tp,tp,true,false,POS_FACEUP)
end
end
else
if Duel.Release(dg:Filter(c33710908.filtt,nil,c:GetControler()),REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c33710908.spfilter2),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if tg:GetCount()>0 then
Duel.SpecialSummon(tg,0,tp,tp,true,false,POS_FACEUP)
end
end
end
end
end
function c33710908.spfilter(c,e,tp,lv)
return c:IsSetCard(0x445) and not c:IsCode(33710908) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:GetLevel()<=lv and c:GetLevel()>0
end
function c33710908.spfilter2(c,e,tp)
return c:IsSetCard(0x445,0x344c) and not c:IsCode(33710908) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c33710908.filtt(c,tp)
return Duel.IsPlayerCanRelease(tp,c)
end
function c33710908.desfilter2(c,s,tp)
local seq=c:GetSequence()
return seq<5 and math.abs(seq-s)==1 and c:IsControler(tp)
end
\ No newline at end of file
--快乐八重彩
function c33710909.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:SetCondition(c33710909.condition)
e1:SetOperation(c33710909.activate)
c:RegisterEffect(e1)
end
function c33710909.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)/Duel.GetLP(1-tp)>=8
end
function c33710909.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(1-tp,0)
end
\ No newline at end of file
--梦幻联动 ~双厨狂喜~
function c33710910.initial_effect(c)
--Active
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
e1:SetCondition(c33710910.thcon)
e1:SetTarget(c33710910.thtg)
e1:SetOperation(c33710910.thop)
c:RegisterEffect(e1)
end
function c33710910.thcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)
end
function c33710910.spfilter(c,e,tp,g)
return c:IsCanBeSpecialSummoned(e,0,tp,true,false) and g:IsExists(Card.IsCode,1,nil,c:GetCode()) and ((c:IsType(TYPE_LINK+TYPE_PENDULUM) and c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and not (c:IsType(TYPE_LINK+TYPE_PENDULUM) and c:IsLocation(LOCATION_EXTRA))))
end
function c33710910.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsFaceup,1-tp,LOCATION_MZONE,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c33710910.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,g) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,nil,0,0)
end
function c33710910.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ggg=Duel.GetMatchingGroup(Card.IsFaceup,1-tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(c33710910.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,e,tp,ggg)
while g:GetCount()>0 do
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
g:RemoveCard(tc)
if Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)~=0 then
local fid=c:GetFieldID()
tc:RegisterFlagEffect(33710910,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(33710910,5))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetLabel(fid)
e3:SetLabelObject(tc)
e3:SetCondition(c33710910.thcon1)
e3:SetOperation(c33710910.thop1)
Duel.RegisterEffect(e3,tp)
Duel.SpecialSummonComplete()
g=g:Filter(c33710910.spfilter,nil,e,tp,ggg)
end
end
end
function c33710910.thcon1(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(33710910)==e:GetLabel() then
return true
else
e:Reset()
return false
end
end
function c33710910.thop1(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.SendtoHand(tc,tp,REASON_EFFECT)
end
\ No newline at end of file
--Calamus & Alula ~梦迹的孩子们~
function c33710911.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,2)
--TEF
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PREDRAW)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c33710911.con)
e1:SetTarget(c33710911.tg)
e1:SetOperation(c33710911.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PREDRAW)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c33710911.con1)
e2:SetTarget(c33710911.tg1)
e2:SetOperation(c33710911.op1)
c:RegisterEffect(e2)
--Effect Draw
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DRAW_COUNT)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(1,1)
e3:SetCondition(c33710911.con2)
e3:SetValue(2)
c:RegisterEffect(e3)
end
function c33710911.con(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>0
and Duel.GetDrawCount(tp)>0 and e:GetHandler():GetLinkedGroup():IsExists(Card.IsControler,1,nil,1-tp)
end
function c33710911.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
_replace_count=0
_replace_max=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function c33710911.op(e,tp,eg,ep,ev,re,r,rp)
_replace_count=_replace_count+1
if _replace_count>_replace_max or not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetDecktopGroup(1-tp,1)
if g:GetCount()>0 then
Duel.DisableShuffleCheck()
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c33710911.con1(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetDrawCount(tp)>0 and e:GetHandler():GetLinkedGroup():IsExists(Card.IsControler,1,nil,tp)
end
function c33710911.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
local dt=Duel.GetDrawCount(1-tp)
if dt~=0 then
_replace_count=0
_replace_max=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,1-tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function c33710911.op1(e,tp,eg,ep,ev,re,r,rp)
_replace_count=_replace_count+1
if _replace_count>_replace_max or not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetDecktopGroup(tp,1)
if g:GetCount()>0 then
Duel.DisableShuffleCheck()
Duel.SendtoHand(g,1-tp,REASON_EFFECT)
Duel.ConfirmCards(tp,g)
end
end
function c33710911.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLinkedGroupCount()==0
end
\ No newline at end of file
--风所到达的场所 ~ 亚由
function c33710912.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,11,5,c33710912.ovfilter,aux.Stringid(33710912,0),5,nil)
c:EnableReviveLimit()
--SpecialSummonLIMIT
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c33710912.sslimit)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33710912,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c33710912.cost1)
e2:SetTarget(c33710912.tg1)
e2:SetOperation(c33710912.op1)
c:RegisterEffect(e2)
end
function c33710912.ovfilter(c)
return c:IsFaceup() and (c:IsType(TYPE_SYNCHRO) or c:IsType(TYPE_XYZ) or c:IsType(TYPE_FUSION)) and (c:IsLevelAbove(9) or c:IsRankAbove(9))
end
function c33710912.sslimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function c33710912.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local sum=e:GetHandler():GetOverlayGroup():GetCount()
if chk==0 then return e:GetHandler():GetOverlayCount()>0
and e:GetHandler():CheckRemoveOverlayCard(tp,e:GetHandler():GetOverlayCount(),REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,e:GetHandler():GetOverlayCount(),e:GetHandler():GetOverlayCount(),REASON_COST)
local sum1=e:GetHandler():GetOverlayGroup():GetCount()
e:SetLabel(sum-sum1)
end
function c33710912.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c33710912.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,nil,tp,LOCATION_GRAVE)
end
function c33710912.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local num=e:GetLabel()
if Duel.IsPlayerAffectedByEffect(tp,59822133) then num=1 end
if not (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c33710912.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)) then return end
num=math.min(num,Duel.GetLocationCount(tp,LOCATION_MZONE))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c33710912.spfilter,tp,LOCATION_GRAVE,0,1,num,nil,e,tp)
c:RegisterFlagEffect(33710912,RESET_EVENT+RESETS_STANDARD,0,0)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
local tc=sg:GetFirst()
while tc do
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetLabelObject(c)
e2:SetCondition(c33710912.condition1)
e2:SetValue(aux.tgoval)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
tc=sg:GetNext()
end
end
end
function c33710912.condition1(e)
local c=e:GetLabelObject()
return c:IsLocation(LOCATION_MZONE) and c:GetFlagEffect(33710912)~=0
end
\ No newline at end of file
--永恒的约定
function c33710913.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,33710913+EFFECT_COUNT_CODE_DUEL)
e1:SetTarget(c33710913.target)
e1:SetOperation(c33710913.activate)
c:RegisterEffect(e1)
end
function c33710913.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,1,nil,tp,POS_FACEDOWN,REASON_EFFECT) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_EXTRA,0,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,sg,sg:GetCount(),0,0)
end
function c33710913.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,33710913)~=0 then return end
Duel.RegisterFlagEffect(tp,33710913,0,0,0)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c33710913.splimit1)
Duel.RegisterEffect(e1,tp)
local flag=1
local sg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,nil,tp,POS_FACEDOWN,REASON_EFFECT)
if Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)~=0 then
if Duel.SelectYesNo(tp,aux.Stringid(33710913,2)) then
Duel.PayLPCost(tp,2000)
flag=0
local token1=Duel.CreateToken(tp,33710928)
Duel.SendtoDeck(token1,tp,0,REASON_EFFECT)
local token2=Duel.CreateToken(tp,33710916)
Duel.SendtoDeck(token2,tp,0,REASON_EFFECT)
local token3=Duel.CreateToken(tp,33710917)
Duel.SendtoDeck(token3,tp,0,REASON_EFFECT)
local token4=Duel.CreateToken(tp,33710918)
Duel.SendtoDeck(token4,tp,0,REASON_EFFECT)
local token5=Duel.CreateToken(tp,33710915)
Duel.SendtoDeck(token5,tp,0,REASON_EFFECT)
end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(c33710913.gain)
e1:SetLabel(flag)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetLabel(flag)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(e2,tp)
end
end
function c33710913.gain(e,tp,eg,ep,ev,re,r,rp)
local flag=e:GetLabel()
local tg=eg:Filter(Card.IsControler,nil,tp)
local tc=tg:GetFirst()
stack11={1,3,5}
while tc and tc:GetFlagEffect(33710913)==0 do
stsck1={1,3,5}
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(33710913,4))
local op=Duel.SelectOption(tp,aux.Stringid(33710913,stsck1[1]),aux.Stringid(33710913,stsck1[2]),aux.Stringid(33710913,stsck1[3]))
local op1=op
local flag2=0
tc:RegisterFlagEffect(33710913,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,0,0,aux.Stringid(33710913,stack11[op1+1]))
table.remove(stsck1,op1+1)
if flag==1 then
flag2=Duel.SelectOption(tp,aux.Stringid(33710913,stsck1[1]),aux.Stringid(33710913,stsck1[2]))
tc:RegisterFlagEffect(33710913,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,0,0,aux.Stringid(33710913,stsck1[flag2+1]))
end
local sum=stack11[op+1]
if flag~=0 then
sum=sum+stsck1[flag2+1]
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_DESTROYED)
e1:SetLabel(sum)
e1:SetOperation(c33710913.op0)
tc:RegisterEffect(e1,true)
tc=tg:GetNext()
end
end
function c33710913.op0(e)
local num=e:GetLabel()
if num==1 then
if Duel.IsPlayerCanDraw(e:GetHandler():GetControler(),1) then
Duel.Draw(tp,1,REASON_EFFECT)
end
elseif num==3 then
if Duel.IsExistingMatchingCard(aux.TRUE,e:GetHandler():GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,e:GetHandler():GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.Destroy(g,REASON_EFFECT)
end
elseif num==4 then
if Duel.IsPlayerCanDraw(e:GetHandler():GetControler(),1) then
Duel.Draw(tp,1,REASON_EFFECT)
end
if Duel.IsExistingMatchingCard(aux.TRUE,e:GetHandler():GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,e:GetHandler():GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.Destroy(g,REASON_EFFECT)
end
elseif num==5 then
local g=Duel.GetMatchingGroup(c33710913.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end
elseif num==6 then
if Duel.IsPlayerCanDraw(e:GetHandler():GetControler(),1) then
Duel.Draw(tp,1,REASON_EFFECT)
end
local g=Duel.GetMatchingGroup(c33710913.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e4=e3:Clone()
e4:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e4)
Duel.SpecialSummonComplete()
end
else
if Duel.IsExistingMatchingCard(aux.TRUE,e:GetHandler():GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,e:GetHandler():GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.Destroy(g,REASON_EFFECT)
end
local g=Duel.GetMatchingGroup(c33710913.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e5=Effect.CreateEffect(e:GetHandler())
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_DISABLE)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e6)
Duel.SpecialSummonComplete()
end
end
e:Reset()
end
function c33710913.spfilter(c,e,tp)
return c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33710913.splimit1(e,c,tp,sumtp,sumpos)
return not c:GetOriginalCode()==33710928 and c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
--随风而去的悲伤
function c33710915.initial_effect(c)
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--UPDATE ATK/DEF
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_TOKEN))
e1:SetValue(500)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--cannot be Destroyed
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_TOKEN))
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
c:RegisterEffect(e5)
end
\ No newline at end of file
--随羊飞舞的无力
function c33710916.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep2(c,aux.FilterBoolFunction(Card.IsType,TYPE_TOKEN),2,63,false)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(c33710916.sucop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c33710916.cost)
e2:SetTarget(c33710916.target)
e2:SetOperation(c33710916.activate)
c:RegisterEffect(e2)
end
function c33710916.sucop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(c:GetMaterialCount()*500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
c:RegisterEffect(e2)
end
function c33710916.ff(c)
return c:IsAbleToRemoveAsCost() and c:IsType(TYPE_MONSTER)
end
function c33710916.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33710916.ff,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c33710916.ff,tp,LOCATION_DECK,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local g=Duel.GetOperatedGroup()
local g=g:GetFirst()
e:SetLabelObject(g)
end
function c33710916.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_MZONE,0,1,nil,TYPE_TOKEN) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_MZONE,0,1,1,nil,TYPE_TOKEN)
end
function c33710916.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local g=e:GetLabelObject()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(g:GetTextAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetCode(EFFECT_SET_DEFENSE_FINAL)
e12:SetValue(g:GetTextDefense())
e12:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e12)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c33710916.ftarget)
e2:SetLabel(tc:GetFieldID())
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function c33710916.ftarget(e,c)
return e:GetLabel()~=c:GetFieldID()
end
\ No newline at end of file
--随波而涌的潮鸣
function c33710917.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--token
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33710917,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_END_PHASE)
e1:SetCost(c33710917.spcost)
e1:SetTarget(c33710917.sptg)
e1:SetOperation(c33710917.spop)
c:RegisterEffect(e1)
--ATKUP
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetDescription(aux.Stringid(33710917,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c33710917.cost)
e2:SetOperation(c33710917.operation)
c:RegisterEffect(e2)
end
function c33710917.cost1(e,c,tp,st)
return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,0,1,nil,TYPE_TOKEN)
end
function c33710917.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c33710917.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,33710919,0,0x4011,0,0,4,nil,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local rc=Duel.AnnounceAttribute(tp,1,0xffff)
e:SetLabel(rc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RACE)
local rac=Duel.AnnounceRace(tp,1,RACE_ALL)
e:SetLabel(rc)
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(rac)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c33710917.spop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetLabel(rc)
e1:SetTarget(c33710917.splimit1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetLabel(rac)
e2:SetTarget(c33710917.splimit2)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local rc=e:GetLabel()
local p,rac=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,33710919,0,0x4011,0,0,4,rac,rc) then return end
local token=Duel.CreateToken(tp,33710919)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e11=Effect.CreateEffect(e:GetHandler())
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e11:SetValue(rc)
e11:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e11)
local e21=Effect.CreateEffect(e:GetHandler())
e21:SetType(EFFECT_TYPE_SINGLE)
e21:SetCode(EFFECT_CHANGE_RACE)
e21:SetValue(rac)
e21:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e21)
Duel.SpecialSummonComplete()
end
function c33710917.splimit1(e,c,tp,sumtp,sumpos)
return not c:IsAttribute(e:GetLabel())
end
function c33710917.splimit2(e,c,tp,sumtp,sumpos)
return not c:IsRace(e:GetLabel())
end
function c33710917.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local sg=e:GetHandler():GetOverlayGroup()
sg:KeepAlive()
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_MZONE,0,1,nil,TYPE_TOKEN) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
sg:Remove(c33710917.ff,nil,e:GetHandler():GetOverlayGroup())
e:SetLabelObject(sg)
end
function c33710917.ff(c,g)
return g:IsContains(c)
end
function c33710917.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=e:GetLabelObject()
local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,33710919)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(sg:GetFirst():GetAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(sg:GetFirst():GetDefense())
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
\ No newline at end of file
--随绊而去的永恒
function c33710918.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c33710918.matfilter,3,3)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,1)
e1:SetValue(1)
e1:SetCondition(c33710918.actcon)
c:RegisterEffect(e1)
--Remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33710918,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c33710918.rmcon)
e2:SetTarget(c33710918.rmtg)
e2:SetOperation(c33710918.rmop)
c:RegisterEffect(e2)
--double damage
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c33710918.damcon)
e3:SetOperation(c33710918.damop)
c:RegisterEffect(e3)
end
function c33710918.matfilter(c)
return c:IsType(TYPE_TOKEN)
end
function c33710918.actcon(e)
local a=Duel.GetAttacker()
return a and a:IsControler(e:GetHandlerPlayer()) and a:IsType(TYPE_TOKEN) and e:GetHandler():GetLinkedGroup():IsContains(a)
end
function c33710918.rmcon(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end
local tc=Duel.GetAttacker()
if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end
return tc:IsType(TYPE_TOKEN) and tc:IsRelateToBattle() and e:GetHandler():GetLinkedGroup():IsContains(tc) and not e:GetHandler():IsStatus(STATUS_CHAINING)
end
function c33710918.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetAttacker()
local bc=Duel.GetAttackTarget()
if tc:IsControler(1-tp) then
tc=Duel.GetAttackTarget()
bc=Duel.GetAttacker()
end
if chk==0 then return tc and tc:IsType(TYPE_TOKEN) and bc:IsAbleToRemove() and e:GetHandler():GetLinkedGroup():IsContains(tc) end
e:SetLabelObject(bc)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,bc,1,0,0)
end
function c33710918.rmop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetLabelObject()
if not bc or not bc:IsAbleToRemove() then return end
Duel.Remove(bc,POS_FACEUP,REASON_EFFECT)
end
function c33710918.damcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return ep==1-tp and e:GetHandler():GetLinkedGroup():IsContains(tc) and tc:IsType(TYPE_TOKEN) and Duel.GetAttackTarget()==nil
end
function c33710918.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2)
end
\ No newline at end of file
--组装融合
function c33710920.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c33710920.target)
e1:SetOperation(c33710920.activate)
c:RegisterEffect(e1)
end
function c33710920.filter1(c,e)
return not c:IsImmuneToEffect(e) and c:IsLocation(LOCATION_HAND) and c:IsAbleToRemove() and c:IsType(TYPE_MONSTER)
end
function c33710920.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and m:CheckWithSumEqual(Card.GetLevel,c:GetLevel(),1,99,c) and not c:IsType(TYPE_EFFECT)
end
function c33710920.filter3(g,tp,c,e)
return g:GetSum(Card.GetLevel)==c:GetLevel() and c:IsAbleToRemove()
end
function c33710920.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFieldGroup(tp,LOCATION_HAND,0):Filter(c33710920.filter1,nil,e)
local res=Duel.IsExistingMatchingCard(c33710920.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c33710920.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFieldGroup(tp,LOCATION_HAND,0):Filter(c33710920.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c33710920.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
if sg1:GetCount()>0then
local sg=sg1:Clone()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) then
local mat1=mg1:SelectSubGroup(tp,c33710920.filter3,true,1,mg1:GetCount(),tp,tc,e)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(mat1:GetSum(Card.GetAttack))
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetValue(mat1:GetSum(Card.GetDefense))
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
end
end
end
\ No newline at end of file
--破防
function c33710921.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c33710921.con)
e1:SetOperation(c33710921.activate)
c:RegisterEffect(e1)
if c33710921.counter==nil then
c33710921.counter=true
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_DESTROYED)
e2:SetOperation(c33710921.addcount)
Duel.RegisterEffect(e2,0)
end
end
function c33710921.addcount(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(Card.IsReason,nil,REASON_BATTLE)
local tc=g:GetFirst()
while tc do
Duel.RegisterFlagEffect(tc:GetPreviousControler(),33710921,RESET_PHASE+PHASE_END,0,1)
tc=g:GetNext()
end
end
function c33710921.con(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c33710921.activate(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e2:SetOperation(c33710921.dop)
e2:SetReset(RESET_PHASE+PHASE_END,1)
Duel.RegisterEffect(e2,tp)
end
function c33710921.dop(e,tp,eg,ep,ev,re,r,rp)
if ep~=tp and Duel.GetFlagEffect(1-tp,33710921)>=6 then
Duel.ChangeBattleDamage(ep,13370)
e:Reset()
end
end
\ No newline at end of file
--虚拟YouTuber 未来明 ~NEW WORLD~
function c33710922.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,6,c33710922.ovfilter,aux.Stringid(33710922,0),6,c33710922.xyzop)
c:EnableReviveLimit()
--Data up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33710922,1))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c33710922.cost1)
e1:SetTarget(c33710922.tg1)
e1:SetOperation(c33710922.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c33710922.tgcon)
e2:SetValue(aux.indoval)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
c:RegisterEffect(e3)
--immue
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetCondition(c33710922.efcon)
e4:SetValue(c33710922.efilter)
c:RegisterEffect(e4)
end
function c33710922.ovfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:GetLevel()>=7
end
function c33710922.xyzop(e,tp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,0,1,nil,TYPE_TOKEN) end
end
function c33710922.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local sum=e:GetHandler():GetOverlayGroup():GetCount()
if chk==0 then return e:GetHandler():GetOverlayCount()>0
and e:GetHandler():CheckRemoveOverlayCard(tp,e:GetHandler():GetOverlayCount(),REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,e:GetHandler():GetOverlayCount(),e:GetHandler():GetOverlayCount(),REASON_COST)
local sum1=e:GetHandler():GetOverlayGroup():GetCount()
e:SetLabel((sum-sum1)*500)
end
function c33710922.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsLocation(LOCATION_MZONE) and e:GetHandler():IsFaceup() end
end
function c33710922.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local num=e:GetLabel()
if not c:IsRelateToEffect(e) or not c:IsFaceup() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(num)
c:RegisterEffect(e1)
end
function c33710922.tgcon(e)
return e:GetHandler():IsAttackPos() and e:GetHandler():GetOverlayCount()>0
end
function c33710922.efcon(e)
return e:GetHandler():IsDefensePos() and e:GetHandler():GetOverlayCount()==0
end
function c33710922.efilter(e,te)
return te:GetHandler()~=e:GetHandler()
end
\ No newline at end of file
--劳改复制体
function c33710924.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c33710924.tg)
e1:SetOperation(c33710924.op)
c:RegisterEffect(e1)
end
function c33710924.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local num=e:GetHandler():GetAttack()+e:GetHandler():GetDefense()
if chk==0 then return num>0 end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(num)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,num)
end
function c33710924.op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
\ No newline at end of file
--永恒的少女
function c33710928.initial_effect(c)
aux.AddSynchroProcedure(c,nil,aux.NonTuner(c33710928.matfilter),1)
c:EnableReviveLimit()
--to deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33710928,1))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c33710928.tdcost)
e1:SetTarget(c33710928.tdtg)
e1:SetOperation(c33710928.tdop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33710928,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c33710928.condition)
e2:SetTarget(c33710928.target)
e2:SetOperation(c33710928.operation)
c:RegisterEffect(e2)
end
function c33710928.matfilter(c)
return not c:IsAttribute(ATTRIBUTE_DARK)
end
function c33710928.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_TOKEN) end
local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_TOKEN)
Duel.Release(g,REASON_COST)
end
function c33710928.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end
end
function c33710928.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function c33710928.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_EFFECT)
and c:GetPreviousControler()==tp
end
function c33710928.filter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_SPELLCASTER) and c:IsLevelBelow(4)
end
function c33710928.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c33710928.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c33710928.operation(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,c33710928.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()<1 then return end
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
......@@ -35,7 +35,7 @@ function c79029028.initial_effect(c)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetCountLimit(1,790290289999999999999999999)
e5:SetCountLimit(1,09029028)
e5:SetTarget(c79029028.target)
e5:SetOperation(c79029028.operation)
c:RegisterEffect(e5)
......
......@@ -64,13 +64,11 @@ end
function c79029174.filter1(c,e,tp)
local rk=c:GetRank()
return rk>1 and c:IsFaceup() and c:IsSetCard(0xa900)
and Duel.IsExistingMatchingCard(c79029174.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk)
and Duel.GetLocationCountFromEx(tp,tp,c)>0
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c79029174.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end
function c79029174.filter2(c,e,tp,mc,rk)
return c:IsRankBelow(rk-1) and c:IsSetCard(0xa900) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c79029174.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
......@@ -37,7 +37,7 @@ function c79029321.initial_effect(c)
c:RegisterEffect(e1)
end
function c79029321.filter(c,e,tp,re)
return c:GetPreviousControler()==tp and c:IsReason(REASON_COST) and c==re:GetHandler() and c:IsSetCard(0xa904)
return c:GetPreviousControler()==tp and c:IsReason(REASON_COST) and c:IsSetCard(0xa904)
end
function c79029321.thfil(c)
return c:IsSetCard(0xa904) and c:IsAbleToHand()
......
......@@ -74,7 +74,7 @@ function c79029327.operation(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
Debug.Message("让头脑清醒点吧。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029327,2))
if Duel.NegateActivation(ev) and Duel.IsExistingMatchingCard(c79029327.spfil,tp,LOCATION_MZONE+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(79029327,1)) then
if Duel.NegateActivation(ev) and Duel.IsExistingMatchingCard(c79029327.spfil,tp,LOCATION_MZONE+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE) and Duel.SelectYesNo(tp,aux.Stringid(79029327,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c79029327.spfil,tp,LOCATION_MZONE+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
......
......@@ -80,10 +80,10 @@ function c79029351.thfil(c)
return c:IsAbleToHand() and c:IsSetCard(0xb90d) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SPELL)
end
function c79029351.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029351.thfil,tp,LOCATION_DECK,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c79029351.thfil,tp,LOCATION_DECK,0,1,1,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c79029351.thfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c79029351.thfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0)
end
function c79029351.thop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("不会有其他人看到我在这吧......?")
......@@ -146,7 +146,7 @@ function c79029351.spop(e,tp,eg,ep,ev,re,r,rp)
local xct=lg:GetClassCount(Card.GetCode)
if ct<=0 or xct<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c79029351.seqfilter,tp,0,LOCATION_ONFIELD,xct,xct,nil,seq)
local g=Duel.SelectMatchingCard(tp,c79029351.seqfilter,tp,0,LOCATION_ONFIELD,1,xct,nil,seq)
Debug.Message("只会剩下灰烬......")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029351,3))
Duel.HintSelection(g)
......
......@@ -2,7 +2,7 @@
function c79029353.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xa900),aux.NonTuner(nil),1)
c:EnableReviveLimit()
c:EnableReviveLimit()
--extra matrial
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
......@@ -22,7 +22,7 @@ function c79029353.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetTargetRange(LOCATION_EXTRA,0)
e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE+LOCATION_EXTRA+LOCATION_REMOVED)
e3:SetRange(LOCATION_MZONE+LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_REMOVED)
e3:SetTarget(c79029353.mattg)
e3:SetLabelObject(e0)
c:RegisterEffect(e3)
......@@ -75,13 +75,13 @@ function c79029353.initial_effect(c)
e6:SetLabel(5)
c:RegisterEffect(e6)
--match kill
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetCode(EFFECT_MATCH_KILL)
e4:SetCondition(c79029353.effcon)
e4:SetLabel(6)
c:RegisterEffect(e4)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e7:SetCode(EVENT_BATTLE_DAMAGE)
e7:SetCondition(c79029353.effcon)
e7:SetOperation(c79029353.winop)
c:RegisterEffect(e7)
end
function c79029353.mattg(e,c)
return c:IsSetCard(0xa900) and c:IsType(TYPE_LINK)
......@@ -91,7 +91,7 @@ function c79029353.mfil(c)
end
function c79029353.matval(e,lc,mg,c,tp)
if e:GetHandler()~=lc then return false,nil end
return true,not mg or not mg:IsExists(c79029353.mfil,mg:GetCount(),nil)
return true,c:GetFlagEffect(79029353)~=0
end
function c79029353.efffil(c,e)
return c:GetLinkedGroup():IsContains(e:GetHandler()) and c:IsSetCard(0xa900)
......@@ -105,6 +105,8 @@ end
function c79029353.emtg(e,tp,eg,ep,ev,re,r,rp,chk)
local x=e:GetHandler():GetMaterialCount()
if chk==0 then return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and x~=0 and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Debug.Message("光。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029353,1))
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,x,nil)
Duel.SetTargetCard(g)
end
......@@ -128,6 +130,8 @@ function c79029353.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*500)
end
function c79029353.desop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("荣耀必须被捍卫。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029353,2))
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(c79029353.filter,tp,0,LOCATION_MZONE,aux.ExceptThisCard(e),c:GetAttack())
......@@ -137,6 +141,14 @@ function c79029353.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,ct*500,REASON_EFFECT)
end
end
function c79029353.winop(e,tp,eg,ep,ev,re,r,rp)
if ep~=tp then
local WIN_REASON_NEARL=0x1
Debug.Message("真正的骑士决不屈服于暴力,在这把战锤面前忏悔吧。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029353,3))
Duel.Win(tp,WIN_REASON_NEARL)
end
end
......
--罗德岛·部署-精锐救援
function c79029354.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,79029354)
e1:SetCost(c79029354.cost)
e1:SetOperation(c79029354.activate)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,09029354)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c79029354.rectg)
e2:SetOperation(c79029354.recop)
c:RegisterEffect(e2)
end
function c79029354.cofil(c,e,tp)
return c:IsSetCard(0xa900) and c:IsReleasable() and Duel.IsExistingMatchingCard(c79029354.spfil,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetMZoneCount(tp,c)>0 and c:IsType(TYPE_MONSTER)
end
function c79029354.spfil(c,e,tp)
return c:IsSetCard(0xa900) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c79029354.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029354.cofil,tp,LOCATION_MZONE,0,1,nil,e,tp) end
local g=Duel.SelectMatchingCard(tp,c79029354.cofil,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.Release(g,REASON_COST)
local tc=g:GetFirst()
e:SetLabelObject(tc)
end
function c79029354.thfil(c)
return c:IsSetCard(0xa900) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function c79029354.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.SelectMatchingCard(tp,c79029354.spfil,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
if e:GetLabelObject():GetSummonLocation()==LOCATION_EXTRA and Duel.IsExistingMatchingCard(c79029354.thfil,tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(79029354,0)) then
local xg=Duel.SelectMatchingCard(tp,c79029354.thfil,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(xg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,xg)
end
end
function c79029354.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_ONFIELD,0,nil,0xa900)
local xct=lg:GetClassCount(Card.GetCode)
if chk==0 then return xct>0 end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(xct*800)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,xct*800)
end
function c79029354.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--罗德岛·重装干员-泥岩
function c79029355.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,12,3)
c:EnableReviveLimit()
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(79029355,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c79029355.descon)
e3:SetOperation(c79029355.desop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(c79029355.valcheck)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
--defense attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DEFENSE_ATTACK)
e1:SetValue(1)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c79029355.reptg)
c:RegisterEffect(e2)
--ac
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e5:SetCountLimit(1,79029355)
e5:SetCost(c79029355.accost)
e5:SetOperation(c79029355.acop)
c:RegisterEffect(e5)
end
function c79029355.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and e:GetLabel()==1
end
function c79029355.desop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("战场,从未改变。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029355,0))
--activate limit
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(c79029355.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c79029355.actlimit(e,re,tp)
return not re:GetHandler():IsLocation(LOCATION_ONFIELD)
end
function c79029355.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsSetCard,1,nil,0xa900) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c79029355.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE) and c:IsAbleToDecreaseAttackAsCost(1000) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Debug.Message("泥土会回应我的意志。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029355,1))
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
Duel.Recover(tp,1000,REASON_EFFECT)
return true
else return false end
end
function c79029355.accost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c79029355.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c and c:IsRelateToEffect(e) then
Duel.ChangePosition(c,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
local x=c:GetPosition()
if x==POS_FACEUP_ATTACK then
Debug.Message("大地与我为友。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029355,2))
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetCode(EFFECT_SWAP_AD)
c:RegisterEffect(e1)
local a=e:GetHandler():GetAttack()
local b=e:GetHandler():GetDefense()
if a>=b then
Duel.Damage(1-tp,a-b,REASON_EFFECT)
elseif a<=b then
Duel.Damage(1-tp,b-a,REASON_EFFECT)
end
elseif x==POS_FACEUP_DEFENSE and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 then
Debug.Message("垒成山脉吧。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029355,3))
g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
local tc=g:GetFirst()
while tc do
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
tc=g:GetNext()
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(c79029355.indct)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if c:IsRelateToEffect(e) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ATTACK_ALL)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(2)
c:RegisterEffect(e2)
end
end
end
end
function c79029355.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE)~=0 then
return 1
else return 0 end
end
--红·瑟谣浮收藏-猎狼人
function c79029356.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xa900),4,2)
c:EnableReviveLimit()
--add code
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_CODE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetValue(79029038)
c:RegisterEffect(e2)
--th
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,79029356)
e1:SetTarget(c79029356.thtg)
e1:SetOperation(c79029356.thop)
c:RegisterEffect(e1)
--tg
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,09029356)
e2:SetCost(c79029356.tgcost)
e2:SetTarget(c79029356.tgtg)
e2:SetOperation(c79029356.tgop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(aux.bdocon)
e3:SetTarget(c79029356.thtg1)
e3:SetOperation(c79029356.thop1)
c:RegisterEffect(e3)
end
function c79029356.thfil(c)
return c:IsAbleToHand() and (c:IsSetCard(0xb90d) or c:IsSetCard(0xc90e))
end
function c79029356.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029356.thfil,tp,LOCATION_DECK,0,1,nil) end
Debug.Message("红该做什么?")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029356,0))
local g=Duel.SelectMatchingCard(tp,c79029356.thfil,tp,LOCATION_DECK,0,1,1,nil)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_DECK)
end
function c79029356.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
function c79029356.tgcost(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 c79029356.tgfil(c)
return c:IsAbleToGrave() and c:IsSetCard(0xa904)
end
function c79029356.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_ONFIELD,0,nil,0xa900)
local xct=lg:GetClassCount(Card.GetCode)
if chk==0 then return Duel.IsExistingMatchingCard(c79029356.tgfil,tp,LOCATION_DECK,0,1,nil) and xct>=1 end
Debug.Message("只要对狩猎有利。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029356,1))
local g=Duel.SelectMatchingCard(tp,c79029356.tgfil,tp,LOCATION_DECK,0,1,xct,nil)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,tp,LOCATION_DECK)
end
function c79029356.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
Duel.SendtoGrave(g,REASON_EFFECT)
end
function c79029356.thfil1(c)
return c:IsAbleToHand() and c:IsSetCard(0xa904)
end
function c79029356.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029356.thfil1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Debug.Message("全灭。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029356,2))
local g=Duel.SelectMatchingCard(tp,c79029356.thfil1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0)
end
function c79029356.thop1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
--召唤师 赫默
function c79029357.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--add code
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_CODE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetValue(79029028)
c:RegisterEffect(e2)
--splimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetTargetRange(1,0)
e2:SetTarget(c79029357.splimit)
c:RegisterEffect(e2)
--fusion
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1)
e2:SetTarget(c79029357.fsptg)
e2:SetOperation(c79029357.fspop)
c:RegisterEffect(e2)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,79029357)
e1:SetTarget(c79029357.target)
e1:SetOperation(c79029357.activate)
c:RegisterEffect(e1)
local e4=e1:Clone()
e4:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e4)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE+LOCATION_HAND+LOCATION_EXTRA)
e2:SetCountLimit(1,09029357)
e2:SetCost(c79029357.spcost)
e2:SetTarget(c79029357.sptg)
e2:SetOperation(c79029357.spop)
c:RegisterEffect(e2)
end
function c79029357.splimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0xa900) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function c79029357.filter0(c)
return c:IsOnField() and c:IsAbleToRemove()
end
function c79029357.filter1(c,e)
return c:IsOnField() and not c:IsImmuneToEffect(e) and c:IsAbleToRemove()
end
function c79029357.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xa900) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c79029357.filter3(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c79029357.fsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c79029357.filter0,nil)
local mg2=Duel.GetMatchingGroup(c79029357.filter3,tp,LOCATION_GRAVE+LOCATION_HAND,0,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c79029357.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c79029357.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD+LOCATION_GRAVE)
end
function c79029357.fspop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("保持冷静。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029357,0))
if not e:GetHandler():IsRelateToEffect(e) then return end
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c79029357.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c79029357.filter3,tp,LOCATION_GRAVE+LOCATION_HAND,0,nil)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(c79029357.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(c79029357.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.Remove(mat1,POS_FACEUP,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
end
function c79029357.afilter1(c,tp)
return Duel.IsExistingMatchingCard(c79029357.afilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c)
end
function c79029357.afilter2(c,fc)
return aux.IsMaterialListCode(fc,c:GetCode()) and c:IsAbleToHand()
end
function c79029357.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029357.afilter1,tp,LOCATION_EXTRA,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c79029357.activate(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("集中精力。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029357,1))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local cg=Duel.SelectMatchingCard(tp,c79029357.afilter1,tp,LOCATION_EXTRA,0,1,1,nil,tp)
if cg:GetCount()==0 then return end
Duel.ConfirmCards(1-tp,cg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c79029357.afilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,cg:GetFirst())
local tc=g:GetFirst()
if not tc then return end
if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,tc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c79029357.splimit)
Duel.RegisterEffect(e1,tp)
end
end
function c79029357.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xa900) and c:IsLocation(LOCATION_EXTRA)
end
function c79029357.cfilter(c,ft,tp)
return c:IsType(TYPE_FUSION)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function c79029357.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return ft>-1 and Duel.CheckReleaseGroup(tp,c79029357.cfilter,1,nil,ft,tp) end
local g=Duel.SelectReleaseGroup(tp,c79029357.cfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST)
end
function c79029357.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c79029357.spop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("博士,让我去吧。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029357,2))
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
end
end
--召唤兽 伊芙利特
function c79029358.initial_effect(c)
--fusion material
aux.AddFusionProcCodeFun(c,79029357,c79029358.mfilter,1,true,true)
c:EnableReviveLimit()
--add code
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_CODE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetValue(79029078)
c:RegisterEffect(e2)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(aux.indoval)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(79029358,0))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,79029358)
e3:SetTarget(c79029358.destg)
e3:SetOperation(c79029358.desop)
c:RegisterEffect(e3)
end
function c79029358.mfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE)
end
function c79029358.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
end
function c79029358.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
local atk=g:GetFirst():GetTextAttack()
if atk<0 then atk=0 end
Duel.HintSelection(g)
Debug.Message("哈哈!再多叫几声!")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029358,0))
if Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,atk,REASON_EFFECT)
local seq=g:GetFirst():GetPreviousSequence()
e:SetLabel(seq+16)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetLabel(e:GetLabel())
e1:SetOperation(c79029358.disop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e:GetHandler():RegisterEffect(e1)
end
end
end
function c79029358.disop(e,tp)
return bit.lshift(0x1,e:GetLabel())
end
......@@ -67,7 +67,7 @@ function cm.efop(e,tp,eg,ep,ev,re,r,rp)
local rc=c:GetReasonCard()
local e2=Effect.CreateEffect(rc)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(cm.indval)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
......
......@@ -72,7 +72,7 @@ function cm.thcost2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,cm.costfilter2,1,1,REASON_DISCARD+REASON_COST)
end
function cm.thfilter2(c)
return c:IsCode(18282103,26704411,29905795,44155002,55277252,56399890,82888408,89194103,90616316,94845226) and c:IsAbleToHand() and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,c)
return c:IsCode(18282103,26704411,29905795,44155002,55277252,56399890,82888408,89194103,90616316,94845226,83039608) and c:IsAbleToHand() and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,c)
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -3,7 +3,7 @@ function c9910014.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c9910014.ffilter,2,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_MZONE,0,Duel.Remove,POS_FACEUP,REASON_COST+REASON_FUSION+REASON_MATERIAL):SetValue(1)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -18,7 +18,6 @@ function c9910014.initial_effect(c)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e2:SetCountLimit(1)
e2:SetCondition(c9910014.condtion)
e2:SetValue(c9910014.valcon)
c:RegisterEffect(e2)
--immune
......@@ -27,7 +26,6 @@ function c9910014.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c9910014.condtion)
e3:SetValue(c9910014.efilter)
c:RegisterEffect(e3)
--Negate
......@@ -49,16 +47,7 @@ function c9910014.ffilter(c)
and c:GetSummonLocation()==LOCATION_EXTRA
end
function c9910014.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c9910014.mfilter(c)
return not c:IsType(TYPE_PENDULUM)
end
function c9910014.condtion(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=c:GetMaterial()
return (c:GetSummonType()==SUMMON_TYPE_SPECIAL+1 or c:IsSummonType(SUMMON_TYPE_FUSION))
and mg:GetCount()>0 and not mg:IsExists(c9910014.mfilter,1,nil)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c9910014.valcon(e,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0
......@@ -76,7 +65,8 @@ function c9910014.discost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c9910014.tgdisable(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
if chk==0 then return c:GetFlagEffect(9910014)==0 end
c:RegisterFlagEffect(9910014,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND)
......
......@@ -42,7 +42,8 @@ function c9910075.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function c9910075.spfilter(c,e,tp)
return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsLevelBelow(4) and c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9910075.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c9910075.spfilter(chkc,e,tp) end
......
......@@ -4,8 +4,9 @@ function c9910214.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER)
e1:SetCondition(c9910214.condition)
e1:SetTarget(c9910214.target)
e1:SetOperation(c9910214.activate)
......
......@@ -41,9 +41,9 @@ end
function c9910220.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c9910220.lkfilter(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(c9910220.lkfilter,tp,LOCATION_MZONE,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c9910220.lkfilter,tp,LOCATION_MZONE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c9910220.lkfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SelectTarget(tp,c9910220.lkfilter,tp,LOCATION_MZONE,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c9910220.lkop(e,tp,eg,ep,ev,re,r,rp)
......
--天空漫步者-回绝
--百态飞天器 试做型
function c9910246.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON)
e1:SetCondition(c9910246.condition)
e1:SetTarget(c9910246.target)
e1:SetOperation(c9910246.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e2)
end
function c9910246.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0
end
function c9910246.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c9910246.filter1(c,tp,id)
return c:GetTurnID()==id and not c:IsReason(REASON_RETURN) and c:GetReasonPlayer()==tp and c:IsAbleToHand()
end
function c9910246.filter2(c,e,tp,id)
return c:GetTurnID()==id and not c:IsReason(REASON_RETURN) and c:GetReasonPlayer()==1-tp
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9910246.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
if Duel.Destroy(eg,REASON_EFFECT)==0 then return end
local id=Duel.GetTurnCount()
local g1=Duel.GetMatchingGroup(c9910246.filter1,tp,0,LOCATION_GRAVE,nil,tp,id)
local g2=Duel.GetMatchingGroup(c9910246.filter2,tp,LOCATION_GRAVE,0,nil,e,tp,id)
Duel.BreakEffect()
local off=1
local ops={}
local opval={}
if g1:GetCount()>0 then
ops[off]=aux.Stringid(9910246,0)
opval[off-1]=1
off=off+1
end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g2:GetCount()>0 then
ops[off]=aux.Stringid(9910246,1)
opval[off-1]=2
off=off+1
end
if off==1 then return end
local op=Duel.SelectOption(tp,table.unpack(ops))
if opval[op]==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg1=g1:Select(tp,1,1,nil)
if sg1:GetCount()>0 then
Duel.HintSelection(sg1)
Duel.SendtoHand(sg1,nil,REASON_EFFECT)
end
elseif opval[op]==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg2=g2:Select(tp,1,1,nil)
if sg2:GetCount()>0 then
Duel.SpecialSummon(sg2,0,tp,tp,false,false,POS_FACEUP)
end
end
--link summon
aux.AddLinkProcedure(c,nil,2)
c:EnableReviveLimit()
end
--塞雷娅
function c9910445.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c9910445.matfilter,2)
--destroy replace
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,6284177)
e1:SetTarget(c9910445.reptg)
e1:SetValue(c9910445.repval)
e1:SetOperation(c9910445.repop)
c:RegisterEffect(e1)
--recover
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c9910445.atkcon)
e2:SetOperation(c9910445.atkop)
c:RegisterEffect(e2)
--disable
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c9910445.discon)
e1:SetTarget(c9910445.distg)
e1:SetOperation(c9910445.disop)
c:RegisterEffect(e1)
end
function c9910445.matfilter(c)
return c:GetSummonLocation()==LOCATION_EXTRA
end
function c9910445.repfilter(c)
return c:IsLocation(LOCATION_ONFIELD) and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c9910445.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c9910445.repfilter,1,nil)
and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c9910445.repval(e,c)
return c9910445.repfilter(c)
end
function c9910445.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,9910445)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c9910445.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
if a:IsControler(1-tp) then a=Duel.GetAttackTarget() end
return a
end
function c9910445.atkop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if tg:GetCount()>0 then
local sc=tg:GetFirst()
while sc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(500)
sc:RegisterEffect(e1)
sc=tg:GetNext()
end
end
end
function c9910445.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc~=c and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function c9910445.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_MZONE,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
Duel.SetChainLimit(c9910445.chlimit)
end
function c9910445.chlimit(e,ep,tp)
return tp==ep
end
function c9910445.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1: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)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
--优雅的韶光 卡米娜尔
function c9910465.initial_effect(c)
--remove
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9910465)
e1:SetTarget(c9910465.target)
e1:SetOperation(c9910465.operation)
c:RegisterEffect(e1)
end
function c9910465.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove()
and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0x9950) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end
function c9910465.locfilter(c,mg)
local res=true
local sc=mg:GetFirst()
while sc do
if c:GetSequence()<=sc:GetSequence() then res=false end
sc=mg:GetNext()
end
return res
end
function c9910465.rmfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c9910465.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)==0 then return end
local g1=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_DECK,0,nil,0x9950)
if g1:GetCount()==0 then return end
local g2=Duel.GetMatchingGroup(c9910465.locfilter,tp,LOCATION_DECK,0,nil,g1)
if g2:GetCount()>0 then g1:Merge(g2) end
Duel.ConfirmCards(tp,g1)
Duel.ConfirmCards(1-tp,g1)
local ct=g1:GetCount()//10
if g1:GetClassCount(Card.GetCode)~=g1:GetCount() or ct<1 then Duel.ShuffleDeck(tp) return end
local g3=Duel.GetFieldGroup(tp,0,LOCATION_MZONE+LOCATION_GRAVE)
if g3:GetCount()>0 then g1:Merge(g3) end
if g1:IsExists(c9910465.rmfilter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(9910465,0)) then
local sg=g1:FilterSelect(tp,c9910465.rmfilter,1,ct,nil)
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
og:AddCard(c)
local fid=c:GetFieldID()
local oc=og:GetFirst()
while oc do
oc:RegisterFlagEffect(9910465,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
oc=og:GetNext()
end
og:KeepAlive()
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:SetLabel(fid)
e1:SetLabelObject(og)
e1:SetCountLimit(1)
e1:SetCondition(c9910465.retcon)
e1:SetOperation(c9910465.retop)
Duel.RegisterEffect(e1,tp)
end
Duel.ShuffleDeck(tp)
end
function c9910465.retfilter(c,fid)
return c:GetFlagEffectLabel(9910465)==fid
end
function c9910465.retcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c9910465.retfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c9910465.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9910465.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local sg=g:Filter(c9910465.retfilter,nil,e:GetLabel())
g:DeleteGroup()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local sg1=sg:Filter(Card.IsAbleToHand,nil)
local sg2=sg:Filter(c9910465.spfilter,nil,e,tp)
local b1=sg1:GetCount()==sg:GetCount()
local b2=sg2:GetCount()==sg:GetCount() and ft>=sg:GetCount()
if b2 and (not b1 or Duel.SelectOption(tp,1104,1152)==1) then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
elseif b1 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
--桃绯斥候 伊那子柚
function c9910521.initial_effect(c)
--spsummon proc
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:SetCountLimit(1,9910521)
e1:SetCondition(c9910521.spcon)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_LVCHANGE+CATEGORY_ATKCHANGE+CATEGORY_TODECK+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c9910521.cost)
e2:SetTarget(c9910521.target)
e2:SetOperation(c9910521.operation)
c:RegisterEffect(e2)
end
function c9910521.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c9910521.cfilter(c,tp)
return not c:IsPublic() and (bit.band(c:GetType(),0x81)==0x81 or c:IsSetCard(0xa950) or c9910521.tdfilter(c,tp))
end
function c9910521.tdfilter(c,tp)
return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(c9910521.thfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(c9910521.thfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c9910521.thfilter(c)
return c:IsSetCard(0xa950) and c:IsLevelBelow(4) and c:IsAbleToHand()
end
function c9910521.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return true end
end
function c9910521.target(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(c9910521.cfilter,tp,LOCATION_HAND,0,1,nil,tp)
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local tc=Duel.SelectMatchingCard(tp,c9910521.cfilter,tp,LOCATION_HAND,0,1,1,nil,tp):GetFirst()
Duel.ConfirmCards(1-tp,tc)
Duel.ShuffleHand(tp)
Duel.SetTargetCard(tc)
local lab=0
local cate=0
if bit.band(tc:GetType(),0x81)==0x81 then
lab=lab+1
cate=cate+CATEGORY_LVCHANGE
end
if tc:IsSetCard(0xa950) then
lab=lab+2
cate=cate+CATEGORY_ATKCHANGE
end
if bit.band(tc:GetType(),0x81)~=0x81 and not tc:IsSetCard(0xa950) and c9910521.tdfilter(tc,tp) then
lab=lab+4
cate=cate+CATEGORY_TODECK+CATEGORY_TOHAND
Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_MZONE)
end
e:SetLabel(lab)
e:SetCategory(cate)
end
function c9910521.fselect(g)
return g:GetClassCount(Card.GetLocation)==g:GetCount()
end
function c9910521.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local lab=e:GetLabel()
if bit.band(lab,1)~=0 and c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
if bit.band(lab,2)~=0 and c:IsRelateToEffect(e) and c:IsFaceup() then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(700)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
if bit.band(lab,4)~=0 and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0
and tc:IsLocation(LOCATION_DECK) then
local g=Duel.GetMatchingGroup(c9910521.thfilter,tp,LOCATION_DECK+LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:SelectSubGroup(tp,c9910521.fselect,false,2,2)
if sg and #sg==2 then
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
--桃绯术式 至暗巨像
function c9910522.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,9910522+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c9910522.target)
e1:SetOperation(c9910522.activate)
c:RegisterEffect(e1)
end
function c9910522.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0xa950) and c:IsAbleToHand() and Duel.GetMZoneCount(tp,c)>1
end
function c9910522.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c9910522.thfilter(chkc,tp) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(c9910522.thfilter,tp,LOCATION_ONFIELD,0,1,c,tp)
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsPlayerCanSpecialSummonMonster(tp,9910523,0xa950,0x4011,1600,1600,4,RACE_ROCK,ATTRIBUTE_DARK) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c9910522.thfilter,tp,LOCATION_ONFIELD,0,1,1,c,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c9910522.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsPlayerCanSpecialSummonMonster(tp,9910523,0xa950,0x4011,1600,1600,4,RACE_ROCK,ATTRIBUTE_DARK) then
for i=1,2 do
local token=Duel.CreateToken(tp,9910522+i)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(1)
token:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c9910522.atkval)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e3,true)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
token:RegisterEffect(e4,true)
end
Duel.SpecialSummonComplete()
end
end
function c9910522.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0xa950)
end
function c9910522.atkval(e,c)
local tp=c:GetControler()
return Duel.GetMatchingGroupCount(c9910522.atkfilter,tp,LOCATION_ONFIELD,0,nil)*200
end
--桃绯术式 日轮之锁
function c9910525.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,9910525+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c9910525.condition)
e1:SetTarget(c9910525.target)
e1:SetOperation(c9910525.activate)
c:RegisterEffect(e1)
end
function c9910525.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainDisablable(ev) and re:IsActiveType(TYPE_MONSTER)
end
function c9910525.atkfilter(c)
return c:IsFaceup() and c:GetAttack()>c:GetBaseAttack()
end
function c9910525.atkfilter2(c,e)
return c:IsFaceup() and c:GetAttack()>c:GetBaseAttack() and not c:IsImmuneToEffect(e)
and not c:IsHasEffect(EFFECT_REVERSE_UPDATE)
end
function c9910525.atkdiff(c)
return math.abs(c:GetBaseAttack()-c:GetAttack())
end
function c9910525.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local tc=re:GetHandler()
if not tc:IsLevelAbove(1) then return false end
local lv=tc:GetLevel()
local atkg=Duel.GetMatchingGroup(c9910525.atkfilter,tp,LOCATION_MZONE,0,nil)
return atkg:CheckWithSumGreater(c9910525.atkdiff,lv*100,1,99)
end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c9910525.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if not tc:IsLevelAbove(1) then return false end
local lv=tc:GetLevel()
local atkg=Duel.GetMatchingGroup(c9910525.atkfilter2,tp,LOCATION_MZONE,0,nil,e)
if not atkg:CheckWithSumGreater(c9910525.atkdiff,lv*100,1,99) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local atkg2=atkg:SelectWithSumGreater(tp,c9910525.atkdiff,lv*100,1,99,nil)
if atkg2:GetCount()==0 then return end
local ct=0
local sc=atkg2:GetFirst()
while sc do
local diff=math.abs(sc:GetBaseAttack()-sc:GetAttack())
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-diff)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
if sc:IsType(TYPE_RITUAL) then ct=ct+1 end
sc=atkg2:GetNext()
end
if Duel.NegateEffect(ev) and ct>0 and Duel.IsPlayerCanDraw(tp,ct)
and Duel.SelectYesNo(tp,aux.Stringid(9910525,0)) then
Duel.BreakEffect()
Duel.Draw(tp,ct,REASON_EFFECT)
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment