Commit 06cf9b7b authored by Chrono-Genex's avatar Chrono-Genex Committed by GitHub

fix (#1807)

parent 2e08dd75
...@@ -15,12 +15,27 @@ function c80036543.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -15,12 +15,27 @@ function c80036543.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<=Duel.GetLP(1-tp)-1000 return Duel.GetLP(tp)<=Duel.GetLP(1-tp)-1000
end end
function c80036543.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c80036543.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return Duel.CheckLPCost(tp,1000) end if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000) Duel.PayLPCost(tp,1000)
end end
function c80036543.target(e,tp,eg,ep,ev,re,r,rp,chk) function c80036543.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) if e:GetLabel()==0 then return Duel.IsPlayerCanDraw(tp,math.floor(math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))/2000)) end
e:SetLabel(0)
local cost=1000
local ce={Duel.IsPlayerAffectedByEffect(tp,EFFECT_LPCOST_CHANGE)}
for _,te in ipairs(ce) do
local con=te:GetCondition()
local val=te:GetValue()
if (not con or con(te)) then
cost=val(te,e,tp,1000)
end
end
local lp=Duel.GetLP(tp)-cost
return Duel.IsPlayerCanDraw(tp,math.floor(math.abs(lp-Duel.GetLP(1-tp))/2000))
end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,math.floor(math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))/2000))
end end
function c80036543.activate(e,tp,eg,ep,ev,re,r,rp) function c80036543.activate(e,tp,eg,ep,ev,re,r,rp)
local p1=Duel.GetLP(tp) local p1=Duel.GetLP(tp)
......
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