Skip to content

Commit b432798

Browse files
committed
"Hidden Passage" fix
Fixed a bug causing script errors when the opponent did not have a face-up monster
1 parent 69900ca commit b432798

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

unofficial/c511000060.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function s.initial_effect(c)
77
e1:SetType(EFFECT_TYPE_ACTIVATE)
88
e1:SetCode(EVENT_FREE_CHAIN)
99
c:RegisterEffect(e1)
10-
--direct attack
10+
--Level 2 or lower Spellcaster-Type monsters you control can attack your opponent directly
1111
local e2=Effect.CreateEffect(c)
1212
e2:SetType(EFFECT_TYPE_FIELD)
1313
e2:SetRange(LOCATION_SZONE)
@@ -18,6 +18,7 @@ function s.initial_effect(c)
1818
end
1919
function s.attg(e,c)
2020
local g=Duel.GetMatchingGroup(Card.IsFaceup,e:GetHandlerPlayer(),0,LOCATION_MZONE,nil)
21+
if #g==0 then return false end
2122
local _,atk=Group.GetMinGroup(g,Card.GetAttack)
2223
return c:IsMonster() and c:IsFaceup() and c:IsLevelBelow(2) and c:IsRace(RACE_SPELLCASTER)
2324
and not c:IsHasEffect(EFFECT_CANNOT_ATTACK) and c:GetAttack()<atk

0 commit comments

Comments
 (0)