Commit fe057de5 authored by GuGu's avatar GuGu

Update c50502.lua

parent 333dd8bd
Pipeline #32599 passed with stage
in 35 seconds
...@@ -6,6 +6,7 @@ function c50502.initial_effect(c) ...@@ -6,6 +6,7 @@ function c50502.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,50502) e1:SetCountLimit(1,50502)
e1:SetTarget(c50502.target)
e1:SetOperation(c50502.activate) e1:SetOperation(c50502.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Charge --Charge
...@@ -22,6 +23,10 @@ end ...@@ -22,6 +23,10 @@ end
function c50502.spfilter(c,e,tp) function c50502.spfilter(c,e,tp)
return c:IsSetCard(0x250) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 return c:IsSetCard(0x250) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c50502.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50502.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c50502.activate(e,tp,eg,ep,ev,re,r,rp) function c50502.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,50502,0,0,0) Duel.RegisterFlagEffect(tp,50502,0,0,0)
local g=Duel.GetMatchingGroup(c50502.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp) local g=Duel.GetMatchingGroup(c50502.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
......
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