@@ -18,8 +18,8 @@ function s.initial_effect(c)
1818 local e3 = Effect .CreateEffect (c )
1919 e3 :SetCategory (CATEGORY_SPECIAL_SUMMON )
2020 e3 :SetType (EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O )
21- e3 :SetCode (EVENT_CHAINING )
2221 e3 :SetProperty (EFFECT_FLAG_DELAY + EFFECT_FLAG_CARD_TARGET )
22+ e3 :SetCode (EVENT_CHAINING )
2323 e3 :SetRange (LOCATION_MZONE )
2424 e3 :SetCountLimit (1 ,id )
2525 e3 :SetCondition (s .spcon )
@@ -29,22 +29,21 @@ function s.initial_effect(c)
2929end
3030s .listed_series = {SET_MAGICAL_MUSKET }
3131function s .spcon (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
32+ if Duel .GetCurrentPhase ()&(PHASE_DAMAGE |PHASE_DAMAGE_CAL )> 0 or not re :IsHasType (EFFECT_TYPE_ACTIVATE ) then return false end
3233 local c = e :GetHandler ()
33- local rc = re :GetHandler ()
34- if Duel .GetCurrentPhase ()&PHASE_DAMAGE |PHASE_DAMAGE_CAL ~= 0 or not re :IsHasType (EFFECT_TYPE_ACTIVATE ) then return false end
35- local p ,loc ,seq = Duel .GetChainInfo (ev ,CHAININFO_TRIGGERING_CONTROLER ,CHAININFO_TRIGGERING_LOCATION ,CHAININFO_TRIGGERING_SEQUENCE )
34+ local p ,seq = Duel .GetChainInfo (ev ,CHAININFO_TRIGGERING_CONTROLER ,CHAININFO_TRIGGERING_SEQUENCE )
3635 return c :IsColumn (seq ,p ,LOCATION_SZONE )
3736end
38- function s .filter (c ,e ,tp )
37+ function s .spfilter (c ,e ,tp )
3938 return c :IsSetCard (SET_MAGICAL_MUSKET ) and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false ,POS_FACEUP_DEFENSE )
4039end
4140function s .sptg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk ,chkc )
42- if chkc then return chkc :IsLocation (LOCATION_GRAVE ) and chkc :IsControler (tp ) and s .filter (chkc ,e ,tp ) end
41+ if chkc then return chkc :IsLocation (LOCATION_GRAVE ) and chkc :IsControler (tp ) and s .spfilter (chkc ,e ,tp ) end
4342 if chk == 0 then return Duel .GetLocationCount (tp ,LOCATION_MZONE )> 0
44- and Duel .IsExistingTarget (s .filter ,tp ,LOCATION_GRAVE ,0 ,1 ,nil ,e ,tp ) end
43+ and Duel .IsExistingTarget (s .spfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,nil ,e ,tp ) end
4544 Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_SPSUMMON )
46- local g = Duel .SelectTarget (tp ,s .filter ,tp ,LOCATION_GRAVE ,0 ,1 ,1 ,nil ,e ,tp )
47- Duel .SetOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,g ,1 ,0 ,0 )
45+ local g = Duel .SelectTarget (tp ,s .spfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,1 ,nil ,e ,tp )
46+ Duel .SetOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,g ,1 ,tp ,0 )
4847end
4948function s .spop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
5049 local tc = Duel .GetFirstTarget ()
0 commit comments