Commit d9dcf496 authored by Huangnan's avatar Huangnan

fix

parent ad15f67a
Pipeline #24101 passed with stages
in 29 minutes and 25 seconds
No preview for this file type
......@@ -22,7 +22,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
--search
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetTarget(s.rmtg)
......@@ -57,20 +57,22 @@ end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local d=Duel.TossDice(tp,1)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,nil)
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
if d>#g then d=#g end
local dg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if g:GetCount()>0 then
local sg=g:RandomSelect(tp,1)
local sc=sg:GetFirst()
Duel.ConfirmCards(1-tp,sg)
Duel.Hint(HINT_CARD,0,sc:GetOriginalCode())
if sc:IsAttack(35) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local dc=dg:Select(tp,d,d,nil)
Duel.SendtoDeck(dc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
else
local sg2=g:RandomSelect(tp,d)
local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,nil)
local sg2=g2:RandomSelect(tp,d)
Duel.Remove(sg2,POS_FACEDOWN,REASON_EFFECT)
end
end
......
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