Commit ad0cc24e authored by wind2009's avatar wind2009

Fix 創星竜華-光巴

parent c1e6a9bb
...@@ -13,7 +13,7 @@ function s.initial_effect(c) ...@@ -13,7 +13,7 @@ function s.initial_effect(c)
--to hand --to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
...@@ -47,15 +47,17 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,15 +47,17 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
if e:GetHandler():IsRelateToEffect(e) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT) Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end end
end
end end
function s.spcfilter(c,tp) function s.spcfilter(c)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.spcfilter,1,nil) return eg:IsExists(s.spcfilter,1,e:GetHandler())
end end
function s.rfilter(c,tp,ec) function s.rfilter(c,tp,ec)
return c:IsSetCard(0x2c1) and c:IsReleasableByEffect() return c:IsSetCard(0x2c1) and c:IsReleasableByEffect()
...@@ -65,7 +67,7 @@ end ...@@ -65,7 +67,7 @@ end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_MZONE,0,c,tp) local g=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_MZONE,0,c,tp)
if chk==0 then return #g>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end if chk==0 then return #g>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_RELEASE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
...@@ -88,7 +90,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,7 +90,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_MZONE,0,1,1,aux.ExceptThisCard(e),tp,c) local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_MZONE,0,1,1,aux.ExceptThisCard(e),tp,c)
if Duel.Release(g,REASON_EFFECT) and c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)~=0 then if Duel.Release(g,REASON_EFFECT) and c:IsRelateToEffect(e) and Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)~=0 then
c:CompleteProcedure() c:CompleteProcedure()
if Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) if Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp)
and Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_DECK,0,1,nil,tp) and Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_DECK,0,1,nil,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