Commit 7b948b34 authored by Chen Bill's avatar Chen Bill

remove global var

parent 9ab4d90e
......@@ -28,6 +28,7 @@ function c54289683.operation(e,tp,eg,ep,ev,re,r,rp)
local t2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,93130022,0,TYPES_TOKEN_MONSTER,tc:GetAttack(),tc:GetDefense(),tc:GetLevel(),tc:GetRace(),tc:GetAttribute())
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(93130021,0))
local op=0
if t1 and t2 then
op=Duel.SelectOption(tp,aux.Stringid(93130021,1),aux.Stringid(93130021,2),aux.Stringid(93130021,3))
elseif t1 then
......@@ -35,7 +36,9 @@ function c54289683.operation(e,tp,eg,ep,ev,re,r,rp)
elseif t2 then
op=Duel.SelectOption(tp,aux.Stringid(93130021,1),aux.Stringid(93130021,3))
if op==1 then op=2 end
else op=Duel.SelectOption(tp,aux.Stringid(93130021,1)) end
else
op=Duel.SelectOption(tp,aux.Stringid(93130021,1))
end
if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c54289683.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
......
......@@ -68,6 +68,7 @@ function c59332125.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c59332125.filter2,nil,e)
local mg2=Duel.GetMatchingGroup(c59332125.filter3,tp,0,LOCATION_MZONE,nil,e)
local exmat=false
if mg1:IsExists(c59332125.chkfilter,1,nil,tp) and mg2:GetCount()>0 then
mg1:Merge(mg2)
exmat=true
......
......@@ -45,7 +45,7 @@ function c67797569.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect()
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
tg=g:SelectSubGroup(tp,c67797569.tgcheck,false,2,2)
local tg=g:SelectSubGroup(tp,c67797569.tgcheck,false,2,2)
if tg then
if Duel.SendtoGrave(tg,REASON_EFFECT)==0 then
Duel.ShuffleHand(p)
......
......@@ -42,7 +42,7 @@ function c81558967.operation(e,tp,eg,ep,ev,re,r,rp)
if ct==0 then return end
local g=Duel.GetDecktopGroup(tp,ct)
Duel.ConfirmDecktop(tp,ct)
tg=g:Filter(c81558967.thfilter,nil)
local tg=g:Filter(c81558967.thfilter,nil)
if tg:GetCount()>0 then
Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
......@@ -83,7 +83,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
zone=zone|s.get_zone(sc,seq)
end
local _,flag_tmp=Duel.GetLocationCount(p,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)
flag=(~flag_tmp)&0x7f
local flag=(~flag_tmp)&0x7f
if sc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,p,flag) then
avail_zone=avail_zone|(flag<<(p==tp and 0 or 16))
end
......
......@@ -12,6 +12,7 @@ function c89181369.initial_effect(c)
end
function c89181369.spfilter(c,e,tp,rg)
if not c:IsType(TYPE_SYNCHRO) or not c:IsRace(RACE_DRAGON) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return false end
local result=false
if rg:IsContains(c) then
rg:RemoveCard(c)
result=rg:CheckWithSumEqual(Card.GetLevel,c:GetLevel(),1,99)
......
......@@ -24,6 +24,7 @@ function c93130021.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local t2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,93130022,0,TYPES_TOKEN_MONSTER,c:GetAttack(),c:GetDefense(),c:GetLevel(),c:GetRace(),c:GetAttribute())
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(93130021,0))
local op=0
if t1 and t2 then
op=Duel.SelectOption(tp,aux.Stringid(93130021,1),aux.Stringid(93130021,2),aux.Stringid(93130021,3))
elseif t1 then
......@@ -31,7 +32,9 @@ function c93130021.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
elseif t2 then
op=Duel.SelectOption(tp,aux.Stringid(93130021,1),aux.Stringid(93130021,3))
if op==1 then op=2 end
else op=Duel.SelectOption(tp,aux.Stringid(93130021,1)) end
else
op=Duel.SelectOption(tp,aux.Stringid(93130021,1))
end
e:SetLabel(op)
if op==1 then
e:SetCategory(CATEGORY_DESTROY)
......
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