Commit 7a16b4b2 authored by wyykak's avatar wyykak

remove files of deleted cards

parent 9cd3ed37
This diff is collapsed.
--九尾妖兽✿八云蓝
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