1+ -- ラビュエル・アイヴォリー
2+ -- Ravuel Ivory
3+ -- scripted by YoshiDuels
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- Ritual
7+ c :EnableReviveLimit ()
8+ -- Check materials on Ritual Summon
9+ local e0 = Effect .CreateEffect (c )
10+ e0 :SetType (EFFECT_TYPE_SINGLE )
11+ e0 :SetCode (EFFECT_MATERIAL_CHECK )
12+ e0 :SetValue (s .matcheck )
13+ c :RegisterEffect (e0 )
14+ -- Draw 2
15+ local e1 = Effect .CreateEffect (c )
16+ e1 :SetCategory (CATEGORY_DRAW )
17+ e1 :SetRange (LOCATION_MZONE )
18+ e1 :SetType (EFFECT_TYPE_IGNITION )
19+ e1 :SetCountLimit (1 )
20+ e1 :SetCondition (s .condition )
21+ e1 :SetTarget (s .target )
22+ e1 :SetOperation (s .operation )
23+ c :RegisterEffect (e1 )
24+ end
25+ function s .matcheck (e ,c )
26+ if # c :GetMaterial ()>= 2 then
27+ c :RegisterFlagEffect (id ,RESET_EVENT |RESETS_STANDARD - RESET_TOFIELD ,EFFECT_FLAG_CLIENT_HINT ,1 ,0 ,aux .Stringid (id ,0 ))
28+ end
29+ end
30+ function s .condition (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
31+ local c = e :GetHandler ()
32+ return c :IsStatus (STATUS_SPSUMMON_TURN ) and c :IsSummonType (SUMMON_TYPE_RITUAL ) and c :GetFlagEffect (id )> 0
33+ end
34+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
35+ if chk == 0 then return Duel .IsPlayerCanDraw (tp ,2 ) end
36+ Duel .SetTargetPlayer (tp )
37+ Duel .SetTargetParam (2 )
38+ Duel .SetOperationInfo (0 ,CATEGORY_DRAW ,nil ,0 ,tp ,2 )
39+ end
40+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
41+ -- Effect
42+ local p ,d = Duel .GetChainInfo (0 ,CHAININFO_TARGET_PLAYER ,CHAININFO_TARGET_PARAM )
43+ Duel .Draw (p ,d ,REASON_EFFECT )
44+ end
0 commit comments