Skip to content

Commit 58f21a4

Browse files
committed
Fixed scripts with wrong operator precedence
1 parent abccf3a commit 58f21a4

File tree

6 files changed

+13
-9
lines changed

6 files changed

+13
-9
lines changed

official/c15735108.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
6363
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
6464
e2:SetCode(EFFECT_UNRELEASABLE_SUM)
6565
e2:SetValue(1)
66-
e2:SetReset(RESET_EVENT|RESETS_STANDARD&~RESET_TOFIELD|RESET_PHASE|PHASE_END)
66+
e2:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TOFIELD)|RESET_PHASE|PHASE_END)
6767
tc:RegisterEffect(e2,true)
6868
local e3=e2:Clone()
6969
e3:SetCode(EFFECT_UNRELEASABLE_NONSUM)

official/c59197169.lua

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ function s.initial_effect(c)
2222
end
2323
function s.val(e,c)
2424
local r=c:GetRace()
25-
if (r&RACE_FIEND|RACE_SPELLCASTER)>0 then return 200
26-
elseif (r&RACE_FAIRY)>0 then return -200
27-
else return 0 end
25+
if r&(RACE_FIEND|RACE_SPELLCASTER)>0 then
26+
return 200
27+
elseif (r&RACE_FAIRY)>0 then
28+
return -200
29+
else
30+
return 0
31+
end
2832
end

official/c65155517.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function s.initial_effect(c)
2323
e2:SetProperty(EFFECT_FLAG_DELAY)
2424
e2:SetCode(EVENT_DESTROYED)
2525
e2:SetCountLimit(1,{id,1})
26-
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_BATTLE|REASON_EFFECT)>0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end)
26+
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return r&(REASON_BATTLE|REASON_EFFECT)>0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end)
2727
e2:SetTarget(s.sptg)
2828
e2:SetOperation(s.spop)
2929
c:RegisterEffect(e2)

official/c68246154.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp)
5353
if chainid==i then
5454
if c:GetFlagEffect(2)==0 then
5555
g:Clear()
56-
c:RegisterFlagEffect(2,RESET_EVENT|RESETS_STANDARD&~RESET_TURN_SET|RESET_CHAIN,0,1)
56+
c:RegisterFlagEffect(2,RESET_EVENT|(RESETS_STANDARD&~RESET_TURN_SET|RESET_CHAIN),0,1)
5757
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+id,e,0,0,0,0)
5858
end
5959
g:AddCard(re:GetHandler())
@@ -67,7 +67,7 @@ function s.regcon(e,tp,eg,ep,ev,re,r,rp)
6767
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and c:IsColumn(seq,p,LOCATION_SZONE)
6868
end
6969
function s.regop2(e,tp,eg,ep,ev,re,r,rp)
70-
e:GetHandler():RegisterFlagEffect(1,RESET_EVENT|RESETS_STANDARD&~RESET_TURN_SET|RESET_CHAIN,0,1,ev)
70+
e:GetHandler():RegisterFlagEffect(1,RESET_EVENT|(RESETS_STANDARD&~RESET_TURN_SET)|RESET_CHAIN,0,1,ev)
7171
end
7272
function s.thfilter(c,codes)
7373
return c:IsSetCard(SET_MAGICAL_MUSKET) and not c:IsCode(codes) and c:IsAbleToHand()

official/c77189532.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function s.initial_effect(c)
4848
end
4949
s.listed_series={SET_BORREL,SET_CODE_TALKER}
5050
function s.chngcon(scard,sumtype,tp)
51-
return (sumtype&SUMMON_TYPE_LINK|MATERIAL_LINK)==SUMMON_TYPE_LINK|MATERIAL_LINK and scard:IsSetCard(SET_BORREL)
51+
return sumtype&(SUMMON_TYPE_LINK|MATERIAL_LINK)==(SUMMON_TYPE_LINK|MATERIAL_LINK) and scard:IsSetCard(SET_BORREL)
5252
end
5353
function s.extrafilter1(c,tp)
5454
return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp)

unofficial/c511004003.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
5959
Duel.SendtoDeck(tc,p,2,REASON_EFFECT)
6060
elseif (loc&LOCATION_HAND)~=0 then
6161
Duel.SendtoHand(tc,p,REASON_EFFECT)
62-
elseif (loc&LOCATION_MZONE|LOCATION_SZONE)~=0 then
62+
elseif loc&(LOCATION_MZONE|LOCATION_SZONE)~=0 then
6363
local seq2=0
6464
if pzone then
6565
loc=LOCATION_PZONE

0 commit comments

Comments
 (0)