Skip to content

Commit 91c7ae7

Browse files
authored
"Redbeard, the Plunder Patroll Matey"
Fixed a bug where it would equip itself to the monster even if it was face-down during the resolution
1 parent 3859ce9 commit 91c7ae7

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

official/c68769900.lua

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function s.initial_effect(c)
1212
e1:SetRange(LOCATION_MZONE)
1313
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E)
1414
e1:SetCountLimit(1,id)
15-
e1:SetCondition(s.condition)
15+
e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end)
1616
e1:SetTarget(s.target)
1717
e1:SetOperation(s.operation)
1818
c:RegisterEffect(e1)
@@ -24,16 +24,13 @@ function s.initial_effect(c)
2424
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
2525
e2:SetCode(EVENT_TO_GRAVE)
2626
e2:SetCountLimit(1,{id,1})
27-
e2:SetCondition(s.spcon)
27+
e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_MZONE) end)
2828
e2:SetTarget(s.eqtg)
2929
e2:SetOperation(s.eqop)
3030
c:RegisterEffect(e2)
3131
end
3232
s.listed_series={SET_PLUNDER_PATROLL}
3333
s.listed_names={id}
34-
function s.condition(e,tp,eg,ep,ev,re,r,rp)
35-
return Duel.IsTurnPlayer(1-tp)
36-
end
3734
function s.filter(c,e,tp,att)
3835
return c:IsSetCard(SET_PLUNDER_PATROLL) and c:IsAttribute(att) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
3936
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
@@ -61,7 +58,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
6158
local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,att):GetFirst()
6259
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
6360
local c=e:GetHandler()
64-
if not c:IsRelateToEffect(e) then return end
61+
if not (c:IsRelateToEffect(e) and c:IsFaceup())then return end
6562
Duel.Equip(tp,c,tc,true)
6663
local e1=Effect.CreateEffect(c)
6764
e1:SetType(EFFECT_TYPE_SINGLE)
@@ -75,9 +72,6 @@ end
7572
function s.eqlimit(e,c)
7673
return c==e:GetLabelObject()
7774
end
78-
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
79-
return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_MZONE)
80-
end
8175
function s.eqfilter(c,ec)
8276
return c:IsFaceup() and c:IsSetCard(SET_PLUNDER_PATROLL) and not c:IsCode(id)
8377
end
@@ -106,4 +100,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
106100
e1:SetLabelObject(tc)
107101
c:RegisterEffect(e1)
108102
end
109-
end
103+
end

0 commit comments

Comments
 (0)