1+ -- P・M スマートオウル
2+ -- Plasmatic Model Smart Owl
3+ -- scripted by YoshiDuels
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- Change the position of an opponent's monster and gain 500 ATK
7+ local e1 = Effect .CreateEffect (c )
8+ e1 :SetDescription (aux .Stringid (id ,0 ))
9+ e1 :SetCategory (CATEGORY_POSITION + CATEGORY_ATKCHANGE )
10+ e1 :SetType (EFFECT_TYPE_IGNITION )
11+ e1 :SetRange (LOCATION_MZONE )
12+ e1 :SetCountLimit (1 )
13+ e1 :SetCondition (function (e ) return e :GetHandler ():IsStatus (STATUS_SUMMON_TURN ) end )
14+ e1 :SetCost (s .cost )
15+ e1 :SetTarget (s .target )
16+ e1 :SetOperation (s .operation )
17+ c :RegisterEffect (e1 )
18+ end
19+ s .listed_names = {160021058 }
20+ function s .cfilter (c )
21+ return c :IsMonster () and c :IsRace (RACE_THUNDER ) and c :IsLevel (4 ) and c :IsDefense (800 ) and c :IsAbleToDeckOrExtraAsCost ()
22+ end
23+ function s .cost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
24+ if chk == 0 then return Duel .IsExistingMatchingCard (s .cfilter ,tp ,LOCATION_GRAVE ,0 ,2 ,nil ) end
25+ end
26+ function s .filter (c )
27+ return c :IsFaceup () and c :IsCanTurnSet () and c :IsCanChangePositionRush ()
28+ end
29+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
30+ if chk == 0 then return Duel .IsExistingMatchingCard (s .filter ,tp ,0 ,LOCATION_MZONE ,1 ,nil ) end
31+ Duel .SetOperationInfo (0 ,CATEGORY_POSITION ,nil ,1 ,1 - tp ,0 )
32+ end
33+ function s .setfilter (c )
34+ return c :IsCode (160021058 ) and c :IsSSetable ()
35+ end
36+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
37+ -- Requirement
38+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TODECK )
39+ local g = Duel .SelectMatchingCard (tp ,s .cfilter ,tp ,LOCATION_GRAVE ,0 ,2 ,2 ,nil )
40+ Duel .HintSelection (g )
41+ if Duel .SendtoDeck (g ,nil ,SEQ_DECKSHUFFLE ,REASON_COST )< 1 then return end
42+ -- Effect
43+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_POSCHANGE )
44+ local g = Duel .SelectMatchingCard (tp ,s .filter ,tp ,0 ,LOCATION_MZONE ,1 ,1 ,nil )
45+ if # g > 0 then
46+ Duel .HintSelection (g )
47+ Duel .ChangePosition (g ,POS_FACEDOWN_DEFENSE )
48+ local g2 = Duel .GetMatchingGroup (aux .NecroValleyFilter (s .setfilter ),tp ,LOCATION_GRAVE ,0 ,nil )
49+ if # g2 > 0 and Duel .SelectYesNo (tp ,aux .Stringid (id ,1 )) then
50+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_SET )
51+ local sg = g2 :Select (tp ,1 ,1 ,nil )
52+ Duel .BreakEffect ()
53+ Duel .SSet (tp ,sg )
54+ end
55+ end
56+ end
0 commit comments