Skip to content

Commit 43ce9e7

Browse files
committed
Added new auxiliary function
Card.GetMainCardType
1 parent ed2601e commit 43ce9e7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

utility.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,11 @@ function Card.IsTrapMonster(c)
248248
return c:IsTrapCard() and (c:GetOriginalLevel()>0 or c:GetOriginalAttribute()>0 or c:GetOriginalRace()>0)
249249
end
250250

251+
function Card.GetMainCardType(c)
252+
return c:GetType()&(TYPE_MONSTER|TYPE_SPELL|TYPE_TRAP)
253+
end
254+
255+
251256
function Card.IsNonEffectMonster(c)
252257
return c:IsMonster() and not c:IsType(TYPE_EFFECT)
253258
end

0 commit comments

Comments
 (0)