55Duel .LoadScript (" c420.lua" )
66local s ,id = GetID ()
77function s .initial_effect (c )
8- -- link summon
9- Link .AddProcedure (c ,aux .FilterBoolFunctionEx2 (Card .IsDrone ),2 )
108 c :EnableReviveLimit ()
11- -- spsummon
9+ -- Link Summon procedure: 2+ "Drone" monsters
10+ Link .AddProcedure (c ,aux .FilterBoolFunctionEx2 (Card .IsDrone ),2 )
11+ -- Once per turn: You can target 1 "Drone" monster in your GY; Special Summon it to your zone this card points to.
1212 local e1 = Effect .CreateEffect (c )
13- e1 :SetDescription (1118 )
13+ e1 :SetDescription (aux . Stringid ( id , 0 )
1414 e1 :SetCategory (CATEGORY_SPECIAL_SUMMON )
1515 e1 :SetProperty (EFFECT_FLAG_CARD_TARGET )
1616 e1 :SetType (EFFECT_TYPE_IGNITION )
@@ -19,31 +19,32 @@ function s.initial_effect(c)
1919 e1 :SetTarget (s .sptg )
2020 e1 :SetOperation (s .spop )
2121 c :RegisterEffect (e1 )
22- -- Damage
22+ -- Once per turn, during your Main Phase 1: You can target 1 Level 4 or lower "Drone" monster you control with 1000 or less ATK; it can attack directly this turn.
2323 local e2 = Effect .CreateEffect (c )
24- e2 :SetDescription (1122 )
25- e2 :SetCategory (CATEGORY_DAMAGE )
26- e2 :SetType (EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O )
27- e2 :SetProperty (EFFECT_FLAG_PLAYER_TARGET )
24+ e2 :SetDescription (aux .Stringid (id ,1 )
25+ e2 :SetType (EFFECT_TYPE_IGNITION )
26+ e2 :SetProperty (EFFECT_FLAG_CARD_TARGET )
2827 e2 :SetRange (LOCATION_MZONE )
29- e2 :SetCode (EVENT_BATTLE_DAMAGE )
30- e2 :SetCondition (s .damcon )
31- e2 :SetCost (s .damcost )
32- e2 :SetTarget (s .damtg )
33- e2 :SetOperation (s .damop )
28+ e2 :SetCountLimit (1 )
29+ e2 :SetCondition (function (e ) return Duel .IsPhase (PHASE_MAIN1 ) end )
30+ e2 :SetTarget (s .s .diratktg )
31+ e2 :SetOperation (s .s .diratkop )
3432 c :RegisterEffect (e2 )
35- -- direct atk
33+ -- If your "Drone" monster inflicts battle damage to your opponent by a direct attack: You can Tribute that monster; inflict damage to your opponent equal to the ATK that monster had on the field.
3634 local e3 = Effect .CreateEffect (c )
37- e3 :SetDescription (1117 )
38- e3 :SetProperty (EFFECT_FLAG_CARD_TARGET )
39- e3 :SetType (EFFECT_TYPE_IGNITION )
35+ e3 :SetDescription (aux .Stringid (id ,2 )
36+ e3 :SetCategory (CATEGORY_DAMAGE )
37+ e3 :SetType (EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O )
38+ e3 :SetProperty (EFFECT_FLAG_PLAYER_TARGET )
39+ e3 :SetCode (EVENT_BATTLE_DAMAGE )
4040 e3 :SetRange (LOCATION_MZONE )
41- e3 :SetCountLimit ( 1 )
42- e3 :SetCondition (s .condition )
43- e3 :SetTarget (s .target )
44- e3 :SetOperation (s .operation )
41+ e3 :SetCondition ( s . damcon )
42+ e3 :SetCost (s .damcost )
43+ e3 :SetTarget (s .damtg )
44+ e3 :SetOperation (s .damop )
4545 c :RegisterEffect (e3 )
4646end
47+ s .listed_series = {0x581 } -- "Drone" archetype
4748function s .spfilter (c ,e ,tp ,zone )
4849 return c :IsDrone () and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false ,POS_FACEUP ,tp ,zone )
4950end
@@ -63,6 +64,25 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
6364 Duel .SpecialSummon (tc ,0 ,tp ,tp ,false ,false ,POS_FACEUP ,zone )
6465 end
6566end
67+ function s .diratkfilter (c )
68+ return c :IsFaceup () and c :IsDrone () and c :IsLevelBelow (4 ) and c :IsAttackBelow (1000 ) and not c :IsHasEffect (EFFECT_DIRECT_ATTACK )
69+ end
70+ function s .diratktg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk ,chkc )
71+ if chkc then return chkc :IsLocation (LOCATION_MZONE ) and chkc :IsControler (tp ) and s .filter (chkc ) end
72+ if chk == 0 then return Duel .IsExistingTarget (s .diratkfilter ,tp ,LOCATION_MZONE ,0 ,1 ,nil ) end
73+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TARGET )
74+ Duel .SelectTarget (tp ,s .diratkfilter ,tp ,LOCATION_MZONE ,0 ,1 ,1 ,nil )
75+ end
76+ function s .s .diratkop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
77+ local tc = Duel .GetFirstTarget ()
78+ if tc and tc :IsRelateToEffect (e ) and tc :IsFaceup () then
79+ local e1 = Effect .CreateEffect (e :GetHandler ())
80+ e1 :SetType (EFFECT_TYPE_SINGLE )
81+ e1 :SetCode (EFFECT_DIRECT_ATTACK )
82+ e1 :SetReset (RESETS_STANDARD_PHASE_END )
83+ tc :RegisterEffect (e1 )
84+ end
85+ end
6686function s .damcon (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
6787 if ep == tp then return false end
6888 local rc = eg :GetFirst ()
@@ -85,25 +105,3 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp)
85105 local p ,d = Duel .GetChainInfo (0 ,CHAININFO_TARGET_PLAYER ,CHAININFO_TARGET_PARAM )
86106 Duel .Damage (p ,d ,REASON_EFFECT )
87107end
88- function s .condition (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
89- return Duel .GetCurrentPhase ()== PHASE_MAIN1
90- end
91- function s .filter (c )
92- return c :IsFaceup () and c :IsDrone () and c :IsLevelBelow (4 ) and c :IsAttackBelow (1000 ) and not c :IsHasEffect (EFFECT_DIRECT_ATTACK )
93- end
94- function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk ,chkc )
95- if chkc then return chkc :IsLocation (LOCATION_MZONE ) and chkc :IsControler (tp ) and s .filter (chkc ) end
96- if chk == 0 then return Duel .IsExistingTarget (s .filter ,tp ,LOCATION_MZONE ,0 ,1 ,nil ) end
97- Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TARGET )
98- Duel .SelectTarget (tp ,s .filter ,tp ,LOCATION_MZONE ,0 ,1 ,1 ,nil )
99- end
100- function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
101- local tc = Duel .GetFirstTarget ()
102- if tc and tc :IsRelateToEffect (e ) and tc :IsFaceup () then
103- local e1 = Effect .CreateEffect (e :GetHandler ())
104- e1 :SetType (EFFECT_TYPE_SINGLE )
105- e1 :SetCode (EFFECT_DIRECT_ATTACK )
106- e1 :SetReset (RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END )
107- tc :RegisterEffect (e1 )
108- end
109- end
0 commit comments