Skip to content

Commit 8d5fd36

Browse files
committed
Some card fixes
- fixed a bug with some "Archfiend" cards that would be able to negate an effect that targets an "Archfiend" and/or themselves even when the targeted changed locations from the moment the effect was activated to the moment it resolved - cards changed: Skull Archfiend of Lightning, Shadowknight Archfiend, Terrorking Archfiend, Infernalqueen Archfiend, Darkbishop Archfiend, Vilepawn Archfiend
1 parent e6f9fa8 commit 8d5fd36

File tree

6 files changed

+71
-75
lines changed

6 files changed

+71
-75
lines changed

official/c35798491.lua

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,47 @@
22
--Darkbishop Archfiend
33
local s,id=GetID()
44
function s.initial_effect(c)
5-
--maintain
5+
--Once per turn, during your Standby Phase, you must pay 500 LP (this is not optional), or this card is destroyed
66
local e1=Effect.CreateEffect(c)
77
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
88
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
99
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
1010
e1:SetRange(LOCATION_MZONE)
1111
e1:SetCountLimit(1)
12-
e1:SetCondition(s.mtcon)
12+
e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end)
1313
e1:SetOperation(s.mtop)
1414
c:RegisterEffect(e1)
15-
--disable and destroy
15+
--Roll a six-sided die when resolving an opponent's card effect that targets an "Archfiend" monster you control
1616
local e2=Effect.CreateEffect(c)
1717
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
1818
e2:SetCode(EVENT_CHAIN_SOLVING)
1919
e2:SetRange(LOCATION_MZONE)
2020
e2:SetOperation(s.disop)
2121
c:RegisterEffect(e2)
2222
end
23-
s.listed_series={0x45}
23+
s.listed_series={SET_ARCHFIEND}
2424
s.roll_dice=true
25-
function s.mtcon(e,tp,eg,ep,ev,re,r,rp)
26-
return Duel.GetTurnPlayer()==tp
27-
end
2825
function s.mtop(e,tp,eg,ep,ev,re,r,rp)
2926
if Duel.CheckLPCost(tp,500) then
3027
Duel.PayLPCost(tp,500)
3128
else
3229
Duel.Destroy(e:GetHandler(),REASON_COST)
3330
end
3431
end
35-
function s.filter(c,tp)
36-
return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsFaceup() and c:IsSetCard(0x45)
32+
function s.filter(c,tp,re)
33+
return c:IsSetCard(SET_ARCHFIEND) and c:IsRelateToEffect(re) and c:IsLocation(LOCATION_MZONE)
34+
and c:IsControler(tp) and c:IsFaceup()
3735
end
3836
function s.disop(e,tp,eg,ep,ev,re,r,rp)
39-
if ep==tp then return end
40-
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
37+
if not (re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and ep==1-tp) then return false end
4138
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
42-
if not tg or not tg:IsExists(s.filter,1,nil,tp) or not Duel.IsChainDisablable(ev) then return false end
39+
if not tg or not tg:IsExists(s.filter,1,nil,tp,re) or not Duel.IsChainDisablable(ev) then return false end
4340
local rc=re:GetHandler()
41+
Duel.Hint(HINT_CARD,1-tp,id)
4442
local dc=Duel.TossDice(tp,1)
4543
if dc==1 or dc==3 or dc==6 then
4644
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
4745
Duel.Destroy(rc,REASON_EFFECT)
4846
end
4947
end
50-
end
48+
end

official/c35975813.lua

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
--Terrorking Archfiend
33
local s,id=GetID()
44
function s.initial_effect(c)
5-
--sumlimit
5+
--Cannot be Normal/Flip summoned unless you control an "Archfiend" monster
66
local e1=Effect.CreateEffect(c)
77
e1:SetType(EFFECT_TYPE_SINGLE)
88
e1:SetCode(EFFECT_CANNOT_SUMMON)
@@ -11,38 +11,35 @@ function s.initial_effect(c)
1111
local e2=e1:Clone()
1212
e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
1313
c:RegisterEffect(e2)
14-
--maintain
14+
--Once per turn, during your Standby Phase, you must pay 800 LP (this is not optional), or this card is destroyed
1515
local e3=Effect.CreateEffect(c)
1616
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
1717
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
1818
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
1919
e3:SetRange(LOCATION_MZONE)
2020
e3:SetCountLimit(1)
21-
e3:SetCondition(s.mtcon)
21+
e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end)
2222
e3:SetOperation(s.mtop)
2323
c:RegisterEffect(e3)
24-
--disable and destroy
24+
--Roll a six-sided die when resolving an opponent's card effect that targets this card
2525
local e4=Effect.CreateEffect(c)
2626
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
2727
e4:SetCode(EVENT_CHAIN_SOLVING)
2828
e4:SetRange(LOCATION_MZONE)
2929
e4:SetOperation(s.disop)
3030
c:RegisterEffect(e4)
31-
--disable
31+
--Negate the effects of monsters destroyed by battle with this card
3232
local e5=Effect.CreateEffect(c)
3333
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
3434
e5:SetCode(EVENT_BATTLED)
3535
e5:SetRange(LOCATION_MZONE)
3636
e5:SetOperation(s.disop2)
3737
c:RegisterEffect(e5)
3838
end
39-
s.listed_series={0x45}
39+
s.listed_series={SET_ARCHFIEND}
4040
s.roll_dice=true
4141
function s.excon(e)
42-
return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x45),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
43-
end
44-
function s.mtcon(e,tp,eg,ep,ev,re,r,rp)
45-
return Duel.GetTurnPlayer()==tp
42+
return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ARCHFIEND),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
4643
end
4744
function s.mtop(e,tp,eg,ep,ev,re,r,rp)
4845
if Duel.CheckLPCost(tp,800) then
@@ -52,11 +49,13 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp)
5249
end
5350
end
5451
function s.disop(e,tp,eg,ep,ev,re,r,rp)
55-
if ep==tp then return end
5652
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
53+
local c=e:GetHandler()
54+
if not (c:IsRelateToEffect(re) and ep==1-tp) then return end
5755
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
58-
if not tg or not tg:IsContains(e:GetHandler()) or not Duel.IsChainDisablable(ev) then return false end
56+
if not tg or not tg:IsContains(c) or not Duel.IsChainDisablable(ev) then return false end
5957
local rc=re:GetHandler()
58+
Duel.Hint(HINT_CARD,1-tp,id)
6059
local dc=Duel.TossDice(tp,1)
6160
if dc~=2 and dc~=5 then return end
6261
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
@@ -70,12 +69,12 @@ function s.disop2(e,tp,eg,ep,ev,re,r,rp)
7069
local e1=Effect.CreateEffect(c)
7170
e1:SetType(EFFECT_TYPE_SINGLE)
7271
e1:SetCode(EFFECT_DISABLE)
73-
e1:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE)
72+
e1:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE)
7473
tc:RegisterEffect(e1)
7574
local e2=Effect.CreateEffect(c)
7675
e2:SetType(EFFECT_TYPE_SINGLE)
7776
e2:SetCode(EFFECT_DISABLE_EFFECT)
78-
e2:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE)
77+
e2:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE)
7978
tc:RegisterEffect(e2)
8079
end
81-
end
80+
end

official/c61370518.lua

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
--Skull Archfiend of Lightning
33
local s,id=GetID()
44
function s.initial_effect(c)
5-
--maintain
5+
--Once per turn, during your Standby Phase, you must pay 500 LP (this is not optional), or this card is destroyed
66
local e1=Effect.CreateEffect(c)
77
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
88
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
99
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
1010
e1:SetRange(LOCATION_MZONE)
1111
e1:SetCountLimit(1)
12-
e1:SetCondition(s.mtcon)
12+
e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end)
1313
e1:SetOperation(s.mtop)
1414
c:RegisterEffect(e1)
15-
--disable and destroy
15+
--Roll a six-sided die when resolving an opponent's card effect that targets this card
1616
local e2=Effect.CreateEffect(c)
1717
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
1818
e2:SetCode(EVENT_CHAIN_SOLVING)
@@ -21,9 +21,6 @@ function s.initial_effect(c)
2121
c:RegisterEffect(e2)
2222
end
2323
s.roll_dice=true
24-
function s.mtcon(e,tp,eg,ep,ev,re,r,rp)
25-
return Duel.GetTurnPlayer()==tp
26-
end
2724
function s.mtop(e,tp,eg,ep,ev,re,r,rp)
2825
if Duel.CheckLPCost(tp,500) then
2926
Duel.PayLPCost(tp,500)
@@ -32,15 +29,17 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp)
3229
end
3330
end
3431
function s.disop(e,tp,eg,ep,ev,re,r,rp)
35-
if ep==tp then return end
3632
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
33+
local c=e:GetHandler()
34+
if not (c:IsRelateToEffect(re) and ep==1-tp) then return end
3735
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
38-
if not tg or not tg:IsContains(e:GetHandler()) or not Duel.IsChainDisablable(ev) then return false end
36+
if not tg or not tg:IsContains(c) or not Duel.IsChainDisablable(ev) then return false end
3937
local rc=re:GetHandler()
38+
Duel.Hint(HINT_CARD,1-tp,id)
4039
local dc=Duel.TossDice(tp,1)
4140
if dc==1 or dc==3 or dc==6 then
4241
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
4342
Duel.Destroy(rc,REASON_EFFECT)
4443
end
4544
end
46-
end
45+
end

official/c73219648.lua

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22
--Vilepawn Archfiend
33
local s,id=GetID()
44
function s.initial_effect(c)
5-
--Maintenance cost
5+
--Once per turn, during your Standby Phase, you must pay 500 LP (this is not optional), or this card is destroyed
66
local e1=Effect.CreateEffect(c)
77
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
88
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
99
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
1010
e1:SetRange(LOCATION_MZONE)
1111
e1:SetCountLimit(1)
12-
e1:SetCondition(s.mtcon)
12+
e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end)
1313
e1:SetOperation(s.mtop)
1414
c:RegisterEffect(e1)
15-
--disable and destroy
15+
--Roll a six-sided die when resolving an opponent's card effect that targets this card
1616
local e2=Effect.CreateEffect(c)
1717
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
1818
e2:SetCode(EVENT_CHAIN_SOLVING)
1919
e2:SetRange(LOCATION_MZONE)
2020
e2:SetOperation(s.disop)
2121
c:RegisterEffect(e2)
22-
--cannot be battle target
22+
--Your opponent cannot attack "Archfiend" monsters you control, except "Vilpawn Archfiend"
2323
local e3=Effect.CreateEffect(c)
2424
e3:SetType(EFFECT_TYPE_FIELD)
2525
e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
@@ -28,11 +28,9 @@ function s.initial_effect(c)
2828
e3:SetValue(s.atktg)
2929
c:RegisterEffect(e3)
3030
end
31-
s.listed_series={0x45}
31+
s.listed_series={SET_ARCHFIEND}
3232
s.roll_dice=true
33-
function s.mtcon(e,tp,eg,ep,ev,re,r,rp)
34-
return Duel.GetTurnPlayer()==tp
35-
end
33+
s.listed_names={id}
3634
function s.mtop(e,tp,eg,ep,ev,re,r,rp)
3735
if Duel.CheckLPCost(tp,500) then
3836
Duel.PayLPCost(tp,500)
@@ -41,17 +39,19 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp)
4139
end
4240
end
4341
function s.disop(e,tp,eg,ep,ev,re,r,rp)
44-
if ep==tp then return end
4542
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
43+
local c=e:GetHandler()
44+
if not (c:IsRelateToEffect(re) and ep==1-tp) then return end
4645
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
47-
if not tg or not tg:IsContains(e:GetHandler()) or not Duel.IsChainDisablable(ev) then return false end
46+
if not tg or not tg:IsContains(c) or not Duel.IsChainDisablable(ev) then return false end
4847
local rc=re:GetHandler()
48+
Duel.Hint(HINT_CARD,1-tp,id)
4949
local dc=Duel.TossDice(tp,1)
5050
if dc~=3 then return end
5151
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
5252
Duel.Destroy(rc,REASON_EFFECT)
5353
end
5454
end
5555
function s.atktg(e,c)
56-
return c:IsFaceup() and c:IsSetCard(0x45) and c:GetCode()~=id
57-
end
56+
return c:IsFaceup() and c:IsSetCard(SET_ARCHFIEND) and not c:IsCode(id)
57+
end

official/c8581705.lua

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,38 @@
22
--Infernalqueen Archfiend
33
local s,id=GetID()
44
function s.initial_effect(c)
5-
--maintain
5+
--Once per turn, during your Standby Phase, you must pay 500 LP (this is not optional), or this card is destroyed
66
local e1=Effect.CreateEffect(c)
77
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
88
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
99
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
1010
e1:SetRange(LOCATION_MZONE)
1111
e1:SetCountLimit(1)
12-
e1:SetCondition(s.mtcon)
12+
e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end)
1313
e1:SetOperation(s.mtop)
1414
c:RegisterEffect(e1)
15-
--negate and destroy
15+
--Roll a six-sided die when resolving an opponent's card effect that targets this card
1616
local e2=Effect.CreateEffect(c)
1717
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
1818
e2:SetCode(EVENT_CHAIN_SOLVING)
1919
e2:SetRange(LOCATION_MZONE)
2020
e2:SetOperation(s.disop)
2121
c:RegisterEffect(e2)
22-
--increase ATK
22+
--Increase the ATK of one "Archfiend" monster by 1000
2323
local e3=Effect.CreateEffect(c)
2424
e3:SetDescription(aux.Stringid(id,0))
25+
e3:SetCategory(CATEGORY_ATKCHANGE)
2526
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
2627
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
2728
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
28-
e3:SetCountLimit(1)
2929
e3:SetRange(LOCATION_MZONE)
30+
e3:SetCountLimit(1)
3031
e3:SetTarget(s.atktg)
3132
e3:SetOperation(s.atkop)
3233
c:RegisterEffect(e3)
3334
end
34-
s.listed_series={0x45}
35+
s.listed_series={SET_ARCHFIEND}
3536
s.roll_dice=true
36-
function s.mtcon(e,tp,eg,ep,ev,re,r,rp)
37-
return Duel.GetTurnPlayer()==tp
38-
end
3937
function s.mtop(e,tp,eg,ep,ev,re,r,rp)
4038
if Duel.CheckLPCost(tp,500) then
4139
Duel.PayLPCost(tp,500)
@@ -44,25 +42,28 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp)
4442
end
4543
end
4644
function s.disop(e,tp,eg,ep,ev,re,r,rp)
47-
if ep==tp then return end
4845
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
46+
local c=e:GetHandler()
47+
if not (c:IsRelateToEffect(re) and ep==1-tp) then return end
4948
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
50-
if not tg or not tg:IsContains(e:GetHandler()) or not Duel.IsChainDisablable(ev) then return false end
49+
if not tg or not tg:IsContains(c) or not Duel.IsChainDisablable(ev) then return false end
5150
local rc=re:GetHandler()
51+
Duel.Hint(HINT_CARD,1-tp,id)
5252
local dc=Duel.TossDice(tp,1)
5353
if dc~=2 and dc~=5 then return end
5454
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
5555
Duel.Destroy(rc,REASON_EFFECT)
5656
end
5757
end
5858
function s.filter(c)
59-
return c:IsFaceup() and c:IsSetCard(0x45)
59+
return c:IsFaceup() and c:IsSetCard(SET_ARCHFIEND)
6060
end
6161
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
6262
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end
6363
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) end
64-
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
65-
Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil)
64+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF)
65+
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil)
66+
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,tp,1000)
6667
end
6768
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
6869
local tc=Duel.GetFirstTarget()
@@ -72,7 +73,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
7273
e1:SetType(EFFECT_TYPE_SINGLE)
7374
e1:SetCode(EFFECT_UPDATE_ATTACK)
7475
e1:SetValue(1000)
75-
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
76+
e1:SetReset(RESETS_STANDARD_PHASE_END)
7677
tc:RegisterEffect(e1)
7778
end
78-
end
79+
end

0 commit comments

Comments
 (0)