@@ -123,9 +123,12 @@ local function ForceExtraRelease(mg)
123123 return g :Includes (mg )
124124 end
125125end
126+ local function GetDefaultSummonFromLocation ()
127+ return Duel .IsDuelType (DUEL_EXTRA_DECK_RITUAL ) and LOCATION_EXTRA or LOCATION_HAND
128+ end
126129Ritual .Target = aux .FunctionWithNamedArgs (
127130function (filter ,_type ,lv ,extrafil ,extraop ,matfilter ,stage2 ,location ,forcedselection ,specificmatfilter ,requirementfunc ,sumpos ,extratg )
128- location = location or LOCATION_HAND
131+ location = location or GetDefaultSummonFromLocation ()
129132 sumpos = sumpos or POS_FACEUP
130133 return function (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
131134 if chk == 0 then
@@ -196,7 +199,7 @@ function Ritual.Check(sc,lv,forcedselection,_type,requirementfunc)
196199 res = sg :CheckWithSumGreater (requirementfunc or Card .GetRitualLevel ,lv ,sc )
197200 end
198201 local stop = false
199- res = res and Duel .GetMZoneCount (tp ,sg ,tp )> 0
202+ res = res and ( sc : IsLocation ( LOCATION_EXTRA ) and Duel .GetLocationCountFromEx ( tp , tp , sg , sc ) or Duel . GetMZoneCount (tp ,sg ,tp ) )> 0
200203 end
201204 return res ,stop
202205 end
218221
219222Ritual .Operation = aux .FunctionWithNamedArgs (
220223function (filter ,_type ,lv ,extrafil ,extraop ,matfilter ,stage2 ,location ,forcedselection ,customoperation ,specificmatfilter ,requirementfunc ,sumpos )
221- location = location or LOCATION_HAND
224+ location = location or GetDefaultSummonFromLocation ()
222225 sumpos = sumpos or POS_FACEUP
223226 return function (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
224227 local mg = Duel .GetRitualMaterial (tp ,not requirementfunc )
0 commit comments