Commit 4ed76387 authored by mallu11's avatar mallu11 Committed by GitHub

fix effects about Continuous Trap for trapmonster (#1340)

* fix 邪気退散

* fix 結界術師 メイコウ

* fix 金属探知器
parent 245c0f05
......@@ -15,7 +15,7 @@ function c13626450.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c13626450.filter(c)
return c:IsFaceup() and c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS
return c:IsFaceup() and bit.band(c:GetType(),0x20004)==0x20004
end
function c13626450.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c13626450.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
......
......@@ -18,7 +18,7 @@ function c47731128.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c47731128.filter(c)
local tpe=c:GetType()
return c:IsFaceup() and (tpe==0x20002 or tpe==0x20004)
return c:IsFaceup() and (tpe==0x20002 or bit.band(tpe,0x20004)==0x20004)
end
function c47731128.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c47731128.filter(chkc) end
......
......@@ -21,7 +21,14 @@ function c75646520.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetTarget(c75646520.distarget)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c75646520.distarget)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c75646520.distarget(e,c)
return c:GetType()==TYPE_CONTINUOUS+TYPE_TRAP
return bit.band(c:GetType(),0x20004)==0x20004
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