@@ -14,9 +14,10 @@ function s.initial_effect(c)
1414 e1 :SetOperation (s .activate )
1515 c :RegisterEffect (e1 )
1616end
17- s .listed_names = {79853073 ,67532912 ,75559356 }
17+ s .listed_names = {79853073 ,67532912 ,75559356 } -- "Cipher Soldier", "Science Soldier", "Cyber Soldier of Dark World"
1818function s .condition (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
19- return Duel .IsExistingMatchingCard (aux .FaceupFilter (Card .IsCode ,79853073 ),tp ,LOCATION_ONFIELD ,0 ,1 ,nil )
19+ return Duel .IsTurnPlayer (tp ) and Duel .IsMainPhase ()
20+ and Duel .IsExistingMatchingCard (aux .FaceupFilter (Card .IsCode ,79853073 ),tp ,LOCATION_ONFIELD ,0 ,1 ,nil )
2021 and Duel .IsExistingMatchingCard (aux .FaceupFilter (Card .IsCode ,67532912 ),tp ,LOCATION_ONFIELD ,0 ,1 ,nil )
2122 and Duel .IsExistingMatchingCard (aux .FaceupFilter (Card .IsCode ,75559356 ),tp ,LOCATION_ONFIELD ,0 ,1 ,nil )
2223end
@@ -32,16 +33,19 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
3233 Duel .RegisterEffect (e1 ,tp )
3334end
3435function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
35- if chk == 0 then return Duel .IsExistingMatchingCard (nil ,tp ,0 ,LOCATION_HAND ,1 ,nil )
36- and Duel .IsExistingMatchingCard (nil ,tp ,0 ,LOCATION_ONFIELD ,1 ,nil ) end
37- local tg = Duel .GetFieldGroup (tp ,0 ,LOCATION_HAND )
38- local dg = Duel .GetFieldGroup (tp ,0 ,LOCATION_ONFIELD )
39- Duel .SetOperationInfo (0 ,CATEGORY_TOGRAVE ,tg ,# tg ,0 ,0 )
40- Duel .SetOperationInfo (0 ,CATEGORY_DESTROY ,dg ,# dg ,0 ,0 )
36+ local desg = Duel .GetFieldGroup (tp ,0 ,LOCATION_ONFIELD )
37+ if chk == 0 then return # desg > 0 or Duel .IsExistingMatchingCard (Card .IsAbleToGrave ,tp ,0 ,LOCATION_HAND ,1 ,nil ) end
38+ local hg = Duel .GetMatchingGroup (Card .IsAbleToGrave ,tp ,0 ,LOCATION_HAND ,nil )
39+ Duel .SetOperationInfo (0 ,CATEGORY_TOGRAVE ,hg ,# hg ,tp ,0 )
40+ Duel .SetOperationInfo (0 ,CATEGORY_DESTROY ,desg ,# desg ,tp ,0 )
4141end
4242function s .activate (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
43- local tg = Duel .GetFieldGroup ( tp ,0 ,LOCATION_HAND )
44- if Duel . SendtoGrave ( tg , REASON_EFFECT ) > 0 and tg : FilterCount ( Card . IsLocation , nil , LOCATION_GRAVE ) > 0 then
45- Duel .Destroy ( Duel . GetFieldGroup ( tp , 0 , LOCATION_ONFIELD ) ,REASON_EFFECT )
43+ local hg = Duel .GetMatchingGroup ( Card . IsAbleToGrave , tp ,0 ,LOCATION_HAND , nil )
44+ if # hg > 0 then
45+ Duel .SendtoGrave ( hg ,REASON_EFFECT )
4646 end
47- end
47+ local desg = Duel .GetFieldGroup (tp ,0 ,LOCATION_ONFIELD )
48+ if # desg > 0 then
49+ Duel .Destroy (desg ,REASON_EFFECT )
50+ end
51+ end
0 commit comments