Skip to content

bit.band ​

Signature ​

lua
bit.band(int a, int b) -> int

Description ​

Returns the bitwise AND of a and b.

Parameters ​

  • a int
  • b int

Returns ​

  • int - Bitwise AND of a and b.

Source ​

  • Utilities/utility.lua:15

Used By ​

Generated from the local Scripts/ folder and cards.cdb.

  • Detected in 984 indexed script(s).
  • Search this function in the Script Explorer with bit.band.
CardIDScriptDetected Calls
Artmage Non-Finito74631897Scripts/c74631897.lua1
Azure Ocean Dragon Lord - Neo-Daedalus Rage41570943Scripts/c41570943.lua2
Yomagna the Fire Phantom17350692Scripts/c17350692.lua1
El Shaddoll Apkallone50907446Scripts/c50907446.lua1
Meteoroa Drytron24166324Scripts/c24166324.lua1
Pere-Zenet Em Heru46273941Scripts/c46273941.lua1
Am Duazenet45151304Scripts/c45151304.lua1
Odd-Eyes Revolution Dragon16306932Scripts/c16306932.lua1
Nekroz Kaleidoscope51124303Scripts/c51124303.lua2
Transonic Bird34072799Scripts/c34072799.lua2
Yummy★Snatchy30581601Scripts/c30581601.lua1
Sonic Tracker17888577Scripts/c17888577.lua2
Stars Align Above the Shrine15306543Scripts/c15306543.lua1
D/D Extra Surveyor74387963Scripts/c74387963.lua1
Starving Venom Wing Dragon5148778Scripts/c5148778.lua1
Red-Eyes Slash Dragon21140872Scripts/c21140872.lua1
Trickstar Light Stage35371948Scripts/c35371948.lua1
Ostinato9113513Scripts/c9113513.lua1
Supreme King Dragon Lightwurm41908872Scripts/c41908872.lua1
Duel Link Dragon, the Duel Dragon60025883Scripts/c60025883.lua2
Gishki Nekromirror36982581Scripts/c36982581.lua1
Performapal Celestial Magician58092907Scripts/c58092907.lua1
Mementotlan Shleepy50042011Scripts/c50042011.lua1
Meteonis Drytron22398665Scripts/c22398665.lua1
...and 960 more

Script Examples ​

Artmage Non-Finito (74631897) ​

Source: Scripts/c74631897.lua

lua
end
function s.splimit(e,se,sp,st)
	return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION and Duel.GetFlagEffect(sp,id)==0
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)

Azure Ocean Dragon Lord - Neo-Daedalus Rage (41570943) ​

Source: Scripts/c41570943.lua

lua
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
	local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
	if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
		and Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp,zone) end

Yomagna the Fire Phantom (17350692) ​

Source: Scripts/c17350692.lua

lua
	local c=e:GetHandler()
	local race=e:GetLabel()
	if c:IsRelateToChain() and c:IsFaceup() and bit.band(c:GetRace(),race)==0 then
		local e1=Effect.CreateEffect(c)
		e1:SetType(EFFECT_TYPE_SINGLE)