1+ -- ハーピィ・レディ3・1
2+ -- Harpie Lady 3 & 1
3+ -- scripted by YoshiDuels
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- Fusion Procedure
7+ c :EnableReviveLimit ()
8+ Fusion .AddProcMixN (c ,true ,true ,54415063 ,1 ,s .ffilter ,1 )
9+ Fusion .AddContactProc (c ,s .contactfil ,s .contactop ,nil ,nil ,SUMMON_TYPE_FUSION ,nil ,false )
10+ c :GetMetatable ().material = {160208006 }
11+ -- Name change
12+ local e1 = Effect .CreateEffect (c )
13+ e1 :SetDescription (aux .Stringid (id ,1 ))
14+ e1 :SetCategory (CATEGORY_ATKCHANGE )
15+ e1 :SetType (EFFECT_TYPE_IGNITION )
16+ e1 :SetRange (LOCATION_MZONE )
17+ e1 :SetCountLimit (1 )
18+ e1 :SetCost (s .cost )
19+ e1 :SetTarget (s .target )
20+ e1 :SetOperation (s .operation )
21+ c :RegisterEffect (e1 )
22+ end
23+ s .listed_names = {CARD_HARPIE_LADY ,54415063 }
24+ s .named_material = {54415063 }
25+ function s .ffilter (c ,fc ,sumtype ,tp )
26+ return c :IsRace (RACE_WINGEDBEAST ,fc ,sumtype ,tp ) and c :IsLevelBelow (4 )
27+ end
28+ function s .contactfil (tp )
29+ return Duel .GetMatchingGroup (aux .FaceupFilter (Card .IsAbleToDeckOrExtraAsCost ),tp ,LOCATION_ONFIELD ,0 ,nil )
30+ end
31+ function s .contactop (g ,tp )
32+ Duel .SendtoDeck (g ,nil ,SEQ_DECKSHUFFLE ,REASON_COST + REASON_MATERIAL )
33+ end
34+ function s .cost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
35+ if chk == 0 then return Duel .IsPlayerCanDiscardDeckAsCost (tp ,1 ) end
36+ end
37+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
38+ local c = e :GetHandler ()
39+ if chk == 0 then return not c :IsCode (CARD_HARPIE_LADY ) end
40+ end
41+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
42+ -- Requirement
43+ if Duel .DiscardDeck (tp ,1 ,REASON_COST )< 1 then return end
44+ -- Effect
45+ local c = e :GetHandler ()
46+ -- Name becomes "Harpie Lady"
47+ local e1 = Effect .CreateEffect (c )
48+ e1 :SetType (EFFECT_TYPE_SINGLE )
49+ e1 :SetProperty (EFFECT_FLAG_CANNOT_DISABLE )
50+ e1 :SetCode (EFFECT_CHANGE_CODE )
51+ e1 :SetValue (CARD_HARPIE_LADY )
52+ e1 :SetReset (RESETS_STANDARD_PHASE_END )
53+ c :RegisterEffect (e1 )
54+ -- can only attack twice
55+ local e2 = Effect .CreateEffect (e :GetHandler ())
56+ e2 :SetDescription (aux .Stringid (id ,2 ))
57+ e2 :SetType (EFFECT_TYPE_FIELD )
58+ e2 :SetProperty (EFFECT_FLAG_IGNORE_IMMUNE + EFFECT_FLAG_CLIENT_HINT )
59+ e2 :SetCode (EFFECT_CANNOT_ATTACK_ANNOUNCE )
60+ e2 :SetTargetRange (0 ,LOCATION_MZONE )
61+ e2 :SetCondition (s .atkcon )
62+ e2 :SetReset (RESET_PHASE |PHASE_END ,2 )
63+ Duel .RegisterEffect (e2 ,tp )
64+ local e3 = Effect .CreateEffect (e :GetHandler ())
65+ e3 :SetType (EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS )
66+ e3 :SetProperty (EFFECT_FLAG_CANNOT_DISABLE )
67+ e3 :SetCode (EVENT_ATTACK_ANNOUNCE )
68+ e3 :SetOperation (s .checkop )
69+ e3 :SetReset (RESET_PHASE |PHASE_END ,2 )
70+ e3 :SetLabelObject (e2 )
71+ Duel .RegisterEffect (e3 ,tp )
72+ end
73+ function s .atkcon (e )
74+ return e :GetLabel ()== 2
75+ end
76+ function s .checkop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
77+ if Duel .IsTurnPlayer (1 - e :GetHandlerPlayer ()) then
78+ e :GetLabelObject ():SetLabel (e :GetLabelObject ():GetLabel ()+ 1 )
79+ end
80+ end
0 commit comments