Commit 7a16b4b2 authored by wyykak's avatar wyykak

remove files of deleted cards

parent 9cd3ed37
--隙间妖怪的式神✿八云蓝
function c86379654.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c86379654.matfilter,2)
c:EnableReviveLimit()
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379654,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,86379654)
e1:SetCondition(c86379654.condition)
e1:SetTarget(c86379654.target)
e1:SetOperation(c86379654.operation)
c:RegisterEffect(e1)
--todeck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379654,1))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c86379654.target2)
e2:SetOperation(c86379654.operation2)
c:RegisterEffect(e2)
--position
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(86379654,2))
e3:SetCategory(CATEGORY_POSITION)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_MOVE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c86379654.condition3)
e3:SetTarget(c86379654.target3)
e3:SetOperation(c86379654.operation3)
c:RegisterEffect(e3)
--
if not c86379654.global_check then
c86379654.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(c86379654.checkop1)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
ge2:SetOperation(c86379654.checkop2)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
ge3:SetOperation(c86379654.checkop3)
Duel.RegisterEffect(ge3,0)
local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_MSET)
ge4:SetOperation(c86379654.checkop1)
Duel.RegisterEffect(ge4,0)
local ge5=Effect.CreateEffect(c)
ge5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge5:SetCode(EVENT_SSET)
ge5:SetOperation(c86379654.checkop4)
Duel.RegisterEffect(ge5,0)
end
end
--
function c86379654.checkop1(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
tc:RegisterFlagEffect(186379654,RESET_EVENT+RESET_TOFIELD+RESET_TOHAND+RESET_TOGRAVE+RESET_PHASE+PHASE_END,0,1)
end
end
function c86379654.checkop2(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
tc:RegisterFlagEffect(186379655,RESET_EVENT+RESET_TOFIELD+RESET_TOHAND+RESET_TOGRAVE+RESET_PHASE+PHASE_END,0,1)
end
end
function c86379654.checkop3(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
tc:RegisterFlagEffect(186379656,RESET_EVENT+RESET_TOFIELD+RESET_TOHAND+RESET_TOGRAVE+RESET_PHASE+PHASE_END,0,1)
end
end
function c86379654.checkop4(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
tc:RegisterFlagEffect(186379657,RESET_EVENT+RESET_TOFIELD+RESET_TOHAND+RESET_TOGRAVE+RESET_PHASE+PHASE_END,0,1)
end
end
--
function c86379654.matfilter(c)
return not c:IsLinkType(TYPE_TOKEN) and c:IsSetCard(0x208)
end
--
function c86379654.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_LINK
end
function c86379654.spfilter(c,e,tp)
return c:IsSetCard(0x225a) and c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c86379654.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379654.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c86379654.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
local c=e:GetHandler()
local fid=c:GetFieldID()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c86379654.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local rc=Duel.GetOperatedGroup():GetFirst()
local tg=rc:GetColumnGroup()
tg:AddCard(rc)
if Duel.Remove(tg,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)<1 then return end
local fid=c:GetFieldID()
local rg=Duel.GetOperatedGroup()
for tc in aux.Next(rg) do
tc:RegisterFlagEffect(86379655,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2,fid)
end
rg:KeepAlive()
local ct=Duel.GetTurnCount()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid,ct)
e1:SetLabelObject(rg)
e1:SetCondition(c86379654.con1_2)
e1:SetOperation(c86379654.op1_2)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
end
end
function c86379654.con1_2(e,tp,eg,ep,ev,re,r,rp)
local fid,ct=e:GetLabel()
return Duel.GetTurnCount()~=ct
end
function c86379654.refilter2(c,fid)
return c:GetFlagEffect(86379655)>0
and c:GetFlagEffectLabel(86379655)==fid
end
function c86379654.op1_2(e,tp,eg,ep,ev,re,r,rp)
local fid,oil=e:GetLabel()
local g=e:GetLabelObject()
local sg=g:Filter(c86379654.refilter2,nil,fid)
for i=1,2 do
local p=tp
if i==2 then p=1-tp end
if sg:GetCount()<1 then return end
local lg=sg:Filter(Card.IsPreviousControler,nil,p)
local ft=Duel.GetLocationCount(p,LOCATION_MZONE)
if lg and ft>0 and ft<lg:GetCount() then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(86379654,4))
local rg=lg:Select(p,ft,ft,nil)
for tc in aux.Next(rg) do
Duel.ReturnToField(tc)
sg:RemoveCard(tc)
end
end
end
if sg:GetCount()<1 then return end
for tc in aux.Next(sg) do
Duel.ReturnToField(tc)
end
end
--
function c86379654.filter(c)
return c:IsAbleToDeck() or bit.band(c:GetReason(),REASON_TEMPORARY)~=0
end
function c86379654.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379654.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_REMOVED)
end
function c86379654.tdfilter(c)
return c:IsAbleToDeck()
end
function c86379654.tzfilter(c)
return bit.band(c:GetReason(),REASON_TEMPORARY)~=0
end
function c86379654.operation2(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c86379654.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) then return end
local c=e:GetHandler()
local off=1
local ops={}
local opval={}
if Duel.IsExistingMatchingCard(c86379654.tdfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) then
ops[off]=aux.Stringid(86379654,3)
opval[off-1]=1
off=off+1
end
if Duel.IsExistingMatchingCard(c86379654.tzfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) then
ops[off]=aux.Stringid(86379654,4)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c86379654.tdfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
if sel==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c86379654.tzfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
Duel.HintSelection(g)
local rc=g:GetFirst()
local pos=rc:GetPreviousPosition()
local cp=rc:GetPreviousControler()
if rc:IsType(TYPE_FIELD) and rc:IsPreviousLocation(LOCATION_FZONE) then
if Duel.GetFieldCard(cp,LOCATION_SZONE,5) then
Duel.SendtoGrave(rc,REASON_RULE)
else
Duel.MoveToField(rc,cp,cp,LOCATION_FZONE,pos,true)
if rc:IsFacedown() and rc:GetFlagEffect(186379657)>0 then
rc:SetStatus(STATUS_SET_TURN,true)
end
end
elseif rc:IsType(TYPE_PENDULUM) and rc:IsPreviousLocation(LOCATION_PZONE) then
if Duel.GetFieldCard(cp,LOCATION_PZONE,0) and Duel.GetFieldCard(cp,LOCATION_PZONE,1) then
Duel.SendtoGrave(rc,REASON_RULE)
else
Duel.MoveToField(rc,cp,cp,LOCATION_PZONE,pos,true)
end
elseif rc:IsType(TYPE_MONSTER) and rc:IsPreviousLocation(LOCATION_SZONE) then
local ty=rc:GetPreviousTypeOnField()
if Duel.GetLocationCount(cp,LOCATION_SZONE)>0 then
Duel.MoveToField(rc,cp,cp,LOCATION_SZONE,pos,true)
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(ty)
rc:RegisterEffect(e1,true)
else
Duel.SendtoGrave(rc,REASON_RULE)
end
elseif rc:IsPreviousLocation(LOCATION_MZONE) then
if Duel.GetLocationCount(cp,LOCATION_MZONE)>0 and rc:IsType(TYPE_MONSTER) then
local a=0
if rc:GetFlagEffect(186379654)>0 then
a=1
end
if rc:GetFlagEffect(186379655)>0 then
a=2
end
if rc:GetFlagEffect(186379656)>0 then
a=3
end
Duel.MoveToField(rc,cp,cp,LOCATION_MZONE,pos,true)
if a==1 then
rc:SetStatus(STATUS_SUMMON_TURN,true)
end
if a==2 then
rc:SetStatus(STATUS_SPSUMMON_TURN,true)
end
if a==3 then
rc:SetStatus(STATUS_FLIP_SUMMON_TURN,true)
end
else
Duel.SendtoGrave(rc,REASON_RULE)
end
elseif rc:IsPreviousLocation(LOCATION_SZONE) then
if Duel.GetLocationCount(cp,LOCATION_SZONE)>0 then
local a=0
if rc:GetFlagEffect(186379657)>0 then
a=4
end
Duel.MoveToField(rc,cp,cp,LOCATION_SZONE,pos,true)
if rc:IsFacedown() and a==4 then
rc:SetStatus(STATUS_SET_TURN,true)
end
else
Duel.SendtoGrave(rc,REASON_RULE)
end
end
end
end
--
function c86379654.pfilter(c)
return c:IsLocation(LOCATION_ONFIELD) and c:IsPreviousLocation(LOCATION_REMOVED) and not c:IsReason(REASON_SPSUMMON)
end
function c86379654.condition3(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c86379654.pfilter,1,nil)
end
function c86379654.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanChangePosition() end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c86379654.operation3(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
--九尾妖兽✿八云蓝
function c86379694.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c86379694.spcon)
e1:SetOperation(c86379694.spop)
c:RegisterEffect(e1)
--nine
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c86379694.condition)
e2:SetOperation(c86379694.operation)
c:RegisterEffect(e2)
--tozone
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetOperation(c86379694.tzop)
c:RegisterEffect(e3)
--remove
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(86379694,0))
e5:SetCategory(CATEGORY_POSITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_REMOVE)
e5:SetTarget(c86379694.gtg)
e5:SetOperation(c86379694.gop)
c:RegisterEffect(e5)
--
if not c86379694.global_check then
c86379694.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(c86379694.checkop1)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
ge2:SetOperation(c86379694.checkop2)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
ge3:SetOperation(c86379694.checkop3)
Duel.RegisterEffect(ge3,0)
local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_MSET)
ge4:SetOperation(c86379694.checkop1)
Duel.RegisterEffect(ge4,0)
local ge5=Effect.CreateEffect(c)
ge5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge5:SetCode(EVENT_SSET)
ge5:SetOperation(c86379694.checkop4)
Duel.RegisterEffect(ge5,0)
end
end
--
function c86379694.checkop1(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
tc:RegisterFlagEffect(186379654,RESET_EVENT+RESET_TOFIELD+RESET_TOHAND+RESET_TOGRAVE+RESET_PHASE+PHASE_END,0,1)
end
end
function c86379694.checkop2(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
tc:RegisterFlagEffect(186379655,RESET_EVENT+RESET_TOFIELD+RESET_TOHAND+RESET_TOGRAVE+RESET_PHASE+PHASE_END,0,1)
end
end
function c86379694.checkop3(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
tc:RegisterFlagEffect(186379656,RESET_EVENT+RESET_TOFIELD+RESET_TOHAND+RESET_TOGRAVE+RESET_PHASE+PHASE_END,0,1)
end
end
function c86379694.checkop4(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
tc:RegisterFlagEffect(186379657,RESET_EVENT+RESET_TOFIELD+RESET_TOHAND+RESET_TOGRAVE+RESET_PHASE+PHASE_END,0,1)
end
end
--
function c86379694.filter(c)
return c:IsSetCard(0x225a) and c:IsAbleToRemoveAsCost() and c:IsRace(RACE_BEAST)
end
function c86379694.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c86379694.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c86379694.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c86379694.filter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
Duel.Remove(tc,POS_FACEUP,REASON_COST+REASON_TEMPORARY)
if tc:IsLocation(LOCATION_REMOVED) then
local fid=c:GetFieldID()
tc:RegisterFlagEffect(86379694,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
tc:RegisterFlagEffect(86379695,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(c86379694.con1_2)
e1:SetOperation(c86379694.op1_2)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
end
function c86379694.con1_2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return tc:GetFlagEffect(86379694)<=0
end
function c86379694.op1_2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
local fid=e:GetLabel()
if tc:GetFlagEffect(86379695)>0 and tc:GetFlagEffectLabel(86379695)==fid then
Duel.ReturnToField(tc)
end
end
--
function c86379694.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>12
end
function c86379694.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
while Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>12 and g:GetCount()>0 do
local sg=g:GetMaxGroup(Card.GetFieldID)
local tc=sg:GetFirst()
g:RemoveCard(tc)
if Duel.Remove(tc,POS_FACEUP,REASON_RULE+REASON_TEMPORARY)~=0 then
if tc:IsLocation(LOCATION_REMOVED) then
tc:CreateRelation(c,RESET_EVENT+RESETS_STANDARD)
c:SetCardTarget(tc)
end
end
end
end
--
function c86379694.tzfilter(c,rc)
return c:IsRelateToCard(rc)
end
function c86379694.tzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c86379694.tzfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil,c)
if g:GetCount()>0 then
for tc in aux.Next(g) do
Duel.ReturnToField(tc)
end
end
end
--
function c86379694.gtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then
if bit.band(c:GetReason(),REASON_TEMPORARY)~=0 then
return
chkc:IsLocation(LOCATION_MZONE)
else
return
chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanChangePosition()
end
end
if chk==0 then
if bit.band(c:GetReason(),REASON_TEMPORARY)~=0 then
return
Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
else
return
Duel.IsExistingTarget(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
end
if bit.band(c:GetReason(),REASON_TEMPORARY)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
end
function c86379694.gop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
local rc=e:GetHandler()
if rc:IsRelateToEffect(e) and bit.band(rc:GetReason(),REASON_TEMPORARY)~=0 and rc:IsPreviousLocation(LOCATION_ONFIELD) then
local pos=rc:GetPreviousPosition()
local cp=rc:GetPreviousControler()
if rc:IsType(TYPE_FIELD) and rc:IsPreviousLocation(LOCATION_FZONE) then
if Duel.GetFieldCard(cp,LOCATION_SZONE,5) then
Duel.SendtoGrave(rc,REASON_RULE)
else
Duel.MoveToField(rc,cp,cp,LOCATION_FZONE,pos,true)
if rc:IsFacedown() and rc:GetFlagEffect(186379657)>0 then
rc:SetStatus(STATUS_SET_TURN,true)
end
end
elseif rc:IsType(TYPE_PENDULUM) and rc:IsPreviousLocation(LOCATION_PZONE) then
if Duel.GetFieldCard(cp,LOCATION_PZONE,0) and Duel.GetFieldCard(cp,LOCATION_PZONE,1) then
Duel.SendtoGrave(rc,REASON_RULE)
else
Duel.MoveToField(rc,cp,cp,LOCATION_PZONE,pos,true)
end
elseif rc:IsType(TYPE_MONSTER) and rc:IsPreviousLocation(LOCATION_SZONE) then
local ty=rc:GetPreviousTypeOnField()
if Duel.GetLocationCount(cp,LOCATION_SZONE)>0 then
Duel.MoveToField(rc,cp,cp,LOCATION_SZONE,pos,true)
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(ty)
rc:RegisterEffect(e1,true)
else
Duel.SendtoGrave(rc,REASON_RULE)
end
elseif rc:IsPreviousLocation(LOCATION_MZONE) then
if Duel.GetLocationCount(cp,LOCATION_MZONE)>0 and rc:IsType(TYPE_MONSTER) then
local a=0
if rc:GetFlagEffect(186379654)>0 then
a=1
end
if rc:GetFlagEffect(186379655)>0 then
a=2
end
if rc:GetFlagEffect(186379656)>0 then
a=3
end
Duel.MoveToField(rc,cp,cp,LOCATION_MZONE,pos,true)
if a==1 then
rc:SetStatus(STATUS_SUMMON_TURN,true)
end
if a==2 then
rc:SetStatus(STATUS_SPSUMMON_TURN,true)
end
if a==3 then
rc:SetStatus(STATUS_FLIP_SUMMON_TURN,true)
end
else
Duel.SendtoGrave(rc,REASON_RULE)
end
elseif rc:IsPreviousLocation(LOCATION_SZONE) then
if Duel.GetLocationCount(cp,LOCATION_SZONE)>0 then
local a=0
if rc:GetFlagEffect(186379657)>0 then
a=4
end
Duel.MoveToField(rc,cp,cp,LOCATION_SZONE,pos,true)
if rc:IsFacedown() and a==4 then
rc:SetStatus(STATUS_SET_TURN,true)
end
else
Duel.SendtoGrave(rc,REASON_RULE)
end
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment