@@ -32,24 +32,23 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
3232end
3333function s .rescon (ct )
3434 return function (sg ,e ,tp ,mg )
35- local ct1 = sg :FilterCount (Card .IsLocation ,nil ,LOCATION_HAND )
36- local ct2 = sg :FilterCount (Card .IsLocation ,nil ,LOCATION_EXTRA )
37- if ct == 1 then
38- return ct1 == ct or ct2 // 6 == ct ,ct1 > 0 and ct2 > 0
39- end
40- if ct2 > 0 then
41- return ct2 >= 6 and ct2 % 6 == 0 and ct == ct1 + (ct2 // 6 )
42- else
43- return ct == ct1
44- end
35+ local count = sg :FilterCount (Card .IsLocation ,nil ,LOCATION_HAND )
36+ local remaining = ct - count
37+ if remaining < 0 then return false ,true end
38+ local extracnt = sg :FilterCount (Card .IsLocation ,nil ,LOCATION_EXTRA )
39+ local extra_needed = remaining * 6
40+ if extracnt > extra_needed then return false ,true end
41+ return extracnt == extra_needed ,extracnt > extra_needed
4542 end
4643end
4744function s .activate (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
4845 local tg = Duel .GetTargetCards (e )
4946 local ct =# tg
5047 if ct == 0 then return end
51- local rg = Duel .GetMatchingGroup (Card .IsAbleToRemove ,tp ,LOCATION_HAND |LOCATION_EXTRA ,0 ,nil ,tp ,POS_FACEDOWN )
52- if # rg < ct then return end
48+ local g1 = Duel .GetMatchingGroup (Card .IsAbleToRemove ,tp ,LOCATION_HAND ,0 ,nil ,tp ,POS_FACEDOWN )
49+ local g2 = Duel .GetMatchingGroup (Card .IsAbleToRemove ,tp ,LOCATION_EXTRA ,0 ,nil ,tp ,POS_FACEDOWN )
50+ if (# g1 +# g2 // 6 )< ct then return end
51+ local rg = g1 + g2
5352 local sg = aux .SelectUnselectGroup (rg ,e ,tp ,1 ,# rg ,s .rescon (ct ),1 ,tp ,HINTMSG_REMOVE ,s .rescon (ct ),s .rescon (ct ))
5453 if Duel .Remove (sg ,POS_FACEDOWN ,REASON_EFFECT )> 0 then
5554 Duel .BreakEffect ()
0 commit comments