Commit 36f22f3c authored by mercury233's avatar mercury233 Committed by GitHub

fix Relinquished Fusion (#1596)

parent 113b445f
...@@ -95,8 +95,9 @@ function c78063197.filter(c) ...@@ -95,8 +95,9 @@ function c78063197.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsAbleToChangeControler() return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsAbleToChangeControler()
end end
function c78063197.eqfilter(c) function c78063197.eqfilter(c)
local m=_G["c"..c:GetOriginalCode()] local m=_G["c"..c:GetCode()]
return c:IsFaceup() and ((c:IsSetCard(0x1110) and c:IsType(TYPE_FUSION)) or c:IsCode(64631466)) and m.can_equip_monster(c) return c:IsFaceup() and ((c:IsSetCard(0x1110) and c:IsType(TYPE_FUSION)) or c:IsCode(64631466))
and not c:IsDisabled() and m.can_equip_monster and m.can_equip_monster(c)
end end
function c78063197.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c78063197.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c78063197.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c78063197.filter(chkc) end
...@@ -113,7 +114,7 @@ function c78063197.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -113,7 +114,7 @@ function c78063197.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c78063197.eqfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c78063197.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
local tc2=g:GetFirst() local tc2=g:GetFirst()
local m=_G["c"..tc2:GetOriginalCode()] local m=_G["c"..tc2:GetCode()]
if tc1:IsFaceup() and tc1:IsRelateToEffect(e) and tc1:IsControler(1-tp) and tc2 then if tc1:IsFaceup() and tc1:IsRelateToEffect(e) and tc1:IsControler(1-tp) and tc2 then
m.equip_monster(tc2,tp,tc1) m.equip_monster(tc2,tp,tc1)
end end
......
...@@ -34,8 +34,9 @@ function c89785779.filter(c) ...@@ -34,8 +34,9 @@ function c89785779.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsAbleToChangeControler() return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsAbleToChangeControler()
end end
function c89785779.eqfilter(c) function c89785779.eqfilter(c)
local m=_G["c"..c:GetOriginalCode()] local m=_G["c"..c:GetCode()]
return c:IsFaceup() and ((c:IsSetCard(0x1110) and c:IsType(TYPE_FUSION)) or c:IsCode(64631466)) and m.can_equip_monster(c) return c:IsFaceup() and ((c:IsSetCard(0x1110) and c:IsType(TYPE_FUSION)) or c:IsCode(64631466))
and not c:IsDisabled() and m.can_equip_monster and m.can_equip_monster(c)
end end
function c89785779.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c89785779.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c89785779.filter(chkc) and chkc~=e:GetHandler() end if chkc then return chkc:IsOnField() and c89785779.filter(chkc) and chkc~=e:GetHandler() end
...@@ -53,7 +54,7 @@ function c89785779.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,7 +54,7 @@ function c89785779.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c89785779.eqfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c89785779.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc2=g:GetFirst() local tc2=g:GetFirst()
if not tc2 then return end if not tc2 then return end
local m=_G["c"..tc2:GetOriginalCode()] local m=_G["c"..tc2:GetCode()]
if tc1:IsFaceup() and tc1:IsRelateToEffect(e) and tc1:IsControler(1-tp) then if tc1:IsFaceup() and tc1:IsRelateToEffect(e) and tc1:IsControler(1-tp) then
m.equip_monster(tc2,tp,tc1) m.equip_monster(tc2,tp,tc1)
end end
......
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