Commit a484a523 authored by 聖園ミカ's avatar 聖園ミカ 🐟

hop

parent 3b3a9ca1
Pipeline #31217 failed with stages
in 18 minutes and 49 seconds
......@@ -7,13 +7,15 @@ function c50224275.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCode(EVENT_CUSTOM+50224275)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetCondition(c50224275.spcon1)
e1:SetTarget(c50224275.sptg1)
e1:SetOperation(c50224275.spop1)
c:RegisterEffect(e1)
aux.RegisterMergedDelayedEvent(c,50224275,EVENT_SPSUMMON_SUCCESS)
--release
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_RELEASE+CATEGORY_ATKCHANGE)
......@@ -44,18 +46,19 @@ function c50224275.spfilter1(c,e,tp,attr)
end
function c50224275.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local sg=eg:Filter(Card.IsSummonPlayer,e:GetHandler(),1-tp)
if #sg<1 then return end
local attr=0
local sc=sg:GetFirst()
while sc do
attr=attr+sc:GetAttribute()
Debug.Message(sc:GetCode())
attr=attr|sc:GetAttribute()
sc=sg:GetNext()
end
e:SetLabel(attr)
if chk==0 then return e:GetHandler():GetFlagEffect(50224275)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c50224275.spfilter1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,attr) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
e:GetHandler():RegisterFlagEffect(50224275,RESET_CHAIN,0,1)
end
function c50224275.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
......
......@@ -7,13 +7,15 @@ function c50224280.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCode(EVENT_CUSTOM+50224280)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetCondition(c50224280.spcon1)
e1:SetTarget(c50224280.sptg1)
e1:SetOperation(c50224280.spop1)
c:RegisterEffect(e1)
aux.RegisterMergedDelayedEvent(c,50224280,EVENT_SPSUMMON_SUCCESS)
--release
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -46,14 +48,13 @@ function c50224280.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local attr=0
local sc=sg:GetFirst()
while sc do
attr=attr+sc:GetAttribute()
attr=attr|sc:GetAttribute(attr)
sc=sg:GetNext()
end
e:SetLabel(attr)
if chk==0 then return e:GetHandler():GetFlagEffect(50224280)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c50224280.spfilter1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,attr) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
e:GetHandler():RegisterFlagEffect(50224280,RESET_CHAIN,0,1)
end
function c50224280.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
......@@ -98,5 +99,13 @@ function c50224280.rlop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c50224280.efilter(e,re)
return re:GetOwner()~=e:GetOwner() and not e:GetHandler():GetLinkedGroup():IsContains(re:GetHandler())
if re:GetOwner()==e:GetOwner() then return false end
local c=e:GetHandler()
local rc=re:GetHandler()
local zone=c:GetLinkedZone()
local loc=re:GetActivateLocation()
if loc&LOCATION_MZONE==0 then return true end
local seq=re:GetActivateSequence()
if re:GetOwnerPlayer()~=e:GetOwnerPlayer() then seq=seq+16 end
return bit.extract(zone,seq)==0
end
\ No newline at end of file
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