22-- Mystical Space Typhoon
33local s ,id = GetID ()
44function s .initial_effect (c )
5- -- Activate
5+ -- Destroy 1 Spell/Trap on the field
66 local e1 = Effect .CreateEffect (c )
7+ e1 :SetDescription (aux .Stringid (id ,0 ))
78 e1 :SetCategory (CATEGORY_DESTROY )
89 e1 :SetType (EFFECT_TYPE_ACTIVATE )
9- e1 :SetCode (EVENT_FREE_CHAIN )
10- e1 :SetHintTiming (0 ,TIMING_END_PHASE |TIMING_EQUIP )
1110 e1 :SetProperty (EFFECT_FLAG_CARD_TARGET )
11+ e1 :SetCode (EVENT_FREE_CHAIN )
12+ e1 :SetHintTiming (0 ,TIMING_STANDBY_PHASE |TIMING_MAIN_END |TIMINGS_CHECK_MONSTER_E )
1213 e1 :SetTarget (s .target )
1314 e1 :SetOperation (s .activate )
1415 c :RegisterEffect (e1 )
1516end
16- function s .filter (c )
17- return c :IsSpellTrap ()
18- end
1917function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk ,chkc )
20- if chkc then return chkc :IsOnField () and s .filter (chkc ) and chkc ~= e :GetHandler () end
21- if chk == 0 then return Duel .IsExistingTarget (s .filter ,tp ,LOCATION_ONFIELD ,LOCATION_ONFIELD ,1 ,e :GetHandler ()) end
18+ local c = e :GetHandler ()
19+ if chkc then return chkc :IsOnField () and chkc :IsSpellTrap () and chkc ~= c end
20+ if chk == 0 then return Duel .IsExistingTarget (Card .IsSpellTrap ,tp ,LOCATION_ONFIELD ,LOCATION_ONFIELD ,1 ,c ) end
2221 Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_DESTROY )
23- local g = Duel .SelectTarget (tp ,s . filter ,tp ,LOCATION_ONFIELD ,LOCATION_ONFIELD ,1 ,1 ,e : GetHandler () )
24- Duel .SetOperationInfo (0 ,CATEGORY_DESTROY ,g ,1 ,0 ,0 )
22+ local g = Duel .SelectTarget (tp ,Card . IsSpellTrap ,tp ,LOCATION_ONFIELD ,LOCATION_ONFIELD ,1 ,1 ,c )
23+ Duel .SetOperationInfo (0 ,CATEGORY_DESTROY ,g ,1 ,tp ,0 )
2524end
2625function s .activate (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
2726 local tc = Duel .GetFirstTarget ()
28- if tc and tc :IsRelateToEffect (e ) then
27+ if tc :IsRelateToEffect (e ) then
2928 Duel .Destroy (tc ,REASON_EFFECT )
3029 end
31- end
30+ end
0 commit comments