Commit 63085692 authored by POLYMER's avatar POLYMER

fix

parent d1bc9200
......@@ -68,6 +68,14 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetCondition(cm.descon)
e2:SetOperation(cm.desop)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetLabelObject(sg)
e3:SetCondition(cm.descon3)
e3:SetOperation(cm.desop3)
Duel.RegisterEffect(e3,tp)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
......@@ -76,7 +84,8 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(dg,REASON_EFFECT)
end
function cm.desfilter(c,fid)
return c:GetFlagEffectLabel(m)==fid
if c:GetFlagEffect(m)==0 then return false end
return c:GetFlagEffectLabel(m)==fid or c:IsHasEffect(EFFECT_FLAG_EFFECT):GetDescription()==aux.Stringid(m,4)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
......@@ -86,8 +95,18 @@ function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return false
else return true end
end
function cm.descon3(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local rc=re:GetHandler()
local te=rc:GetReasonEffect()
return g and g:IsContains(rc) and rc:GetFlagEffect(m)==0 and rc:IsPreviousLocation(LOCATION_ONFIELD) and te and te:IsActivated() and te==re
end
function cm.desop3(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
rc:RegisterFlagEffect(m,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,4))
end
function cm.dsop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsImmuneToEffect(e) then return end
--if re:GetHandler():IsImmuneToEffect(e) then return end
local op=re:GetOperation() or aux.TRUE
local op2=function(e,...) e:SetOperation(op) op(e,...) Duel.BreakEffect() op(e,...) end
re:SetOperation(op2)
......
......@@ -27,9 +27,10 @@ function c19209536.initial_effect(c)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--search
Debug.Message(1)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_DECK)
e4:SetProperty(EFFECT_FLAG_DELAY)
......@@ -41,6 +42,15 @@ function c19209536.initial_effect(c)
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
function c19209536.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_PZONE,0,1,e:GetHandler(),19209511)
......@@ -80,13 +90,20 @@ function c19209536.pzop(e,tp,eg,ep,ev,re,r,rp)
end
function c19209536.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and c:IsLocation(LOCATION_EXTRA+LOCATION_GRAVE)
return true--c:IsReason(REASON_EFFECT) and c:IsLocation(LOCATION_EXTRA+LOCATION_GRAVE)
end
function c19209536.spfilter(c,e,tp)
return c:IsCode(19209542) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceupEx()
end
function c19209536.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
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
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)
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)
end
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