1+ -- バイス・シャーク
2+ -- Veiss Shark
3+ -- scripted by pyrQ
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- Special Summon 1 Fish "Shark" monster from your Deck
7+ local e1 = Effect .CreateEffect (c )
8+ e1 :SetDescription (aux .Stringid (id ,0 ))
9+ e1 :SetCategory (CATEGORY_SPECIAL_SUMMON )
10+ e1 :SetType (EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O )
11+ e1 :SetProperty (EFFECT_FLAG_DELAY )
12+ e1 :SetCode (EVENT_SUMMON_SUCCESS )
13+ e1 :SetCountLimit (1 ,id )
14+ e1 :SetCost (s .spcost )
15+ e1 :SetTarget (s .sptg )
16+ e1 :SetOperation (s .spop )
17+ c :RegisterEffect (e1 )
18+ local e2 = e1 :Clone ()
19+ e2 :SetCode (EVENT_SPSUMMON_SUCCESS )
20+ c :RegisterEffect (e2 )
21+ -- A "Shark Drake" Xyz Monster that has this card as material gains this effect: Negate a Spell/Trap effect, and if you do, destroy that card
22+ local e3 = Effect .CreateEffect (c )
23+ e3 :SetDescription (aux .Stringid (id ,1 ))
24+ e3 :SetCategory (CATEGORY_DISABLE + CATEGORY_DESTROY )
25+ e3 :SetType (EFFECT_TYPE_XMATERIAL + EFFECT_TYPE_QUICK_O )
26+ e3 :SetCode (EVENT_CHAINING )
27+ e3 :SetRange (LOCATION_MZONE )
28+ e3 :SetCountLimit (1 )
29+ e3 :SetCondition (function (e ,tp ,eg ,ep ,ev ,re ,r ,rp ) return e :GetHandler ():IsSetCard (SET_SHARK_DRAKE ) and re :IsSpellTrapEffect () and Duel .IsChainDisablable (ev ) end )
30+ e3 :SetCost (aux .dxmcostgen (2 ,2 ,nil ))
31+ e3 :SetTarget (s .distg )
32+ e3 :SetOperation (s .disop )
33+ c :RegisterEffect (e3 )
34+ end
35+ s .listed_series = {SET_SHARK ,SET_SHARK_DRAKE }
36+ function s .spcost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
37+ if chk == 0 then return Duel .CheckReleaseGroupCost (tp ,Card .IsRace ,1 ,false ,nil ,nil ,RACE_FISH ) end
38+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_RELEASE )
39+ local g = Duel .SelectReleaseGroupCost (tp ,Card .IsRace ,1 ,1 ,false ,nil ,nil ,RACE_FISH )
40+ Duel .Release (g ,REASON_COST )
41+ end
42+ function s .spfilter (c ,e ,tp )
43+ return c :IsRace (RACE_FISH ) and c :IsSetCard (SET_SHARK ) and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false )
44+ end
45+ function s .sptg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
46+ if chk == 0 then return Duel .GetMZoneCount (tp ,e :GetHandler ())> 0
47+ and Duel .IsExistingMatchingCard (s .spfilter ,tp ,LOCATION_DECK ,0 ,1 ,nil ,e ,tp ) end
48+ Duel .SetOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,nil ,1 ,0 ,LOCATION_DECK )
49+ end
50+ function s .spop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
51+ if Duel .GetLocationCount (tp ,LOCATION_MZONE )> 0 then
52+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_SPSUMMON )
53+ local g = Duel .SelectMatchingCard (tp ,s .spfilter ,tp ,LOCATION_DECK ,0 ,1 ,1 ,nil ,e ,tp )
54+ if # g > 0 then
55+ Duel .SpecialSummon (g ,0 ,tp ,tp ,false ,false ,POS_FACEUP )
56+ end
57+ end
58+ -- You cannot Special Summon for the rest of this turn, except WATER monsters
59+ local e1 = Effect .CreateEffect (e :GetHandler ())
60+ e1 :SetDescription (aux .Stringid (id ,2 ))
61+ e1 :SetType (EFFECT_TYPE_FIELD )
62+ e1 :SetProperty (EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_CLIENT_HINT )
63+ e1 :SetCode (EFFECT_CANNOT_SPECIAL_SUMMON )
64+ e1 :SetTargetRange (1 ,0 )
65+ e1 :SetTarget (function (e ,c ) return not c :IsAttribute (ATTRIBUTE_WATER ) end )
66+ e1 :SetReset (RESET_PHASE |PHASE_END )
67+ Duel .RegisterEffect (e1 ,tp )
68+ end
69+ function s .distg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
70+ if chk == 0 then return true end
71+ local rc = re :GetHandler ()
72+ Duel .SetOperationInfo (0 ,CATEGORY_DISABLE ,eg ,1 ,tp ,0 )
73+ if rc :IsDestructable () and rc :IsRelateToEffect (re ) then
74+ Duel .SetOperationInfo (0 ,CATEGORY_DESTROY ,eg ,1 ,tp ,0 )
75+ end
76+ end
77+ function s .disop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
78+ if Duel .NegateEffect (ev ) and re :GetHandler ():IsRelateToEffect (re ) then
79+ Duel .Destroy (eg ,REASON_EFFECT )
80+ end
81+ end
0 commit comments