Skip to content

Commit 158cf37

Browse files
authored
fix "Night Dragolich"
- should not affect monsters Special Summoned from locations other than the Main or Extra Deck - modernization updates
1 parent b9df742 commit 158cf37

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

official/c88724332.lua

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,18 @@
22
--Night Dragolich
33
local s,id=GetID()
44
function s.initial_effect(c)
5-
--position change
5+
--Change all non-Wyrm Attack Position monsters that were Special Summoned from the Main or Extra Deck to Defense Position
66
local e1=Effect.CreateEffect(c)
77
e1:SetType(EFFECT_TYPE_FIELD)
88
e1:SetCode(EFFECT_SET_POSITION)
99
e1:SetRange(LOCATION_MZONE)
10-
e1:SetTarget(s.target)
10+
e1:SetTarget(function(e,c) return c:IsFaceup() and not c:IsRace(RACE_WYRM) and c:IsSpecialSummoned() and c:IsSummonLocation(LOCATION_DECK|LOCATION_EXTRA) end)
1111
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
1212
e1:SetValue(POS_FACEUP_DEFENSE)
1313
c:RegisterEffect(e1)
14-
--defense decrease
15-
local e2=Effect.CreateEffect(c)
16-
e2:SetType(EFFECT_TYPE_FIELD)
14+
--All non-Wyrm monsters that were Special Summoned from the Main or Extra Deck lose DEF equal to their original DEF
15+
local e2=e1:Clone()
1716
e2:SetCode(EFFECT_UPDATE_DEFENSE)
18-
e2:SetRange(LOCATION_MZONE)
19-
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
20-
e2:SetTarget(s.target)
21-
e2:SetValue(s.defval)
17+
e2:SetValue(function(e,c) return -c:GetBaseDefense() end)
2218
c:RegisterEffect(e2)
2319
end
24-
function s.target(e,c)
25-
return c:IsFaceup() and not c:IsRace(RACE_WYRM) and c:IsSpecialSummoned() and (c:GetSummonLocation()&LOCATION_DECK|LOCATION_EXTRA)~=0
26-
end
27-
function s.defval(e,c)
28-
return -c:GetBaseDefense()
29-
end

0 commit comments

Comments
 (0)