Commit 0988dc1c authored by mercury233's avatar mercury233 Committed by GitHub

fix Play the Diabell (#2839)

parent 8cbf204d
......@@ -26,9 +26,14 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
end
function s.cfilter(c,re)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
and c:IsReason(REASON_COST) and re:IsActivated()
and (not c:IsPreviousLocation(LOCATION_ONFIELD) or c:GetPreviousTypeOnField()&(TYPE_SPELL+TYPE_TRAP)~=0)
if not c:IsType(TYPE_SPELL+TYPE_TRAP) or not c:IsReason(REASON_COST) then return false end
if c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousTypeOnField()&(TYPE_SPELL+TYPE_TRAP)==0 then return false end
local recode=re:GetCode()
return re:IsActivated()
or recode==EFFECT_TRAP_ACT_IN_HAND
or recode==EFFECT_TRAP_ACT_IN_SET_TURN
or recode==EFFECT_QP_ACT_IN_NTPHAND
or recode==EFFECT_QP_ACT_IN_SET_TURN
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,re)
......
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