1+ -- 報道記人テレコロイド
2+ -- Reporter Recorder
3+ -- scripted by YoshiDuels
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- Add card to hand
7+ local e1 = Effect .CreateEffect (c )
8+ e1 :SetDescription (aux .Stringid (id ,0 ))
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 = {CARD_FUSION ,160007029 }
19+ function s .cfilter (c )
20+ return c :IsRace (RACE_MACHINE ) and c :IsAttribute (ATTRIBUTE_EARTH )
21+ end
22+ function s .condition (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
23+ return e :GetHandler ():IsStatus (STATUS_SUMMON_TURN ) and Duel .IsExistingMatchingCard (s .cfilter ,tp ,LOCATION_GRAVE ,0 ,2 ,nil )
24+ end
25+ function s .thfilter (c )
26+ return c :IsCode (CARD_FUSION ,160007029 ) and c :IsAbleToHand ()
27+ end
28+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
29+ if chk == 0 then return Duel .IsExistingMatchingCard (s .thfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,nil ) end
30+ Duel .SetOperationInfo (0 ,CATEGORY_TOHAND ,nil ,1 ,tp ,LOCATION_GRAVE )
31+ end
32+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
33+ -- Effect
34+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_ATOHAND )
35+ local g = Duel .SelectMatchingCard (tp ,s .thfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,1 ,nil )
36+ if # g > 0 then
37+ Duel .SendtoHand (g ,nil ,REASON_EFFECT )
38+ Duel .ConfirmCards (1 - tp ,g )
39+ if Duel .IsExistingMatchingCard (Card .IsAbleToDeck ,tp ,0 ,LOCATION_GRAVE ,1 ,nil ) and Duel .SelectYesNo (tp ,aux .Stringid (id ,1 )) then
40+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TODECK )
41+ local g = Duel .SelectMatchingCard (tp ,Card .IsAbleToDeck ,tp ,0 ,LOCATION_GRAVE ,1 ,1 ,nil )
42+ if # g == 0 then return end
43+ Duel .HintSelection (g )
44+ Duel .BreakEffect ()
45+ Duel .SendtoDeck (g ,nil ,SEQ_DECKTOP ,REASON_EFFECT )
46+ end
47+ end
48+ end
0 commit comments