22-- Lavalval Salamander
33local s ,id = GetID ()
44function s .initial_effect (c )
5- -- Must be properly summoned before reviving
65 c :EnableReviveLimit ()
7- -- Synchro summon procedure
6+ -- Synchro Summon procedure: 1 Tuner + 1+ non-Tuner FIRE monsters
87 Synchro .AddProcedure (c ,nil ,1 ,1 ,Synchro .NonTunerEx (Card .IsAttribute ,ATTRIBUTE_FIRE ),1 ,99 )
9- -- If synchro summoned, draw 2
8+ -- Draw 2 cards, then, if you have a FIRE monster in your hand, send 2 cards from your hand to the GY including a FIRE monster
109 local e1 = Effect .CreateEffect (c )
1110 e1 :SetDescription (aux .Stringid (id ,0 ))
1211 e1 :SetCategory (CATEGORY_DRAW )
1312 e1 :SetType (EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O )
14- e1 :SetCode (EVENT_SPSUMMON_SUCCESS )
1513 e1 :SetProperty (EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_DELAY )
14+ e1 :SetCode (EVENT_SPSUMMON_SUCCESS )
1615 e1 :SetCountLimit (1 ,id )
17- e1 :SetCondition (s . drcon )
16+ e1 :SetCondition (function ( e ) return e : GetHandler (): IsSynchroSummoned () end )
1817 e1 :SetTarget (s .drtg )
1918 e1 :SetOperation (s .drop )
2019 c :RegisterEffect (e1 )
21- -- Change opponent's monsters to face-down defense position
20+ -- Cchange face-up monsters your opponent controls, up to the number of "Laval" monsters you control, to face-down Defense Position
2221 local e2 = Effect .CreateEffect (c )
2322 e2 :SetDescription (aux .Stringid (id ,1 ))
2423 e2 :SetCategory (CATEGORY_POSITION )
@@ -31,9 +30,6 @@ function s.initial_effect(c)
3130 c :RegisterEffect (e2 )
3231end
3332s .listed_series = {SET_LAVAL }
34- function s .drcon (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
35- return e :GetHandler ():IsSynchroSummoned ()
36- end
3733function s .drtg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
3834 if chk == 0 then return Duel .IsPlayerCanDraw (tp ,2 ) end
3935 Duel .SetTargetPlayer (tp )
@@ -68,9 +64,10 @@ function s.poscost(e,tp,eg,ep,ev,re,r,rp,chk)
6864 Duel .Remove (g ,POS_FACEUP ,REASON_COST )
6965end
7066function s .postg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
71- local sc = Duel .GetMatchingGroupCount (aux .FaceupFilter (Card .IsSetCard ,SET_LAVAL ),tp ,LOCATION_MZONE ,0 ,nil )
72- if chk == 0 then return sc > 0 and Duel .IsExistingMatchingCard (aux .FaceupFilter (Card .IsCanTurnSet ),tp ,0 ,LOCATION_MZONE ,1 ,nil ) end
73- Duel .SetOperationInfo (0 ,CATEGORY_POSITION ,1 ,1 ,0 ,0 )
67+ local ct = Duel .GetMatchingGroupCount (aux .FaceupFilter (Card .IsSetCard ,SET_LAVAL ),tp ,LOCATION_MZONE ,0 ,nil )
68+ local g = Duel .GetMatchingGroup (aux .FaceupFilter (Card .IsCanTurnSet ),tp ,0 ,LOCATION_MZONE ,nil )
69+ if chk == 0 then return ct > 0 and # g > 0 end
70+ Duel .SetOperationInfo (0 ,CATEGORY_POSITION ,g ,1 ,tp ,0 )
7471end
7572function s .posop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
7673 local ct = Duel .GetMatchingGroupCount (aux .FaceupFilter (Card .IsSetCard ,SET_LAVAL ),tp ,LOCATION_MZONE ,0 ,nil )
0 commit comments