Commit 37e4ad8b authored by mercury233's avatar mercury233 Committed by GitHub

fix クリティウスの牙

parent 84b84812
......@@ -18,10 +18,10 @@ function c11082056.initial_effect(c)
c:RegisterEffect(e2)
end
function c11082056.tgfilter(c,e,tp)
return c:IsType(TYPE_TRAP) and Duel.IsExistingMatchingCard(c11082056.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
return c:IsType(TYPE_TRAP) and Duel.IsExistingMatchingCard(c11082056.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode(),c)
end
function c11082056.spfilter(c,e,tp,tc)
return c:IsType(TYPE_FUSION) and c.material_trap and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and tc:IsCode(c.material_trap)
function c11082056.spfilter(c,e,tp,code,tc)
return c:IsType(TYPE_FUSION) and c.material_trap and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and code==c.material_trap
and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end
function c11082056.target(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -34,10 +34,11 @@ function c11082056.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if tc and not tc:IsImmuneToEffect(e) then
if tc:IsOnField() and tc:IsFacedown() then Duel.ConfirmCards(1-tp,tc) end
local code=tc:GetCode()
Duel.SendtoGrave(tc,REASON_EFFECT)
if not tc:IsLocation(LOCATION_GRAVE) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c11082056.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
local sg=Duel.SelectMatchingCard(tp,c11082056.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,code,nil)
local sc=sg:GetFirst()
if sc then
Duel.BreakEffect()
......
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