Commit 941ea884 authored by GuGu's avatar GuGu

Update c999501.lua 与卡名复制的联动bug

parent 12aca202
Pipeline #23244 passed with stage
in 1 minute and 11 seconds
......@@ -60,8 +60,10 @@ function M.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g = Duel.GetMatchingGroup(M.costfilter, tp, LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE, 0, nil)
if chk == 0 then return g:GetCount() >= 2 and M[tp] end
local rg = g:Select(tp, 2, 2, nil)
if e:GetLabelObject() then e:GetLabelObject():DeleteGroup() end
e:SetLabelObject(rg)
if e:GetLabel() then e:SetLabel(nil) end
local code1 = rg:GetFirst():GetCode()
local code2 = rg:GetNext():GetCode()
e:SetLabel(code1,code2)
rg:KeepAlive()
Duel.Remove(rg,POS_FACEUP,REASON_COST)
......@@ -96,14 +98,17 @@ function M.operation(e,tp,eg,ep,ev,re,r,rp)
local rpz = Duel.GetFieldCard(tp, LOCATION_SZONE, 4)
if lpz or rpz then return end
local rg = e:GetLabelObject()
local fc = rg:GetFirst()
while fc do
local code = fc:GetCode() - 25020 + 999502
local token = Duel.CreateToken(tp, code)
Duel.MoveToField(token, tp, tp, LOCATION_PZONE, POS_FACEUP, true)
fc = rg:GetNext()
end
local code1,code2 = e:GetLabel()
if code1 then
local code = code1 - 25020 + 999502
local token = Duel.CreateToken(tp, code)
Duel.MoveToField(token, tp, tp, LOCATION_PZONE, POS_FACEUP, true)
end
if code2 then
local code = code2 - 25020 + 999502
local token = Duel.CreateToken(tp, code)
Duel.MoveToField(token, tp, tp, LOCATION_PZONE, POS_FACEUP, true)
end
end
function M.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
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