1+ -- 呪われたドールハウス
12-- Cursed Dollhouse
23local s ,id = GetID ()
34function s .initial_effect (c )
@@ -6,39 +7,48 @@ function s.initial_effect(c)
67 e1 :SetType (EFFECT_TYPE_ACTIVATE )
78 e1 :SetCode (EVENT_FREE_CHAIN )
89 c :RegisterEffect (e1 )
9- -- sp summon
10+ -- When your opponent takes control of "Alice the Wandering Doll", you can Special Summon 1 "Doll Part" monster from your Deck. Also, you select the targets of your opponent's attacks.
1011 local e2 = Effect .CreateEffect (c )
1112 e2 :SetDescription (aux .Stringid (id ,0 ))
1213 e2 :SetCategory (CATEGORY_SPECIAL_SUMMON )
1314 e2 :SetType (EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O )
1415 e2 :SetProperty (EFFECT_FLAG_DAMAGE_STEP )
1516 e2 :SetCode (EVENT_CONTROL_CHANGED )
16- e2 :SetRange (LOCATION_SZONE )
17- e2 :SetCondition (s .condition )
18- e2 :SetTarget (s .target )
19- e2 :SetOperation (s .operation )
17+ e2 :SetRange (LOCATION_FZONE )
18+ e2 :SetCondition (s .spcon )
19+ e2 :SetTarget (s .sptg )
20+ e2 :SetOperation (s .spop )
2021 c :RegisterEffect (e2 )
22+ -- You choose the targets for your opponent's attacks
23+ local e3 = Effect .CreateEffect (c )
24+ e3 :SetType (EFFECT_TYPE_FIELD )
25+ e3 :SetProperty (EFFECT_FLAG_PLAYER_TARGET )
26+ e3 :SetCode (EFFECT_PATRICIAN_OF_DARKNESS )
27+ e3 :SetRange (LOCATION_FZONE )
28+ e3 :SetTargetRange (0 ,1 )
29+ c :RegisterEffect (e3 )
2130end
22- s .listed_names = {511001466 }
23- function s .cfilter (c ,tp )
31+ s .listed_names = {511001466 } -- "Alice the Wandering Doll"
32+ s .listed_series = {0x2517 } -- "Doll Part"
33+ function s .spcfilter (c ,tp )
2434 return c :IsCode (511001466 ) and c :IsControler (1 - tp ) and c :IsPreviousControler (tp )
2535end
26- function s .condition (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
27- return eg :IsExists (s .cfilter ,1 ,nil ,tp )
36+ function s .spcon (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
37+ return eg :IsExists (s .spcfilter ,1 ,nil ,tp )
2838end
2939function s .spfilter (c ,e ,tp )
3040 return c :IsSetCard (0x2517 ) and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false )
3141end
32- function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
42+ function s .sptg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
3343 if chk == 0 then return Duel .GetLocationCount (tp ,LOCATION_MZONE )> 0
3444 and Duel .IsExistingMatchingCard (s .spfilter ,tp ,LOCATION_DECK ,0 ,1 ,nil ,e ,tp ) end
3545 Duel .SetOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,nil ,1 ,tp ,LOCATION_DECK )
3646end
37- function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
47+ function s .spop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
3848 if Duel .GetLocationCount (tp ,LOCATION_MZONE )<= 0 then return end
3949 Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_SPSUMMON )
4050 local g = Duel .SelectMatchingCard (tp ,s .spfilter ,tp ,LOCATION_DECK ,0 ,1 ,1 ,nil ,e ,tp )
4151 if # g > 0 then
4252 Duel .SpecialSummon (g ,0 ,tp ,tp ,false ,false ,POS_FACEUP )
4353 end
44- end
54+ end
0 commit comments