1+ -- 七匹の子ヤギ
12-- Seven Kid Goats
2- -- Jackpro 1.3
33local s ,id = GetID ()
44function s .initial_effect (c )
5- -- destroy
6- local e1 = Effect .CreateEffect (c )
7- e1 :SetCategory (CATEGORY_DESTROY + CATEGORY_DAMAGE )
8- e1 :SetType (EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O )
9- e1 :SetProperty (EFFECT_FLAG_CARD_TARGET )
10- e1 :SetCode (EVENT_SUMMON_SUCCESS )
11- e1 :SetCondition (s .descon )
12- e1 :SetTarget (s .destg )
13- e1 :SetOperation (s .desop )
14- c :RegisterEffect (e1 )
15- local e2 = e1 :Clone ()
16- e2 :SetCode (EVENT_FLIP_SUMMON_SUCCESS )
17- c :RegisterEffect (e2 )
18- local e3 = e1 :Clone ()
19- e3 :SetCode (EVENT_SPSUMMON_SUCCESS )
20- c :RegisterEffect (e3 )
21- end
22- function s .descon (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
23- local c = e :GetHandler ()
24- return c :IsFaceup ()
25- end
26- function s .filter (c )
27- return c :IsFaceup () and c :IsDestructable () and c :IsRace (RACE_BEAST )
5+ -- When this card is Normal or Flip Summoned, destroy 1 face-up Beast-Type monster your opponent controls and inflict damage to your opponent equal to the ATK of the destroyed monster.
6+ local e1a = Effect .CreateEffect (c )
7+ e1a :SetCategory (CATEGORY_DESTROY + CATEGORY_DAMAGE )
8+ e1a :SetType (EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F )
9+ e1a :SetCode (EVENT_SUMMON_SUCCESS )
10+ e1a :SetTarget (s .destg )
11+ e1a :SetOperation (s .desop )
12+ c :RegisterEffect (e1a )
13+ local e1b = e1a :Clone ()
14+ e1b :SetCode (EVENT_FLIP_SUMMON_SUCCESS )
15+ c :RegisterEffect (e1b )
2816end
2917function s .destg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk ,chkc )
30- if chkc then return chkc :IsLocation (LOCATION_MZONE ) and chkc :IsControler (1 - tp ) and s .filter (chkc ) end
31- if chk == 0 then return Duel .IsExistingMatchingCard (s .filter ,tp ,0 ,LOCATION_MZONE ,1 ,nil ) end
32- Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_DESTROY )
33- local g = Duel .SelectTarget (tp ,s .filter ,tp ,0 ,LOCATION_MZONE ,1 ,1 ,nil )
34- Duel .SetOperationInfo (0 ,CATEGORY_DESTROY ,g ,# g ,0 ,0 )
18+ if chk == 0 then return true end
19+ local g = Duel .GetMatchingGroup (aux .FaceupFilter (Card .IsRace ,RACE_BEAST ),tp ,0 ,LOCATION_MZONE ,nil )
20+ Duel .SetOperationInfo (0 ,CATEGORY_DESTROY ,g ,1 ,0 ,0 )
3521 Duel .SetOperationInfo (0 ,CATEGORY_DAMAGE ,nil ,0 ,1 - tp ,0 )
3622end
3723function s .desop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
38- local tc = Duel .GetFirstTarget ()
39- if not tc then return end
40- local atk = tc :GetAttack ()
41- if tc :IsFaceup () and tc :IsRelateToEffect (e ) and Duel .Destroy (tc ,REASON_EFFECT )~= 0 then
42- Duel .Damage (1 - tp ,atk ,REASON_EFFECT )
24+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_DESTROY )
25+ local g = Duel .SelectMatchingCard (tp ,aux .FaceupFilter (Card .IsRace ,RACE_BEAST ),tp ,0 ,LOCATION_MZONE ,1 ,1 ,nil )
26+ if # g > 0 then
27+ Duel .HintSelection (g )
28+ local tc = g :GetFirst ()
29+ local atk = tc :GetAttack ()
30+ if atk < 0 then atk = 0 end
31+ if tc and tc :IsFaceup () and tc :IsRelateToEffect (e ) and Duel .Destroy (tc ,REASON_EFFECT )> 0 then
32+ Duel .Damage (1 - tp ,atk ,REASON_EFFECT )
33+ end
4334 end
44- end
35+ end
0 commit comments