1+ -- 魔人の落とし穴
12-- Fiendish Trap Hole
23local s ,id = GetID ()
34function s .initial_effect (c )
4- -- Activate
5+ -- Destroyed 1 monster Special Summoned via card effect
56 local e1 = Effect .CreateEffect (c )
67 e1 :SetCategory (CATEGORY_DESTROY )
78 e1 :SetType (EFFECT_TYPE_ACTIVATE )
89 e1 :SetCode (EVENT_SPSUMMON_SUCCESS )
910 e1 :SetTarget (s .target )
10- e1 :SetOperation (s .activate )
11+ e1 :SetOperation (s .operation )
1112 c :RegisterEffect (e1 )
1213end
13- function s .filter (c ,tp )
14- return c :IsFaceup () and c :IsDestructable ()
15- end
1614function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
17- local tc = eg :GetFirst ()
18- if chk == 0 then return eg :IsExists (s .filter ,1 ,nil ,tp ) end
19- local g = eg :Filter (s .filter ,nil ,tp )
20- Duel .SetTargetCard (eg )
15+ if chk == 0 then return true end
16+ if # eg == 1 then
17+ local tc = eg :GetFirst ()
18+ Duel .HintSelection (tc )
19+ Duel .SetTargetCard (tc )
20+ else
21+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_DESTROY )
22+ local g = eg :Select (tp ,1 ,1 ,nil )
23+ local tc = g :GetFirst ()
24+ Duel .HintSelection (tc )
25+ Duel .SetTargetCard (tc )
26+ end
2127 Duel .SetOperationInfo (0 ,CATEGORY_DESTROY ,tc ,1 ,0 ,0 )
2228end
23- function s .activate (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
24- if # eg > 0 then
25- Duel .Destroy (eg ,REASON_EFFECT )
29+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
30+ local tc = Duel .GetFirstTarget ()
31+ if tc then
32+ Duel .Destroy (tc ,REASON_EFFECT )
2633 end
27- end
34+ end
0 commit comments