1+ -- 恐竜駕ダイナ-ティラノ
2+ -- Dynamic Dino Dynatyranno
3+ -- Scripted by YoshiDuels
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- Destroy 1 spell/trap your opponent controls
7+ local e1 = Effect .CreateEffect (c )
8+ e1 :SetCategory (CATEGORY_DESTROY )
9+ e1 :SetType (EFFECT_TYPE_IGNITION )
10+ e1 :SetRange (LOCATION_MZONE )
11+ e1 :SetCountLimit (1 )
12+ e1 :SetCondition (s .condition )
13+ e1 :SetCost (s .cost )
14+ e1 :SetTarget (s .target )
15+ e1 :SetOperation (s .operation )
16+ c :RegisterEffect (e1 )
17+ end
18+ function s .filter (c )
19+ return c :IsMonster () and not c :IsRace (RACE_DINOSAUR )
20+ end
21+ function s .condition (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
22+ return Duel .IsExistingMatchingCard (Card .IsMonster ,tp ,LOCATION_GRAVE ,0 ,1 ,nil )
23+ and not Duel .IsExistingMatchingCard (s .filter ,tp ,LOCATION_GRAVE ,0 ,1 ,nil )
24+ end
25+ function s .cost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
26+ if chk == 0 then return Duel .IsExistingMatchingCard (Card .IsAbleToGraveAsCost ,tp ,LOCATION_ONFIELD ,0 ,1 ,nil ) end
27+ end
28+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
29+ local dg = Duel .GetMatchingGroup (Card .IsSpellTrap ,tp ,0 ,LOCATION_ONFIELD ,nil )
30+ if chk == 0 then return # dg > 0 end
31+ end
32+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
33+ -- Requirement
34+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TOGRAVE )
35+ local g = Duel .SelectMatchingCard (tp ,Card .IsAbleToGraveAsCost ,tp ,LOCATION_ONFIELD ,0 ,1 ,1 ,nil )
36+ if Duel .SendtoGrave (g ,REASON_COST )== 0 then return end
37+ -- Effect
38+ local dg = Duel .GetMatchingGroup (Card .IsSpellTrap ,tp ,0 ,LOCATION_ONFIELD ,nil )
39+ if # dg > 0 then
40+ local sg = dg :Select (tp ,1 ,1 ,nil )
41+ Duel .HintSelection (sg )
42+ Duel .Destroy (sg ,REASON_EFFECT )
43+ end
44+ end
0 commit comments