Skip to content

Commit bc7650f

Browse files
committed
Fix script errors with SetOperationInfo
Fixed some cards that were not passing a group or passing an incorrect group in one of the arguments of this function, leading to script errors
1 parent ee9a778 commit bc7650f

File tree

9 files changed

+22
-24
lines changed

9 files changed

+22
-24
lines changed

official/c11321089.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function s.drdestg(e,tp,eg,ep,ev,re,r,rp,chk)
7272
if chk==0 then return hc>0 and fc>0 and Duel.IsPlayerCanDraw(tp,hc) and #dg>=fc end
7373
Duel.SetTargetPlayer(tp)
7474
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,hc)
75-
Duel.SetOperationInfo(0,CATEGORY_DESTROY,#dg,fc,1-tp,LOCATION_ONFIELD)
75+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,fc,1-tp,LOCATION_ONFIELD)
7676
end
7777
function s.drdesop(e,tp,eg,ep,ev,re,r,rp)
7878
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)

official/c28126717.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function s.filter2(c,code)
4242
end
4343
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
4444
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,tp) end
45-
Duel.SetOperationInfo(0,CATEGORY_REMOVE,POS_FACEUP,1,tp,LOCATION_DECK)
45+
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
4646
end
4747
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
4848
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)

official/c30989084.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
100100
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
101101
local tc=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
102102
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,tp,0)
103-
Duel.SetOperationInfo(0,CATEGORY_RECOVER,tp,1,tp,1000)
103+
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,1,tp,1000)
104104
end
105105
function s.rmvop(e,tp,eg,ep,ev,re,r,rp)
106106
local tc=Duel.GetFirstTarget()

official/c47710198.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ function s.rmcon2(e,tp,eg,ep,ev,re,r,rp)
115115
end
116116
function s.rmtg2(e,tp,eg,ep,ev,re,r,rp,chk)
117117
if chk==0 then return re:GetHandler():IsAbleToRemove() end
118-
Duel.SetOperationInfo(0,CATEGORY_REMOVE,rg,1,0,0)
118+
Duel.SetOperationInfo(0,CATEGORY_REMOVE,re:GetHandler(),1,0,0)
119119
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1200)
120120
end
121121
function s.rmop2(e,tp,eg,ep,ev,re,r,rp)

official/c61160289.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
6363
return eg:IsExists(s.filter,1,e:GetHandler(),1-tp)
6464
end
6565
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
66-
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil) end
67-
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,1,tp,0,LOCATION_ONFIELD)
66+
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil)
67+
if chk==0 then return #g>0 end
68+
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,tp,0)
6869
end
6970
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
7071
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil)

official/c67797569.lua

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,22 @@
22
--Lavalval Salamander
33
local s,id=GetID()
44
function 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)
3231
end
3332
s.listed_series={SET_LAVAL}
34-
function s.drcon(e,tp,eg,ep,ev,re,r,rp)
35-
return e:GetHandler():IsSynchroSummoned()
36-
end
3733
function 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)
6965
end
7066
function 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)
7471
end
7572
function 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)

official/c75771170.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function s.initial_effect(c)
3939
e4:SetOperation(s.thop)
4040
c:RegisterEffect(e4)
4141
end
42-
s.listed_names={16310544} --Mikanko Kagura
42+
s.listed_names={16310544} --"Mikanko Kagura"
4343
s.listed_series={SET_MIKANKO}
4444
function s.eqcond(e,tp,eg,ep,ev,re,r,rp)
4545
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,1,e:GetHandler(),SET_MIKANKO)
@@ -50,7 +50,7 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
5050
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
5151
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
5252
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
53-
Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,0,0)
53+
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0)
5454
end
5555
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
5656
local c=e:GetHandler()

official/c78348934.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
4343
if chk==0 then return #g>0 and Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
4444
local rg=aux.SelectUnselectGroup(g,e,tp,1,3,s.rescon,1,tp,HINTMSG_REMOVE)
4545
Duel.SetTargetCard(rg)
46-
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,1,0,LOCATION_GRAVE)
46+
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0)
4747
end
4848
function s.activate(e,tp,eg,ep,ev,re,r,rp)
4949
local g=Duel.GetTargetCards(e)
5050
local ct=Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
5151
if ct==0 then return end
52-
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
52+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF)
5353
local tc=Duel.SelectMatchingCard(tp,s.atkfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
5454
if tc then
5555
local e1=Effect.CreateEffect(e:GetHandler())

official/c98049934.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function s.initial_effect(c)
3636
e3:SetOperation(s.qpovop)
3737
c:RegisterEffect(e3)
3838
end
39-
s.listed_names={29599813} --Purrely Pretty Memory
39+
s.listed_names={29599813} --"Purrely Pretty Memory"
4040
s.listed_series={SET_PURRELY}
4141
function s.negcon(e,tp,eg,ep,ev,re,r,rp)
4242
return e:IsHasType(EFFECT_TYPE_QUICK_O)==e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,29599813)
@@ -49,7 +49,7 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
4949
if chk==0 then return Duel.IsExistingTarget(s.negfilter,tp,0,LOCATION_MZONE,1,nil) end
5050
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE)
5151
local g=Duel.SelectTarget(tp,s.negfilter,tp,0,LOCATION_MZONE,1,1,nil)
52-
Duel.SetOperationInfo(0,CATEGORY_DISABLE,tg,1,0,0)
52+
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0)
5353
end
5454
function s.negop(e,tp,eg,ep,ev,re,r,rp)
5555
local tc=Duel.GetFirstTarget()

0 commit comments

Comments
 (0)