1+ -- ヴォイドヴェルグ・ホワイトライダー
2+ -- Voidvelg Whiterider
3+ -- scripted by YoshiDuels
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- Name change
7+ local e1 = Effect .CreateEffect (c )
8+ e1 :SetDescription (aux .Stringid (id ,1 ))
9+ e1 :SetCategory (CATEGORY_TOHAND )
10+ e1 :SetType (EFFECT_TYPE_IGNITION )
11+ e1 :SetRange (LOCATION_MZONE )
12+ e1 :SetCountLimit (1 )
13+ e1 :SetCondition (s .condition )
14+ e1 :SetTarget (s .target )
15+ e1 :SetOperation (s .operation )
16+ c :RegisterEffect (e1 )
17+ end
18+ s .listed_names = {160317012 }
19+ function s .condition (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
20+ return Duel .GetFieldGroupCount (tp ,LOCATION_DECK ,0 )>= 10
21+ end
22+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
23+ local c = e :GetHandler ()
24+ if chk == 0 then return not c :IsCode (160317012 ) end
25+ end
26+ function s .filter (c )
27+ return (c :IsCode (160010025 ) or (c :IsRace (RACE_GALAXY ) and c :IsAttribute (ATTRIBUTE_DARK ) and c :IsType (TYPE_NORMAL ))) and c :IsAbleToHand ()
28+ end
29+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
30+ -- Effect
31+ local c = e :GetHandler ()
32+ -- Name becomes "Voidvelg Palerider"
33+ local e1 = Effect .CreateEffect (c )
34+ e1 :SetType (EFFECT_TYPE_SINGLE )
35+ e1 :SetProperty (EFFECT_FLAG_CANNOT_DISABLE )
36+ e1 :SetCode (EFFECT_CHANGE_CODE )
37+ e1 :SetValue (160317012 )
38+ e1 :SetReset (RESETS_STANDARD_PHASE_END )
39+ c :RegisterEffect (e1 )
40+ if Duel .GetFieldGroupCount (tp ,LOCATION_DECK ,0 )< 3 then return end
41+ Duel .ConfirmDecktop (tp ,3 )
42+ local g = Duel .GetDecktopGroup (tp ,3 )
43+ Duel .DisableShuffleCheck ()
44+ if g :IsExists (s .filter ,1 ,nil ) and Duel .SelectYesNo (tp ,aux .Stringid (id ,1 )) then
45+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_ATOHAND )
46+ local tg = g :FilterSelect (tp ,s .filter ,1 ,1 ,nil )
47+ if # tg > 0 then
48+ Duel .SendtoHand (tg ,nil ,REASON_EFFECT )
49+ Duel .ConfirmCards (1 - tp ,tg )
50+ Duel .ShuffleHand (tp )
51+ g :RemoveCard (tg )
52+ end
53+ end
54+ local ct =# g
55+ if ct > 0 then
56+ Duel .MoveToDeckBottom (ct ,tp )
57+ Duel .SortDeckbottom (tp ,tp ,ct )
58+ end
59+ end
0 commit comments