|
20 | 20 | function s.extragroup(e,tp,eg,ep,ev,re,r,rp,chk) |
21 | 21 | return Duel.GetMatchingGroup(s.deckmatfilter,tp,LOCATION_DECK,0,nil) |
22 | 22 | end |
| 23 | +function s.extraop(mat,e,tp,eg,ep,ev,re,r,rp,tc) |
| 24 | + Duel.ReleaseRitualMaterial(mat,true) |
| 25 | +end |
23 | 26 | function s.tributelimit(e,tp,g,sc) |
24 | 27 | return #g<=2,#g>2 |
25 | 28 | end |
| 29 | +local ritual_params1={lvtype=RITPROC_EQUAL,filter=aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE),location=LOCATION_DECK,matfilter=aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE)} |
| 30 | +local ritual_params2={lvtype=RITPROC_EQUAL,filter=aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE),matfilter=aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE),extrafil=s.extragroup,extraop=s.extraop,forcedselection=s.tributelimit} |
26 | 31 | function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) |
27 | 32 | e:SetLabel(-100) |
28 | | - local params1={lvtype=RITPROC_EQUAL,filter=aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE),location=LOCATION_DECK,matfilter=aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE)} |
29 | | - local params2={lvtype=RITPROC_EQUAL,filter=aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE),matfilter=aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE),extrafil=s.extragroup,forcedselection=s.tributelimit} |
30 | | - local b1=not Duel.HasFlagEffect(tp,id) and Ritual.Target(params1)(e,tp,eg,ep,ev,re,r,rp,0) |
31 | | - local b2=not Duel.HasFlagEffect(tp,id+1) and Ritual.Target(params2)(e,tp,eg,ep,ev,re,r,rp,0) |
| 33 | + local b1=not Duel.HasFlagEffect(tp,id) and Ritual.Target(ritual_params1)(e,tp,eg,ep,ev,re,r,rp,0) |
| 34 | + local b2=not Duel.HasFlagEffect(tp,id+1) and Ritual.Target(ritual_params2)(e,tp,eg,ep,ev,re,r,rp,0) |
32 | 35 | if chk==0 then return b1 or b2 end |
33 | 36 | end |
34 | 37 | function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) |
35 | 38 | local cost_skip=e:GetLabel()~=-100 |
36 | | - local params1={lvtype=RITPROC_EQUAL,filter=aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE),location=LOCATION_DECK,matfilter=aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE)} |
37 | | - local params2={lvtype=RITPROC_EQUAL,filter=aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE),matfilter=aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE),extrafil=s.extragroup,forcedselection=s.tributelimit} |
38 | 39 | local b1=(cost_skip or not Duel.HasFlagEffect(tp,id)) |
39 | | - and Ritual.Target(params1)(e,tp,eg,ep,ev,re,r,rp,0) |
| 40 | + and Ritual.Target(ritual_params1)(e,tp,eg,ep,ev,re,r,rp,0) |
40 | 41 | local b2=(cost_skip or not Duel.HasFlagEffect(tp,id+1)) |
41 | | - and Ritual.Target(params2)(e,tp,eg,ep,ev,re,r,rp,0) |
| 42 | + and Ritual.Target(ritual_params2)(e,tp,eg,ep,ev,re,r,rp,0) |
42 | 43 | if chk==0 then e:SetLabel(0) return b1 or b2 end |
43 | 44 | local op=Duel.SelectEffect(tp, |
44 | 45 | {b1,aux.Stringid(id,1)}, |
|
57 | 58 | function s.effop(e,tp,eg,ep,ev,re,r,rp) |
58 | 59 | local op=e:GetLabel() |
59 | 60 | if op==1 then |
60 | | - local params1={lvtype=RITPROC_EQUAL,filter=aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE),location=LOCATION_DECK,matfilter=aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE)} |
61 | | - Ritual.Operation(params1)(e,tp,eg,ep,ev,re,r,rp) |
| 61 | + Ritual.Operation(ritual_params1)(e,tp,eg,ep,ev,re,r,rp) |
62 | 62 | elseif op==2 then |
63 | | - local params2={lvtype=RITPROC_EQUAL,filter=aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE),matfilter=aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE),extrafil=s.extragroup,forcedselection=s.tributelimit} |
64 | | - Ritual.Operation(params2)(e,tp,eg,ep,ev,re,r,rp) |
| 63 | + Ritual.Operation(ritual_params2)(e,tp,eg,ep,ev,re,r,rp) |
65 | 64 | end |
66 | 65 | end |
0 commit comments