Commit 31f3e41d authored by Tachibana's avatar Tachibana

ybb

parent c35835a6
Pipeline #9602 passed with stages
in 32 minutes and 30 seconds
......@@ -15,6 +15,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetTarget(cm.destg)
......@@ -45,10 +46,6 @@ function cm.initial_effect(c)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return ( Duel.GetFlagEffect(tp,m+100)==0 or (Duel.GetFlagEffect(tp,12043024)~=0 and Duel.GetFlagEffect(tp,m+100)<2 ) ) end
Duel.RegisterFlagEffect(tp,m+100,RESET_PHASE+PHASE_END,0,1)
end
function cm.mfilter(c)
return srre.check_set_FRXS(c)
end
......@@ -79,6 +76,10 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetFlagEffect(tp,m+100)==0 or (Duel.GetFlagEffect(tp,12043024)~=0 and Duel.GetFlagEffect(tp,m+100)<2)) end
Duel.RegisterFlagEffect(tp,m+100,RESET_PHASE+PHASE_END,0,1)
end
function cm.drcfilter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
......@@ -91,25 +92,18 @@ end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=eg:FilterCount(cm.drcfilter1,nil,tp)
local ct2=eg:FilterCount(cm.drcfilter1,nil,1-tp)
if chk==0 then return ( ct>0 and Duel.IsPlayerCanDraw(tp,ct) ) or ( ct2>0 and Duel.IsPlayerCanDraw(1-tp,ct2) ) end
if ct>0 then
e:SetLabel(e:GetLabel()+ct)
if chk==0 then return (ct>0 and Duel.IsPlayerCanDraw(tp,ct)) or (ct2>0 and Duel.IsPlayerCanDraw(1-tp,ct2)) end
e:SetLabel(ct,ct2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
if ct2>0 then
e:SetLabel(e:GetLabel()+ct2*100)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,ct2)
end
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
local ct1=ct%100
local ct2=math.floor(ct/100)
local ct,ct2=e:GetLabel()
if ct1>0 then
Duel.Draw(tp,ct1,REASON_EFFECT)
Duel.Draw(tp,ct1,REASON_EFFECT)
end
if ct2>0 then
Duel.Draw(tp,ct2,REASON_EFFECT)
Duel.Draw(tp,ct2,REASON_EFFECT)
end
end
function cm.spfilter(c,e,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