bit.band
Signature
lua
bit.band(int a, int b) -> intDescription
Returns the bitwise AND of a and b.
Parameters
aintbint
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.
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) endYomagna 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)