|
34 | 34 | function s.setcon(e,tp,eg,ep,ev,re,r,rp) |
35 | 35 | return re and re:IsActivated() and eg:IsExists(s.setconfilter,1,nil) |
36 | 36 | end |
37 | | -function s.setfilter(c) |
38 | | - return c:IsSpellTrap() and c:IsSSetable() |
| 37 | +function s.setfilter(c,ft) |
| 38 | + return c:IsSpellTrap() and c:IsSSetable() and (ft>0 or c:IsFieldSpell()) |
39 | 39 | end |
40 | 40 | function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) |
41 | | - if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil) end |
| 41 | + local c=e:GetHandler() |
| 42 | + local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) |
| 43 | + if c:IsLocation(LOCATION_HAND) then ft=ft-1 end |
| 44 | + if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,c,ft) end |
42 | 45 | end |
43 | 46 | function s.setop(e,tp,eg,ep,ev,re,r,rp) |
| 47 | + local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) |
44 | 48 | Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) |
45 | | - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil):GetFirst() |
| 49 | + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,ft):GetFirst() |
46 | 50 | if sc and Duel.SSet(tp,sc,tp,false)>0 then |
47 | 51 | --It cannot be activated this turn |
48 | 52 | local e1=Effect.CreateEffect(e:GetHandler()) |
|
0 commit comments