Commit ce212171 authored by Chrono-Genex's avatar Chrono-Genex Committed by GitHub

add Effect.SetCostCheck (#1934)

parent 8c2339e8
......@@ -47,12 +47,14 @@ function c13093792.spelltg(e,tp,eg,ep,ev,re,r,rp,chk)
local ae=e:GetHandler():GetActivateEffect()
local ftg=ae:GetTarget()
if chk==0 then
e:SetCostCheck(false)
return not ftg or ftg(e,tp,eg,ep,ev,re,r,rp,chk)
end
if ae:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
else e:SetProperty(0) end
if ftg then
e:SetCostCheck(false)
ftg(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
......
......@@ -25,11 +25,15 @@ end
function c49398568.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ftg=re:GetTarget()
if chkc then return ftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end
if chk==0 then return not ftg or ftg(e,tp,eg,ep,ev,re,r,rp,chk) end
if chk==0 then
e:SetCostCheck(false)
return not ftg or ftg(e,tp,eg,ep,ev,re,r,rp,chk)
end
if re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
end
if ftg then
e:SetCostCheck(false)
ftg(e,tp,eg,ep,ev,re,r,rp,chk)
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