Commit 2f8e8552 authored by mercury233's avatar mercury233

fix

parent 3fe484f6
......@@ -26,7 +26,7 @@ function c10312660.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or g:GetClassCount(Card.GetCode)<3 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,3,3)
if #sg>0 then
if sg then
Duel.ConfirmCards(1-tp,sg)
local tc=sg:RandomSelect(1-tp,1):GetFirst()
Duel.ConfirmCards(tp,tc)
......
......@@ -51,7 +51,7 @@ function c11481610.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local g=Duel.GetMatchingGroup(c11481610.cfilter,tp,LOCATION_HAND,0,nil,e,tp,lsc,rsc)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ct)
res=Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
res=Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0
end
end
if not res then
......
......@@ -40,7 +40,7 @@ function c16209941.spop(e,tp,eg,ep,ev,re,r,rp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local spg=Duel.GetMatchingGroup(c16209941.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if spg:GetCount()<=0 then return end
local sg=spg:GetFirst()
local sg=spg
if spg:GetCount()~=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=spg:Select(tp,1,1,nil)
......
......@@ -69,9 +69,6 @@ function c18458255.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
function c18458255.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_PENDULUM)
end
function c18458255.reprmfilter(c,tp)
return c:IsFacedown() and c:IsAbleToRemove(tp,POS_FACEDOWN,REASON_EFFECT)
end
......
......@@ -34,7 +34,7 @@ function c20246864.cfilter(c)
end
function c20246864.spcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return #g>0 and #g==Duel.GetMatchingGroupCount(c20246864.cfilter,tp,LOCATION_MZONE,0,1,nil)
return #g>0 and #g==Duel.GetMatchingGroupCount(c20246864.cfilter,tp,LOCATION_MZONE,0,nil)
end
function c20246864.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -44,7 +44,7 @@ function c20590515.activate(e,tp,eg,ep,ev,re,r,rp)
and Duel.SelectYesNo(tp,aux.Stringid(20590515,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,1,nil)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g)
local tc=g:GetFirst()
if tc then
......
......@@ -40,7 +40,7 @@ function c26302107.spop(e,tp,eg,ep,ev,re,r,rp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local spg=Duel.GetMatchingGroup(c26302107.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if spg:GetCount()<=0 then return end
local sg=spg:GetFirst()
local sg=spg
if spg:GetCount()~=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=spg:Select(tp,1,1,nil)
......
......@@ -74,7 +74,7 @@ function c30680659.stfilter(c,tp)
return aux.IsCodeListed(c,3285552) and c:IsType(TYPE_FIELD) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function c30680659.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c30680659.stfilter,tp,LOCATION_DECK,0,1,1,nil,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(c30680659.stfilter,tp,LOCATION_DECK,0,1,nil,tp) end
end
function c30680659.sop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
......
......@@ -48,7 +48,7 @@ end
function c31588572.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local res=false
local res=0
if tc:IsType(TYPE_MONSTER) then
res=Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
if res~=0 then Duel.ConfirmCards(1-tp,tc) end
......
......@@ -58,7 +58,7 @@ function c32453837.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,1-tp,LOCATION_MZONE)
elseif sel==1 then
e:SetCategory(CATEGORY_DAMAGE)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,nil)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
end
end
function c32453837.ctop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -45,7 +45,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if not tc:IsRelateToEffect(e) then return end
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
local b2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
local res=false
local res=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3))
elseif b1 then
......
......@@ -75,7 +75,7 @@ end
function s.fstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_GRAVE,0,1,nil)
local mg1=Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_GRAVE,0,nil)
local res=Duel.IsExistingMatchingCard(s.ffilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
......@@ -94,7 +94,7 @@ function s.fstg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.fsop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.mfilter),tp,LOCATION_GRAVE,0,1,nil)
local mg1=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.mfilter),tp,LOCATION_GRAVE,0,nil)
local sg1=Duel.GetMatchingGroup(s.ffilter,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
......
......@@ -29,7 +29,7 @@ function c35960413.filter(c)
return c:IsFaceup() and c:IsDefense(600)
end
function c35960413.spcon(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c35960413.filter,tp,LOCATION_MZONE,0,1,nil)
local ct=Duel.GetMatchingGroupCount(c35960413.filter,tp,LOCATION_MZONE,0,nil)
return ct>0 and ct==Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
end
function c35960413.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -68,7 +68,7 @@ end
function c36239585.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local res=false
local res=0
if tc:IsType(TYPE_MONSTER) then
res=Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
if res~=0 then Duel.ConfirmCards(1-tp,tc) end
......
......@@ -40,7 +40,7 @@ function c43316238.spop(e,tp,eg,ep,ev,re,r,rp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local spg=Duel.GetMatchingGroup(c43316238.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if spg:GetCount()<=0 then return end
local sg=spg:GetFirst()
local sg=spg
if spg:GetCount()~=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=spg:Select(tp,1,1,nil)
......
......@@ -40,7 +40,7 @@ function c43694650.spop(e,tp,eg,ep,ev,re,r,rp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local spg=Duel.GetMatchingGroup(c43694650.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if spg:GetCount()<=0 then return end
local sg=spg:GetFirst()
local sg=spg
if spg:GetCount()~=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=spg:Select(tp,1,1,nil)
......
......@@ -54,7 +54,7 @@ function c51412776.checkop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c51412776.checkfilter,1,nil,1) then v=v+2 end
if v>0 then
local evp=({0,1,PLAYER_ALL})[v]
Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+51412776,nil,0,rp,ep,evp)
Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+51412776,e,0,rp,ep,evp)
end
end
function c51412776.thcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -40,7 +40,7 @@ function c52350806.spop(e,tp,eg,ep,ev,re,r,rp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local spg=Duel.GetMatchingGroup(c52350806.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if spg:GetCount()<=0 then return end
local sg=spg:GetFirst()
local sg=spg
if spg:GetCount()~=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=spg:Select(tp,1,1,nil)
......
......@@ -75,6 +75,6 @@ function c60514625.tkop(e,tp,eg,ep,ev,re,r,rp)
end
function c60514625.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,0,nil,60514626)
local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,60514626)
Duel.Destroy(g,REASON_EFFECT)
end
......@@ -25,7 +25,7 @@ function c6075533.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x2f) and c:IsType(TYPE_SYNCHRO)
end
function c6075533.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c6075533.cfilter,tp,LOCATION_MZONE,0,1,nil)
local g=Duel.GetMatchingGroup(c6075533.cfilter,tp,LOCATION_MZONE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
if chk==0 then return ct>=1 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil)
or ct>=2 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil)
......
......@@ -30,10 +30,10 @@ function c61976639.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c61976639.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c61976639.thfilter,tp,LOCATION_DECK,0,1,nil)
local g=Duel.GetMatchingGroup(c61976639.thfilter,tp,LOCATION_DECK,0,nil)
if Duel.IsExistingMatchingCard(c61976639.scchk,tp,LOCATION_MZONE,0,1,nil,0x152)
and Duel.IsExistingMatchingCard(c61976639.scchk,tp,LOCATION_MZONE,0,1,nil,0x153) then
local eg=Duel.GetMatchingGroup(c61976639.thfilter1,tp,LOCATION_DECK,0,1,nil)
local eg=Duel.GetMatchingGroup(c61976639.thfilter1,tp,LOCATION_DECK,0,nil)
g:Merge(eg)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
......@@ -51,7 +51,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SendtoHand(g,nil,REASON_EFFECT)<1 then return end
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
local tg=Duel.GetMatchingGroup(s.gfilter,tp,LOCATION_DECK,0,1,nil)
local tg=Duel.GetMatchingGroup(s.gfilter,tp,LOCATION_DECK,0,nil)
if Duel.GetLP(tp)<Duel.GetLP(1-tp) and #g>0
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
......
......@@ -40,7 +40,7 @@ function c70711847.spop(e,tp,eg,ep,ev,re,r,rp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local spg=Duel.GetMatchingGroup(c70711847.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if spg:GetCount()<=0 then return end
local sg=spg:GetFirst()
local sg=spg
if spg:GetCount()~=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=spg:Select(tp,1,1,nil)
......
......@@ -53,9 +53,6 @@ function c75952542.sttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(75952542,0))
Duel.SelectTarget(tp,c75952542.stfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
end
function c75952542.seqfilter(c,seq)
return c:GetSequence()==seq
end
function c75952542.stop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and not tc:IsImmuneToEffect(e)) then return end
......
......@@ -18,7 +18,7 @@ function c78663366.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c78663366.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsControler(tp) and Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)~=0 then
if c:IsRelateToEffect(e) and c:IsControler(tp) and Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
......
......@@ -35,7 +35,7 @@ function c7987191.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
local g=Duel.GetMatchingGroup(c7987191.filter,tp,LOCATION_MZONE,0,1,1,nil)
local g=Duel.GetMatchingGroup(c7987191.filter,tp,LOCATION_MZONE,0,nil)
g:AddCard(c)
g:Merge(eg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,eg:GetCount()+1,0,0)
......@@ -44,7 +44,7 @@ function c7987191.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
local g=Duel.GetMatchingGroup(c7987191.filter,tp,LOCATION_MZONE,0,1,1,nil)
local g=Duel.GetMatchingGroup(c7987191.filter,tp,LOCATION_MZONE,0,nil)
if c:IsRelateToEffect(e) then g:AddCard(c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:Select(tp,1,1,nil)
......
......@@ -38,7 +38,7 @@ function c83518674.spop(e,tp,eg,ep,ev,re,r,rp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local spg=Duel.GetMatchingGroup(c83518674.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if spg:GetCount()<=0 then return end
local sg=spg:GetFirst()
local sg=spg
if spg:GetCount()~=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=spg:Select(tp,1,1,nil)
......
......@@ -40,7 +40,7 @@ function c90807199.spop(e,tp,eg,ep,ev,re,r,rp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local spg=Duel.GetMatchingGroup(c90807199.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if spg:GetCount()<=0 then return end
local sg=spg:GetFirst()
local sg=spg
if spg:GetCount()~=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=spg:Select(tp,1,1,nil)
......
......@@ -99,7 +99,7 @@ function c94821366.costfilter(c)
end
function c94821366.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c94821366.costfilter,tp,LOCATION_GRAVE,0,1,nil) end
local rt=Duel.GetTargetCount(nil,tp,0,LOCATION_ONFIELD,1,nil)
local rt=Duel.GetTargetCount(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c94821366.costfilter,tp,LOCATION_GRAVE,0,1,rt,nil)
local cg=Duel.Remove(g,POS_FACEUP,REASON_COST)
......
......@@ -40,7 +40,7 @@ function c99745551.spop(e,tp,eg,ep,ev,re,r,rp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local spg=Duel.GetMatchingGroup(c99745551.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if spg:GetCount()<=0 then return end
local sg=spg:GetFirst()
local sg=spg
if spg:GetCount()~=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=spg:Select(tp,1,1,nil)
......
......@@ -1209,7 +1209,7 @@ function Auxiliary.FConditionMix(insf,sub,...)
local mg=g:Filter(Auxiliary.FConditionFilterMix,c,c,sub,concat_fusion,table.unpack(funs))
if gc then
if not mg:IsContains(gc) then return false end
Duel.SetSelectedCard(Group.FromCards(gc))
Duel.SetSelectedCard(gc)
end
return mg:CheckSubGroup(Auxiliary.FCheckMixGoal,#funs,#funs,tp,c,sub,chkfnf,table.unpack(funs))
end
......@@ -1223,7 +1223,7 @@ function Auxiliary.FOperationMix(insf,sub,...)
local concat_fusion=chkfnf&0x200>0
local sub=(sub or notfusion) and not concat_fusion
local mg=eg:Filter(Auxiliary.FConditionFilterMix,c,c,sub,concat_fusion,table.unpack(funs))
if gc then Duel.SetSelectedCard(Group.FromCards(gc)) end
if gc then Duel.SetSelectedCard(gc) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local sg=mg:SelectSubGroup(tp,Auxiliary.FCheckMixGoal,false,#funs,#funs,tp,c,sub,chkfnf,table.unpack(funs))
Duel.SetFusionMaterial(sg)
......
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