11-- 焔征竜-ブラスター
2+ -- Blaster, Dragon Ruler of Infernos
23local s ,id = GetID ()
34function s .initial_effect (c )
4- -- special summon
5+ -- Special Summon this card from the hand or GY
56 local e1 = Effect .CreateEffect (c )
67 e1 :SetDescription (aux .Stringid (id ,0 ))
78 e1 :SetCategory (CATEGORY_SPECIAL_SUMMON )
89 e1 :SetType (EFFECT_TYPE_IGNITION )
9- e1 :SetRange (LOCATION_HAND + LOCATION_GRAVE )
10+ e1 :SetRange (LOCATION_HAND | LOCATION_GRAVE )
1011 e1 :SetCountLimit (1 ,id )
1112 e1 :SetCost (s .hspcost )
1213 e1 :SetTarget (s .hsptg )
1314 e1 :SetOperation (s .hspop )
1415 c :RegisterEffect (e1 )
15- -- return
16+ -- Return this card to the hand
1617 local e2 = Effect .CreateEffect (c )
1718 e2 :SetDescription (aux .Stringid (id ,1 ))
1819 e2 :SetCategory (CATEGORY_TOHAND )
1920 e2 :SetType (EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F )
2021 e2 :SetRange (LOCATION_MZONE )
21- e2 :SetCountLimit (1 ,id )
2222 e2 :SetCode (EVENT_PHASE + PHASE_END )
23+ e2 :SetCountLimit (1 ,id )
2324 e2 :SetCondition (s .retcon )
2425 e2 :SetTarget (s .rettg )
2526 e2 :SetOperation (s .retop )
2627 c :RegisterEffect (e2 )
27- -- destroy
28+ -- Destroy 1 card on the field
2829 local e3 = Effect .CreateEffect (c )
2930 e3 :SetDescription (aux .Stringid (id ,2 ))
3031 e3 :SetCategory (CATEGORY_DESTROY )
@@ -35,14 +36,14 @@ function s.initial_effect(c)
3536 e3 :SetCost (s .descost )
3637 e3 :SetTarget (s .destg )
3738 e3 :SetOperation (s .desop )
38- c :RegisterEffect (e3 )
39- -- search
39+ c :RegisterEffect (e3 , false , REGISTER_FLAG_DRAGON_RULER )
40+ -- Add 1 FIRE Dragon monster from your Deck to your han
4041 local e4 = Effect .CreateEffect (c )
4142 e4 :SetDescription (aux .Stringid (id ,3 ))
4243 e4 :SetCategory (CATEGORY_TOHAND + CATEGORY_SEARCH )
4344 e4 :SetType (EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O )
45+ e4 :SetProperty (EFFECT_FLAG_DELAY )
4446 e4 :SetCode (EVENT_REMOVE )
45- e4 :SetProperty (EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY )
4647 e4 :SetCountLimit (1 ,id )
4748 e4 :SetTarget (s .thtg )
4849 e4 :SetOperation (s .thop )
@@ -53,15 +54,15 @@ function s.rfilter(c)
5354 and (c :IsLocation (LOCATION_HAND ) or aux .SpElimFilter (c ,true ))
5455end
5556function s .hspcost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
56- local rg = Duel .GetMatchingGroup (s .rfilter ,tp ,LOCATION_HAND + LOCATION_MZONE + LOCATION_GRAVE ,0 ,e :GetHandler ())
57- if chk == 0 then return Duel .GetLocationCount (tp ,LOCATION_MZONE )>- 2 and # rg > 1
58- and aux .SelectUnselectGroup (rg ,e ,tp ,2 ,2 ,aux .ChkfMMZ (1 ),0 ) end
57+ local rg = Duel .GetMatchingGroup (s .rfilter ,tp ,LOCATION_HAND |LOCATION_MZONE |LOCATION_GRAVE ,0 ,e :GetHandler ())
58+ if chk == 0 then return # rg > 1 and aux .SelectUnselectGroup (rg ,e ,tp ,2 ,2 ,aux .ChkfMMZ (1 ),0 ) end
5959 local g = aux .SelectUnselectGroup (rg ,e ,tp ,2 ,2 ,aux .ChkfMMZ (1 ),1 ,tp ,HINTMSG_REMOVE )
6060 Duel .Remove (g ,POS_FACEUP ,REASON_COST )
6161end
6262function s .hsptg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
63- if chk == 0 then return e :GetHandler ():IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false ) end
64- Duel .SetOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,e :GetHandler (),1 ,0 ,0 )
63+ local c = e :GetHandler ()
64+ if chk == 0 then return c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false ) end
65+ Duel .SetOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,c ,1 ,tp ,0 )
6566end
6667function s .hspop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
6768 local c = e :GetHandler ()
@@ -70,12 +71,11 @@ function s.hspop(e,tp,eg,ep,ev,re,r,rp)
7071 end
7172end
7273function s .retcon (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
73- return Duel .GetTurnPlayer ()~= tp
74- and e :GetHandler ():IsSummonType (SUMMON_TYPE_SPECIAL )
74+ return Duel .IsTurnPlayer (1 - tp ) and e :GetHandler ():IsSummonType (SUMMON_TYPE_SPECIAL )
7575end
7676function s .rettg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
7777 if chk == 0 then return true end
78- Duel .SetOperationInfo (0 ,CATEGORY_TOGRAVE ,e :GetHandler (),1 ,0 ,0 )
78+ Duel .SetOperationInfo (0 ,CATEGORY_TOHAND ,e :GetHandler (),1 ,tp ,0 )
7979end
8080function s .retop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
8181 local c = e :GetHandler ()
@@ -87,23 +87,24 @@ function s.dfilter(c)
8787 return c :IsAttribute (ATTRIBUTE_FIRE ) and c :IsDiscardable () and c :IsAbleToGraveAsCost ()
8888end
8989function s .descost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
90- if chk == 0 then return e :GetHandler ():IsDiscardable () and e :GetHandler ():IsAbleToGraveAsCost ()
91- and Duel .IsExistingMatchingCard (s .dfilter ,tp ,LOCATION_HAND ,0 ,1 ,e :GetHandler ()) end
90+ local c = e :GetHandler ()
91+ if chk == 0 then return c :IsDiscardable () and c :IsAbleToGraveAsCost ()
92+ and Duel .IsExistingMatchingCard (s .dfilter ,tp ,LOCATION_HAND ,0 ,1 ,c ) end
9293 Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_DISCARD )
93- local g = Duel .SelectMatchingCard (tp ,s .dfilter ,tp ,LOCATION_HAND ,0 ,1 ,1 ,e : GetHandler () )
94+ local g = Duel .SelectMatchingCard (tp ,s .dfilter ,tp ,LOCATION_HAND ,0 ,1 ,1 ,c )
9495 g :AddCard (e :GetHandler ())
95- Duel .SendtoGrave (g ,REASON_COST + REASON_DISCARD )
96+ Duel .SendtoGrave (g ,REASON_COST | REASON_DISCARD )
9697end
9798function s .destg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk ,chkc )
9899 if chkc then return chkc :IsOnField () end
99- if chk == 0 then return Duel .IsExistingTarget (aux . TRUE ,tp ,LOCATION_ONFIELD ,LOCATION_ONFIELD ,1 ,nil ) end
100+ if chk == 0 then return Duel .IsExistingTarget (nil ,tp ,LOCATION_ONFIELD ,LOCATION_ONFIELD ,1 ,nil ) end
100101 Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_DESTROY )
101- local g = Duel .SelectTarget (tp ,aux . TRUE ,tp ,LOCATION_ONFIELD ,LOCATION_ONFIELD ,1 ,1 ,nil )
102- Duel .SetOperationInfo (0 ,CATEGORY_DESTROY ,g ,1 ,0 ,0 )
102+ local g = Duel .SelectTarget (tp ,nil ,tp ,LOCATION_ONFIELD ,LOCATION_ONFIELD ,1 ,1 ,nil )
103+ Duel .SetOperationInfo (0 ,CATEGORY_DESTROY ,g ,1 ,tp ,0 )
103104end
104105function s .desop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
105106 local tc = Duel .GetFirstTarget ()
106- if tc and tc :IsRelateToEffect (e ) then
107+ if tc :IsRelateToEffect (e ) then
107108 Duel .Destroy (tc ,REASON_EFFECT )
108109 end
109110end
@@ -121,4 +122,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
121122 Duel .SendtoHand (g ,nil ,REASON_EFFECT )
122123 Duel .ConfirmCards (1 - tp ,g )
123124 end
124- end
125+ end
0 commit comments