Commit c6037eec authored by wind2009's avatar wind2009

Fix 希望の天啓

parent 788f92b3
Pipeline #31280 passed with stages
in 1 minute and 40 seconds
...@@ -3,6 +3,7 @@ local s,id,o=GetID() ...@@ -3,6 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
...@@ -13,14 +14,17 @@ function s.initial_effect(c) ...@@ -13,14 +14,17 @@ function s.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.spfilter(c,e,tp,lc) function s.spfilter(c,e,tp,lc)
return c:IsType(TYPE_XYZ) and c:IsRace(RACE_DRAGON) and c:IsRank(8) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,lc,c)>0 return c:IsType(TYPE_XYZ) and c:IsRace(RACE_DRAGON)
and c:IsRank(8) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,lc,c)>0
end end
function s.costfilter(c,e,tp) function s.costfilter(c,e,tp)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsLevel(8) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsLevel(8)
and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,s.costfilter,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
local g=Duel.SelectReleaseGroup(tp,s.costfilter,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
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