1+ -- ヴォイドヴェルグ・ゲヘナマギア
2+ -- Voidvelg Gehennamagia
3+ -- Scripted by YoshiDuels
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- fusion material
7+ c :EnableReviveLimit ()
8+ Fusion .AddProcMix (c ,true ,true ,160010025 ,160317007 )
9+ -- Return up to 2 face-down cards to the hand
10+ local e1 = Effect .CreateEffect (c )
11+ e1 :SetCategory (CATEGORY_TOHAND )
12+ e1 :SetType (EFFECT_TYPE_IGNITION )
13+ e1 :SetRange (LOCATION_MZONE )
14+ e1 :SetCountLimit (1 )
15+ e1 :SetCondition (s .condition )
16+ e1 :SetCost (s .cost )
17+ e1 :SetTarget (s .target )
18+ e1 :SetOperation (s .operation )
19+ c :RegisterEffect (e1 )
20+ end
21+ function s .condition (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
22+ local c = e :GetHandler ()
23+ return c :IsStatus (STATUS_SPSUMMON_TURN ) and c :IsSummonType (SUMMON_TYPE_FUSION )
24+ end
25+ function s .cost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
26+ if chk == 0 then return Duel .IsExistingMatchingCard (Card .IsAbleToGraveAsCost ,tp ,LOCATION_HAND ,0 ,2 ,nil ) end
27+ end
28+ function s .thfilter (c )
29+ return c :IsFacedown () and c :IsAbleToHand ()
30+ end
31+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
32+ if chk == 0 then return Duel .IsExistingMatchingCard (s .thfilter ,tp ,0 ,LOCATION_ONFIELD ,1 ,nil ) end
33+ Duel .SetOperationInfo (0 ,CATEGORY_TOHAND ,nil ,1 ,tp ,0 )
34+ end
35+ function s .filter (c )
36+ return c :IsNormalSpell () and c :IsLocation (LOCATION_GRAVE )
37+ end
38+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
39+ local c = e :GetHandler ()
40+ -- Requirement
41+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TOGRAVE )
42+ local g = Duel .SelectMatchingCard (tp ,Card .IsAbleToGraveAsCost ,tp ,LOCATION_HAND ,0 ,2 ,2 ,nil )
43+ if Duel .SendtoGrave (g ,REASON_COST )< 2 then return end
44+ local og = Duel .GetOperatedGroup ()
45+ local ct = og :FilterCount (s .filter ,nil )
46+ -- Effect:
47+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_RTOHAND )
48+ local tc = Duel .SelectMatchingCard (tp ,s .thfilter ,tp ,0 ,LOCATION_ONFIELD ,1 ,2 ,nil )
49+ if # tc > 0 then
50+ Duel .HintSelection (tc )
51+ if Duel .SendtoHand (tc ,nil ,REASON_EFFECT )> 0 and ct == 2 then
52+ local e1 = Effect .CreateEffect (c )
53+ e1 :SetDescription (aux .Stringid (id ,1 ))
54+ e1 :SetProperty (EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_CLIENT_HINT )
55+ e1 :SetType (EFFECT_TYPE_FIELD )
56+ e1 :SetRange (LOCATION_MZONE )
57+ e1 :SetCode (EFFECT_CANNOT_ACTIVATE )
58+ e1 :SetValue (s .aclimit )
59+ e1 :SetReset (RESETS_STANDARD_PHASE_END |RESET_OPPO_TURN ,1 )
60+ e1 :SetTargetRange (1 ,1 )
61+ c :RegisterEffect (e1 )
62+ end
63+ end
64+ end
65+ function s .aclimit (e ,re ,tp )
66+ local c = re :GetHandler ()
67+ return re :IsHasType (EFFECT_TYPE_ACTIVATE ) and c :IsNormalSpell ()
68+ end
0 commit comments