Commit 06405a32 authored by mercury233's avatar mercury233 Committed by DailyShana

fix Fusion Tag (#727)

parent 16108580
...@@ -10,12 +10,14 @@ function c59432181.initial_effect(c) ...@@ -10,12 +10,14 @@ function c59432181.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c59432181.filter(c) function c59432181.filter(c)
return c:IsType(TYPE_FUSION) return c:IsFaceup() and Duel.IsExistingMatchingCard(c59432181.cfilter,tp,LOCATION_EXTRA,0,1,nil,c)
end
function c59432181.cfilter(c,tc)
return c:IsType(TYPE_FUSION) and not c:IsCode(tc:GetFusionCode())
end end
function c59432181.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c59432181.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c59432181.filter,tp,LOCATION_MZONE,0,1,nil) end
and Duel.IsExistingMatchingCard(c59432181.filter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
end end
...@@ -23,7 +25,7 @@ function c59432181.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -23,7 +25,7 @@ function c59432181.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local cg=Duel.SelectMatchingCard(tp,c59432181.filter,tp,LOCATION_EXTRA,0,1,1,nil) local cg=Duel.SelectMatchingCard(tp,c59432181.cfilter,tp,LOCATION_EXTRA,0,1,1,nil,tc)
if cg:GetCount()==0 then return end if cg:GetCount()==0 then return end
Duel.ConfirmCards(1-tp,cg) Duel.ConfirmCards(1-tp,cg)
local code1,code2=cg:GetFirst():GetOriginalCodeRule() local code1,code2=cg:GetFirst():GetOriginalCodeRule()
......
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