Commit 5dbd4f65 authored by fallenstardust's avatar fallenstardust

update fixed script/c90615639.lua

时间次元洞会馆
parent 16d3c49b
Pipeline #25699 passed with stages
in 1 minute and 5 seconds
--タイム・ディメンションホール
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummon(tp) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=1
and Duel.IsExistingMatchingCard(Card.IsSummonableCard,tp,LOCATION_DECK,0,1,nil) end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=1) then return false end
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
Duel.DisableShuffleCheck()
if tc:IsSummonableCard() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
if Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2))==1 then
Duel.MoveSequence(tc,1)
end
end
end
\ No newline at end of file
No preview for this file type
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