Commit 03197915 authored by 未闻皂名's avatar 未闻皂名

2021/1/6 新增:地层调查

parent 7727f0ef
No preview for this file type
local m=120155043
local cm=_G["c"..m]
cm.name="地层调查"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<ct then return end
Duel.ConfirmDecktop(tp,ct)
local op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2))
if ct>1 then Duel.SortDecktop(tp,tp,ct) end
if op==0 then return end
for i=1,ct do
local tg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(tg:GetFirst(),1)
end
end
\ No newline at end of file
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