Commit 5111e96c authored by GuGu's avatar GuGu

Update c74561011.lua

parent b6701489
Pipeline #37457 passed with stage
in 21 seconds
......@@ -8,9 +8,9 @@ function cCardno.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(Cardno,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_TO_DECK)
e2:SetCode(EVENT_CUSTOM+Cardno)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,Cardno)
e2:SetCondition(cCardno.spcon)
......@@ -39,6 +39,27 @@ function cCardno.initial_effect(c)
e4:SetTarget(cCardno.tdtg)
e4:SetOperation(cCardno.tdop)
--c:RegisterEffect(e4)
if not cCardno.global_check then
cCardno.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_DECK)
ge1:SetCondition(cCardno.regcon)
ge1:SetOperation(cCardno.regop)
Duel.RegisterEffect(ge1,0)
end
end
function cCardno.regcon(e,tp,eg,ep,ev,re,r,rp)
local v=0
if eg:IsExists(cCardno.spfilter,1,nil,0) then v=v+1 end
if eg:IsExists(cCardno.spfilter,1,nil,1) then v=v+2 end
if v==0 then return false end
e:SetLabel(({0,1,PLAYER_ALL})[v])
return true
end
function cCardno.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(eg,EVENT_CUSTOM+Cardno,re,r,rp,ep,e:GetLabel())
end
--to deck
function cCardno.tdfilter(c)
......@@ -77,15 +98,15 @@ function cCardno.scop(e,tp,eg,ep,ev,re,r,rp)
end
end
--special summon
function cCardno.spfilter(c)
return c:IsPreviousLocation(LOCATION_HAND) or c:IsPreviousLocation(LOCATION_GRAVE) or c:IsPreviousLocation(LOCATION_ONFIELD)
function cCardno.spfilter(c,tp)
return (c:IsPreviousLocation(LOCATION_HAND) or c:IsPreviousLocation(LOCATION_GRAVE) or c:IsPreviousLocation(LOCATION_ONFIELD)) and c:IsPreviousControler(tp)
end
function cCardno.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return eg:IsExists(cCardno.spfilter,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return ev==tp or ev==1-tp or ev==PLAYER_ALL
end
function cCardno.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
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,e:GetHandler(),1,tp,e:GetHandler():GetLocation())
end
function cCardno.spop(e,tp,eg,ep,ev,re,r,rp,c)
......
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