11-- バリア・リゾネーター
22-- Barrier Resonator
3-
43local s ,id = GetID ()
54function s .initial_effect (c )
6- -- Targeted tuner monster cannot be destroyed by battle, also take no battle damage involving it
5+ -- 1 Tuner monster you control cannot be destroyed by battle, also take no battle damage involving it
76 local e1 = Effect .CreateEffect (c )
87 e1 :SetDescription (aux .Stringid (id ,0 ))
9- e1 :SetProperty (EFFECT_FLAG_CARD_TARGET )
108 e1 :SetType (EFFECT_TYPE_QUICK_O )
119 e1 :SetCode (EVENT_FREE_CHAIN )
10+ e1 :SetProperty (EFFECT_FLAG_CARD_TARGET )
1211 e1 :SetRange (LOCATION_HAND )
13- e1 :SetCost (s .cost )
12+ e1 :SetHintTiming (0 ,TIMING_BATTLE_START )
13+ e1 :SetCondition (function () return Duel .IsAbleToEnterBP () end )
14+ e1 :SetCost (aux .SelfToGraveCost )
1415 e1 :SetTarget (s .target )
1516 e1 :SetOperation (s .operation )
16- e1 :SetHintTiming (0 ,TIMING_BATTLE_START )
1717 c :RegisterEffect (e1 )
1818end
19- function s .cost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
20- if chk == 0 then return e :GetHandler ():IsAbleToGraveAsCost () end
21- Duel .SendtoGrave (e :GetHandler (),REASON_COST )
22- end
2319function s .filter (c )
2420 return c :IsFaceup () and c :IsType (TYPE_TUNER )
2521end
2622function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk ,chkc )
2723 if chkc then return chkc :IsControler (tp ) and chkc :IsLocation (LOCATION_MZONE ) and s .filter (chkc ) end
2824 if chk == 0 then return Duel .IsExistingTarget (s .filter ,tp ,LOCATION_MZONE ,0 ,1 ,nil ) end
29- Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_FACEUP )
30- Duel .SelectTarget (tp ,s .filter ,tp ,LOCATION_MZONE ,0 ,1 ,1 ,nil )
25+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_APPLYTO )
26+ Duel .SelectTarget (tp ,s .filter ,tp ,LOCATION_MZONE ,0 ,tp ,1 ,nil )
3127end
3228function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
3329 local c = e :GetHandler ()
@@ -40,16 +36,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk)
4036 e1 :SetType (EFFECT_TYPE_SINGLE )
4137 e1 :SetCode (EFFECT_AVOID_BATTLE_DAMAGE )
4238 e1 :SetValue (1 )
43- e1 :SetReset (RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END )
39+ e1 :SetReset (RESETS_STANDARD_PHASE_END )
4440 tc :RegisterEffect (e1 )
4541 -- Cannot be destroyed by battle
46- local e2 = Effect . CreateEffect ( c )
42+ local e2 = e1 : Clone ( )
4743 e2 :SetDescription (3000 )
48- e2 :SetProperty (EFFECT_FLAG_CLIENT_HINT )
49- e2 :SetType (EFFECT_TYPE_SINGLE )
5044 e2 :SetCode (EFFECT_INDESTRUCTABLE_BATTLE )
51- e2 :SetValue (1 )
52- e2 :SetReset (RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END )
5345 tc :RegisterEffect (e2 )
5446 end
5547end
0 commit comments