22-- Coach King Giantrainer
33local s ,id = GetID ()
44function s .initial_effect (c )
5- -- xyz summon
6- Xyz .AddProcedure (c ,nil ,8 ,3 )
75 c :EnableReviveLimit ()
8- -- draw
6+ -- Xyz Summon procedure: 3 Level 8 monsters
7+ Xyz .AddProcedure (c ,nil ,8 ,3 )
8+ -- Draw 1 card and reveal it, then if it was a monster, inflict 800 damage to your opponent
99 local e1 = Effect .CreateEffect (c )
10- e1 :SetCategory (CATEGORY_DRAW + CATEGORY_DAMAGE )
1110 e1 :SetDescription (aux .Stringid (id ,0 ))
11+ e1 :SetCategory (CATEGORY_DRAW + CATEGORY_DAMAGE )
1212 e1 :SetType (EFFECT_TYPE_IGNITION )
1313 e1 :SetRange (LOCATION_MZONE )
1414 e1 :SetCountLimit (3 ,id )
@@ -18,28 +18,32 @@ function s.initial_effect(c)
1818 c :RegisterEffect (e1 ,false ,REGISTER_FLAG_DETACH_XMAT )
1919end
2020function s .cost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
21+ local c = e :GetHandler ()
2122 if chk == 0 then return Duel .IsPhase (PHASE_MAIN1 )
22- and e :GetHandler ():CheckRemoveOverlayCard (tp ,1 ,REASON_COST ) end
23- e :GetHandler ():RemoveOverlayCard (tp ,1 ,1 ,REASON_COST )
23+ and c :CheckRemoveOverlayCard (tp ,1 ,REASON_COST ) end
24+ c :RemoveOverlayCard (tp ,1 ,1 ,REASON_COST )
25+ -- You cannot conduct your Battle Phase the turn you activate this effect
2426 local e1 = Effect .CreateEffect (e :GetHandler ())
2527 e1 :SetType (EFFECT_TYPE_FIELD )
2628 e1 :SetCode (EFFECT_CANNOT_BP )
2729 e1 :SetProperty (EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_OATH )
2830 e1 :SetTargetRange (1 ,0 )
2931 e1 :SetReset (RESET_PHASE |PHASE_END )
3032 Duel .RegisterEffect (e1 ,tp )
31- aux .RegisterClientHint (e : GetHandler () ,nil ,tp ,1 ,0 ,aux .Stringid (id ,1 ),nil )
33+ aux .RegisterClientHint (c ,nil ,tp ,1 ,0 ,aux .Stringid (id ,1 ),nil )
3234end
3335function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
3436 if chk == 0 then return Duel .IsPlayerCanDraw (tp ,1 ) end
3537 Duel .SetOperationInfo (0 ,CATEGORY_DRAW ,nil ,0 ,tp ,1 )
38+ Duel .SetPossibleOperationInfo (0 ,CATEGORY_DAMAGE ,nil ,1 ,1 - tp ,800 )
3639end
3740function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
3841 local ct = Duel .Draw (tp ,1 ,REASON_EFFECT )
3942 if ct == 0 then return end
4043 local dc = Duel .GetOperatedGroup ():GetFirst ()
4144 Duel .ConfirmCards (1 - tp ,dc )
4245 if dc :IsMonster () then
46+ Duel .BreakEffect ()
4347 Duel .Damage (1 - tp ,800 ,REASON_EFFECT )
4448 end
4549 Duel .ShuffleHand (tp )
0 commit comments