Commit d5338ccb authored by mercury233's avatar mercury233 Committed by GitHub

update Codebreaker Virus Berserker (#1953)

parent 396c2545
......@@ -64,14 +64,15 @@ function c48736598.spop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
local tc=g:GetFirst()
while tc do
local ava_zone=0
local avail_zone=0
for p=0,1 do
local _,flag_tmp=Duel.GetLocationCount(p,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone[p])
flag[p]=(~flag_tmp)&0x7f
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,p,zone[p]) then
ava_zone=ava_zone|(flag[p]<<(p==tp and 0 or 16))
avail_zone=avail_zone|(flag[p]<<(p==tp and 0 or 16))
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local sel_zone=Duel.SelectDisableField(tp,1,LOCATION_MZONE,LOCATION_MZONE,0x00ff00ff&(~ava_zone))
local sel_zone=Duel.SelectField(tp,1,LOCATION_MZONE,LOCATION_MZONE,0x00ff00ff&(~avail_zone),tc:GetCode())
local sump=0
if sel_zone&0xff>0 then
sump=tp
......
......@@ -93,14 +93,14 @@ function c61665245.spop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c61665245.spfilter3,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetRace())
local sc=g:GetFirst()
if sc then
local ava_zone=0
local avail_zone=0
for p=0,1 do
if sc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,p,zone[p]) then
ava_zone=ava_zone|(flag[p]<<(p==tp and 0 or 16))
avail_zone=avail_zone|(flag[p]<<(p==tp and 0 or 16))
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local sel_zone=Duel.SelectDisableField(tp,1,LOCATION_MZONE,LOCATION_MZONE,0x00ff00ff&(~ava_zone))
local sel_zone=Duel.SelectDisableField(tp,1,LOCATION_MZONE,LOCATION_MZONE,0x00ff00ff&(~avail_zone))
local sump=0
if sel_zone&0xff>0 then
sump=tp
......
......@@ -68,14 +68,14 @@ function c84121193.spop1(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
local tc=g:GetFirst()
if tc then
local ava_zone=0
local avail_zone=0
for p=0,1 do
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,p,zone[p]) then
ava_zone=ava_zone|(flag[p]<<(p==tp and 0 or 16))
avail_zone=avail_zone|(flag[p]<<(p==tp and 0 or 16))
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local sel_zone=Duel.SelectDisableField(tp,1,LOCATION_MZONE,LOCATION_MZONE,0x00ff00ff&(~ava_zone))
local sel_zone=Duel.SelectDisableField(tp,1,LOCATION_MZONE,LOCATION_MZONE,0x00ff00ff&(~avail_zone))
local sump=0
if sel_zone&0xff>0 then
sump=tp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment