Commit 43dd4c4a authored by POLYMER's avatar POLYMER

fix

parent 63085692
...@@ -27,30 +27,17 @@ function c19209536.initial_effect(c) ...@@ -27,30 +27,17 @@ function c19209536.initial_effect(c)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3) c:RegisterEffect(e3)
Debug.Message(1)
--spsummon --spsummon
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_DECK) e4:SetCode(EVENT_MOVE)
e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,19209538) e4:SetCountLimit(1,19209538)
e4:SetCondition(c19209536.spcon) e4:SetCondition(c19209536.spcon)
e4:SetTarget(c19209536.sptg) e4:SetTarget(c19209536.sptg)
e4:SetOperation(c19209536.spop) e4:SetOperation(c19209536.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_TO_GRAVE)
c:RegisterEffect(e5)
Debug.Message(2)
Debug.Message(e4)
--test
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_GRAVE)
e6:SetTarget(c19209536.sptg)
e6:SetOperation(c19209536.spop)
c:RegisterEffect(e6)
end end
function c19209536.thcon(e,tp,eg,ep,ev,re,r,rp) function c19209536.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_PZONE,0,1,e:GetHandler(),19209511) return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_PZONE,0,1,e:GetHandler(),19209511)
...@@ -90,20 +77,13 @@ function c19209536.pzop(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,20 +77,13 @@ function c19209536.pzop(e,tp,eg,ep,ev,re,r,rp)
end end
function c19209536.spcon(e,tp,eg,ep,ev,re,r,rp) function c19209536.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return true--c:IsReason(REASON_EFFECT) and c:IsLocation(LOCATION_EXTRA+LOCATION_GRAVE) return c:IsReason(REASON_EFFECT) and c:IsLocation(LOCATION_EXTRA+LOCATION_GRAVE)
end end
function c19209536.spfilter(c,e,tp) function c19209536.spfilter(c,e,tp)
return c:IsCode(19209542) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceupEx() return c:IsCode(19209542) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceupEx()
end end
function c19209536.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c19209536.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end--Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(c19209536.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) if chk==0 then return Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(c19209536.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
local c=e:GetHandler()
local ct=0
if c:IsReason(REASON_EFFECT) then ct=ct+1 end
if c:IsLocation(LOCATION_EXTRA+LOCATION_GRAVE) then ct=ct+2 end
if Duel.GetMZoneCount(tp)>0 then ct=ct+4 end
if Duel.IsExistingMatchingCard(c19209536.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) then ct=ct+8 end
Debug.Message(ct)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end end
function c19209536.spop(e,tp,eg,ep,ev,re,r,rp) function c19209536.spop(e,tp,eg,ep,ev,re,r,rp)
......
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