Commit 2fd0c019 authored by POLYMER's avatar POLYMER

fix

parent 17532421
......@@ -98,8 +98,9 @@ function c22348178.cfilter(c)
end
function c22348178.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) end
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,0,1,0,0)
end
function c22348178.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -100,7 +100,7 @@ function c28315746.lvop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1)
end
end
function c28315746.atkfilter(c)
function c28315746.atkfilter(c,seq)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsFaceup() and c:GetSequence()==seq-1
end
function c28315746.atkcon(e)
......
......@@ -17,6 +17,7 @@ function cm.initial_effect(c)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.sprcon)
e1:SetTarget(cm.sprtg)
e1:SetOperation(cm.sprop)
c:RegisterEffect(e1)
--search
......@@ -48,12 +49,20 @@ end
function cm.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,tp)
return Duel.CheckReleaseGroupEx(tp,cm.cfilter,1,REASON_SPSUMMON,false,nil,tp)
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
function cm.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(cm.cfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -65,12 +65,12 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local l=e:GetLabel()==1
if chk==0 then
e:SetLabel(0)
return l and Duel.CheckReleaseGroupEx(tp,cm.cfilter,1,nil,tp)
return l and Duel.CheckReleaseGroupEx(tp,cm.cfilter,1,REASON_COST,true,nil,tp)
end
if l then
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=Duel.SelectReleaseGroupEx(tp,cm.cfilter,1,1,nil,tp)
local sg=Duel.SelectReleaseGroupEx(tp,cm.cfilter,1,1,REASON_COST,true,nil,tp)
Duel.Release(sg,REASON_COST)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
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