1+ -- 空牙団の船匠 キール
2+ -- Keel, Shipwright Fur Hire
3+ -- scripted by Naim
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ c :EnableReviveLimit ()
7+ -- Link Summon procedure: 2 monsters with different types
8+ Link .AddProcedure (c ,nil ,2 ,nil ,s .matfiltercheck )
9+ -- Set 1 Spell/Trap "Fur Hire" or 1 "Fandora, the Flying Furtress" from your Deck
10+ local e1 = Effect .CreateEffect (c )
11+ e1 :SetDescription (aux .Stringid (id ,0 ))
12+ e1 :SetType (EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O )
13+ e1 :SetProperty (EFFECT_FLAG_DELAY )
14+ e1 :SetCode (EVENT_SPSUMMON_SUCCESS )
15+ e1 :SetCountLimit (1 ,id )
16+ e1 :SetTarget (s .settg )
17+ e1 :SetOperation (s .setop )
18+ c :RegisterEffect (e1 )
19+ -- Banish this card from your GY, and if you do, Special Summon 1 monster "Fur Hire" from your hand
20+ local e2 = Effect .CreateEffect (c )
21+ e2 :SetDescription (aux .Stringid (id ,1 ))
22+ e2 :SetCategory (CATEGORY_REMOVE + CATEGORY_SPECIAL_SUMMON )
23+ e2 :SetType (EFFECT_TYPE_QUICK_O )
24+ e2 :SetCode (EVENT_FREE_CHAIN )
25+ e2 :SetRange (LOCATION_GRAVE )
26+ e2 :SetCountLimit (1 ,{id ,1 })
27+ e2 :SetCondition (function (e ,tp ) return Duel .IsTurnPlayer (1 - tp ) end )
28+ e2 :SetTarget (s .sptg )
29+ e2 :SetOperation (s .spop )
30+ e2 :SetHintTiming (0 ,TIMING_STANDBY_PHASE |TIMING_MAIN_END |TIMINGS_CHECK_MONSTER_E )
31+ c :RegisterEffect (e2 )
32+ end
33+ s .listed_names = {64400161 } -- "Fandora, the Flying Furtress"
34+ s .listed_series = {SET_FUR_HIRE }
35+ function s .matfiltercheck (g ,lc ,sumtype ,tp )
36+ return g :CheckDifferentPropertyBinary (Card .GetRace ,lc ,sumtype ,tp )
37+ end
38+ function s .setfilter (c )
39+ return ((c :IsSetCard (SET_FUR_HIRE ) and c :IsSpellTrap ()) or c :IsCode (64400161 )) and c :IsSSetable ()
40+ end
41+ function s .settg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
42+ if chk == 0 then return Duel .IsExistingMatchingCard (s .setfilter ,tp ,LOCATION_DECK ,0 ,1 ,nil ) end
43+ end
44+ function s .setop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
45+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_SET )
46+ local g = Duel .SelectMatchingCard (tp ,s .setfilter ,tp ,LOCATION_DECK ,0 ,1 ,1 ,nil )
47+ if # g > 0 then
48+ Duel .SSet (tp ,g )
49+ end
50+ -- You cannot Special Summon for the rest of this turn, except monsters "Fur Hire"
51+ local e1 = Effect .CreateEffect (e :GetHandler ())
52+ e1 :SetDescription (aux .Stringid (id ,2 ))
53+ e1 :SetType (EFFECT_TYPE_FIELD )
54+ e1 :SetProperty (EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_CLIENT_HINT )
55+ e1 :SetCode (EFFECT_CANNOT_SPECIAL_SUMMON )
56+ e1 :SetTargetRange (1 ,0 )
57+ e1 :SetTarget (function (e ,c ) return not c :IsSetCard (SET_FUR_HIRE ) end )
58+ e1 :SetReset (RESET_PHASE |PHASE_END )
59+ Duel .RegisterEffect (e1 ,tp )
60+ end
61+ function s .spfilter (c ,e ,tp )
62+ return c :IsSetCard (SET_FUR_HIRE ) and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false )
63+ end
64+ function s .sptg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
65+ local c = e :GetHandler ()
66+ if chk == 0 then return c :IsAbleToRemove () and Duel .GetLocationCount (tp ,LOCATION_MZONE )> 0
67+ and Duel .IsExistingMatchingCard (s .spfilter ,tp ,LOCATION_HAND ,0 ,1 ,nil ,e ,tp ) end
68+ Duel .SetOperationInfo (0 ,CATEGORY_REMOVE ,c ,1 ,tp ,0 )
69+ Duel .SetOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,nil ,1 ,tp ,LOCATION_HAND )
70+ end
71+ function s .spop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
72+ local c = e :GetHandler ()
73+ if c :IsRelateToEffect (e ) and Duel .Remove (c ,nil ,REASON_EFFECT )> 0 and c :IsLocation (LOCATION_REMOVED ) and Duel .GetLocationCount (tp ,LOCATION_MZONE )> 0 then
74+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_SPSUMMON )
75+ local g1 = Duel .SelectMatchingCard (tp ,s .spfilter ,tp ,LOCATION_HAND ,0 ,1 ,1 ,nil ,e ,tp )
76+ if # g1 > 0 and Duel .SpecialSummon (g1 ,0 ,tp ,tp ,false ,false ,POS_FACEUP )> 0
77+ and Duel .GetLocationCount (tp ,LOCATION_MZONE )> 0
78+ and Duel .IsExistingMatchingCard (s .spfilter ,tp ,LOCATION_HAND ,0 ,1 ,nil ,e ,tp ) then
79+ local atkg = Duel .GetMatchingGroup (Card .IsFaceup ,tp ,LOCATION_MZONE ,LOCATION_MZONE ,nil ):GetMaxGroup (Card .GetBaseAttack )
80+ if not atkg :IsExists (Card .IsControler ,1 ,nil ,1 - tp ) then return end
81+ if Duel .SelectYesNo (tp ,aux .Stringid (id ,3 )) then
82+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_SPSUMMON )
83+ local g2 = Duel .SelectMatchingCard (tp ,s .spfilter ,tp ,LOCATION_HAND ,0 ,1 ,1 ,nil ,e ,tp )
84+ if # g2 > 0 then
85+ Duel .BreakEffect ()
86+ Duel .SpecialSummon (g2 ,0 ,tp ,tp ,false ,false ,POS_FACEUP )
87+ end
88+ end
89+ end
90+ end
91+ end
0 commit comments