Commit 72db42a7 authored by POLYMER's avatar POLYMER

fix

parent 1611f74a
No preview for this file type
......@@ -101,7 +101,7 @@ function cm.imop(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(0x20000000+m+1)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(e:GetHandler():GetLocation())
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e2)
......
......@@ -23,7 +23,7 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
--e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(cm.descon)
e1:SetOperation(cm.desop2)
Duel.RegisterEffect(e1,0)
......@@ -59,7 +59,7 @@ function cm.filter(c,e)
local b2,g2=Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS,true)
return c:GetPreviousLocation()==LOCATION_DECK and (not b1 or not g1:IsContains(c)) and (not b2 or not g2:IsContains(c))
end
return not (e:GetCode()==EVENT_SUMMON_SUCCESS and c:GetFlagEffect(m)>0)
return c:GetPreviousLocation()==LOCATION_DECK and not (e:GetCode()==EVENT_SUMMON_SUCCESS and c:GetFlagEffect(m)>0)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil,e)
......@@ -68,7 +68,7 @@ function cm.desop2(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(eg,EVENT_CUSTOM+m,re,r,rp,ep,ev)
end
function cm.descon3(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():GetFieldID()==re:GetHandler():GetRealFieldID()
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():GetFieldID()==re:GetHandler():GetRealFieldID() and re:GetHandler():GetPreviousLocation()==LOCATION_DECK
end
function cm.desop3(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(eg,EVENT_CUSTOM+m,re,r,rp,ep,ev)
......
--囚徒与恶眼
--星之奔流★十三拘束解放
local cm,m=GetID()
function cm.initial_effect(c)
--search limit
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CUSTOM+m)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
if not cm.global_check then
cm.global_check=true
local _Equip=Duel.Equip
Duel.Equip=function(p,c,...)
c:RegisterFlagEffect(m,RESET_CHAIN,0,1)
local res=_Equip(p,c,...)
c:ResetFlagEffect(m)
return res
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
--e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(cm.descon)
e1:SetOperation(cm.desop2)
Duel.RegisterEffect(e1,0)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(e2,0)
local e3=e1:Clone()
e3:SetCode(EVENT_MOVE)
Duel.RegisterEffect(e3,0)
local e4=e1:Clone()
e4:SetCode(EVENT_CHAINING)
e4:SetCondition(cm.descon3)
e4:SetOperation(cm.desop3)
Duel.RegisterEffect(e4,0)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_SUMMON)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetTargetRange(1,1)
e5:SetTarget(cm.costchk)
Duel.RegisterEffect(e5,0)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(cm.imop)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(cm.efilter)
c:RegisterEffect(e3)
--addition
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_EXTRA)
e4:SetCondition(cm.chcon)
e4:SetOperation(cm.chop)
c:RegisterEffect(e4)
end
function cm.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function cm.imop(e,tp,eg,ep,ev,re,r,rp)
--tograve
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetOperation(cm.adjustop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
e:GetHandler():RegisterEffect(e1,true)
end
function cm.tgfilter(c,tc)
if c:IsLocation(LOCATION_FZONE) then return false end
local seq=c:GetSequence()
if seq==5 then seq=1 elseif seq==6 then seq=3 end
local tseq=tc:GetSequence()
if tseq==5 then tseq=1 elseif tseq==6 then tseq=3 end
return tc:GetColumnGroup():IsContains(c) or (seq+tseq==3) or (seq+tseq==5)
end
function cm.adjustop(e,tp)
local phase=Duel.GetCurrentPhase()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then return end
local g=Duel.GetMatchingGroup(cm.tgfilter,tp,0,LOCATION_ONFIELD,e:GetHandler(),e:GetHandler())
if Duel.SendtoGrave(g,REASON_RULE)>0 then
Duel.Readjust()
end
end
function cm.costchk(e,c,tp,st)
if bit.band(st,SUMMON_TYPE_DUAL)~=SUMMON_TYPE_DUAL then return false end
if c:GetFlagEffect(m)==0 then c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1) end
return false
function cm.chcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and e:GetLabel()==ev-1 and ev<=13
end
function cm.filter(c,e)
if not (c:IsOnField() and (c:IsFacedown() or c:IsStatus(STATUS_EFFECT_ENABLED) or c:GetFlagEffect(m)>0)) then return false end
if e:GetCode()==EVENT_MOVE then
local b1,g1=Duel.CheckEvent(EVENT_SUMMON_SUCCESS,true)
local b2,g2=Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS,true)
return c:GetPreviousLocation()==LOCATION_DECK and (not b1 or not g1:IsContains(c)) and (not b2 or not g2:IsContains(c))
function cm.chop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cat={CATEGORY_RECOVER,CATEGORY_DAMAGE,CATEGORY_DECKDES+CATEGORY_TOGRAVE,CATEGORY_DRAW,CATEGORY_REMOVE,0,CATEGORY_REMOVE,0,CATEGORY_ATKCHANGE,CATEGORY_TOGRAVE,0,CATEGORY_TODECK,CATEGORY_DISABLE}
local cat0=re:GetCategory()
local op0=re:GetOperation()
local repop=function(e,tp,eg,ep,ev,re,r,rp)
op0(e,tp,eg,ep,ev,re,r,rp)
cm.addition(e,tp,eg,ep,ev,re,r,rp)
end
if not Duel.SelectYesNo(tp,aux.Stringid(m,14)) then return end
Duel.ConfirmCards(1-tp,e:GetHandler())
Duel.Hint(HINT_CARD,0,m)
re:SetCategory(cat0|cat[ev])
re:SetOperation(repop)
e:SetLabel(ev)
if ev==13 then
if Duel.IsExistingMatchingCard(Card.IsAbleToHandAsCost,tp,LOCATION_MZONE,0,1,nil) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.SelectYesNo(tp,aux.Stringid(m,15)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHandAsCost,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_COST)
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then
c:CompleteProcedure()
end
end
end
return c:GetPreviousLocation()==LOCATION_DECK and not (e:GetCode()==EVENT_SUMMON_SUCCESS and c:GetFlagEffect(m)>0)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCountLimit(1)
e1:SetLabel(ev)
e1:SetLabelObject(e)
e1:SetCondition(cm.rscon)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) re:SetOperation(op0) re:SetCategory(cat0) e:GetLabelObject():SetLabel(4650) end)
e1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_CHAIN_NEGATED)
Duel.RegisterEffect(e2,tp)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil,e)
function cm.rscon(e,tp,eg,ep,ev,re,r,rp)
return ev==e:GetLabel()
end
function cm.desop2(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(eg,EVENT_CUSTOM+m,re,r,rp,ep,ev)
function cm.addition(e,tp,eg,ep,ev,re,r,rp)
local ev=Duel.GetCurrentChain()
if ev==1 and cm[ev]==nil and Duel.SelectYesNo(tp,aux.Stringid(m,ev)) then
Duel.Recover(tp,100,REASON_EFFECT)
elseif ev==2 and cm[ev]==nil and Duel.SelectYesNo(tp,aux.Stringid(m,ev)) then
Duel.Damage(1-tp,100,REASON_EFFECT)
elseif ev==3 and cm[ev]==nil and Duel.IsPlayerCanDiscardDeck(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(m,ev)) then
Duel.DiscardDeck(tp,1,REASON_EFFECT)
elseif ev==4 and cm[ev]==nil and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(m,ev)) then
Duel.Draw(tp,1,REASON_EFFECT)
elseif ev==5 and cm[ev]==nil and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_DECK,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,ev)) then
local g=Duel.GetDecktopGroup(1-tp,1)
if g:GetCount()>0 then
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
elseif ev==6 and cm[ev]==nil then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)+Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)
if Duel.CheckLocation(tp,LOCATION_MZONE,5) and Duel.CheckLocation(1-tp,LOCATION_MZONE,6) then ft=ft+1 end
if Duel.CheckLocation(tp,LOCATION_MZONE,6) and Duel.CheckLocation(1-tp,LOCATION_MZONE,5) then ft=ft+1 end
if ft>0 and Duel.SelectYesNo(tp,aux.Stringid(m,ev)) then
local zone=Duel.SelectDisableField(tp,1,LOCATION_MZONE,LOCATION_MZONE,0)
if tp==1 then
zone=((zone&0xffff)<<16)|((zone>>16)&0xffff)
end
--disable field
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE_FIELD)
e1:SetValue(zone)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
elseif ev==7 and cm[ev]==nil and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,POS_FACEDOWN) and Duel.SelectYesNo(tp,aux.Stringid(m,ev)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,POS_FACEDOWN)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
elseif ev==8 and cm[ev]==nil and Duel.IsExistingMatchingCard(cm.seqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,ev)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,cm.seqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst()
if tc then
local p1,p2
if tc:IsControler(tp) then
p1=LOCATION_MZONE
p2=0
else
p1=0
p2=LOCATION_MZONE
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local seq=math.log(Duel.SelectDisableField(tp,1,p1,p2,0),2)
if tc:IsControler(1-tp) then seq=seq-16 end
Duel.MoveSequence(tc,seq)
end
elseif ev==9 and cm[ev]==nil then
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,ev)) then
local tc=g:GetFirst()
while tc do
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetValue(500)
tc:RegisterEffect(e3)
tc=g:GetNext()
end
end
elseif ev==10 and cm[ev]==nil then
local g2=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
if g2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,ev)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g2:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
elseif ev==11 and cm[ev]==nil and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,ev)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.ShuffleDeck(tp)
Duel.MoveSequence(tc,SEQ_DECKTOP)
Duel.ConfirmDecktop(tp,1)
end
elseif ev==12 and cm[ev]==nil and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,ev)) then
local p=tp
local g=Duel.GetFieldGroup(p,0,LOCATION_HAND)
if g:GetCount()>0 then
Duel.ConfirmCards(p,g)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local sg=g:Select(p,1,1,nil)
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ShuffleHand(1-p)
end
elseif ev==13 and cm[ev]==nil and Duel.SelectYesNo(tp,aux.Stringid(m,ev)) then
local c=e:GetHandler()
--negate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1)
e1:SetCondition(cm.negcon)
e1:SetOperation(cm.negop)
e1:SetLabel(tp)
Duel.RegisterEffect(e1,tp)
end
cm[ev]=1
end
function cm.descon3(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():GetFieldID()==re:GetHandler():GetRealFieldID() and re:GetHandler():GetPreviousLocation()==LOCATION_DECK
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetLabel()
return rp==1-tp and re:IsActivated()
end
function cm.desop3(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(eg,EVENT_CUSTOM+m,re,r,rp,ep,ev)
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetLabel()
local c=e:GetHandler()
--negate
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCountLimit(1)
e2:SetCondition(cm.dis2con)
e2:SetOperation(cm.dis2op)
e2:SetLabelObject(re)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
e:Reset()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
function cm.dis2con(e,tp,eg,ep,ev,re,r,rp)
return re and e:GetLabelObject() and re==e:GetLabelObject()
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CUSTOM+m)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(cm.filter,nil,e) Duel.SendtoDeck(g,nil,2,REASON_RULE) end)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,0)
function cm.dis2op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.NegateEffect(ev)
end
function cm.seqfilter(c)
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE,PLAYER_NONE,0)>0
end
\ No newline at end of file
--灰流丽·惊奇
function c35531500.initial_effect(c)
aux.AddCodeList(c,14558127)
--sp
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,35531500)
e1:SetTarget(c35531500.sptg)
e1:SetOperation(c35531500.spop)
c:RegisterEffect(e1)
end
function c35531500.ctfil(c,e,tp)
return (c:IsCode(14558127) or aux.IsCodeListed(c,14558127)) and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c35531500.espfil,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetLevel())
end
function c35531500.espfil(c,e,tp,lv)
return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsLevel(lv+e:GetHandler():GetLevel())
end
function c35531500.espfil2(c,e,tp,lv1,lv2)
return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsLevel(lv1+lv2+e:GetHandler():GetLevel())
end
function c35531500.pbfil(c,e,tp,lv)
return not c:IsPublic() and c:IsLevelAbove(1) and (c:IsCode(14558127) or aux.IsCodeListed(c,14558127)) and Duel.IsExistingMatchingCard(c35531500.espfil2,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv,c:GetLevel())
end
function c35531500.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c35531500.ctfil,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
local tc=Duel.SelectMatchingCard(tp,c35531500.ctfil,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp):GetFirst()
local lv=tc:GetLevel()
local g=Group.FromCards(tc,e:GetHandler())
if Duel.IsExistingMatchingCard(c35531500.pbfil,tp,LOCATION_HAND,0,1,nil,e,tp,lv) and Duel.SelectYesNo(tp,aux.Stringid(35531500,0)) then
local pc=Duel.SelectMatchingCard(tp,c35531500.pbfil,tp,LOCATION_HAND,0,1,1,nil,e,tp,lv):GetFirst()
Duel.ConfirmCards(1-tp,pc)
Duel.ShuffleHand(tp)
lv=lv+pc:GetLevel()
end
e:SetLabel(lv)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c35531500.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lv=e:GetLabel()
if lv and Duel.IsExistingMatchingCard(c35531500.espfil,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv) then
local sc=Duel.SelectMatchingCard(tp,c35531500.espfil,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv):GetFirst()
Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
--灰流丽·可爱
function c35531502.initial_effect(c)
aux.AddCodeList(c,14558127)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,35531501+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c35531502.hspcon)
c:RegisterEffect(e1)
--to deck and sp
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,15531502)
e2:SetTarget(c35531502.tgsptg)
e2:SetOperation(c35531502.tgspop)
c:RegisterEffect(e2)
end
function c35531502.cfilter(c)
return c:IsFaceup() and (c:IsCode(14558127) or aux.IsCodeListed(c,14558127)) and not c:IsCode(35531502)
end
function c35531502.hspcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c35531502.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c35531502.espfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and (c:IsCode(14558127) or aux.IsCodeListed(c,14558127)) and c:IsType(TYPE_SYNCHRO)
end
function c35531502.tgsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGrave() and Duel.IsExistingTarget(c35531502.tdfil,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(c35531502.espfil,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
local g=Duel.SelectTarget(tp,c35531502.tdfil,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c35531502.tgspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c35531502.espfil,tp,LOCATION_EXTRA,0,1,nil,e,tp) then
local sc=Duel.SelectMatchingCard(tp,c35531502.espfil,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
--灰流丽·疑问
function c35531503.initial_effect(c)
aux.AddCodeList(c,14558127)
--negate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,35531503)
e1:SetCondition(c35531503.discon)
e1:SetCost(c35531503.discost)
e1:SetTarget(c35531503.distg)
e1:SetOperation(c35531503.disop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,35531503)
e2:SetCost(c35531503.thcost)
e2:SetTarget(c35531503.thtg)
e2:SetOperation(c35531503.thop)
c:RegisterEffect(e2)
end
function c35531503.discon(e,tp,eg,ep,ev,re,r,rp)
local ex2,g2,gc2,dp2,dv2=Duel.GetOperationInfo(ev,CATEGORY_SPECIAL_SUMMON)
local ex3,g3,gc3,dp3,dv3=Duel.GetOperationInfo(ev,CATEGORY_TOGRAVE)
local ex4=re:IsHasCategory(CATEGORY_DRAW)
local ex5=re:IsHasCategory(CATEGORY_SEARCH)
local ex6=re:IsHasCategory(CATEGORY_DECKDES)
return ((ex2 and bit.band(dv2,LOCATION_DECK)==LOCATION_DECK)
or (ex3 and bit.band(dv3,LOCATION_DECK)==LOCATION_DECK)
or ex4 or ex5 or ex6) and Duel.IsChainDisablable(ev)
end
function c35531503.discost(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 c35531503.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c35531503.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c35531503.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c35531503.thfilter(c)
return (c:IsCode(14558127) or aux.IsCodeListed(c,14558127)) and not c:IsCode(35531503) and c:IsAbleToHand()
end
function c35531503.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c35531503.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c35531503.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.SelectMatchingCard(tp,c35531503.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--灰流丽·委屈
function c35531504.initial_effect(c)
aux.AddCodeList(c,14558127)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,35531504)
e1:SetCondition(function(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)==0 end)
e1:SetCost(c35531504.spcost)
e1:SetTarget(c35531504.sptg)
e1:SetOperation(c35531504.spop)
c:RegisterEffect(e1)
end
function c35531504.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c35531504.spfilter(c,e,tp)
return (c:IsCode(14558127) or aux.IsCodeListed(c,14558127)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c35531504.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c35531504.spfilter,tp,LOCATION_HAND,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c35531504.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c35531504.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--灰流丽·咬
function c35531505.initial_effect(c)
aux.AddCodeList(c,14558127)
--deckdes
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,35531505)
e1:SetCondition(c35531505.dkcon)
e1:SetTarget(c35531505.dktg)
e1:SetOperation(c35531505.dkop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,15531505)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c35531505.sptg)
e2:SetOperation(c35531505.spop)
c:RegisterEffect(e2)
--Release
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_RELEASE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,25531505)
e3:SetCondition(c35531505.rlcon)
e3:SetTarget(c35531505.rltg)
e3:SetOperation(c35531505.rlop)
c:RegisterEffect(e3)
end
function c35531505.dkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_DECK)
end
function c35531505.dktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) and Duel.IsPlayerCanDiscardDeck(1-tp,3) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,PLAYER_ALL,3)
end
function c35531505.dkop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetDecktopGroup(tp,3)
local g2=Duel.GetDecktopGroup(1-tp,3)
g1:Merge(g2)
Duel.DisableShuffleCheck()
Duel.SendtoGrave(g1,REASON_EFFECT)
end
function c35531505.spfilter(c,e,tp)
return (c:IsCode(14558127) or aux.IsCodeListed(c,14558127)) and not c:IsCode(35531505) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c35531505.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c35531505.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c35531505.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c35531505.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c35531505.rlcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and rp==1-tp and c:IsPreviousControler(tp)
end
function c35531505.rltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,1-tp,LOCATION_MZONE)
end
function c35531505.rlop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.Release(g,REASON_EFFECT)
end
end
--灰流丽·欺负小蓝
function c35531508.initial_effect(c)
aux.AddCodeList(c,14558127)
--Synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--deckdes
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DECKDES+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,35531508)
e1:SetCondition(function(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) end)
e1:SetTarget(c35531508.ddtg)
e1:SetOperation(c35531508.ddop)
c:RegisterEffect(e1)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,15531508)
e1:SetCost(c35531508.srcost)
e1:SetTarget(c35531508.srtg)
e1:SetOperation(c35531508.srop)
c:RegisterEffect(e1)
end
function c35531508.ddtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2)
end
function c35531508.thfil(c)
return (c:IsCode(14558127) or aux.IsCodeListed(c,14558127)) and c:IsAbleToHand()
end
function c35531508.ddop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.DiscardDeck(tp,2,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c35531508.thfil,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(35531508,0)) then
Duel.BreakEffect()
local sc=Duel.SelectMatchingCard(tp,c35531508.thfil,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
Duel.SendtoHand(sc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sc)
end
end
function c35531508.srcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c35531508.thgck(g)
return g:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)==1
and g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)==1
end
function c35531508.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c35531508.thfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if chk==0 then return g:CheckSubGroup(c35531508.thgck,2,2) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c35531508.srop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c35531508.thfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if g:CheckSubGroup(c35531508.thgck,2,2) then
local sg=g:SelectSubGroup(tp,c35531508.thgck,false,2,2)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--灰流丽·带上手铐
function c35531509.initial_effect(c)
aux.AddCodeList(c,14558127)
--Synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--lv
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(35531509,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,35531509)
e1:SetTarget(c35531509.lvtg)
e1:SetOperation(c35531509.lvop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(35531509,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,15531509)
e2:SetCost(c35531509.spcost)
e2:SetTarget(c35531509.sptg)
e2:SetOperation(c35531509.spop)
c:RegisterEffect(e2)
--des
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,25531509)
e3:SetCondition(c35531509.descon)
e3:SetTarget(c35531509.destg)
e3:SetOperation(c35531509.desop)
c:RegisterEffect(e3)
end
function c35531509.pbfil(c)
return not c:IsPublic() and c:IsAttribute(ATTRIBUTE_FIRE)
end
function c35531509.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c35531509.pbfil,tp,LOCATION_HAND,0,1,nil) end
local tc=Duel.SelectMatchingCard(tp,c35531509.pbfil,tp,LOCATION_HAND,0,1,1,nil):GetFirst()
Duel.ConfirmCards(1-tp,tc)
e:SetLabel(tc:GetLevel())
Duel.ShuffleHand(tp)
end
function c35531509.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lv=e:GetLabel()
if lv and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(-lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
function c35531509.ctfil(c)
return c:IsAbleToHandAsCost() and (c:IsCode(14558127) or aux.IsCodeListed(c,14558127))
end
function c35531509.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c35531509.ctfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,2,nil) end
local g=Duel.SelectMatchingCard(tp,c35531509.ctfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,2,2,nil)
Duel.SendtoHand(g,nil,REASON_COST)
end
function c35531509.spfilter(c,e,tp)
return c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c35531509.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c35531509.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c35531509.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c35531509.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
function c35531509.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
function c35531509.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c35531509.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--灰流丽·选择困难症
function c35531510.initial_effect(c)
aux.AddCodeList(c,14558127)
--Synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--negate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,35531510)
e1:SetTarget(c35531510.negtg)
e1:SetOperation(c35531510.negop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,15531510)
e2:SetCost(c35531510.spcost)
e2:SetTarget(c35531510.sptg)
e2:SetOperation(c35531510.spop)
c:RegisterEffect(e2)
end
function c35531510.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c35531510.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) 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+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_ATTACK)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
function c35531510.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c35531510.spfilter(c,e,tp,mc)
return c:IsLevelBelow(9) and aux.IsCodeListed(c,14558127) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c35531510.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c35531510.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c35531510.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c35531510.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil):GetFirst()
if tc then
if Duel.SpecialSummonStep(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) then
tc:CompleteProcedure()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_TUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
end
--灰流丽·为什么会有墓指这种东西
function c35531511.initial_effect(c)
aux.AddCodeList(c,14558127)
--Synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(function(c) return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_ZOMBIE) end),2)
c:EnableReviveLimit()
--remove
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,35531511)
e1:SetTarget(c35531511.rmtg)
e1:SetOperation(c35531511.rmop)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c35531511.damcon)
e2:SetOperation(c35531511.damop)
c:RegisterEffect(e2)
--negate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,15531511)
e2:SetCondition(c35531511.discon)
e2:SetTarget(c35531511.distg)
e2:SetOperation(c35531511.disop)
c:RegisterEffect(e2)
end
function c35531511.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local x=Duel.GetMatchingGroupCount(function(c) return (c:IsCode(14558127) or aux.IsCodeListed(c,14558127)) end,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return x>0 and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,x,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),nil,LOCATION_ONFIELD)
end
function c35531511.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function c35531511.cfilter(c,tp)
return c:IsSummonPlayer(1-tp)
end
function c35531511.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return eg:IsExists(c35531511.cfilter,1,nil,tp)
end
function c35531511.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,35531511)
Duel.Damage(1-tp,500,REASON_EFFECT)
end
function c35531511.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c35531511.distg(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 c35531511.disop(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 c35531512.initial_effect(c)
aux.AddCodeList(c,14558127)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,35531512+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c35531512.condition)
e1:SetTarget(c35531512.target)
e1:SetOperation(c35531512.activate)
c:RegisterEffect(e1)
end
function c35531512.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(function(c) return c:IsFaceup() and (c:IsCode(14558127) or aux.IsCodeListed(c,14558127)) end,tp,LOCATION_MZONE,0,1,nil)
end
function c35531512.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,35531513,0,TYPES_TOKEN_MONSTER,0,1800,3,RACE_ZOMBIE,ATTRIBUTE_FIRE,POS_FACEUP) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c35531512.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,35531513,0,TYPES_TOKEN_MONSTER,0,1800,3,RACE_ZOMBIE,ATTRIBUTE_FIRE,POS_FACEUP) then return end
local token=Duel.CreateToken(tp,35531513)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
--查询着的灰流丽
function c35531514.initial_effect(c)
aux.AddCodeList(c,14558127)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,35531514+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c35531514.target)
e1:SetOperation(c35531514.activate)
c:RegisterEffect(e1)
end
function c35531514.filter(c)
return c:IsType(TYPE_MONSTER) and (c:IsCode(14558127) or aux.IsCodeListed(c,14558127)) and c:IsAbleToGrave()
end
function c35531514.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c35531514.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c35531514.thfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
end
function c35531514.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c35531514.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 and Duel.SelectYesNo(tp,aux.Stringid(35531514,0)) then
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3)
if g:GetCount()>0 and g:IsExists(c35531514.thfilter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(35531514,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,c35531514.thfilter,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
end
Duel.ShuffleDeck(tp)
end
end
--被破坏轮惩罚的灰流丽
function c35531515.initial_effect(c)
aux.AddCodeList(c,14558127)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c35531515.cost)
c:RegisterEffect(e1)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(35531515,1))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetLabel(1)
e1:SetCondition(c35531515.effcon)
e1:SetTarget(c35531515.tgtg)
e1:SetOperation(c35531515.tgop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(35531515,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetLabel(3)
e2:SetCondition(c35531515.effcon)
e2:SetTarget(c35531515.sptg)
e2:SetOperation(c35531515.spop)
c:RegisterEffect(e2)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(35531515,3))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetLabel(5)
e2:SetCondition(c35531515.effcon)
e2:SetTarget(c35531515.esptg)
e2:SetOperation(c35531515.espop)
c:RegisterEffect(e2)
end
function c35531515.ctfil(c)
return c:IsAbleToRemoveAsCost() and (c:IsCode(14558127) or aux.IsCodeListed(c,14558127))
end
function c35531515.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c35531515.ctfil,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c35531515.ctfil,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c35531515.effcon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroupCount(function(c) return (c:IsCode(14558127) or aux.IsCodeListed(c,14558127)) end,tp,LOCATION_GRAVE,0,nil)>=e:GetLabel()
end
function c35531515.tgfil(c)
return (c:IsCode(14558127) or aux.IsCodeListed(c,14558127)) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c35531515.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c35531515.tgfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c35531515.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c35531515.tgfil,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c35531515.spfil(c,e,tp)
return (c:IsCode(14558127) or aux.IsCodeListed(c,14558127)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c35531515.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c35531515.spfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c35531515.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c35531515.spfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c35531515.tdfil(c)
return c:IsAbleToDeckOrExtraAsCost() and (c:IsCode(14558127) or aux.IsCodeListed(c,14558127)) and c:IsLevelAbove(1)
end
function c35531515.espfil(c,e,tp,g)
return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and c:IsLevel(g:GetSum(Card.GetLevel)) and aux.IsCodeListed(c,14558127) and c:IsType(TYPE_SYNCHRO)
end
function c35531515.tdgck(g,e,tp)
return g:FilterCount(function(c) return c:IsType(TYPE_TUNER) end,nil)==1
and g:FilterCount(function(c) return not c:IsType(TYPE_TUNER) end,nil)==1
and Duel.IsExistingMatchingCard(c35531515.espfil,tp,LOCATION_EXTRA,0,1,nil,e,tp,g)
end
function c35531515.esptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c35531515.tdfil,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return g:CheckSubGroup(c35531515.tdgck,2,2,e,tp) end
local sg=g:SelectSubGroup(tp,c35531515.tdgck,false,2,2,e,tp)
sg:KeepAlive()
e:SetLabelObject(sg)
Duel.SendtoDeck(sg,nil,2,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c35531515.espop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=e:GetLabelObject()
if g:GetCount()>0 and Duel.IsExistingMatchingCard(c35531515.espfil,tp,LOCATION_EXTRA,0,1,nil,e,tp,g) then
local sc=Duel.SelectMatchingCard(tp,c35531515.espfil,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,g):GetFirst()
Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
......@@ -86,6 +86,7 @@ function c9911357.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local tc=g1:RandomSelect(tp,1):GetFirst()
if tc then
Duel.ConfirmCards(tp,tc)
tc:RegisterFlagEffect(9911357,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,66)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -47,6 +47,7 @@ function c9911359.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(9911359,1))
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_CONFIRM)
local tc=cg:Select(1-tp,1,1,nil):GetFirst()
Duel.ConfirmCards(tp,tc)
tc:RegisterFlagEffect(9911359,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,66)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
......
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