Commit fef9f1d9 authored by mallu11's avatar mallu11 Committed by mercury233

fix for face-down equip card (#1314)

* fix ゴッドフェニックス・ギア・フリード

* fix 鎧獄竜-サイバー・ダークネス・ドラゴン
parent a64cc3d3
...@@ -83,7 +83,7 @@ function c18967507.negcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,7 +83,7 @@ function c18967507.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp and Duel.IsChainNegatable(ev) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp and Duel.IsChainNegatable(ev)
end end
function c18967507.negfilter(c) function c18967507.negfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EQUIP) and c:IsAbleToGraveAsCost() return (c:IsFaceup() or c:GetEquipTarget()) and c:IsType(TYPE_EQUIP) and c:IsAbleToGraveAsCost()
end end
function c18967507.negcost(e,tp,eg,ep,ev,re,r,rp,chk) function c18967507.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c18967507.negfilter,tp,LOCATION_ONFIELD,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c18967507.negfilter,tp,LOCATION_ONFIELD,0,1,nil) end
......
...@@ -38,7 +38,8 @@ function c22091647.initial_effect(c) ...@@ -38,7 +38,8 @@ function c22091647.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c22091647.costfilter(c) function c22091647.costfilter(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:GetType()==TYPE_EQUIP+TYPE_SPELL and c:IsAbleToRemoveAsCost() return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup() or c:GetEquipTarget()) and c:GetType()==TYPE_EQUIP+TYPE_SPELL
and c:IsAbleToRemoveAsCost()
end end
function c22091647.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c22091647.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22091647.costfilter,tp,LOCATION_SZONE+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c22091647.costfilter,tp,LOCATION_SZONE+LOCATION_GRAVE,0,1,nil) 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