Skip to content

Commit 433e96a

Browse files
committed
"Deskbot 009" fix
Fixed a bug where the destruction replacement effect could be applied from the Spell/Trap Zone
1 parent d47d550 commit 433e96a

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

official/c25494711.lua

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22
--Deskbot 009
33
local s,id=GetID()
44
function s.initial_effect(c)
5-
--atkup
5+
--Make this card gain ATK equal to the combined ATK of all "Deskbot" monsters you currently control
66
local e1=Effect.CreateEffect(c)
7+
e1:SetDescription(aux.Stringid(id,0))
78
e1:SetCategory(CATEGORY_ATKCHANGE)
89
e1:SetType(EFFECT_TYPE_IGNITION)
910
e1:SetRange(LOCATION_MZONE)
1011
e1:SetCountLimit(1)
11-
e1:SetCondition(s.atkcon)
12+
e1:SetCondition(function() return Duel.IsPhase(PHASE_MAIN1) end)
1213
e1:SetTarget(s.atktg)
1314
e1:SetOperation(s.atkop)
1415
c:RegisterEffect(e1)
15-
--actlimit
16+
--Your opponent's cards and effects cannot be activated until the end of the Damage Step
1617
local e2=Effect.CreateEffect(c)
1718
e2:SetType(EFFECT_TYPE_FIELD)
1819
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
@@ -22,24 +23,24 @@ function s.initial_effect(c)
2223
e2:SetValue(1)
2324
e2:SetCondition(s.actcon)
2425
c:RegisterEffect(e2)
25-
--destroy replace
26+
--If this card would be destroyed by battle or card effect, you can destroy 1 "Deskbot" card you control instead.
2627
local e3=Effect.CreateEffect(c)
2728
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
29+
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
2830
e3:SetCode(EFFECT_DESTROY_REPLACE)
31+
e3:SetRange(LOCATION_MZONE)
2932
e3:SetTarget(s.reptg)
3033
e3:SetOperation(s.repop)
3134
c:RegisterEffect(e3)
3235
end
3336
s.listed_series={SET_DESKBOT}
34-
s.listed_names={}
35-
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
36-
return Duel.IsPhase(PHASE_MAIN1)
37-
end
37+
s.listed_names={id}
3838
function s.atkfilter(c)
3939
return c:IsFaceup() and c:IsSetCard(SET_DESKBOT) and not c:IsCode(id)
4040
end
4141
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
4242
if chk==0 then return Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
43+
--Only this card can attack the turn this effect is activated
4344
local e1=Effect.CreateEffect(e:GetHandler())
4445
e1:SetType(EFFECT_TYPE_FIELD)
4546
e1:SetCode(EFFECT_CANNOT_ATTACK)

0 commit comments

Comments
 (0)